com.saxonica.schema.sdoc
Class LSSchemaResolver

java.lang.Object
  extended by com.saxonica.schema.sdoc.LSSchemaResolver
All Implemented Interfaces:
Serializable, SchemaURIResolver

public class LSSchemaResolver
extends Object
implements SchemaURIResolver

This class is a SchemaURIResolver implemented as a wrapper around a JAXP LSResourceResolver

See Also:
Serialized Form

Constructor Summary
LSSchemaResolver(LSResourceResolver resolver, Configuration config)
           
 
Method Summary
 Source[] resolve(String targetNamespace, String baseURI, String[] locations)
          Resolve a URI identifying a schema document, given the target namespace URI and a set of associated location hints.
 void setConfiguration(Configuration config)
          Set the configuration information for use by the resolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LSSchemaResolver

public LSSchemaResolver(LSResourceResolver resolver,
                        Configuration config)
Method Detail

setConfiguration

public void setConfiguration(Configuration config)
Set the configuration information for use by the resolver

Specified by:
setConfiguration in interface SchemaURIResolver
Parameters:
config - the Saxon Configuration (which will always be an EnterpriseConfiguration)

resolve

public Source[] resolve(String targetNamespace,
                        String baseURI,
                        String[] locations)
                 throws XPathException
Resolve a URI identifying a schema document, given the target namespace URI and a set of associated location hints.

Specified by:
resolve in interface SchemaURIResolver
Parameters:
targetNamespace - the target namespaces of the module to be imported. The "null namesapce" is identified by a zero-length string. In the case of an xsd:include directive, where no target namespace is specified, the parameter is null.
baseURI - The base URI of the module containing the "import schema" declaration; null if no base URI is known
locations - The set of URIs identified as schema location hints. In most cases (xsd:include, xsd:import, xsi:schemaLocation, xsl:import-schema) there is only one URI in this list. With an XQuery "import module" declaration, however, a list of URIs may be specified.
Returns:
an array of Source objects each identifying a schema document to be loaded. These need not necessarily correspond one-to-one with the location hints provided.
Throws:
XPathException - if the module cannot be located, and if delegation to the default module resolver is not required.


Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.