public class ExpressionContext extends Object implements XSLTStaticContext
| Constructor and Description |
|---|
ExpressionContext(StyleElement styleElement,
StructuredQName attributeName)
Create a static context for XPath expressions in an XSLT stylesheet
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
bindVariable(StructuredQName qName)
Bind a variable to an object that can be used to refer to it
|
Configuration |
getConfiguration()
Get the system configuration
|
Location |
getContainingLocation()
Get the containing location of an XPath expression within the stylesheet
|
DecimalFormatManager |
getDecimalFormatManager()
Get a DecimalFormatManager to resolve the names of decimal formats used in calls
to the format-number() function.
|
String |
getDefaultCollationName()
Get the default collation.
|
String |
getDefaultElementNamespace()
Get the default XPath namespace for elements and types
Return NamespaceConstant.NULL for the non-namespace
|
String |
getDefaultFunctionNamespace()
Get the default function namespace
|
FunctionLibrary |
getFunctionLibrary()
Get the function library containing all the in-scope functions available in this static
context
|
Set<String> |
getImportedSchemaNamespaces()
Get the set of imported schemas
|
KeyManager |
getKeyManager()
Get the KeyManager, containing definitions of keys available for use.
|
NamespaceResolver |
getNamespaceResolver()
Get a copy of the NamespaceResolver suitable for saving in the executable code
|
StylesheetPackage |
getPackageData()
Get information about the containing package (unit of compilation)
|
ItemType |
getRequiredContextItemType()
Get the required type of the context item.
|
String |
getStaticBaseURI()
Get the Base URI of the element containing the expression, for resolving any
relative URI's used in the expression.
|
StyleElement |
getStyleElement()
Get the stylesheet element containing this XPath expression
|
String |
getSystemId()
Get the System ID of the entity containing the expression (used for diagnostics)
|
int |
getXPathVersion()
Get the XPath language level supported, as an integer.
|
boolean |
isElementAvailable(String qname)
Determine if an extension element is available
|
boolean |
isImportedSchema(String namespace)
Test whether a schema has been imported for a given namespace
|
boolean |
isInBackwardsCompatibleMode()
Determine whether Backwards Compatible Mode is used
|
boolean |
isSchemaAware()
Ask whether expressions compiled under this static context are schema-aware.
|
void |
issueWarning(String s,
Location locator)
Issue a compile-time warning
|
XPathContext |
makeEarlyEvaluationContext()
Construct a dynamic context for early evaluation of constant subexpressions
|
RetainedStaticContext |
makeRetainedStaticContext()
Construct a RetainedStaticContext, which extracts information from this StaticContext
to provide the subset of static context information that is potentially needed
during expression evaluation
|
public ExpressionContext(StyleElement styleElement, StructuredQName attributeName)
styleElement - the element on which the XPath expression appearsattributeName - the name of the attribute in which the XPath expression appears; or null
if the expression appears in a text nodepublic Configuration getConfiguration()
getConfiguration in interface StaticContextpublic StylesheetPackage getPackageData()
StaticContextgetPackageData in interface StaticContextpublic boolean isSchemaAware()
public XPathContext makeEarlyEvaluationContext()
makeEarlyEvaluationContext in interface StaticContextpublic RetainedStaticContext makeRetainedStaticContext()
makeRetainedStaticContext in interface StaticContextpublic Location getContainingLocation()
getContainingLocation in interface StaticContextpublic void issueWarning(String s, Location locator)
issueWarning in interface StaticContexts - The warning message. This should not contain any prefix such as "Warning".locator - the location of the construct in question. May be null.public String getSystemId()
getSystemId in interface StaticContextpublic String getStaticBaseURI()
getStaticBaseURI in interface StaticContextpublic NamespaceResolver getNamespaceResolver()
getNamespaceResolver in interface StaticContextpublic ItemType getRequiredContextItemType()
getRequiredContextItemType in interface StaticContextpublic DecimalFormatManager getDecimalFormatManager()
getDecimalFormatManager in interface StaticContextpublic Expression bindVariable(StructuredQName qName) throws XPathException
bindVariable in interface StaticContextqName - the name of the variableXPathException - if the variable has not been declaredpublic FunctionLibrary getFunctionLibrary()
getFunctionLibrary in interface StaticContextpublic boolean isElementAvailable(String qname) throws XPathException
isElementAvailable in interface XSLTStaticContextXPathException - if the name is invalid or the prefix is not declaredpublic String getDefaultCollationName()
getDefaultCollationName in interface StaticContextpublic String getDefaultElementNamespace()
getDefaultElementNamespace in interface StaticContextpublic String getDefaultFunctionNamespace()
getDefaultFunctionNamespace in interface StaticContextpublic boolean isInBackwardsCompatibleMode()
isInBackwardsCompatibleMode in interface StaticContextpublic int getXPathVersion()
getXPathVersion in interface StaticContextpublic boolean isImportedSchema(String namespace)
isImportedSchema in interface StaticContextnamespace - the target namespace of the required schemapublic Set<String> getImportedSchemaNamespaces()
getImportedSchemaNamespaces in interface StaticContextpublic KeyManager getKeyManager()
getKeyManager in interface StaticContextpublic StyleElement getStyleElement()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.