|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.sf.saxon.Configuration
|
+--com.saxonica.validate.SchemaAwareConfiguration
A subclass of Configuration that defines a schema-aware processor. This contains helper methods invoked both at compile time and at run-time to perform operations that are allowed only in a schema-aware processor; the superclass Configuration contains the dummy versions of these methods used in a non-schema-aware processor. The interface is designed so that the calling classes contain no references to classes that are available only in the schema-aware product.
| Field Summary |
| Fields inherited from class net.sf.saxon.Configuration |
DO_NOT_RECOVER, RECOVER_SILENTLY, RECOVER_WITH_WARNINGS, XQUERY, XSLT |
| Constructor Summary | |
SchemaAwareConfiguration()
|
|
| Method Summary | |
void |
addSchema(SchemaMarker schema)
Add a schema to the cache |
void |
addSchema(javax.xml.transform.Source schemaSource)
Load a schema, which will be available for use by all subsequent operations using this TransformerFactory. |
void |
displayLicenseMessage()
Display a message about the license status |
SchemaDeclaration |
getAttributeDeclaration(int fingerprint)
Get a global attribute declaration |
SchemaType |
getAttributeType(SchemaDeclaration attributeDecl)
Get the schema type corresponding to an attribute declaration |
ValidationContext |
getContainedValidationContext(ValidationContext outer,
int fingerprint,
boolean isType)
Get a validation context nested within an existing validation context (XQuery only) |
Receiver |
getDocumentValidator(Receiver receiver,
java.lang.String systemId,
NamePool namePool,
int validationMode)
Get a document-level validator to add to a Receiver pipeline |
SchemaDeclaration |
getElementDeclaration(int fingerprint)
Get a global element declaration |
SchemaType |
getElementType(SchemaDeclaration elementDecl)
Get the schema type corresponding to an element declaration |
Receiver |
getElementValidator(Receiver out,
int nameCode,
SchemaType schemaType,
int validation,
ValidationContext validationContext,
NamePool pool)
Get a Receiver that can be used to validate an element, and that passes the validated element on to a target receiver. |
java.lang.String |
getProductTitle()
Get a message used to identify this product when a transformation is run using the -t option |
SchemaMarker |
getSchema(java.lang.String namespace)
Get a schema from the cache. |
SchemaType |
getSchemaType(int fingerprint)
Get the top-level schema type with a given fingerprint. |
SuperSchema |
getSuperSchema()
Get the SuperSchema, containing references to all names defined in all known schemas |
boolean |
isSchemaAware()
Determine if the configuration is schema-aware |
NodeTest |
makeSubstitutionGroupTest(SchemaDeclaration elementDecl)
Make a test for elements corresponding to a give element declaration |
java.lang.String |
readSchema(java.lang.String baseURI,
java.lang.String schemaLocation,
java.lang.String expected)
Read a schema from a given schema location |
long |
validateAttribute(int nameCode,
java.lang.CharSequence value,
int validation)
Validate an attribute value (XSLT only) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SchemaAwareConfiguration()
| Method Detail |
public java.lang.String getProductTitle()
getProductTitle in class Configurationpublic final boolean isSchemaAware()
isSchemaAware in class Configurationpublic void displayLicenseMessage()
displayLicenseMessage in class Configuration
public java.lang.String readSchema(java.lang.String baseURI,
java.lang.String schemaLocation,
java.lang.String expected)
throws SchemaException
readSchema in class ConfigurationbaseURI - the base URI for resolving relative URIsschemaLocation - the location "hint" where to find the schema document. Must not be null.expected - the target namespace expected; null if there is no
expectation
SchemaException
public void addSchema(javax.xml.transform.Source schemaSource)
throws javax.xml.transform.TransformerException
addSchema in class ConfigurationschemaSource - the JAXP Source object identifying the schema document to be loaded
javax.xml.transform.TransformerException - if the schema cannot be read or parsed or if it is invalidpublic void addSchema(SchemaMarker schema)
addSchema in class Configurationpublic SchemaMarker getSchema(java.lang.String namespace)
getSchema in class Configurationpublic SuperSchema getSuperSchema()
public SchemaDeclaration getElementDeclaration(int fingerprint)
getElementDeclaration in class Configurationpublic SchemaDeclaration getAttributeDeclaration(int fingerprint)
getAttributeDeclaration in class Configurationpublic SchemaType getSchemaType(int fingerprint)
getSchemaType in class Configurationfingerprint - the fingerprint of the schema type
public Receiver getDocumentValidator(Receiver receiver,
java.lang.String systemId,
NamePool namePool,
int validationMode)
getDocumentValidator in class Configurationreceiver - The receiver to which events should be sent after validationsystemId - the base URI of the document being validatednamePool - the namePool to be used by the validatorvalidationMode - for example Validation.STRICT or Validation.STRIP
public Receiver getElementValidator(Receiver out,
int nameCode,
SchemaType schemaType,
int validation,
ValidationContext validationContext,
NamePool pool)
throws javax.xml.transform.TransformerException
getElementValidator in class Configurationout - the target receiver to receive the validated elementnameCode - the nameCode of the element to be validated. This must correspond to the
name of an element declaration in a loaded schemaschemaType - the schema type (typically a complex type) against which the element is to
be validatedvalidation - The validation mode, for example Validation.STRICT or Validation.LAXpool - The name pool
javax.xml.transform.TransformerException
public ValidationContext getContainedValidationContext(ValidationContext outer,
int fingerprint,
boolean isType)
throws XPathException
getContainedValidationContext in class ConfigurationXPathException
public long validateAttribute(int nameCode,
java.lang.CharSequence value,
int validation)
throws ValidationException
validateAttribute in class ConfigurationnameCode - the name of the attributevalue - the value of the attribute as a stringvalidation - STRICT or LAX
ValidationException - if the value is invalidpublic SchemaType getAttributeType(SchemaDeclaration attributeDecl)
getAttributeType in class Configurationpublic SchemaType getElementType(SchemaDeclaration elementDecl)
getElementType in class Configurationpublic NodeTest makeSubstitutionGroupTest(SchemaDeclaration elementDecl)
makeSubstitutionGroupTest in class Configuration
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||