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 in SVG content documents: bare minimum #1358

Closed
murata2makoto opened this issue Oct 26, 2020 · 7 comments
Closed
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Topic-XML The issue affects XML processing

Comments

@murata2makoto
Copy link
Contributor

murata2makoto commented Oct 26, 2020

I understand that some SVG editors create this document type declaration:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

Do people want to allow something else? Different public identifiers are obviously bad, since they mean "I'm not SVG". The absence of system identifiers is fine. But does somebody want to allow different system identifiers? A sensible reason is to declare internal or external parsed entities in your external DTD subset. But such an external DTD subset should not have "-//W3C//DTD SVG 1.1//EN" as the public identifier.

If we allow the above and

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN">

and nothing else, we do not have to worry about possible definitions of parsed entities in external DTD subsets and external parameter entities.

@murata2makoto
Copy link
Contributor Author

I forgot to mention internal DTD subsets. They should be allowed since they have been allowed by EPUB3,

@iherman
Copy link
Member

iherman commented Oct 26, 2020

I believe the only DTD-s that we should allow are the one in the SVG specification (the one you use in your starting example).

@murata2makoto
Copy link
Contributor Author

@iherman

Both the system identifier and the public identifier?

@iherman
Copy link
Member

iherman commented Oct 26, 2020

To be very pragmatic: whatever makes the authors', checkers', and RS implementers' life easier; the goal is to ignore those anyway. The SVG specification refers to

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

in all its examples, for example, I bet this is the DTD string all tools use. I do not know whether any of the other forms that you refer to has any practical value.

@murata2makoto
Copy link
Contributor Author

As shown in #1354, we have allowed internal subsets and do not have any reasons to disallow them. Let me make a proposal.

  • A document type declaration [XML] in an SVG content document MUST NOT specify external identifiers except when it specifies "-//W3C//DTD SVG 1.1//EN" as a public identifier and also specifies "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" as a system identifier. Note: This restriction does not allow declarations of external parsed entities or external parameter entities in the internal DTD subset of an SVG content document.

@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
Copy link
Member

iherman commented Nov 6, 2020

@wareid I believe this issue can also be closed

@dauwhe dauwhe closed this as completed Nov 6, 2020
@mattgarrish mattgarrish added EPUB33 Issues addressed in the EPUB 3.3 revision and removed EPUB33 Issues addressed in the EPUB 3.3 revision labels Nov 9, 2020
@mattgarrish mattgarrish added the EPUB33 Issues addressed in the EPUB 3.3 revision label Sep 14, 2022
@mattgarrish mattgarrish added the Topic-XML The issue affects XML processing label Oct 4, 2022
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 Topic-XML The issue affects XML processing
Projects
None yet
Development

No branches or pull requests

4 participants