public class ContentHandlerProxyLocator
extends java.lang.Object
implements org.xml.sax.Locator
When the ContentHandler is used to receive the results of a query or stylesheet,
the information supplied by the standard methods such as getSystemId()
and
getLineNumber()
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-locator
was 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 and Description |
---|
ContentHandlerProxyLocator(ContentHandlerProxy parent)
Create the Locator for a ContentHandlerProxy
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber()
Get the column number
|
java.util.Stack |
getContextItemStack()
Get the current item stack.
|
int |
getLineNumber()
Get the line number
|
java.lang.String |
getPublicId()
Get the Public ID
|
java.lang.String |
getSystemId()
Get the System ID
|
public ContentHandlerProxyLocator(ContentHandlerProxy parent)
parent
- the ContentHandlerProxypublic java.lang.String getPublicId()
getPublicId
in interface org.xml.sax.Locator
public java.lang.String getSystemId()
getSystemId
in interface org.xml.sax.Locator
public int getLineNumber()
getLineNumber
in interface org.xml.sax.Locator
public int getColumnNumber()
getColumnNumber
in interface org.xml.sax.Locator
public java.util.Stack getContextItemStack()
Item
. The top item in the stack is the context node or atomic value; items
further down the stack represent previous context node or atomic valueCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.