Justin,

I have built and deployed schema packages for GML 3.2 and WFS 2.0 
(latest draft) and fixed AppSchemaValidator to work with them. To use 
AppSchemaValidator in unit tests, add to your pom:

<dependency>
     <groupId>org.geotools</groupId>
     <artifactId>gt-app-schema-resolver</artifactId>
     <version>${project.version}</version>
     <scope>test</scope>
</dependency>

gt-app-schema-resolver does not depend on gt-app-schema. One concern is 
that it is not yet in the base build (it will be soon, it is currently 
build by -Dall). We don't want extensions to depend on unsupported. You 
can use it for gml32 development if you have a gt-xsd-gml32 that is 
enabled by a profile.

Because the latest WFS 2.0 draft has no explicit dependence on GML of 
any version, you need to specify both GML 3.2 and WFS 2.0 as test 
dependencies so they are on the classpath and AppSchemaResolver can find 
them.

<dependency>
     <groupId>org.geotools.schemas</groupId>
     <artifactId>gml-3.2</artifactId>
     <version>3.2.1-1</version>
     <scope>test</scope>
</dependency>
<dependency>
     <groupId>org.geotools.schemas</groupId>
     <artifactId>wfs-2.0</artifactId>
     <version>2.0.0-1</version>
     <scope>test</scope>
</dependency>

You can then use AppSchemaValidator.validate(InputSource) to test schema 
validity against schemas on the classpath. It will throw a descriptive 
RuntimeException if schema validation fails.

See AppSchemaValidatorTest for examples.

Kind regards,

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to