public final class EnterpriseConfiguration extends ProfessionalConfiguration
Applications should avoid using this class directly, and should instead access all the
necessary functionality through its superclass, Configuration.
Configuration.ApiProvider, Configuration.LicenseFeaturevendorFunctionSetbooleanFeatures, builtInExtensionLibraryList, byteCodeThreshold, collectionFinder, defaultStaticQueryContext, defaultXsltCompilerInfo, DO_NOT_RECOVER, JAVA_APPLICATION, optimizer, optimizerOptions, RECOVER_SILENTLY, RECOVER_WITH_WARNINGS, typeHierarchy, XML_SCHEMA, XML10, XML11, XPATH, XQUERY, XSD10, XSD11, xsdVersion, XSLT| Constructor and Description |
|---|
EnterpriseConfiguration()
Create an EnterpriseConfiguration
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSchema(PreparedSchema pschema)
Add a schema (a collection of schema components) to the cache
|
void |
addSchemaForBuiltInNamespace(java.lang.String namespace)
Add a built-in schema for a given namespace.
|
void |
addSchemaSource(javax.xml.transform.Source schemaSource,
javax.xml.transform.ErrorListener errorListener)
Load a schema, which will be available for use by all subsequent operations using
this EnterpriseConfiguration.
|
void |
addSurrogateSchema(java.lang.String namespace)
Put a temporary schema marker in the cache, to indicate that a schema for a given
namespace is being processed.
|
void |
checkLicensedFeature(int feature,
java.lang.String name,
int localLicenseId)
Check whether a particular feature is licensed, with a fatal error if it is not
|
void |
checkStrictStreamability(XSLTemplate template,
Expression body)
Check the streamability of a template rule
|
void |
checkTypeDerivationIsOK(SchemaType derived,
SchemaType base,
int block)
Check that a type is validly derived from another type, following the rules for the Schema Component
Constraint "Is Type Derivation OK (Simple)" (3.14.6) or "Is Type Derivation OK (Complex)" (3.4.6) as
appropriate.
|
void |
clearSchemaCache()
Remove all schema components that have been loaded into this Configuration.
|
RegularExpression |
compileRegularExpression(java.lang.CharSequence regex,
java.lang.String flags,
java.lang.String hostLanguage,
java.util.List<java.lang.String> warnings)
Compile a regular expression (or, in some configurations, get a compiled
regular expression from a cache
|
void |
createByteCodeReport(java.lang.String fileName)
Generate a report on byte code instrumentation to a specified file
|
InvalidityReportGeneratorEE |
createValidityReporter() |
void |
declareBuiltInExtensionElementNamespaces()
Declare the built-in XSLT extension element namespaces
|
void |
exportComponents(Receiver out)
Export a precompiled Schema Component Model containing all the components (except built-in components)
that have been loaded into this Processor.
|
Receiver |
getAnnotationStripper(Receiver destination)
Add to a pipeline a receiver that strips all type annotations.
|
SchemaDeclaration |
getAttributeDeclaration(int fingerprint)
Get a global attribute declaration by fingerprint
|
SchemaDeclaration |
getAttributeDeclaration(StructuredQName attributeName)
Get a global attribute declaration by name
|
FunctionLibraryList |
getBuiltInExtensionLibraryList() |
<T> T |
getConfigurationProperty(Feature<T> feature)
Get a property of the configuration
|
java.util.Collection<GlobalParam> |
getDeclaredSchemaParameters()
Get the set of saxon:param schema parameters declared in the schema held by this Configuration.
|
ContextItemStaticInfo |
getDefaultContextItemStaticInfo()
Get a default ContextItemStaticInfo, indication no information is available about the context item
type
|
Receiver |
getDocumentValidator(Receiver receiver,
java.lang.String systemId,
ParseOptions validationOptions,
Location initiatingLocation)
Get a document-level validator to add to a Receiver pipeline
|
java.lang.String |
getEditionCode()
Get the edition code identifying this configuration: "HE", "PE" or "EE"
|
SchemaDeclaration |
getElementDeclaration(int fingerprint)
Get a global element declaration by fingerprint
|
SchemaDeclaration |
getElementDeclaration(StructuredQName qName)
Get a global element declaration by name.
|
Receiver |
getElementValidator(Receiver receiver,
ParseOptions options,
Location location)
Get a Receiver that can be used to validate an element, and that passes the validated
element on to a target receiver.
|
java.util.Iterator<? extends SchemaType> |
getExtensionsOfType(SchemaType type)
Get the set of complex types that have been defined as extensions of a given type.
|
java.util.function.Function<SequenceIterator<?>,FocusTrackingIterator<?>> |
getFocusTrackerFactory(Executable exec,
boolean multithreaded)
Get a factory function that can be used to wrap a SequenceIterator in a FocusTrackingIterator.
|
java.util.Set<java.lang.String> |
getImportedNamespaces()
Get the set of namespaces of imported schemas
|
<F extends Item<?>,T extends Item<?>> |
getMultithreadedItemMappingIterator(SequenceIterator<F> base,
ItemMappingFunction<F,T> action)
Get an item mapping iterator suitable for multi-threaded execution, if this is permitted
|
MultithreadingFactory |
getMultithreadingFactory()
Get the factory class used to handle creation of objects that support multithreaded
execution.
|
int |
getNamespaceStatus(java.lang.String namespace)
Get the status of a particular schema namespace.
|
int[] |
getOccurrenceLimits()
Get the occurrence limits previously set using setOccurrenceLimits (or the default)
|
OptimizerOptions |
getOptimizerOptions()
Get the optimization options in use
|
int |
getResultDocumentThreadsLimit()
Get the number of threads to be used for xsl:result-document instructions
|
Function |
getSchemaAsFunctionItem()
Get information about the schema in the form of a function item.
|
Function |
getSchemaComponentAsFunctionItem(java.lang.String kind,
QNameValue name)
Get information about the schema in the form of a function item.
|
SchemaType |
getSchemaType(StructuredQName name)
Get the top-level schema type definition with a given QName.
|
SchemaURIResolver |
getSchemaURIResolver()
Get the user-defined SchemaURIResolver for resolving URIs used in "import schema"
declarations; if none has been explicitly set, returns the standard schema URI resolver.
|
int |
getStreamability()
Get the streamability rules to be applied.
|
PreparedSchema |
getSuperSchema()
Get the SuperSchema, containing references to all names defined in all
known schemas
|
TypeHierarchy |
getTypeHierarchy()
Get the TypeHierarchy: a cache holding type information
|
void |
importComponents(javax.xml.transform.Source source)
Import a precompiled Schema Component Model from a given Source.
|
boolean |
isDeclaredNotation(java.lang.String uri,
java.lang.String local)
Ask whether a given notation has been declared in the schema
|
boolean |
isDeferredByteCode(int hostLanguage)
Ask whether bytecode should be generated in Just-In-time compilation and therefore deferring the byte code generation.
|
boolean |
isGenerateByteCode(int hostLanguage)
Ask whether bytecode should be generated.
|
boolean |
isJITEnabled()
Ask whether just-in-time compilation of XSLT template rules is in force
|
boolean |
isSchemaAvailable(java.lang.String targetNamespace)
Determine whether the Configuration contains a cached schema for a given target namespace
|
boolean |
isSealedNamespace(java.lang.String namespace)
Test whether a schema namespace is sealed.
|
boolean |
isStreamedNode(NodeInfo node)
Ask whether a given node is a streamed node
|
AccumulatorRegistry |
makeAccumulatorRegistry()
Factory method to make the AccumulatorManager, used for static information
about the accumulators used in a particular package
|
Sequence<?> |
makeClosure(Expression expression,
int ref,
XPathContext context)
Make a Closure, given the expected reference count
|
CompilerInfo |
makeCompilerInfo()
Make an XSLT CompilerInfo object - can be overridden in a subclass to produce variants
capable of optimization
|
CompilerService |
makeCompilerService(int hostLanguage)
Make a CompilerService object, to handle byte code generation, or null if byte code
generation is not available
|
ContextItemStaticInfo |
makeContextItemStaticInfo(ItemType itemType,
boolean maybeUndefined)
Factory method to make a ContextItemStaticInfo
|
FilterFactory |
makeDocumentProjector(PathMap.PathMapRoot map)
Create a document projector for a given path map root.
|
FilterFactory |
makeDocumentProjector(XQueryExpression exp)
Create a document projector for the document supplied as the initial context item
in a query.
|
SimpleMode |
makeMode(StructuredQName modeName,
CompilerInfo compilerInfo)
Make a new Mode - this can be overridden in subclasses to produce optimized variants
|
PackageLoaderEE |
makePackageLoader() |
PipelineConfiguration |
makePipelineConfiguration()
Make a PipelineConfiguration from the properties of this Configuration
|
SchemaURIResolver |
makeSchemaURIResolver(javax.xml.transform.URIResolver resolver) |
GroundedValue<?> |
makeSequenceExtent(Expression expression,
int ref,
XPathContext context)
Make a SequenceExtent, given the expected reference count
|
SlotManager |
makeSlotManager()
Factory method to create a SlotManager.
|
protected StaticQueryContext |
makeStaticQueryContext(boolean copyFromDefault)
Make a new static query context object using the factory registered with this configuration
|
Receiver |
makeStreamingTransformer(XPathContext context,
Mode mode,
ParameterSet ordinaryParams,
ParameterSet tunnelParams)
Create a streaming transformer
|
Expression |
makeStreamInstruction(Expression hrefExp,
Expression body,
boolean streaming,
ParseOptions options,
PackageData packageData,
Location location,
RetainedStaticContext rsc) |
StyleNodeFactory |
makeStyleNodeFactory(Compilation compilation)
Factory method to make a StyleNodeFactory, used for constructing elements
in a stylesheet document
|
StylesheetPackage |
makeStylesheetPackage()
Factory method to make a StylesheetPackage
|
TemplateRuleEE |
makeTemplateRule()
Factory method to create a Template Rule
|
XPathContextMajor.ThreadManager |
makeThreadManager()
Make a ThreadManager for asynchronous xsl:result-document instructions
|
UserUnionType |
makeUserUnionType(java.util.List<AtomicType> memberTypes)
Make a union type with a given list of member types
|
XQueryExpression |
makeXQueryExpression(Expression exp,
QueryModule mainModule,
boolean streaming)
Factory method to make an XQueryExpression
|
protected void |
needEnterpriseEdition()
Throw an error indicating that a request cannot be satisfied because it requires
the enterprise edition of Saxon.
|
ExpressionPresenter |
newExpressionExporter(java.lang.String target,
java.io.OutputStream destination,
StylesheetPackage rootPackage)
Get a new ExpressionPresenter capable of exporting a compiled stylesheet
|
XPathParser |
newExpressionParser(java.lang.String language,
boolean updating,
int languageVersion)
Make an expression Parser for a specified version of XPath or XQuery
|
PendingUpdateList |
newPendingUpdateList()
Get a new Pending Update List
|
SchemaCompiler |
newSchemaCompiler()
Make a SchemaCompiler which can be used to compile schema documents.
|
UserFunction |
newUserFunction(boolean memoFunction,
FunctionStreamability streamability)
Make a UserFunction object.
|
ByteCodeMonitor |
obtainByteCodeMonitor()
Obtain a ByteCodeMonitor for monitoring hotspot bytecode generation
|
Optimizer |
obtainOptimizer()
Factory method to get an Optimizer
|
Optimizer |
obtainOptimizer(OptimizerOptions options)
Factory method to get an Optimizer with specified optimizer options.
|
void |
prepareValidationReporting(XPathContext context,
ParseOptions options)
Set validation reporting options.
|
void |
processResultDocument(ResultDocument instruction,
Expression content,
XPathContext context)
Process an xsl:result-document instruction.
|
protected Configuration |
readConfigurationFile(javax.xml.transform.Source source)
Read the configuration file an construct a new Configuration (the real one)
|
java.lang.String |
readInlineSchema(NodeInfo root,
java.lang.String expected,
javax.xml.transform.ErrorListener errorListener)
Read an inline schema from a stylesheet
|
void |
readMultipleSchemas(PipelineConfiguration pipe,
java.lang.String baseURI,
java.util.Collection<java.lang.String> schemaLocations,
java.lang.String expected)
Read schema documents from a list of schema locations
|
java.lang.String |
readSchema(PipelineConfiguration pipe,
java.lang.String baseURI,
java.lang.String schemaLocation,
java.lang.String expected)
Read a schema from a given schema location
|
void |
removeSchema(java.lang.String namespace)
Remove the schema for a given namespace.
|
void |
sealNamespace(java.lang.String namespace)
Mark a schema namespace as being sealed.
|
<T> void |
setConfigurationProperty(Feature<T> feature,
T value)
Set a property of the configuration.
|
protected void |
setLicensedFeatures() |
void |
setMultithreadingFactory(MultithreadingFactory factory)
Set a factory class to handle creation of objects that support multithreaded
execution.
|
void |
setNamespaceStatus(java.lang.String namespace,
int status)
Set the status of a particular schema namespace.
|
void |
setOccurrenceLimits(int minimum,
int maximum)
Set the occurrence limits to be used when compiling a finite state automaton.
|
void |
setParameterizedURIResolver()
Set the URIResolver to a URI resolver that allows query parameters after the URI,
and in the case of Saxon-EE, that inteprets the file extension .ptree
|
void |
setSchemaURIResolver(SchemaURIResolver resolver)
Set a user-defined SchemaURIResolver for resolving URIs used in "import schema"
declarations.
|
void |
setStreamability(int streamability)
Set the streamability rules to be applied.
|
protected boolean |
testFeature(int feature)
Determine if a particular feature is licensed.
|
SimpleType |
validateAttribute(StructuredQName nodeName,
java.lang.CharSequence value,
int validation)
Validate an attribute value (XSLT only)
|
addExtensionBinders, declareBuiltInExtensionFunctions, disableLicensing, displayLicenseMessage, externalObjectAsMap, forceLoadLicense, getExtensionBinder, getExtensionElementFactory, getFeature, getJavaExternalObjectType, getLicenseFeature, getSystemFunction, getUseWhenFunctionSet, getVendorFunctionSet, getXPath30FunctionSet, getXPath31FunctionSet, getXQueryUpdateFunctionSet, getXSLT30FunctionSet, importLicenseDetails, isExtensionElementAvailable, isFeatureAllowedBySecondaryLicense, isLicensedFeature, isLicenseFound, isLicenseNotFound, loadLicense, makeConfigurationReader, makeEvaluateInstruction, makeFunctionSequenceCoercer, makeMethodMap, makeObjectLookupExpression, makeProfessionalConfiguration, makeTypeAliasManager, registerLocalLicense, reportIfMissingLicenseFeature, resolveSource, setConfigurationProperty, setExtensionBinder, setExtensionElementNamespace, supplyLicenseKeyaddSchemaSource, buildDocument, buildDocument, buildDocumentTree, buildDocumentTree, close, createXMLParser, getBooleanProperty, getCharacterSetFactory, getClass, getCollation, getCollation, getCollation, getCollationURIResolver, getCollectionFinder, getCollectionURIResolver, getConfiguration, getConfigurationProperty, getConversionContext, getConversionRules, getCountDown, getDebugger, getDefaultCollationName, getDefaultCollection, getDefaultCountry, getDefaultLanguage, getDefaultRegexEngine, getDefaultSerializationProperties, getDefaultStaticQueryContext, getDefaultXsltCompilerInfo, getDocumentNumberAllocator, getDynamicLoader, getErrorListener, getExternalObjectModel, getExternalObjectModel, getExternalObjectModels, getFunctionAnnotationHandler, getGlobalDocumentPool, getInstance, getIntegratedFunctionLibrary, getLabel, getLocalizerFactory, getLogger, getMediaQueryEvaluator, getMediaTypeForFileExtension, getMessageEmitterClass, getModuleURIResolver, getNamePool, getOutputURIResolver, getParseOptions, getProcessor, getProductTitle, getRecoveryPolicy, getResourceFactoryForMediaType, getSchemaValidationMode, getSerializerFactory, getSourceParser, getSourceParserClass, getSourceResolver, getStandardErrorOutput, getStandardModuleURIResolver, getStyleParser, getStyleParserClass, getSystemURIResolver, getTraceListener, getTraceListenerClass, getTraceListenerOutputFile, getTreeModel, getTreeStatistics, getTypeChecker, getUnparsedTextURIResolver, getURIResolver, getValidCharacterChecker, getXMLVersion, getXsdVersion, init, instantiateClassName, instantiateConfiguration, internalSetBooleanProperty, isAssertionsEnabled, isCompatible, isCompileWithTracing, isExpandAttributeDefaults, isLineNumbering, isStripsAllWhiteSpace, isTiming, isValidation, isValidationWarnings, isVersionWarning, isXIncludeAware, loadSchema, locateResource, locateResourceSource, makeEmitter, makeLicensedConfiguration, makeNumberer, makeParser, makeSystemFunction, makeTraceListener, makeTraceListener, makeURIResolver, newConfiguration, newStaticQueryContext, obtainDefaultSerializationProperties, readConfiguration, readConfiguration, readConfigurationFile, registerCollation, registerCollection, registerExtensionFunction, registerExternalObjectModel, registerFileExtension, registerFunctionAnnotationHandler, registerMediaType, reportFatalError, requireBoolean, requireInteger, requireString, reuseSourceParser, reuseStyleParser, setBooleanProperty, setBooleanProperty, setCollationURIResolver, setCollectionFinder, setCollectionURIResolver, setCompileWithTracing, setConversionRules, setDebugger, setDefaultCollection, setDefaultCountry, setDefaultLanguage, setDefaultRegexEngine, setDefaultSerializationProperties, setDocumentNumberAllocator, setDynamicLoader, setErrorListener, setExpandAttributeDefaults, setLabel, setLineNumbering, setLocalizerFactory, setLogger, setMediaQueryEvaluator, setMessageEmitterClass, setModuleURIResolver, setModuleURIResolver, setNamePool, setOutputURIResolver, setProcessor, setRecoveryPolicy, setSchemaValidationMode, setSerializerFactory, setSourceParserClass, setSourceResolver, setStandardErrorOutput, setStaticQueryContextFactory, setStripsAllWhiteSpace, setStyleParserClass, setTiming, setTraceListener, setTraceListenerClass, setTraceListenerOutputFile, setTreeModel, setUnparsedTextURIResolver, setURIResolver, setValidation, setValidationWarnings, setVersionWarning, setXIncludeAware, setXMLVersion, unravelpublic EnterpriseConfiguration()
protected StaticQueryContext makeStaticQueryContext(boolean copyFromDefault)
ConfigurationmakeStaticQueryContext in class ConfigurationcopyFromDefault - true if the new static query context is to copy the properties
of the default static query context held in the configurationpublic java.lang.String getEditionCode()
getEditionCode in class ProfessionalConfigurationpublic <T> void setConfigurationProperty(Feature<T> feature, T value)
setConfigurationProperty in class ProfessionalConfigurationfeature - the property to be set. See the class Feature for
constants representing the properties that can be set.value - the value of the propertyjava.lang.IllegalArgumentException - if the property name is not recognized or if the value is not
a valid value for the named propertyprotected Configuration readConfigurationFile(javax.xml.transform.Source source) throws XPathException
readConfigurationFile in class Configurationsource - the source of the configuration fileXPathException - if, for example, the configuration file is invalidpublic <T> T getConfigurationProperty(Feature<T> feature)
getConfigurationProperty in class Configurationfeature - the required property. See the class Feature for
constants representing the property names that can be requested.java.lang.IllegalArgumentException - thrown if the property is not one that Saxon recognizes.public void checkLicensedFeature(int feature,
java.lang.String name,
int localLicenseId)
throws LicenseException
checkLicensedFeature in class ProfessionalConfigurationfeature - the feature in question, identified by a constant in class Configuration.LicenseFeaturename - the name of the required feature, for use in diagnosticslocalLicenseId - identifies a license key embedded in the SEF fileLicenseException - if the feature is not licensedprotected void setLicensedFeatures()
setLicensedFeatures in class ProfessionalConfigurationprotected boolean testFeature(int feature)
Configuration.isLicensedFeature(int) which will load the license when necessary.testFeature in class ProfessionalConfigurationfeature - the feature in question, identified by a constant in class Configuration.LicenseFeatureprotected void needEnterpriseEdition()
needEnterpriseEdition in class Configurationpublic StyleNodeFactory makeStyleNodeFactory(Compilation compilation)
makeStyleNodeFactory in class ProfessionalConfigurationcompilation - the compilation episode (compiling one XSLT package)public StylesheetPackage makeStylesheetPackage()
makeStylesheetPackage in class Configurationpublic AccumulatorRegistry makeAccumulatorRegistry()
makeAccumulatorRegistry in class Configurationpublic FunctionLibraryList getBuiltInExtensionLibraryList()
getBuiltInExtensionLibraryList in class ProfessionalConfigurationpublic UserFunction newUserFunction(boolean memoFunction, FunctionStreamability streamability)
newUserFunction in class ProfessionalConfigurationmemoFunction - true if the function is to be a memo function, This option is ignored
in Saxon-HE.streamability - the declared streamability of the functionpublic TypeHierarchy getTypeHierarchy()
getTypeHierarchy in class ProfessionalConfigurationpublic void setParameterizedURIResolver()
setParameterizedURIResolver in class Configurationpublic void setSchemaURIResolver(SchemaURIResolver resolver)
resolver - the URI resolver used for import schema declarationspublic InvalidityReportGeneratorEE createValidityReporter()
createValidityReporter in class Configurationpublic PackageLoaderEE makePackageLoader()
makePackageLoader in class ProfessionalConfigurationpublic SchemaCompiler newSchemaCompiler()
public void setOccurrenceLimits(int minimum,
int maximum)
minimum - The highest value of minOccurs that will be strictly enforced. If the actual
value of minOccurs in a schema is higher than this value, it will be treated as if this value
had been specified. The default is 100.maximum - The highest value of maxOccurs that will be strictly enforced. If the actual
value of maxOccurs in a schema is higher than this value, it will be treated as if "unbounded"
had been specified. The default is 250.public int[] getOccurrenceLimits()
public SchemaURIResolver getSchemaURIResolver()
public java.lang.String readSchema(PipelineConfiguration pipe, java.lang.String baseURI, java.lang.String schemaLocation, java.lang.String expected) throws SchemaException
readSchema in class Configurationpipe - the PipelineConfigurationbaseURI - the base URI for resolving relative URIsschemaLocation - the location "hint" where to find the schema document. Must not be null.
The document located may be either an XSD schema document or an SCM compiled schema.expected - the target namespace expected; null if there is no
expectationSchemaException - if the schema cannot be readpublic void readMultipleSchemas(PipelineConfiguration pipe, java.lang.String baseURI, java.util.Collection<java.lang.String> schemaLocations, java.lang.String expected) throws SchemaException
readMultipleSchemas in class Configurationpipe - the pipeline configurationbaseURI - the base URI for resolving relative URIsschemaLocations - the list of location "hints" where to find the schema document. Must not be null.expected - the target namespace expected in each of the schema documents; null if there is no
expected namespaceSchemaException - if an error occurspublic java.lang.String readInlineSchema(NodeInfo root, java.lang.String expected, javax.xml.transform.ErrorListener errorListener) throws SchemaException
readInlineSchema in class Configurationroot - the xs:schema element in the stylesheetexpected - the target namespace expected; "" if there is no
expectationerrorListener - The destination for error messages. May be null, in which case
the errorListener registered with this Configuration is used.SchemaException - if the schema cannot be processedpublic void addSchemaSource(javax.xml.transform.Source schemaSource,
javax.xml.transform.ErrorListener errorListener)
throws SchemaException
addSchemaSource in class ConfigurationschemaSource - the JAXP Source object identifying the schema document to be loaded. This may be either
a source schema document in XSD format, or a compiled schema in Saxon's SCM formaterrorListener - the ErrorListener to be notified of any errors in the schema. If null,
the configuration's errorListener is usedSchemaException - if the schema cannot be read or parsed or if it is invalidpublic void addSchema(PreparedSchema pschema) throws SchemaException
pschema - The schema to be addedSchemaException - if the schema cannot be added because components in the schema
are incompatible with components already in the cachepublic void addSurrogateSchema(java.lang.String namespace)
This method is intended for internal use
namespace - the target namespace of the schemapublic void addSchemaForBuiltInNamespace(java.lang.String namespace)
addSchemaForBuiltInNamespace in class Configurationnamespace - the namespace. Currently built-in schemas are available for the XML, XSI, and FN namespacespublic int getNamespaceStatus(java.lang.String namespace)
namespace - the Namespace URI whose status is required (supply "" for the non-namespace)PreparedSchema.NAMESPACE_KNOWN, PreparedSchema.NAMESPACE_UNKNOWN,
PreparedSchema.NAMESPACE_UNDER_CONSTRUCTION, PreparedSchema.NAMESPACE_SEALEDpublic void setNamespaceStatus(java.lang.String namespace,
int status)
namespace - the Namespace URI whose status is required (supply "" for the non-namespace)status - one of PreparedSchema.NAMESPACE_KNOWN, PreparedSchema.NAMESPACE_UNKNOWN,
PreparedSchema.NAMESPACE_UNDER_CONSTRUCTION, PreparedSchema.NAMESPACE_SEALEDpublic boolean isSchemaAvailable(java.lang.String targetNamespace)
isSchemaAvailable in class ConfigurationtargetNamespace - the target namespace of the schema being sought (supply "" for the
unnamed namespace)public void removeSchema(java.lang.String namespace)
namespace - the namespace of the schema to be removedpublic java.util.Set<java.lang.String> getImportedNamespaces()
getImportedNamespaces in class Configurationpublic PreparedSchema getSuperSchema()
public void sealNamespace(java.lang.String namespace)
sealNamespace in class Configurationnamespace - the namespace URI of the components to be sealedpublic boolean isSealedNamespace(java.lang.String namespace)
namespace - the namespace URI of the components to be tested. Supply "" for the no-namespace.public java.util.Collection<GlobalParam> getDeclaredSchemaParameters()
getDeclaredSchemaParameters in class Configurationpublic java.util.Iterator<? extends SchemaType> getExtensionsOfType(SchemaType type)
getExtensionsOfType in class Configurationtype - the type whose extensions are requiredpublic void importComponents(javax.xml.transform.Source source)
throws XPathException
importComponents in class Configurationsource - the XML file containing the schema component model, as generated by a previous call on
exportComponents(net.sf.saxon.event.Receiver)XPathException - if an error occurspublic void exportComponents(Receiver out) throws XPathException
exportComponents in class Configurationout - the destination to recieve the precompiled Schema Component Model in the form of an
XML documentXPathException - if a failure occurspublic void clearSchemaCache()
clearSchemaCache in class Configurationpublic Function getSchemaAsFunctionItem()
getSchemaAsFunctionItem in class Configurationpublic Function getSchemaComponentAsFunctionItem(java.lang.String kind, QNameValue name) throws XPathException
getSchemaComponentAsFunctionItem in class Configurationkind - the component kind, e.g. "element declaration"name - the component nameXPathException - if the first argument does not identify a valid kind of componentpublic SchemaDeclaration getElementDeclaration(int fingerprint)
getElementDeclaration in class Configurationfingerprint - the NamePool fingerprint of the element namepublic SchemaDeclaration getElementDeclaration(StructuredQName qName)
getElementDeclaration in class ConfigurationqName - the name of the required
element declarationpublic SchemaDeclaration getAttributeDeclaration(int fingerprint)
getAttributeDeclaration in class Configurationfingerprint - the NamePool fingerprint of the element namepublic SchemaDeclaration getAttributeDeclaration(StructuredQName attributeName)
getAttributeDeclaration in class ConfigurationattributeName - the name of the required attribute declarationpublic SchemaType getSchemaType(StructuredQName name)
getSchemaType in class Configurationname - the name of the required schema typepublic UserUnionType makeUserUnionType(java.util.List<AtomicType> memberTypes)
makeUserUnionType in class ConfigurationmemberTypes - the member typespublic boolean isDeclaredNotation(java.lang.String uri,
java.lang.String local)
isDeclaredNotation in interface NotationSetisDeclaredNotation in class Configurationuri - the targetNamespace of the notationlocal - the local part of the notation namepublic void checkTypeDerivationIsOK(SchemaType derived, SchemaType base, int block) throws SchemaException
checkTypeDerivationIsOK in class Configurationderived - the derived typebase - the base type; the algorithm tests whether derivation from this type is permittedblock - the derivations that are blocked by the relevant element declarationSchemaException - if the derivation is not allowedpublic void prepareValidationReporting(XPathContext context, ParseOptions options)
prepareValidationReporting in class Configurationcontext - the XPath evaluation contextoptions - the parser options, to be updatedpublic Receiver getDocumentValidator(Receiver receiver, java.lang.String systemId, ParseOptions validationOptions, Location initiatingLocation)
getDocumentValidator in class Configurationreceiver - The receiver to which events should be sent after validationsystemId - the base URI of the document being validatedvalidationOptions - Supplies options relevant to XSD validationinitiatingLocation - (optional) Location in query or stylesheet of instruction
that requested validationpublic Receiver getElementValidator(Receiver receiver, ParseOptions options, Location location) throws XPathException
getElementValidator in class Configurationreceiver - the target receiver to receive the validated element; its pipelineConfiguration
must be initialized.options - options affecting the way schema validation is donelocation - identifies the location of the element within its source document (or, if
preferred, the location of the instruction requesting validation), relative to the LocationProvider
in the PipelineConfiguration of the receiverXPathException - if a validator for the element cannot be createdpublic SimpleType validateAttribute(StructuredQName nodeName, java.lang.CharSequence value, int validation) throws ValidationException, MissingComponentException
validateAttribute in class ConfigurationnodeName - the name of the attributevalue - the value of the attribute as a stringvalidation - STRICT or LAXValidationException - if the value is invalidMissingComponentExceptionpublic Receiver getAnnotationStripper(Receiver destination)
getAnnotationStripper in class Configurationdestination - the Receiver that events will be written to after whitespace strippingpublic XPathParser newExpressionParser(java.lang.String language, boolean updating, int languageVersion) throws XPathException
newExpressionParser in class ProfessionalConfigurationlanguage - set to "XP" (XPath) or "XQ" (XQuery) or "PATTERN" (XSLT Patterns)updating - indicates whether or not XQuery update syntax may be used. Note that XQuery Update
is supported only in Saxon-EElanguageVersion - the required version (e.g 10 for "1.0", 30 for "3.0", 31 for "3.1"). In Saxon 9.8,
a request for XQuery 1.0 or 3.0 delivers an XQuery 3.1 parser, while the values
supported for XPath are 2.0 and 3.1XPathException - if this version of Saxon does not support the
requested optionspublic ExpressionPresenter newExpressionExporter(java.lang.String target, java.io.OutputStream destination, StylesheetPackage rootPackage) throws XPathException
newExpressionExporter in class Configurationtarget - the target environment, e.g. EE, JS, JS2destination - the destination for the output filerootPackage - the compiled stylesheet packageXPathException - if none is available (e.g. because this is not Saxon-EE)public PendingUpdateList newPendingUpdateList()
newPendingUpdateList in class Configurationpublic PipelineConfiguration makePipelineConfiguration()
makePipelineConfiguration in class Configurationpublic SchemaURIResolver makeSchemaURIResolver(javax.xml.transform.URIResolver resolver)
makeSchemaURIResolver in class Configurationpublic FilterFactory makeDocumentProjector(PathMap.PathMapRoot map)
makeDocumentProjector in class Configurationmap - a path map root in a path map. This might represent the call to the initial
context item for a query, or it might represent a call on the doc() function. The path map
contains information about the paths that the query uses within this document.java.lang.UnsupportedOperationException - if this is not a schema-aware configuration, or
if no Saxon-EE license is availablepublic FilterFactory makeDocumentProjector(XQueryExpression exp)
makeDocumentProjector in class Configurationexp - an XQuery expression. The document projector that is returned will
be for the document supplied as the context item to this query.java.lang.UnsupportedOperationException - if this is not a schema-aware configuration, or
if no Saxon-EE license is availablepublic java.util.function.Function<SequenceIterator<?>,FocusTrackingIterator<?>> getFocusTrackerFactory(Executable exec, boolean multithreaded)
Controller to get a default factory function; the value can be overridden
by the application using Controller.setFocusTrackerFactory(java.util.function.Function).
The FocusTrackingIterator that is created by the factory must be thread-safe if it is
to be used for iterating over a sequence where the items might be processed asynchronously using
xsl:result-document; for this reason this method is overridden for a Saxon-EE configuration.getFocusTrackerFactory in class Configurationexec - the executable; supplied so that the factory can be sensitive to whether calls on xsl:result-document
are possiblemultithreaded - set to true to get a factory suitable for creating focus tracking iterators for a
multi-threaded xsl:for-each instructionpublic void setStreamability(int streamability)
streamability - the streamability rules. With a plain Saxon-HE Configuration,
any value other than 0 causes an IllegalArgumentExceptionpublic int getStreamability()
getStreamability in class ConfigurationStreamability.OFF, or Streamability.STANDARDpublic Receiver makeStreamingTransformer(XPathContext context, Mode mode, ParameterSet ordinaryParams, ParameterSet tunnelParams) throws XPathException
makeStreamingTransformer in class Configurationcontext - the initial XPath contextmode - the initial mode, which must be a streaming modeordinaryParams - the parameters that are not tunnel parameterstunnelParams - the tunnel parametersXPathException - if a streaming transformer cannot be created (which
is always the case in Saxon-HE and Saxon-PE)public Expression makeStreamInstruction(Expression hrefExp, Expression body, boolean streaming, ParseOptions options, PackageData packageData, Location location, RetainedStaticContext rsc) throws XPathException
makeStreamInstruction in class ConfigurationXPathExceptionpublic void checkStrictStreamability(XSLTemplate template, Expression body) throws XPathException
checkStrictStreamability in class ConfigurationXPathExceptionpublic boolean isStreamedNode(NodeInfo node)
isStreamedNode in class Configurationnode - the node in questionpublic OptimizerOptions getOptimizerOptions()
getOptimizerOptions in class Configurationpublic Optimizer obtainOptimizer()
obtainOptimizer in class Configurationpublic Optimizer obtainOptimizer(OptimizerOptions options)
This method is intended for internal use only.
obtainOptimizer in class Configurationoptions - the optimizer optionspublic boolean isGenerateByteCode(int hostLanguage)
isGenerateByteCode in class ConfigurationhostLanguage - one of XSLT or XQUERYpublic boolean isDeferredByteCode(int hostLanguage)
isDeferredByteCode in class ConfigurationhostLanguage - one of XSLT or XQUERYpublic boolean isJITEnabled()
ConfigurationisJITEnabled in class Configurationpublic XQueryExpression makeXQueryExpression(Expression exp, QueryModule mainModule, boolean streaming) throws XPathException
makeXQueryExpression in class Configurationexp - the expression forming the body of the querymainModule - the query module containing the expressionstreaming - true if streamed execution is requestedXPathException - if an error occurspublic RegularExpression compileRegularExpression(java.lang.CharSequence regex, java.lang.String flags, java.lang.String hostLanguage, java.util.List<java.lang.String> warnings) throws XPathException
ConfigurationcompileRegularExpression in class Configurationregex - the regular expression as a stringflags - the value of the flags attributehostLanguage - one of "XSD10", "XSD11", XP20" or "XP30". Also allow combinations, e.g. "XP20/XSD11".warnings - if non-null, any warnings from the regular expression compiler will be added to this list.
If null, the warnings are ignored.XPathException - if the regular expression or the flags are invalidpublic SlotManager makeSlotManager()
ConfigurationThis method is provided for advanced users only, and is subject to change.
makeSlotManager in class Configurationpublic int getResultDocumentThreadsLimit()
public void processResultDocument(ResultDocument instruction, Expression content, XPathContext context) throws XPathException
processResultDocument in class Configurationinstruction - the instruction to be executedcontent - the expression that defines the content of the new result documentcontext - the evaluation contextXPathException - if any dynamic error occurspublic MultithreadingFactory getMultithreadingFactory()
public void setMultithreadingFactory(MultithreadingFactory factory)
factory - a MultithreadingFactory, which can be subclassed by advanced applicationspublic <F extends Item<?>,T extends Item<?>> SequenceIterator<T> getMultithreadedItemMappingIterator(SequenceIterator<F> base, ItemMappingFunction<F,T> action) throws XPathException
getMultithreadedItemMappingIterator in class Configurationbase - iterator over the input sequenceaction - mapping function to be applied to each item in the input sequence.XPathException - if (for example) a dynamic error occurs while priming the queuepublic Sequence<?> makeClosure(Expression expression, int ref, XPathContext context) throws XPathException
makeClosure in class Configurationexpression - the expression to be evaluatedref - the (nominal) number of times the value of the expression is requiredcontext - the XPath dynamic evaluation contextXPathException - if a failure occurs constructing the Closurepublic GroundedValue<?> makeSequenceExtent(Expression expression, int ref, XPathContext context) throws XPathException
makeSequenceExtent in class Configurationexpression - the expression to be evaluatedref - the (nominal) number of times the value of the expression is requiredcontext - the XPath dynamic evaluation contextXPathException - if evaluation of the expression failspublic void declareBuiltInExtensionElementNamespaces()
declareBuiltInExtensionElementNamespaces in class ProfessionalConfigurationpublic ContextItemStaticInfo makeContextItemStaticInfo(ItemType itemType, boolean maybeUndefined)
makeContextItemStaticInfo in class ConfigurationitemType - the item type of the context item. If the context item is absent, set this to
ErrorType.getInstance().maybeUndefined - set to true if it is possible (or certain) that the context item will be absent.public ContextItemStaticInfo getDefaultContextItemStaticInfo()
getDefaultContextItemStaticInfo in class Configurationpublic SimpleMode makeMode(StructuredQName modeName, CompilerInfo compilerInfo)
makeMode in class ProfessionalConfigurationmodeName - the name of the modecompilerInfo - information on the compiler, that can alter rule optimizationpublic TemplateRuleEE makeTemplateRule()
makeTemplateRule in class Configurationpublic XPathContextMajor.ThreadManager makeThreadManager()
makeThreadManager in class Configurationpublic CompilerInfo makeCompilerInfo()
makeCompilerInfo in class Configurationpublic CompilerService makeCompilerService(int hostLanguage)
makeCompilerService in class ConfigurationhostLanguage - for example Configuration.XSLTpublic ByteCodeMonitor obtainByteCodeMonitor()
public void createByteCodeReport(java.lang.String fileName)
createByteCodeReport in class ConfigurationfileName - the specified file nameCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.