java.io.Serializable, javax.xml.transform.SourceLocator, Container, StaticContext, NamespaceResolverpublic class JAXPXPathStaticContext extends AbstractStaticContext implements StaticContext, NamespaceResolver, Container
XPathEvaluator| Constructor | Description |
|---|---|
JAXPXPathStaticContext(Configuration config) |
Create a StandaloneContext using a specific Configuration.
|
| Modifier and Type | Method | Description |
|---|---|---|
VariableReference |
bindVariable(StructuredQName qName) |
Bind a variable used in an XPath Expression to the XSLVariable element in which it is declared.
|
java.util.Set |
getImportedSchemaNamespaces() |
Get the set of imported schemas
|
javax.xml.namespace.NamespaceContext |
getNamespaceContext() |
Get the NamespaceContext that was set using
setNamespaceContext(javax.xml.namespace.NamespaceContext) |
NamespaceResolver |
getNamespaceResolver() |
Get a namespace resolver to resolve the namespaces declared in this static context.
|
SlotManager |
getStackFrameMap() |
Get the stack frame map containing the slot number allocations for the variables declared
in this static context
|
java.lang.String |
getURIForPrefix(java.lang.String prefix) |
Get the URI for a prefix, using the declared namespaces as
the context for namespace resolution.
|
java.lang.String |
getURIForPrefix(java.lang.String prefix,
boolean useDefault) |
Get the namespace URI corresponding to a given prefix.
|
javax.xml.xpath.XPathFunctionResolver |
getXPathFunctionResolver() |
|
javax.xml.xpath.XPathVariableResolver |
getXPathVariableResolver() |
Get the XPathVariableResolver
|
void |
importSchema(javax.xml.transform.Source source) |
Import a schema.
|
boolean |
isImportedSchema(java.lang.String namespace) |
Determine whether a Schema for a given target namespace has been imported.
|
java.util.Iterator |
iteratePrefixes() |
Get an iterator over all the prefixes declared in this namespace context.
|
void |
setNamespaceContext(javax.xml.namespace.NamespaceContext context) |
Supply the NamespaceContext used to resolve namespaces.
|
void |
setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver xPathFunctionResolver) |
|
void |
setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver resolver) |
Set an XPathVariableResolver.
|
addFunctionLibrary, declareCollation, getBaseURI, getCollation, getColumnNumber, getConfiguration, getDefaultCollationName, getDefaultElementNamespace, getDefaultFunctionNamespace, getExecutable, getFunctionLibrary, getHostLanguage, getLineNumber, getLocationMap, getLocationProvider, getNamePool, getPublicId, getSystemId, isAllowedBuiltInType, isInBackwardsCompatibleMode, issueWarning, makeEarlyEvaluationContext, replaceSubExpression, setBackwardsCompatibilityMode, setBaseURI, setConfiguration, setDefaultElementNamespace, setDefaultFunctionLibrary, setDefaultFunctionNamespace, setFunctionLibrary, setLocationMapgetExecutable, getHostLanguage, getLocationProvider, replaceSubExpressionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumnNumber, getLineNumber, getPublicId, getSystemIdgetBaseURI, getCollation, getConfiguration, getDefaultCollationName, getDefaultElementNamespace, getDefaultFunctionNamespace, getFunctionLibrary, getLineNumber, getLocationMap, getNamePool, getSystemId, isAllowedBuiltInType, isInBackwardsCompatibleMode, issueWarning, makeEarlyEvaluationContextpublic JAXPXPathStaticContext(Configuration config)
config - the Configuration. For schema-aware XPath expressions, this must be a SchemaAwareConfiguration.public void setNamespaceContext(javax.xml.namespace.NamespaceContext context)
public javax.xml.namespace.NamespaceContext getNamespaceContext()
setNamespaceContext(javax.xml.namespace.NamespaceContext)public SlotManager getStackFrameMap()
public void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver resolver)
resolver - A JAXP 1.3 XPathVariableResolverpublic javax.xml.xpath.XPathVariableResolver getXPathVariableResolver()
public void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver xPathFunctionResolver)
public javax.xml.xpath.XPathFunctionResolver getXPathFunctionResolver()
public java.lang.String getURIForPrefix(java.lang.String prefix)
throws XPathException
getURIForPrefix in interface StaticContextprefix - The prefixXPathException - if the prefix is not declaredpublic NamespaceResolver getNamespaceResolver()
StaticContextgetNamespaceResolver in interface StaticContextpublic java.lang.String getURIForPrefix(java.lang.String prefix,
boolean useDefault)
setNamespaceContext(javax.xml.namespace.NamespaceContext).getURIForPrefix in interface NamespaceResolverprefix - the namespace prefixuseDefault - true if the default namespace for elements and types is to be used when the
prefix is ""public java.util.Iterator iteratePrefixes()
setNamespaceContext(javax.xml.namespace.NamespaceContext) is an
instance of Saxon's NamespaceResolver class. In other cases the method throws an
UnsupportedOperationExceptioniteratePrefixes in interface NamespaceResolverjava.lang.UnsupportedOperationException - if the NamespaceContext object is not a NamespaceResolver.public final VariableReference bindVariable(StructuredQName qName) throws XPathException
bindVariable in interface StaticContextqName - XPathException - if no VariableResolver has been supplied.public void importSchema(javax.xml.transform.Source source)
throws SchemaException
source - A Source object identifying the schema document to be loadedSchemaException - if the schema contained in this document is invalidjava.lang.UnsupportedOperationException - if the configuration is not schema-awarepublic boolean isImportedSchema(java.lang.String namespace)
isImportedSchema in interface StaticContextnamespace - the target namespace in questionpublic java.util.Set getImportedSchemaNamespaces()
getImportedSchemaNamespaces in interface StaticContext