woodstox icon indicating copy to clipboard operation
woodstox copied to clipboard

'Element <root> has no attribute "verbose"' not thrown from RepairingNsStreamWriter when validating against a DTD schema

Open ppalaga opened this issue 5 months ago • 1 comments

The same scenario is passing for ValidatingStreamReader in the following test:

https://github.com/FasterXML/woodstox/blob/5ba99cd1efde98280700469f6392f7341fce3eb3/src/test/java/wstxtest/vstream/TestInvalidAttributeValue.java#L21-L56

When the test is adapted for SimpleNsStreamWriter it still works.

But when the test is adapted for RepairingNsStreamWriter it does not work anymore.

The PR with a reproducer follows.

ppalaga avatar Jan 13 '24 16:01 ppalaga

RepairingNsStreamWriter perhaps has a general problem with attribute access, because it does not see a required attribute that is set in the input document. This can be reproduced by adapting wstxtest.vstream.TestRelaxNG.testPartialValidationOk() a reproducer PR follows.

ppalaga avatar Jan 13 '24 18:01 ppalaga