net.sf.saxon.expr

## Interface Container

- All Superinterfaces:
    Serializable, SourceLocator
  All Known Implementing Classes:
    AbsentExtensionElement, AncestorQualifiedPattern, AnchorPattern, AttributeSet, BooleanExpressionPattern, ConditionalPattern, DedicatedStaticContext, ExceptPattern, ExpressionParser.TemporaryContainer, ExtensionInstruction, GeneralNodePattern, GeneralPositionalPattern, GlobalParam, GlobalVariable, IntersectPattern, ItemTypePattern, KeyDefinition, LiteralResultElement, MemoFunction, NodeSetPattern, Pattern, PatternThatSetsCurrent, PatternWithPredicate, Procedure, SaxonAssign, SaxonCallTemplate, SaxonCollation, SaxonDoctype, SaxonEntityRef, SaxonImportQuery, SaxonWhile, SchemaElement.XPathStaticContext, SimpleContainer, SimplePositionalPattern, SQLClose, SQLColumn, SQLConnect, SQLDelete, SQLExecute, SQLInsert, SQLQuery, SQLUpdate, StyleElement, Template, UndeclaredVariable, UnionPattern, UserFunction, UseWhenStaticContext, VennPattern, XQueryExpression, XQueryFunction, XSLAccumulator, XSLAccumulatorRule, XSLAnalyzeString, XSLApplyImports, XSLApplyTemplates, XSLAssert, XSLAttribute, XSLAttributeSet, XSLBreak, XSLBreakOrContinue, XSLCallTemplate, XSLCatch, XSLCharacterMap, XSLChoose, XSLComment, XSLCopy, XSLCopyOf, XSLDecimalFormat, XSLDocument, XSLElement, XSLEvaluate, XSLFallback, XSLForEach, XSLForEachGroup, XSLFork, XSLFunction, XSLGeneralIncorporate, XSLGeneralVariable, XSLGlobalParam, XSLGlobalVariable, XSLIf, XSLImport, XSLImportSchema, XSLInclude, XSLIterate, XSLKey, XSLLeafNodeConstructor, XSLLocalParam, XSLLocalVariable, XSLMap, XSLMapEntry, XSLMatchingSubstring, XSLMerge, XSLMergeAction, XSLMergeKey, XSLMergeSource, XSLMessage, XSLMode, XSLNamespace, XSLNamespaceAlias, XSLNextIteration, XSLNextMatch, XSLNumber, XSLOnCompletion, XSLOtherwise, XSLOutput, XSLOutputCharacter, XSLPerformSort, XSLPreserveSpace, XSLProcessingInstruction, XSLResultDocument, XSLSequence, XSLSort, XSLSortOrMergeKey, XSLStream, XSLStylesheet, XSLTemplate, XSLText, XSLTry, XSLValueOf, XSLWhen, XSLWithParam

      public interface Container
      extends SourceLocator, Serializable

  A Container is something other than an expression that can act as the container of an expression. It is typically an object such as a function, a global variable, or in XSLT a template, or an attribute set. When free-standing XPath expressions are compiled, the static context for the expression acts as its container.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getContainerGranularity()` Get the granularity of the container.
    `Executable` | `getExecutable()` Get the Executable (representing a complete stylesheet or query) of which this Container forms part
    `int` | `getHostLanguage()` Get the host language (XSLT, XQuery, XPath) used to implement the code in this container
    `LocationProvider` | `getLocationProvider()` Get the LocationProvider allowing location identifiers to be resolved.

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

      `getColumnNumber, getLineNumber, getPublicId, getSystemId`

- - ### Method Detail

    - #### getExecutable

          Executable getExecutable()

      Get the Executable (representing a complete stylesheet or query) of which this Container forms part
      Returns:
        the executable

    - #### getLocationProvider

          LocationProvider getLocationProvider()

      Get the LocationProvider allowing location identifiers to be resolved.
      Returns:
        the location provider

    - #### getHostLanguage

          int getHostLanguage()

      Get the host language (XSLT, XQuery, XPath) used to implement the code in this container
      Returns:
        typically `Configuration.XSLT` or `Configuration.XQUERY`

    - #### getContainerGranularity

          int getContainerGranularity()

      Get the granularity of the container. During successive phases of compilation, growing expression trees are rooted in containers of increasing granularity. The granularity of the container is used to avoid "repotting" a tree more frequently than is required, as this requires a complete traversal of the tree which can take a measurable time.
      Returns:
        0 for a temporary container created during parsing; 1 for a container that operates at the level of an XPath expression; 2 for a container at the level of a global function or template

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