Class ContentHandlerProxyLocator
- java.lang.Object
-
- net.sf.saxon.event.ContentHandlerProxyLocator
-
- All Implemented Interfaces:
org.xml.sax.Locator
public class ContentHandlerProxyLocator extends java.lang.Object implements org.xml.sax.LocatorImplementation of the SAX Locator interface, used to supply location information to the ContentHandler.When the ContentHandler is used to receive the results of a query or stylesheet, the information supplied by the standard methods such as
getSystemId()andgetLineNumber()relates to the position of the expression/instruction in the stylesheet or query that caused the relevant nodes to be output.If the ContentHandler is used in other contexts, for example as the destination of an IdentityTransformer, the information reflects the position in the source document.
If the output property
saxon:supply-source-locatorwas set to the value "yes" (which in turn requires that tracing was enabled at compile time), the Locator will also contain information about the current location in the source document (specifically, the position of the context node). This will not always be 100% accurate, since there is some buffering of events in the output pipeline: it reflects the context node at the time the event reaches the ContentHandler, which may not be the same as the context node at the time the relevant instruction was executed; however, it still provides some information that may be useful for diagnostics.
-
-
Constructor Summary
Constructors Constructor Description ContentHandlerProxyLocator(ContentHandlerProxy parent)Create the Locator for a ContentHandlerProxy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()Get the column numberjava.util.StackgetContextItemStack()Get the current item stack.intgetLineNumber()Get the line numberjava.lang.StringgetPublicId()Get the Public IDjava.lang.StringgetSystemId()Get the System ID
-
-
-
Constructor Detail
-
ContentHandlerProxyLocator
public ContentHandlerProxyLocator(ContentHandlerProxy parent)
Create the Locator for a ContentHandlerProxy- Parameters:
parent- the ContentHandlerProxy
-
-
Method Detail
-
getPublicId
public java.lang.String getPublicId()
Get the Public ID- Specified by:
getPublicIdin interfaceorg.xml.sax.Locator- Returns:
- null (always)
-
getSystemId
public java.lang.String getSystemId()
Get the System ID- Specified by:
getSystemIdin interfaceorg.xml.sax.Locator- Returns:
- the system ID giving the location in the query or stylesheet of the most recent event notified
-
getLineNumber
public int getLineNumber()
Get the line number- Specified by:
getLineNumberin interfaceorg.xml.sax.Locator- Returns:
- the line number giving the location of the most recent event notified
-
getColumnNumber
public int getColumnNumber()
Get the column number- Specified by:
getColumnNumberin interfaceorg.xml.sax.Locator- Returns:
- -1 (always)
-
getContextItemStack
public java.util.Stack getContextItemStack()
Get the current item stack. This is a Stack, whose members are objects of classItem. The top item in the stack is the context node or atomic value; items further down the stack represent previous context node or atomic value- Returns:
- the stack of context items
-
-