View Single Post
Old 07-02-2017, 05:12 PM   #4
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,806
Karma: 103362673
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by jhowell View Post
I don't know if this relates to your problem, but EPUB calls for SVG version 1.1 and you appear to have version 1.0 in your file.
I couldn't find a dia exporter with an option to select an SVG ouput version, and the w3c SVG validator didn't like the DTD in the SVG 1.0 files either. I edited the SVG version to 1.1 and changed the DTD to match the w3c SVG 1.1 DTG and every browser I tried rendered the figures at least as well as when they were labeled SVD 1.0, so I made a tip-toe of faith and checked a dozen or so against the w3c validator. All of them passed.

Quote:
Originally Posted by jhowell View Post
Added:

I ran your file though EPUBCHECK 4.0.2 and received the following errors:
Spoiler:
Code:
Validating using EPUB version 2.0.1 rules.
ERROR(OPF-029): progit-svg-xml-img-auto.epub(-1,-1): The file 'cover.jpg' does not appear to match the media type image/jpeg, as specified in the OPF file.
WARNING(PKG-022): progit-svg-xml-img-auto.epub/cover.jpg(-1,-1): Wrong file extension for image. The image is a 'png' file but has the file extension 'jpg'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(129,198): Error while parsing file 'attribute "smudge" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(129,198): Error while parsing file 'attribute "filter" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(129,198): Error while parsing file 'attribute "is" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(129,198): Error while parsing file 'attribute "run" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(129,198): Error while parsing file 'attribute "on" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(129,198): Error while parsing file 'attribute "checkout." not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "clean" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "filter" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "is" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "run" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "when" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "files" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "are" not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/progit_split_053.html(131,213): Error while parsing file 'attribute "staged." not allowed here; expected attribute "class", "dir", "id", "ismap", "lang", "longdesc", "style", "title", "usemap" or "xml:lang"'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/toc.ncx(14,71): Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/toc.ncx(20,71): Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/toc.ncx(38,71): Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/toc.ncx(56,71): Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'.
ERROR(RSC-005): progit-svg-xml-img-auto.epub/toc.ncx(62,71): Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'.
WARNING(OPF-003): progit-svg-xml-img-auto.epub(-1,-1): Item 'iTunesMetadata.plist' exists in the EPUB, but is not declared in the OPF manifest.


It looks like something went wrong in the file progit_split_053.html. There is content like:

Code:
<img width="100%"  height="auto" src="18333fig0702-tn.svg" alt="Figure 7-2. The " smudge="" filter="" is="" run="" on="" checkout.="" title="Figure 7-2. The " class="calibre6"/>
The problem with progit_split_053.html must have been a screw up in of nested quote conversion in the original conversion to epub with PNG figures. I think I've cleaned that up
(but did not attempt to quote smudge).

I think I've also fixed the problems related to PNG cover image, and the weird substitution of UUIDs for navpoint ids in the TOC.

I don't know if these changes fixed the epubcheck-4.0.2 complaints because it takes over an hour to get past all the "Unable to read file" errors. (It must spend a long time trying each svg file.) In case this might be a linux openJDK thing, I put epubcheck-4.0.2 on a server running solaris with java 1.8.0_45 which is grinding just as slowly with the same "Unable to read file" errors.

Android epub readers, except "Reader" on NookHD, still do not render the SVG figures. FBreader on linux desktop continues to work. I haven't rechecked Onyx M92, but assume that still does not work.

New version with SVG 1.1 figures and above other fixes attached to this message.

Added:

Well, it actually took 169 minutes for epubcheck to run, and the last thing it had to say was that I missed the cover image being referred to as jpg in titlepage.xhtml

I've fixed that and will try to replace the epub attached to this message. But of course that does not fix the failure of most epub reading apps to render the SVG figures. I hope the epub is now in good enough shape for epub experts to figure out what is going wrong.

Sorry for my mistakes.
Attached Files
File Type: epub progit-svg11-xml-img-auto.epub (1.86 MB, 537 views)

Last edited by j.p.s; 07-02-2017 at 07:18 PM. Reason: Add info regarding errors and replace epub upload
j.p.s is offline   Reply With Quote