mxp1988 / epubcheck

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

Misleading error message when invalid ID starts with a number #193

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When an ID attribute (I found the issue on the id attribute of an item in the 
OPF manifest) starts with an illegal character (a number, in my case), the 
error message given is 'value of attribute "id" is invalid; must be an XML name 
without colons'.

That's true, but made me think the issue is with colons in the name. It'd be 
nice if it was clearer about the issue; ideally giving the exact issue with the 
specific name. If it needs to be a single message for all cases, it'd be nice 
if it was rewritten for clarity - possibly "must be an XML name, and cannot 
contain colons", to emphasize there are two rules in play. Or actually 
mentioning the constraints on an XML name (or a URL to them).

Original issue reported on code.google.com by PeterSHa...@gmail.com on 28 Jun 2012 at 11:21

GoogleCodeExporter commented 8 years ago
This message is indeed suboptimal, but comes from Jing, so EpubCheck does not 
really have control over the message contents. I suggest you report this to the 
jing-trang project on google code instead. 

Original comment by markus.g...@gmail.com on 18 Jul 2012 at 3:12

GoogleCodeExporter commented 8 years ago
How is it correct that an id attribute cannot contain a colon?  As I understand 
it can be any opaque string: 
http://www.w3.org/TR/html5/dom.html#the-id-attribute

Original comment by benson.b...@gmail.com on 28 Dec 2012 at 8:36

GoogleCodeExporter commented 8 years ago
The same error message is generated when the id starts with a digit, which 
should be legal in HTML5.

Original comment by bobmy...@gmail.com on 8 Apr 2013 at 11:40

GoogleCodeExporter commented 8 years ago
I recognized this error as well, when having values like "0001" in ids of 
par-elements in smil-files.

According to the suggestion of project member markus.g... I filed an issue on 
the project-page of jing-trang:

https://code.google.com/p/jing-trang/issues/detail?id=174

Original comment by flie...@gmail.com on 28 Aug 2013 at 11:47