Skip to content
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

Error in error message... #1344

Open
iherman opened this issue Aug 3, 2022 · 7 comments
Open

Error in error message... #1344

iherman opened this issue Aug 3, 2022 · 7 comments
Assignees
Labels
priority: low To be processed when time allows status: in discussion The issue is being discussed by the development team type: improvement The issue suggests an improvement of an existing feature

Comments

@iherman
Copy link
Member

iherman commented Aug 3, 2022

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...

@mattgarrish
Copy link
Member

mattgarrish commented Sep 1, 2022

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).

@rdeltour
Copy link
Member

rdeltour commented Sep 1, 2022

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.

@rdeltour rdeltour self-assigned this Sep 1, 2022
@rdeltour rdeltour added type: improvement The issue suggests an improvement of an existing feature priority: low To be processed when time allows status: in discussion The issue is being discussed by the development team labels Sep 1, 2022
@mattgarrish
Copy link
Member

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?

@rdeltour
Copy link
Member

rdeltour commented Sep 5, 2022

I think it is a catch-all. I'll have to double check.

@rdeltour rdeltour added this to the v5.0.0 milestone Dec 8, 2022
@rdeltour rdeltour modified the milestones: v5.0.0, v5.0.0-rc Dec 30, 2022
@rdeltour
Copy link
Member

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.

@rdeltour rdeltour removed this from the v5.0.0-rc milestone Dec 31, 2022
@gautierchomel
Copy link

I ran into this misleading message for an ID starting with a number and was unable to identify the error.

I suggest naming the expected standard so one can search and find it.

"XML Namespace NCName compliant is expected"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low To be processed when time allows status: in discussion The issue is being discussed by the development team type: improvement The issue suggests an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants