|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.sxpath.AbstractStaticContext
net.sf.saxon.style.UseWhenStaticContext
public class UseWhenStaticContext
This class implements the static context used for evaluating use-when expressions in XSLT 2.0 A new instance of this class is created for each use-when expression encountered; there are therefore no issues with reusability. The class provides a Container for the expression as well as the static context information; the Executable contains the single XPath expression only, and is created for the purpose.
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.sxpath.AbstractStaticContext |
|---|
usingDefaultFunctionLibrary |
| Constructor Summary | |
|---|---|
UseWhenStaticContext(Configuration config,
NamespaceResolver namespaceContext)
Create a static context for evaluating use-when expressions |
|
| Method Summary | |
|---|---|
Expression |
bindVariable(StructuredQName qName)
Bind a variable used in this element to the XSLVariable element in which it is declared |
StringCollator |
getCollation(String name)
Get a named collation. |
int |
getContainerGranularity()
Get the granularity of the container. |
DecimalFormatManager |
getDecimalFormatManager()
Get a DecimalFormatManager to resolve the names of decimal formats used in calls to the format-number() function. |
String |
getDefaultCollationName()
Get the name of the default collation. |
String |
getDefaultFunctionNamespace()
Get the default function namespace |
Executable |
getExecutable()
Get the Executable representing the containing XSLT stylesheet |
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 |
NamespaceResolver |
getNamespaceResolver()
Get a namespace resolver to resolve the namespaces declared in this static context. |
String |
getSystemId()
Get the System ID of the container of the expression. |
String |
getURIForPrefix(String prefix)
Get the URI for a namespace prefix. |
boolean |
isAllowedBuiltInType(BuiltInAtomicType type)
Determine whether a built-in type is available in this context. |
boolean |
isElementAvailable(String qname)
Determine if an extension element is available |
boolean |
isImportedSchema(String namespace)
Determine whether a Schema for a given target namespace has been imported. |
boolean |
isInBackwardsCompatibleMode()
Determine whether Backwards Compatible Mode is used |
void |
issueWarning(String s,
SourceLocator locator)
Issue a compile-time warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.expr.StaticContext |
|---|
getBaseURI, getConfiguration, getDefaultElementNamespace, getLineNumber, getLocationMap, getNamePool, getRequiredContextItemType, getXPathLanguageLevel, isSchemaAware, makeEarlyEvaluationContext |
| Methods inherited from interface net.sf.saxon.expr.Container |
|---|
getHostLanguage, getLocationProvider |
| Methods inherited from interface javax.xml.transform.SourceLocator |
|---|
getColumnNumber, getLineNumber, getPublicId |
| Constructor Detail |
|---|
public UseWhenStaticContext(Configuration config,
NamespaceResolver namespaceContext)
config - the Saxon configurationnamespaceContext - the namespace context in which the use-when expression appears| Method Detail |
|---|
public Executable getExecutable()
getExecutable in interface Container
public void issueWarning(String s,
SourceLocator locator)
issueWarning in interface StaticContextissueWarning in class AbstractStaticContexts - 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 SourceLocatorgetSystemId in interface StaticContextgetSystemId in class AbstractStaticContextpublic int getContainerGranularity()
getContainerGranularity in interface Container
public String getURIForPrefix(String prefix)
throws XPathException
getURIForPrefix in interface StaticContextprefix - The prefix
XPathException - if the prefix is not declared
public Expression bindVariable(StructuredQName qName)
throws XPathException
bindVariable in interface StaticContextqName - the name of the variable
VariableReference, suitably initialized to refer to the corresponding variable declaration,
but in general it can be any expression.
XPathExceptionpublic FunctionLibrary getFunctionLibrary()
getFunctionLibrary in interface StaticContextgetFunctionLibrary in class AbstractStaticContextpublic StringCollator getCollation(String name)
getCollation in interface StaticContextgetCollation in class AbstractStaticContextname - The name of the required collation. Supply null to get the default collation.
public String getDefaultCollationName()
getDefaultCollationName in interface StaticContextgetDefaultCollationName in class AbstractStaticContextpublic String getDefaultFunctionNamespace()
getDefaultFunctionNamespace in interface StaticContextgetDefaultFunctionNamespace in class AbstractStaticContextpublic boolean isInBackwardsCompatibleMode()
isInBackwardsCompatibleMode in interface StaticContextisInBackwardsCompatibleMode in class AbstractStaticContextpublic boolean isImportedSchema(String namespace)
isImportedSchema in interface StaticContextnamespace - the target namespace in question
public Set<String> getImportedSchemaNamespaces()
getImportedSchemaNamespaces in interface StaticContextpublic boolean isAllowedBuiltInType(BuiltInAtomicType type)
isAllowedBuiltInType in interface StaticContextisAllowedBuiltInType in class AbstractStaticContexttype - the supposedly built-in type. This will always be a type in the
XS or XDT namespace.
public NamespaceResolver getNamespaceResolver()
getNamespaceResolver in interface StaticContextpublic DecimalFormatManager getDecimalFormatManager()
getDecimalFormatManager in interface StaticContextgetDecimalFormatManager in class AbstractStaticContext
public boolean isElementAvailable(String qname)
throws XPathException
isElementAvailable in interface XSLTStaticContextXPathException - if the name is invalid or the prefix is not declared
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||