Evening Ben:
I have been testing the geotools ResourceId patch; and have a failure inside app-schema…
Judging from the console the following fails:
INFO: WFS DescribeFeatureType response:
<?xml version="1.0" encoding="UTF-8"?><xsd:schema elementFormDefault=“qualified” targetNamespace=“http://example.com” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>
<xsd:import namespace=“urn:cgi:xmlns:CGI:GeoSciML:2.0” schemaLocation=“http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd”/>
<xsd:include schemaLocation=“file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_FirstParentFeature/simpleContent.xsd”/>
<xsd:include schemaLocation=“file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_SecondParentFeature/simpleContent.xsd”/>
<xsd:import namespace=“http://www.opengis.net/om/1.0” schemaLocation=“http://schemas.opengis.net/om/1.0.0/observation.xsd”/>
</xsd:schema>
The checkDescribeFeatureType test that is failing is:
String targetNamespace = evaluate(“//@targetNamespace”, doc);
assertTrue(targetNamespace.length() > 0);
int numberOfReferences = omSchemaLocation != null ? 3 : 2;
int numberOfImports = getMatchingNodes(“//xsd:import”, doc).getLength();
int numberOfIncludes = getMatchingNodes(“//xsd:include”, doc).getLength();
assertEquals(numberOfReferences, numberOfImports + numberOfIncludes);
And we end up with the correct values of:
- numberOfImports = 2
- numberOfIncludes = 2
This is checked against numberOfReferences = 3 resulting in a failed test…
I have considered modifying your code test to actually count the numberOfReferences:
int numberOfReferences = 1; // geosciml.xsd assumed
numberOfReferences += (exSchemaOneLocation == null ? 0 : 1);
numberOfReferences += (exSchemaTwoLocation == null ? 0 : 1);
numberOfReferences += (omSchemaLocation == null ? 0 : 1);
I am not sure how any of this could be related to the ResourceId patch
–
Jody Garnett