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

[poc] upgrade to latest XML resolver version #5461

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,21 @@ public void insertModeTrue() throws XMLDBException {
fail("should have failed");
} catch (XMLDBException ex) {
String msg = ex.getMessage();
if (!msg.contains("Cannot find the declaration of element 'schema'.")) {
if (!msg.contains("cvc-elt.1.a: Cannot find the declaration of element 'schema'.")) {
fail(msg);
}
}


// non resolvable namespace provided, should fail
try {
storeDocument("/db/true", "different.xml", different);
fail("should have failed");
} catch (XMLDBException ex) {
String msg = ex.getMessage();
if (!msg.contains("schema_reference.4: Failed to read schema document")) {
if (!msg.contains("cvc-elt.1.a: Cannot find the declaration of element 'asd:schema'")) {
fail(msg);
}
}

}

@Test
Expand All @@ -154,7 +152,6 @@ public void insertModeAuto() throws XMLDBException {
// namespace provided, valid document; should pass
storeDocument("/db/auto", "valid.xml", valid);


// namespace provided, invalid document, should fail
try {
storeDocument("/db/auto", "invalid.xml", invalid);
Expand All @@ -177,14 +174,7 @@ public void insertModeAuto() throws XMLDBException {
}

// non resolvable namespace provided, should fail
try {
storeDocument("/db/auto", "different.xml", different);
fail("should have failed");
} catch (XMLDBException ex) {
String msg = ex.getMessage();
if (!msg.contains("schema_reference.4: Failed to read schema document")) {
fail(msg);
}
}
storeDocument("/db/auto", "different.xml", different);
fail("schema https://www.w3.org/2001/XMLSchemaschema is missing, document should not be insertable");
}
}
5 changes: 3 additions & 2 deletions exist-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
<milton.version>1.8.1.3</milton.version>
<milton.servlet.version>1.8.1.3-jakarta5</milton.servlet.version>
<nekohtml.version>2.1.3</nekohtml.version>
<saxon.version>9.9.1-8</saxon.version>
<xmlresolver.version>5.2.3</xmlresolver.version>
<saxon.version>9.9.1-8</saxon.version>n>
<xmlresolver.version>6.0.11</xmlresolver.version>
<xmlunit.version>2.10.0</xmlunit.version>
<junit.version>4.13.2</junit.version>
<junit.platform.version>1.11.3</junit.platform.version>
Expand Down Expand Up @@ -854,6 +854,7 @@
<user.timezone>Europe/Berlin</user.timezone>
<java.locale.providers>JRE,CLDR,SPI</java.locale.providers>
<log4j.configurationFile>${project.build.testOutputDirectory}/log4j2.xml</log4j.configurationFile>
<xml.catalog.alwaysResolve>false</xml.catalog.alwaysResolve>
<log4j2.disableJmx>false</log4j2.disableJmx>
</systemPropertyVariables>
</configuration>
Expand Down
Loading