public class UseWhenStaticContext extends AbstractStaticContext implements XSLTStaticContext
usingDefaultFunctionLibrary
Constructor and Description |
---|
UseWhenStaticContext(Compilation compilation,
NamespaceResolver namespaceContext)
Create a static context for evaluating use-when expressions
|
Modifier and Type | Method and Description |
---|---|
Expression |
bindVariable(StructuredQName qName)
Bind a variable used in this element to its declaration
|
int |
getColumnNumber() |
Compilation |
getCompilation() |
DecimalFormatManager |
getDecimalFormatManager()
Get a DecimalFormatManager to resolve the names of decimal formats used in calls
to the format-number() function.
|
java.lang.String |
getDefaultCollationName()
Get the name of the default collation.
|
java.lang.String |
getDefaultFunctionNamespace()
Get the default function namespace
|
FunctionLibrary |
getFunctionLibrary()
Get the function library containing all the in-scope functions available in this static
context
|
java.util.Set<java.lang.String> |
getImportedSchemaNamespaces()
Get the set of imported schemas
|
int |
getLineNumber() |
NamespaceResolver |
getNamespaceResolver()
Get a namespace resolver to resolve the namespaces declared in this static context.
|
java.lang.String |
getPublicId() |
java.lang.String |
getSystemId()
Get the System ID of the container of the expression.
|
boolean |
isElementAvailable(java.lang.String qname)
Determine if an extension element is available
|
boolean |
isImportedSchema(java.lang.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(java.lang.String s,
Location locator)
Issue a compile-time warning
|
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
|
ItemType |
resolveTypeAlias(StructuredQName typeName)
Get type alias.
|
addFunctionLibrary, declareCollation, getConfiguration, getContainingLocation, getDefaultElementNamespace, getHostLanguage, getKeyManager, getPackageData, getRequiredContextItemType, getStaticBaseURI, getXPathVersion, makeEarlyEvaluationContext, setBackwardsCompatibilityMode, setBaseURI, setConfiguration, setContainingLocation, setDecimalFormatManager, setDefaultCollationName, setDefaultElementNamespace, setDefaultFunctionLibrary, setDefaultFunctionLibrary, setDefaultFunctionNamespace, setFunctionLibrary, setPackageData, setSchemaAware, setTypeAlias, setXPathLanguageLevel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration, getContainingLocation, getDefaultElementNamespace, getKeyManager, getPackageData, getRequiredContextItemType, getStaticBaseURI, getXPathVersion, makeEarlyEvaluationContext
public UseWhenStaticContext(Compilation compilation, NamespaceResolver namespaceContext)
compilation
- the package compilation episodenamespaceContext
- the namespace context in which the static expression appearspublic RetainedStaticContext makeRetainedStaticContext()
makeRetainedStaticContext
in interface StaticContext
makeRetainedStaticContext
in class AbstractStaticContext
public Compilation getCompilation()
public void issueWarning(java.lang.String s, Location locator)
issueWarning
in interface StaticContext
issueWarning
in class AbstractStaticContext
s
- The warning message. This should not contain any prefix such as "Warning".locator
- the location of the construct in question. May be null.public java.lang.String getSystemId()
getSystemId
in interface StaticContext
getSystemId
in class AbstractStaticContext
public Expression bindVariable(StructuredQName qName) throws XPathException
bindVariable
in interface StaticContext
qName
- the name of the variableVariableReference
, suitably initialized to refer to the corresponding variable declaration,
but in general it can be any expression which returns the variable's value when evaluated. In this version of the method,
the value of the variable is known statically, so the returned expression is a literal containing the variable's value.XPathException
- if the variable cannot be bound (has not been declared)public FunctionLibrary getFunctionLibrary()
getFunctionLibrary
in interface StaticContext
getFunctionLibrary
in class AbstractStaticContext
public java.lang.String getDefaultCollationName()
getDefaultCollationName
in interface StaticContext
getDefaultCollationName
in class AbstractStaticContext
public java.lang.String getDefaultFunctionNamespace()
getDefaultFunctionNamespace
in interface StaticContext
getDefaultFunctionNamespace
in class AbstractStaticContext
public boolean isInBackwardsCompatibleMode()
isInBackwardsCompatibleMode
in interface StaticContext
isInBackwardsCompatibleMode
in class AbstractStaticContext
public boolean isImportedSchema(java.lang.String namespace)
isImportedSchema
in interface StaticContext
namespace
- the target namespace in questionpublic java.util.Set<java.lang.String> getImportedSchemaNamespaces()
getImportedSchemaNamespaces
in interface StaticContext
public NamespaceResolver getNamespaceResolver()
getNamespaceResolver
in interface StaticContext
public DecimalFormatManager getDecimalFormatManager()
getDecimalFormatManager
in interface StaticContext
getDecimalFormatManager
in class AbstractStaticContext
public boolean isElementAvailable(java.lang.String qname) throws XPathException
isElementAvailable
in interface XSLTStaticContext
XPathException
- if the name is invalid or the prefix is not declaredpublic int getColumnNumber()
public java.lang.String getPublicId()
public int getLineNumber()
public ItemType resolveTypeAlias(StructuredQName typeName)
resolveTypeAlias
in interface StaticContext
resolveTypeAlias
in class AbstractStaticContext
typeName
- the name of the type aliasCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.