nooyoo11 / epubcheck

Automatically exported from code.google.com/p/epubcheck
MIT License
1 stars 0 forks source link

Confusing Error for Adobe Illustrator-Generated SVGs with package version 3 #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PROBLEM:

Illustrator-Generated SVGs (1.1) generate the error: 'element "font-face" 
incomplete; expected element "desc", "font-face-src", "metadata" or "title" ' 
with every instance of font-face in an SVG. Only when being verified as EPUB 3.

METHOD:

1. Generated SVGs from PDFs in AI 5.1 or 6.0

2. Saved as 1.1, with 
   Fonts: SVG; 
   Only Glyphs Used; 
   Images embedded; 
   Style attributes (tried all others)
   Preserve Illustrator Editing: Disabled

3. Removed DOCTYPE line, which generated another error with EPUB 3

4. Use in EPUB 3, with declaration in .opf as media-type="image/svg+xml"

RESULT:

ERROR: /PATH_REDACTED/FILENAME.svg(LINE,COLUMN): element "font-face" 
incomplete; expected element "desc", "font-face-src", "metadata" or "title"

I tried correcting by adding one of the "expected" elements in turn, but each 
element generated its own error:

attribute "title (OR ONE OF THE OTHERS)" not allowed here; expected attribute 
"accent-height", "alphabetic", "ascent", "bbox", "cap-height", "descent", 
"font-size", "font-stretch", "font-style", "font-variant", "font-weight", 
"hanging", "id", "ideographic", "mathematical", "overline-position", 
"overline-thickness", "panose-1", "slope", "stemh", "stemv", 
"strikethrough-position", "strikethrough-thickness", "underline-position", 
"underline-thickness", "unicode-range", "units-per-em", "v-alphabetic", 
"v-hanging", "v-ideographic", "v-mathematical", "widths", "x-height", 
"xml:base", "xml:lang" or "xml:space"

EXPECTED:

No Error 

PLATFORM:

3.0 RC-1; Mac 10.6.8

ADDITIONAL INFO:

I would appreciate timely feedback of some sort, as submission of this project 
is being delayed by this error (and there are over 100 SVGs in this book, each 
with about 7 font-face elements), and it needs to be EPUB 3 for iBooks version 
updating.

Original issue reported on code.google.com by Richard.C.Gordon on 6 Nov 2012 at 7:24

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Richard,
I can confirm that the error is in EPUBCheck and not in your SVG files. It is 
clear as per section 20.8.3 of the SVG 1.1 spec 
(http://www.w3.org/TR/SVG/fonts.html#FontFaceElement) that font-face elements 
are allowed to be empty.

In r373, I have committed a fix, after which the sample file you attached 
passes as valid. 

(Note that this problem is caused by the RNC schema used for SVG 1.1 is based 
on a conversion from DTD which has caused problems like these to sneak in; we 
hope to be able to improve the schema in future releases of the epub spec.) 

Hope this note and r373 is sufficient for your submission to be completed; if 
not let me know if there are other ways I can help (the next release of 
epubcheck is at least a week away, but I can send you a sneak preview cut if it 
would help).

Original comment by markus.g...@gmail.com on 6 Nov 2012 at 8:12

GoogleCodeExporter commented 9 years ago
Thanks, Markus. Glad to hear it. A sneak preview would be welcome. I'm 
wondering if it may pose a problem if I submitted my ebook to Apple before it's 
gone through the pipes, since I think they validate using epubcheck as part of 
their acceptance process. Perhaps you know, or can suggest something. Thanks 
again for your quick reply to this. Now I won't waste any more time trying to 
fix it on my end,

Original comment by Richard.C.Gordon on 6 Nov 2012 at 10:38

GoogleCodeExporter commented 9 years ago
Fixed in r373

Original comment by markus.g...@gmail.com on 25 Nov 2012 at 10:18