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

Document type declarations for MathML? #1370

Closed
murata2makoto opened this issue Oct 27, 2020 · 9 comments
Closed

Document type declarations for MathML? #1370

murata2makoto opened this issue Oct 27, 2020 · 9 comments
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation

Comments

@murata2makoto
Copy link
Contributor

Do we need document type declarations for MathML? Since MathML is always embedded within an HTML content document, document type declarations for MathML are unusable. Do people agree?

This issue is to create § B. Allowed External Identifiers as proposed in #1368.

@mattgarrish
Copy link
Member

This is a tough one. Technically you can embed MathML even without it being listed as a core media type, the more I think about it.

The object element falls back to the html inside it, for example, so you should be able to include mathml files without epubcheck complaining.

I don't believe mathml will always render this way, but it might be useful to allow in the interests of letting people do as the please.

@murata2makoto
Copy link
Contributor Author

@mattgarrish

Just checking. Are you saying that MathML documents are allowed as spine items if fallback is specified?

@mattgarrish
Copy link
Member

mattgarrish commented Oct 28, 2020

Are you saying that MathML documents are allowed as spine items if fallback is specified?

Sure, I suppose that's yet another way they could appear in EPUB. But you can also embed them within an XHTML document using the object tag so long as you have an xhtml equivalent as a fallback, something like this:

<object data="equation.xml" type="application/mathml+xml">
   <div>2+2=4</div>
</object>

That's an intrinsic fallback for a foreign media type, after all.

@murata2makoto
Copy link
Contributor Author

@mattgarrish

MathML in object is possible, but this does not mean that the DTD for MathML can be referenced from the HTML document having the MathML subtree.

@mattgarrish
Copy link
Member

this does not mean that the DTD for MathML can be referenced from the HTML document having the MathML subtree.

Right, but the xml file containing the equation can, and these rules apply to any xml file type. That's why we might want to allow this.

@murata2makoto
Copy link
Contributor Author

murata2makoto commented Oct 28, 2020

Right, but the xml file containing the equation can, and these rules apply to any xml file type. That's why we might want to allow this.

Yes, you are right. Such a MathML document is not a spine item.

Do people expect that entities predefined by MathML are usable in such MathML documents?

@mattgarrish
Copy link
Member

Do people expect that entities predefined by MathML are usable in such MathML documents?

That I don't know, but I think we can remain consistent in disallowing them for use in EPUB, at least until the day comes when the HTML serialization is allowed.

I'd be curious if a browser would even render them, given they would be invalid if the math was embedded, but too late for me to test tonight.

@iherman
Copy link
Member

iherman commented Oct 28, 2020

But isn't it possible already today to include MathML as a data file in the EPUB instance (ie, not in the spine but listed in the manifest) and accessed, eg, via a javascript? The point is that MathML may be used to interchange mathematical formulae, not only for direct display. It is the same as, possibly, storing a CSV file or some other XML files.

@mattgarrish mattgarrish added Topic-ContentDocs The issue affects EPUB content documents Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation and removed Topic-ContentDocs The issue affects EPUB content documents labels Oct 30, 2020
@iherman
Copy link
Member

iherman commented Nov 6, 2020

This issue was discussed in a meeting.

  • RESOLVED: Merge PR #1368 to address outstanding DTD issues, and close GH issues 1369-1373
View the transcript Wendy Reid: we had resolutions at the F2F, and further discussions on github
… and came to a happy place
Matt Garrish: #1368
Matt Garrish: where we ended up was…
… we put in an allowance for a specific set of external identifiers that we have put in an appendix
… we have SVG and MathML that are allowed to be used in content docs or in separate files
… and we made a restriction against external entities in the internal DTD subset
… so it prevents some security issues but eases authoring
… so we’ll no longer force people to remove SVG DTDs from tool-generated files
… I’m hoping this is it :)
Ivan Herman: tech comment
… in fact, the changes are such that
… makes possible something that I’m not sure we really use
… I can define as part of an internal entity something that won’t go out to the network
… I’m not sure if this feature is in use
… formal comment
… there was a formal resolution on the previous version; this PR slightly changes that
… can we get a formal resolution to merge, and also close a bunch of issues which were examples of the problem?
Proposed resolution: Merge PR #1368 to address outstanding DTD issues, and close GH issues 1369-1373 (Wendy Reid)
Garth Conboy: +1
Matt Garrish: +1
Ivan Herman: +1
Charles LaPierre: +1
Matthew Chan: +1
Wendy Reid: +1
Brady Duga: +1
George Kerscher: +1
Laura Brady: +1
Bill Kasdorf: +1
Ben Schroeter: +1
Resolution #1: Merge PR #1368 to address outstanding DTD issues, and close GH issues 1369-1373

@iherman iherman closed this as completed Nov 6, 2020
@mattgarrish mattgarrish added the EPUB33 Issues addressed in the EPUB 3.3 revision label Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation
Projects
None yet
Development

No branches or pull requests

3 participants