-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Notations declared in external DTD subsets are reported as undefined #184
Comments
Attached is a patch with a unit test that demonstrates this case and a potential fix: Issue_184_-_potential_fix_and_unit_test.patch.txt |
Thank you for reporting this issue. Interesting that this was not covered by the extensive XMLTest suite (I think maybe https://www.w3.org/XML/Test/ but it has been years) that had ~2000 tests, many focusing on DTD aspects. I hope to find time to at least get test integrated and then have a look at proposed solution. |
Attached is a new version of the patch that fixes a problem with parameter entity overrides (demonstrated in a unit test). To solve this the external subset is read twice, but there may be better ways to fix this. |
@nektarios-kitsios Apologies for slow follow up here. Would it be possible to split patch in two parts: one for unit tests, another for actual fix? I should be able to merge tests first (and move under |
As requested, split the patch in two parts: Issue_184_-_unit_tests.patch.txt |
Thank you! |
Validation fails with the error below when a NOTATION that is declared in an external DTD subset is referenced in an internal DTD subset:
The following example demonstrates this problem:
XML:
DTD:
Note that Xerces and xmllint validate the above XML successfully. This is in accordance with the XML specification which does not impose any specific order in the declarations. The only requirement is the following:
The problem seems to be that woodstox reads the internal subset before the external one, and reports the error at the time the internal subset is read when the notation declaration has not been read yet.
For the record there used to be an old issue reporting this problem here: https://web.archive.org/web/20150507153747/http://jira.codehaus.org/browse/WSTX-264
The text was updated successfully, but these errors were encountered: