Skip to content
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

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

Open
ppalaga opened this issue Jan 13, 2024 · 1 comment
Open

Comments

@ppalaga
Copy link
Contributor

ppalaga commented Jan 13, 2024

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

public void testSimpleNonNsUndefinedId() throws XMLStreamException
{
XMLValidationSchema schema = parseW3CSchema(SIMPLE_NON_NS_SCHEMA);
String XML = "<personnel><person id='a1'>"
+ "<name><family>F</family><given>G</given>"
+ "</name><link manager='m3' /></person></personnel>";
verifyFailure(XML, schema, "undefined referenced id ('m3')",
"Undefined ID 'm3'");
}

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
Copy link
Contributor Author

ppalaga commented Jan 13, 2024

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

ppalaga added a commit to ppalaga/woodstox that referenced this issue Jan 13, 2024
ppalaga added a commit to ppalaga/woodstox that referenced this issue Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant