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

DTD-Validation with no designated grammar #512

Open
xml-project opened this Issue Aug 28, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@xml-project
Contributor

xml-project commented Aug 28, 2018

We now have DTD-validation on p:document and p:load, but we do not say what happens, if the document to be validated designates no grammar.
In the XProc 1.0 specs (p:load) there was no rule for this case, but both processors raise an error. I propose to formalise this behaviour in XProc 3.0 by changing error message for XD0023. Currently it is:

It is a dynamic error if a DTD validation is performed and the document is not valid.

I propose:

It is a dynamic error if a DTD validation is performed and either the document is not valid or no DTD is found.

@xml-project xml-project self-assigned this Aug 28, 2018

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Aug 28, 2018

Contributor

In fact, p:load now says "If the dtd-validate parameter is true and the document has a doctype declaration, then DTD validation must be performed when parsing the document."

Rather than trying to repeat the rules under p:document, I wonder if we should point to the rules for p:load. (We may also need to clarify them there, but I'd prefer not to have them repeated unless we need to.)

Contributor

ndw commented Aug 28, 2018

In fact, p:load now says "If the dtd-validate parameter is true and the document has a doctype declaration, then DTD validation must be performed when parsing the document."

Rather than trying to repeat the rules under p:document, I wonder if we should point to the rules for p:load. (We may also need to clarify them there, but I'd prefer not to have them repeated unless we need to.)

@xml-project

This comment has been minimized.

Show comment
Hide comment
@xml-project

xml-project Aug 28, 2018

Contributor

@ndw Yes, you are right: I overlooked this. So I propose:

  1. Change XD0023 to

It is a dynamic error if a DTD validation is performed and either the document is not valid or no DTD is found.

  1. Remove "and the document has a doctype declaration" from

If the dtd-validate parameter is true and the document has a doctype declaration, then DTD validation must be performed when parsing the document."

Contributor

xml-project commented Aug 28, 2018

@ndw Yes, you are right: I overlooked this. So I propose:

  1. Change XD0023 to

It is a dynamic error if a DTD validation is performed and either the document is not valid or no DTD is found.

  1. Remove "and the document has a doctype declaration" from

If the dtd-validate parameter is true and the document has a doctype declaration, then DTD validation must be performed when parsing the document."

@xml-project

This comment has been minimized.

Show comment
Hide comment
@xml-project

xml-project Aug 28, 2018

Contributor

@eriksiegel BTW: Welcome back, Erik.

Contributor

xml-project commented Aug 28, 2018

@eriksiegel BTW: Welcome back, Erik.

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Sep 5, 2018

Contributor

👍

Contributor

ndw commented Sep 5, 2018

👍

@eriksiegel

This comment has been minimized.

Show comment
Hide comment
@eriksiegel

eriksiegel Sep 5, 2018

Contributor

dtd-validate =true means using a validting parser

Consequence is that documents without a DTD ref fail

Contributor

eriksiegel commented Sep 5, 2018

dtd-validate =true means using a validting parser

Consequence is that documents without a DTD ref fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment