FasterXML / woodstox

The gold standard Stax XML API implementation. Now at Github.
Apache License 2.0
220 stars 81 forks source link

'Undefined ID' not thrown when validating with SimpleNsStreamWriter #189

Open ppalaga opened 5 months ago

ppalaga commented 5 months ago

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 commented 5 months ago

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