woodstox icon indicating copy to clipboard operation
woodstox copied to clipboard

'Undefined ID' not thrown when validating with SimpleNsStreamWriter

Open ppalaga opened this issue 5 months ago • 1 comments

There is a test validating the same scenario on the reader side in wstxtest.msv.TestW3CSchema.testSimpleNonNsUndefinedId():

https://github.com/FasterXML/woodstox/blob/b853557398f8242808cd415098360ce602c46042/src/test/java/wstxtest/msv/TestW3CSchema.java#L143-L151

There the validation exception containg Undefined ID 'm3' is thrown properly.

When the same test is adapted for SimpleNsStreamWriter the exception is not thrown.

A PR with the reproducer follows.

ppalaga avatar Jan 13 '24 14:01 ppalaga

The above is with W3CSchema. The same is reproducible with a RelaxNG schema. A reproducer follows.

ppalaga avatar Jan 13 '24 17:01 ppalaga