com.saxonica.schema.sdoc

## Class SchemaElement.XPathStaticContext

- java.lang.Object
- - net.sf.saxon.sxpath.AbstractStaticContext
  - - net.sf.saxon.sxpath.IndependentContext
    - - net.sf.saxon.sxpath.DedicatedStaticContext
      - - com.saxonica.schema.sdoc.SchemaElement.XPathStaticContext

- All Implemented Interfaces:
    Serializable, SourceLocator, Container, StaticContext, NamespaceResolver, XPathStaticContext
  Enclosing class:
    SchemaElement

      protected class SchemaElement.XPathStaticContext
      extends DedicatedStaticContext

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.sxpath.IndependentContext

      `autoDeclare, externalResolver, importedSchemaNamespaces, namespaces, requiredContextItemType, variables`

    - ### Fields inherited from class net.sf.saxon.sxpath.AbstractStaticContext

      `usingDefaultFunctionLibrary`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SchemaElement.XPathStaticContext(Configuration config)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Executable` | `getExecutable()` Bind a variable reference appearing within an XPath expression
    `NamespaceResolver` | `getNamespaceResolver()` Get a Namespace resolver that can be used for run-time resolution of QNames appearing in the XPath expression
    `String` | `getURIForPrefix(String prefix)` Get the URI for a prefix, using the declared namespaces as the context for namespace resolution.
    `boolean` | `isSchemaAware()` Ask whether this static context is schema-aware

    - ### Methods inherited from class net.sf.saxon.sxpath.DedicatedStaticContext

      `setExecutable`

    - ### Methods inherited from class net.sf.saxon.sxpath.IndependentContext

      `bindVariable, clearAllNamespaces, clearNamespaces, declareNamespace, declareVariable, declareVariable, declareVariable, getContainerGranularity, getExternalVariable, getImportedSchemaNamespaces, getRequiredContextItemType, getSlotNumber, getStackFrameMap, getURIForPrefix, isAllowUndeclaredVariables, isImportedSchema, iterateExternalVariables, iteratePrefixes, setAllowUndeclaredVariables, setDefaultElementNamespace, setImportedSchemaNamespaces, setNamespaceResolver, setNamespaces, setRequiredContextItemType`

    - ### Methods inherited from class net.sf.saxon.sxpath.AbstractStaticContext

      `addFunctionLibrary, declareCollation, getBaseURI, getCollation, getCollationMap, getColumnNumber, getConfiguration, getDecimalFormatManager, getDefaultCollationName, getDefaultElementNamespace, getDefaultFunctionNamespace, getFunctionLibrary, getHostLanguage, getLineNumber, getLocationMap, getLocationProvider, getNamePool, getPublicId, getSystemId, getXPathLanguageLevel, isAllowedBuiltInType, isInBackwardsCompatibleMode, issueWarning, makeEarlyEvaluationContext, setBackwardsCompatibilityMode, setBaseURI, setCollationMap, setConfiguration, setDecimalFormatManager, setDefaultFunctionLibrary, setDefaultFunctionNamespace, setFunctionLibrary, setLocationMap, setSchemaAware, setXPathLanguageLevel`

    - ### 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.Container

      `getContainerGranularity, getHostLanguage, getLocationProvider`

    - ### Methods inherited from interface javax.xml.transform.SourceLocator

      `getColumnNumber, getLineNumber, getPublicId, getSystemId`

    - ### Methods inherited from interface net.sf.saxon.expr.StaticContext

      `getBaseURI, getCollation, getConfiguration, getDecimalFormatManager, getDefaultCollationName, getDefaultElementNamespace, getDefaultFunctionNamespace, getFunctionLibrary, getLineNumber, getLocationMap, getNamePool, getSystemId, getXPathLanguageLevel, isAllowedBuiltInType, isInBackwardsCompatibleMode, issueWarning, makeEarlyEvaluationContext`

- - ### Constructor Detail

    - #### SchemaElement.XPathStaticContext

          public SchemaElement.XPathStaticContext(Configuration config)

  - ### Method Detail

    - #### getURIForPrefix

          public String getURIForPrefix(String prefix)
                                 throws XPathException

      Get the URI for a prefix, using the declared namespaces as the context for namespace resolution. This method is provided for use by the XPath parser.
      Specified by:
        `getURIForPrefix` in interface `StaticContext`
      Overrides:
        `getURIForPrefix` in class `IndependentContext`
      Parameters:
        `prefix` - The prefix
      Returns:
        the corresponding namespace URI
      Throws:
        `XPathException` - if the prefix is not declared

    - #### getNamespaceResolver

          public NamespaceResolver getNamespaceResolver()

      Get a Namespace resolver that can be used for run-time resolution of QNames appearing in the XPath expression
      Specified by:
        `getNamespaceResolver` in interface `StaticContext`
      Overrides:
        `getNamespaceResolver` in class `IndependentContext`
      Returns:
        a namespace resolver that uses the namespace context of the containing element in the schema document

    - #### getExecutable

          public Executable getExecutable()

      Bind a variable reference appearing within an XPath expression
      Specified by:
        `getExecutable` in interface `Container`
      Overrides:
        `getExecutable` in class `DedicatedStaticContext`
      Returns:
        the executable

    - #### isSchemaAware

          public boolean isSchemaAware()

      Ask whether this static context is schema-aware
      Specified by:
        `isSchemaAware` in interface `StaticContext`
      Overrides:
        `isSchemaAware` in class `AbstractStaticContext`
      Returns:
        true if this context is schema-aware

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.