public class StandaloneContext extends java.lang.Object implements StaticContext
| Constructor and Description |
|---|
StandaloneContext()
Create a StandaloneContext using the default NamePool
|
StandaloneContext(NamePool pool)
Create a StandaloneContext using a specific NamePool
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsKeyFunction()
Determine whether the key() function is permmitted in this context
|
Binding |
bindVariable(int fingerprint)
Bind a variable used in this element to the XSLVariable element in which it is declared
|
void |
declareNamespace(java.lang.String prefix,
java.lang.String uri)
Declare a namespace whose prefix can be used in expressions
|
boolean |
forwardsCompatibleModeIsEnabled()
Determine whether forwards-compatible mode is enabled
|
java.lang.String |
getBaseURI()
Get the Base URI of the stylesheet element, for resolving any relative URI's used
in the expression.
|
java.lang.Class |
getExternalJavaClass(java.lang.String uri)
Get an external Java class corresponding to a given namespace prefix, if there is
one.
|
int |
getFingerprint(java.lang.String qname,
boolean useDefault)
Make a fingerprint, using this Element as the context for namespace resolution
|
int |
getLineNumber()
Get the line number of the expression within that container
|
Function |
getStyleSheetFunction(int fingerprint) |
java.lang.String |
getSystemId()
Get the system ID of the container of the expression
|
java.lang.String |
getURIForPrefix(java.lang.String prefix)
Get the URI for a prefix, using this Element as the context for namespace resolution
|
java.lang.String |
getVersion()
Get the effective XSLT version in this region of the stylesheet
|
boolean |
isElementAvailable(java.lang.String qname)
Determine if an extension element is available
|
boolean |
isExtensionNamespace(short uriCode)
Determine whether a given URI identifies an extension element namespace
|
boolean |
isFunctionAvailable(java.lang.String qname)
Determine if a function is available
|
int |
makeNameCode(java.lang.String qname,
boolean useDefault)
Make a NameCode, using this Element as the context for namespace resolution
|
NamespaceTest |
makeNamespaceTest(short nodeType,
java.lang.String prefix)
Make a NamespaceTest, using this element as the context for namespace resolution
|
NameTest |
makeNameTest(short nodeType,
java.lang.String qname,
boolean useDefault)
Make a NameTest, using this element as the context for namespace resolution
|
StaticContext |
makeRuntimeContext(NamePool pool)
Copy the context with a different namepool.
|
public StandaloneContext()
public StandaloneContext(NamePool pool)
public void declareNamespace(java.lang.String prefix,
java.lang.String uri)
public StaticContext makeRuntimeContext(NamePool pool)
makeRuntimeContext in interface StaticContextpublic java.lang.String getSystemId()
getSystemId in interface StaticContextpublic java.lang.String getBaseURI()
getBaseURI in interface StaticContextpublic int getLineNumber()
getLineNumber in interface StaticContextpublic java.lang.String getURIForPrefix(java.lang.String prefix)
throws XPathException
getURIForPrefix in interface StaticContextprefix - The prefixXPathExceptionpublic final int makeNameCode(java.lang.String qname,
boolean useDefault)
throws XPathException
makeNameCode in interface StaticContextqname - The name as written, in the form "[prefix:]localname"XPathExceptionpublic final int getFingerprint(java.lang.String qname,
boolean useDefault)
throws XPathException
getFingerprint in interface StaticContextqname - The name as written, in the form "[prefix:]localname"XPathExceptionpublic NameTest makeNameTest(short nodeType, java.lang.String qname, boolean useDefault) throws XPathException
makeNameTest in interface StaticContextXPathExceptionpublic NamespaceTest makeNamespaceTest(short nodeType, java.lang.String prefix) throws XPathException
makeNamespaceTest in interface StaticContextXPathExceptionpublic Binding bindVariable(int fingerprint) throws XPathException
bindVariable in interface StaticContextfingerprint - The fingerprint of the variable nameXPathException - if the variable has not been declared, or if the context
does not allow the use of variablespublic boolean isExtensionNamespace(short uriCode)
isExtensionNamespace in interface StaticContextpublic boolean forwardsCompatibleModeIsEnabled()
forwardsCompatibleModeIsEnabled in interface StaticContextpublic Function getStyleSheetFunction(int fingerprint) throws XPathException
getStyleSheetFunction in interface StaticContextXPathExceptionpublic java.lang.Class getExternalJavaClass(java.lang.String uri)
getExternalJavaClass in interface StaticContexturi - The namespace URI corresponding to the prefix used in the function call.public boolean isElementAvailable(java.lang.String qname)
throws XPathException
isElementAvailable in interface StaticContextXPathExceptionpublic boolean isFunctionAvailable(java.lang.String qname)
throws XPathException
isFunctionAvailable in interface StaticContextXPathExceptionpublic boolean allowsKeyFunction()
allowsKeyFunction in interface StaticContextpublic java.lang.String getVersion()
getVersion in interface StaticContext