net.sf.saxon.expr.parser

## Class ExpressionParser.TemporaryContainer

- java.lang.Object
- - net.sf.saxon.expr.parser.ExpressionParser.TemporaryContainer

- All Implemented Interfaces:
    Serializable, SourceLocator, LocationProvider, Container
  Enclosing class:
    ExpressionParser

      protected static class ExpressionParser.TemporaryContainer
      extends Object
      implements Container, LocationProvider, Serializable

  A Container used on a temporary basis to hold an expression while it is being parsed
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExpressionParser.TemporaryContainer(LocationMap map, int locationId)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getColumnNumber()`
    `int` | `getColumnNumber(long locationId)` Get the column number within the document, entity, or module containing a particular location
    `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
    `int` | `getLineNumber()`
    `int` | `getLineNumber(long locationId)` Get the line number within the document, entity or module containing a particular location
    `LocationProvider` | `getLocationProvider()` Get the LocationProvider allowing location identifiers to be resolved.
    `String` | `getPublicId()`
    `String` | `getSystemId()`
    `String` | `getSystemId(long locationId)` Get the URI of the document, entity, or module containing a particular location
    `void` | `setExecutable(Executable exec)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExpressionParser.TemporaryContainer

          public ExpressionParser.TemporaryContainer(LocationMap map,
                                             int locationId)

  - ### Method Detail

    - #### getContainerGranularity

          public int getContainerGranularity()

      Get the granularity of the container.
      Specified by:
        `getContainerGranularity` in interface `Container`
      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

    - #### setExecutable

          public void setExecutable(Executable exec)

    - #### getExecutable

          public Executable getExecutable()

      Description copied from interface: `Container`
      Get the Executable (representing a complete stylesheet or query) of which this Container forms part
      Specified by:
        `getExecutable` in interface `Container`
      Returns:
        the executable

    - #### getLocationProvider

          public LocationProvider getLocationProvider()

      Description copied from interface: `Container`
      Get the LocationProvider allowing location identifiers to be resolved.
      Specified by:
        `getLocationProvider` in interface `Container`
      Returns:
        the location provider

    - #### getPublicId

          public String getPublicId()

      Specified by:
        `getPublicId` in interface `SourceLocator`

    - #### getSystemId

          public String getSystemId()

      Specified by:
        `getSystemId` in interface `SourceLocator`

    - #### getLineNumber

          public int getLineNumber()

      Specified by:
        `getLineNumber` in interface `SourceLocator`

    - #### getColumnNumber

          public int getColumnNumber()

      Specified by:
        `getColumnNumber` in interface `SourceLocator`

    - #### getSystemId

          public String getSystemId(long locationId)

      Description copied from interface: `LocationProvider`
      Get the URI of the document, entity, or module containing a particular location
      Specified by:
        `getSystemId` in interface `LocationProvider`
      Parameters:
        `locationId` - identifier of the location in question (as passed down the Receiver pipeline)
      Returns:
        the URI of the document, XML entity or module. For a SourceLocationProvider this will be the URI of the document or entity (the URI that would be the base URI if there were no xml:base attributes). In other cases it may identify the query or stylesheet module currently being executed.

    - #### getLineNumber

          public int getLineNumber(long locationId)

      Description copied from interface: `LocationProvider`
      Get the line number within the document, entity or module containing a particular location
      Specified by:
        `getLineNumber` in interface `LocationProvider`
      Parameters:
        `locationId` - identifier of the location in question (as passed down the Receiver pipeline)
      Returns:
        the line number within the document, entity or module, or -1 if no information is available.

    - #### getColumnNumber

          public int getColumnNumber(long locationId)

      Description copied from interface: `LocationProvider`
      Get the column number within the document, entity, or module containing a particular location
      Specified by:
        `getColumnNumber` in interface `LocationProvider`
      Parameters:
        `locationId` - identifier of the location in question (as passed down the Receiver pipeline)
      Returns:
        the column number within the document, entity, or module, or -1 if this is not available

    - #### getHostLanguage

          public int getHostLanguage()

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

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