## net.sf.saxon.sxpath
Class SimpleContainer

    java.lang.Object
      net.sf.saxon.sxpath.SimpleContainer

All Implemented Interfaces:
  Serializable, SourceLocator, Container

    public class SimpleContainer

extends Object
implements Container

A simple container for standalone XPath expressions

See Also:
  Serialized Form

Constructor Summary
`SimpleContainer(Executable exec)`

Method Summary
`int` `getColumnNumber()` Return the character position where the current document event ends.
`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()` Return the line number where the current document event ends.
`LocationProvider` `getLocationProvider()` Get the LocationProvider allowing location identifiers to be resolved.
`String` `getPublicId()` Return the public identifier for the current document event.
`String` `getSystemId()` Return the system identifier for the current document event.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleContainer

    public SimpleContainer(Executable exec)

Method Detail

### getExecutable

    public Executable getExecutable()

  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()

  Get the LocationProvider allowing location identifiers to be resolved.

  Specified by:
    `getLocationProvider` in interface `Container`
  Returns:
    the location provider

### 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`

### getContainerGranularity

    public 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.

  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

### getPublicId

    public String getPublicId()

  Return the public identifier for the current document event.

  The return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.

  Specified by:
    `getPublicId` in interface `SourceLocator`
  Returns:
    A string containing the public identifier, or null if none is available.
  See Also:
    `getSystemId()`

### getSystemId

    public String getSystemId()

  Return the system identifier for the current document event.

  The return value is the system identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.

  If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

  Specified by:
    `getSystemId` in interface `SourceLocator`
  Returns:
    A string containing the system identifier, or null if none is available.
  See Also:
    `getPublicId()`

### getLineNumber

    public int getLineNumber()

  Return the line number where the current document event ends.

  Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.

  The return value is an approximation of the line number in the document entity or external parsed entity where the markup that triggered the event appears.

  Specified by:
    `getLineNumber` in interface `SourceLocator`
  Returns:
    The line number, or -1 if none is available.
  See Also:
    `getColumnNumber()`

### getColumnNumber

    public int getColumnNumber()

  Return the character position where the current document event ends.

  Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.

  The return value is an approximation of the column number in the document entity or external parsed entity where the markup that triggered the event appears.

  Specified by:
    `getColumnNumber` in interface `SourceLocator`
  Returns:
    The column number, or -1 if none is available.
  See Also:
    `getLineNumber()`

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