Class SimpleContainer
- java.lang.Object
-
- net.sf.saxon.sxpath.SimpleContainer
-
- All Implemented Interfaces:
java.io.Serializable,javax.xml.transform.SourceLocator,Container
public class SimpleContainer extends java.lang.Object implements Container
A simple container for standalone XPath expressions- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleContainer(Executable exec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()Return the character position where the current document event ends.intgetContainerGranularity()Get the granularity of the container.ExecutablegetExecutable()Get the Executable (representing a complete stylesheet or query) of which this Container forms partintgetHostLanguage()Get the host language (XSLT, XQuery, XPath) used to implement the code in this containerintgetLineNumber()Return the line number where the current document event ends.LocationProvidergetLocationProvider()Get the LocationProvider allowing location identifiers to be resolved.java.lang.StringgetPublicId()Return the public identifier for the current document event.java.lang.StringgetSystemId()Return the system identifier for the current document event.voidsetLocation(java.lang.String systemId, int lineNumber)Set location information if available
-
-
-
Constructor Detail
-
SimpleContainer
public SimpleContainer(Executable exec)
-
-
Method Detail
-
setLocation
public void setLocation(java.lang.String systemId, int lineNumber)Set location information if available- Parameters:
systemId- the system IdlineNumber- the line number
-
getExecutable
public Executable getExecutable()
Get the Executable (representing a complete stylesheet or query) of which this Container forms part- Specified by:
getExecutablein interfaceContainer- Returns:
- the executable
-
getLocationProvider
public LocationProvider getLocationProvider()
Get the LocationProvider allowing location identifiers to be resolved.- Specified by:
getLocationProviderin interfaceContainer- 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:
getHostLanguagein interfaceContainer- Returns:
- typically
Configuration.XSLTorConfiguration.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:
getContainerGranularityin interfaceContainer- 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 java.lang.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:
getPublicIdin interfacejavax.xml.transform.SourceLocator- Returns:
- A string containing the public identifier, or null if none is available.
- See Also:
getSystemId()
-
getSystemId
public java.lang.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:
getSystemIdin interfacejavax.xml.transform.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:
getLineNumberin interfacejavax.xml.transform.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:
getColumnNumberin interfacejavax.xml.transform.SourceLocator- Returns:
- The column number, or -1 if none is available.
- See Also:
getLineNumber()
-
-