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

m:annotation-xml missing required attribute "name" #1024

Closed
francofaa opened this issue Mar 26, 2019 · 1 comment
Closed

m:annotation-xml missing required attribute "name" #1024

francofaa opened this issue Mar 26, 2019 · 1 comment
Assignees
Labels
spec: EPUB 3.2 Impacting the support of EPUB 3.2 status: accepted Ready to be further processed
Milestone

Comments

@francofaa
Copy link

ERROR(RSC-005): rog_9781319055783_EM_endpaper.xhtml(561,1055): Error while parsing file: element "m:annotation-xml" missing required attribute "name"

Searching around, I was able to find what I thought was the solution to my problem (https://www.idpf.org/epub/30/spec/epub30-contentdocs.html#sec-xhtml-mathml-conf-content), but this has not come up in previous versions of epubcheck.

After setting name to value contentequiv, I received another error:

Error while parsing file: value of attribute "name" is invalid; must be equal to "alternate-representation"

At this point I was able to resolve the issue and validate the epub.

My question is two-fold: Should this be flagged at this level of severity? Could the error report elaborate more on suggested values of attribute name?

And for my own edification, where is this requirement coming from?

@rdeltour
Copy link
Member

Hi @francofaa, thanks for the feedback.

Note: the restrictions on annotation-xml were just changed by the CG, see w3c/epub-specs#1212 and w3c/epub-specs#1249.

this has not come up in previous versions of epubcheck.

Right, this was introduced for v4.2.0 in 47d4926. We now need to tweak that to adapt to the latest changes mentioned above.

Should this be flagged at this level of severity?

The new rules now only say:

When Content MathML is included as per the previous condition, the given annotation-xml element's encoding attribute MUST be set to either of the functionally-equivalent values MathML-Content or application/mathml-content+xml, and its name attribute MUST be set to contentequiv.

So in your case (as far as I understand you have XHTML content in annotation-xml), there will be no restriction other than what is specified in HTML – i.e. the content model must be flow HTML content.

But if the annotation-xml contains Content MathML, the absence or incorrect value for the name attribute will still be reported as an ERROR, as this is a MUST in the spec.

Could the error report elaborate more on suggested values of attribute name?

Unfortunately this message is generated by the schema validator, so we cannot easily control the message details…

And for my own edification, where is this requirement coming from?

This was originally intended to restrict the element to fallback content, see the discussion in w3c/epub-specs#1212. But this point is moot now that this restriction has been removed in the spec :-)

@rdeltour rdeltour self-assigned this Mar 26, 2019
@rdeltour rdeltour added spec: EPUB 3.2 Impacting the support of EPUB 3.2 status: accepted Ready to be further processed labels Mar 26, 2019
@rdeltour rdeltour added this to the 4.2.0 milestone Mar 26, 2019
rdeltour added a commit that referenced this issue Mar 29, 2019
- Content MathML is still restricted by the rules in the spec:
  https://w3c.github.io/publ-epub-revision/epub32/spec/epub-contentdocs.html#sec-xhtml-mathml-conf-content
- Presentation MathML is allowed
- SVG is allowed
- MathML descendants are allowed in HTML annotations

Fix #1024
See also w3c/epub-specs#1212 and w3c/epub-specs#1249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec: EPUB 3.2 Impacting the support of EPUB 3.2 status: accepted Ready to be further processed
Projects
None yet
Development

No branches or pull requests

2 participants