New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complaints about inkscape, Sodipodi, etc attributes in SVG files #1147
Comments
They shouldn't. The use of foreign namespaces should have been fixed with #491 Are you using an older version of epubcheck by any chance? I haven't been able to reproduce the warnings with the latest, but could be something I'm not trying. |
I just now did a pull to make sure I have the latest of the master branch. I'm getting the same complaints. |
@DavidGriffith thanks for confirming. Would you be able to share a sample EBUB to help us reproduce and further investigate? |
Of course -- test.epub wrapped in a zip. |
I’m not able to reproduce with you file and EPUBCheck v4.2.2 🤔. Here’s what I get: EPUBCheck log
|
Those complaints about elements not being terminated properly or in the wrong place are from a bug in tex4ebook (michal-h21/tex4ebook#68) that I recently reported. I don't expect them to be relevant to this bug report. This is what I'm using:
Maybe I'm missing some library? It took a long time for me to figure out just what libraries are required. Doing
I can't figure out what to install to satisfy this. |
According to Synaptic Debian 10 (stable) uses epubcheck 4.1.0 Using a newer version from github within a specific directory it works with something like: |
Ah, this is an EPUB 2 issue with SVG. The test file didn't actually contain any SVG images, but when I added one I was able to reproduce the issue. |
Looks like we'd need to use a similar nvdl script to the epub 3 one -- just switch to sending the stripped file to validate against the svg 1.1 dtd. |
Debian includes a wrapper that allows one to simply execute a |
Looking at the test epub, things are working okay now except for the aforementioned tex4ebook errors. But my project wherein this problem first appeared, I still have trouble. Here's a second test epub prepared more carefully. |
See my comment above. The issue is that foreign namespaced elements and attributes aren't filtered out before validating the SVG against the 1.1 DTD. The DTD can't handle them. We fixed this problem for EPUB 3 by using an NVDL schema to strip foreign namespaces so that they aren't present in the validation step. The same needs to be implemented for EPUB 2 validation. |
Oh. I mistakenly thought you said it was fixed for epub2. My apologies. |
@DavidGriffith Thanks for the alert ! |
FYI, pull request #1150 will fix this problem. You'll still get errors about the flowRoot element, though, as EPUB 2 only supports SVG 1.1 (plus flowRoot died with SVG 1.2, so even an EPUB 3 file won't validate with it). |
This seems to clear up the trouble. I've stripped my SVG files of flowRoot by way of this: http://inkscape.13.x6.nabble.com/How-to-eliminate-aria-label-flowRoot-and-rdf-from-my-SVGs-td4981839.html and checked it over with Inkscape. When my document is built into an epub2 file, I get no errors. But when I generate an epub3 file, epubcheck complains like this:
I think the complaint about |
The elements title and desc in SVG are related to a text alternative for the parent element, for example if this is the most outside svg element, it represents the complete graphic. The attribute cellspacing is available for example in XHTML 1.1 (used in EPUB2), but not in HTML5 (EPUB3 uses the XML variant of this; here cellspacing is indicated to be obsolete, it is assumed, that it is decorative, therefore CSS can be used for the desired effect - because readability of table content can be much better, we need not to share this opinion of the recommendation authors, however, removed is removed, therefore not available anymore with all consequences). |
When I run a check on an epub I'm building by way of text4ebook (https://github.com/michal-h21/tex4ebook/) I get zillions of complaints like this:
Why do the presence of these attributes matter?
The text was updated successfully, but these errors were encountered: