net.sf.saxon.style
Class UseWhenStaticContext
- Container, Serializable, SourceLocator, StaticContext, XSLTStaticContext
public class UseWhenStaticContext
This class implements the static context used for evaluating use-when expressions in XSLT 2.0
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 , setLocationMap |
UseWhenStaticContext
public UseWhenStaticContext(Configuration config,
NamespaceResolver namespaceContext)
Create a static context for evaluating use-when expressions
config
- the Saxon configurationnamespaceContext
- the namespace context in which the use-when expression appears
getImportedSchemaNamespaces
public Set getImportedSchemaNamespaces()
Get the set of imported schemas
- getImportedSchemaNamespaces in interface StaticContext
- a Set, the set of URIs representing the names of imported schemas
getSystemId
public String getSystemId()
Get the System ID of the container of the expression. This is the containing
entity (file) and is therefore useful for diagnostics. Use getBaseURI() to get
the base URI, which may be different.
- getSystemId in interface StaticContext
- getSystemId in interface AbstractStaticContext
getURIForPrefix
public String getURIForPrefix(String prefix)
throws XPathException
Get the URI for a namespace prefix. The default namespace is NOT used
when the prefix is empty.
- getURIForPrefix in interface StaticContext
isAllowedBuiltInType
public boolean isAllowedBuiltInType(BuiltInAtomicType type)
Determine whether a built-in type is available in this context. This method caters for differences
between host languages as to which set of types are built in.
- isAllowedBuiltInType in interface StaticContext
- isAllowedBuiltInType in interface AbstractStaticContext
type
- the supposedly built-in type. This will always be a type in the
XS or XDT namespace.
- true if this type can be used in this static context
isImportedSchema
public boolean isImportedSchema(String namespace)
Determine whether a Schema for a given target namespace has been imported. Note that the
in-scope element declarations, attribute declarations and schema types are the types registered
with the (schema-aware) configuration, provided that their namespace URI is registered
in the static context as being an imported schema namespace. (A consequence of this is that
within a Configuration, there can only be one schema for any given namespace, including the
null namespace).
- isImportedSchema in interface StaticContext