Class W3CMultiSchemaFactory

java.lang.Object
com.ctc.wstx.msv.W3CMultiSchemaFactory

public class W3CMultiSchemaFactory extends Object
This is a StAX2 schema factory that can parse and create schema instances for creating validators that validate documents to check their validity against specific W3C Schema instances. It requires Sun Multi-Schema Validator (http://www.sun.com/software/xml/developers/multischema/) to work (bundled by Woodstox, no need to add dependency separately, and acts as a quite thin wrapper layer, similar to how matching RelaxNG validator works.

Note: intentionally does NOT (claim to) implement XMLValidationSchemaFactory since interface (that is, createSchema(String, Map)) is not incompatible with that of other "standard" schema factories; means that usage must be explicit, direct and can not be triggered via Stax2 API.

Since:
6.2
Author:
Daniel Kulp
  • Constructor Details

    • W3CMultiSchemaFactory

      public W3CMultiSchemaFactory()
  • Method Details

    • createSchema

      public org.codehaus.stax2.validation.XMLValidationSchema createSchema(String baseURI, Map<String,Source> schemaSources) throws XMLStreamException
      Creates an XMLValidateSchema that can be used to validate XML instances against any of the schemas defined in the Map of schemaSources.
      Parameters:
      baseURI - Base URI for resolving dependant schemas
      schemaSources - Map of schemas, namespace to Source
      Throws:
      XMLStreamException