epubcheck
epubcheck copied to clipboard
Error in error message...
Consider this in the package file:
<manifest>
<item id="content_001" properties="scripted" fallback="#fallbackid" href="content_001.xhtml" media type="application/xhtml+xml" />
<item id="fallbackid" href="content_fallback.xhtml" media-type="application/xhtml+xml" />
<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml" />
</manifest>
Epubcheck flags an error because it should be fallback="fallbackid". However, the error message says:
ERROR(RSC-005): [...]: Error while parsing file: value of attribute "fallback" is invalid; must be an XML name without colons
The problem is not a colon, the problem is a hash mark...
I think this has been raised before. Epubcheck isn't telling you what you did wrong, as it only knows the pattern doesn't match. It's telling you what it expects: a non-colonized XML name (NCName).
Yeah, this message comes from the RelaxNG schema validator (Jing). We might be able to intercept it and reword it, if anyone can suggest a better wording.
Trying to make NCName human readable definitely seems to focus people on the comma being the issue.
Could it say "must be a valid ID reference (IDREF)", or is this a catch-all for all NCName validation?
I think it is a catch-all. I'll have to double check.
Yeah, this is a catch all, so it's difficult to intercept particular cases when this is raised to reword the message depending on the context.
I'm open to suggestion for something better than "an XML name without colons", but moving this out of v5.0.0 for now.