Skip to content

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

Open
@ppalaga

Description

@ppalaga

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions