public class LinkedBuilderMonitor extends BuilderMonitor
nextReceiverpipelineConfiguration, previousAtomic, systemId| Constructor and Description |
|---|
LinkedBuilderMonitor(LinkedTreeBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(int nameCode,
int typeCode,
java.lang.CharSequence value,
int locationId,
int properties)
Notify an attribute.
|
void |
characters(java.lang.CharSequence chars,
int locationId,
int properties)
Character data
|
void |
comment(java.lang.CharSequence chars,
int locationId,
int properties)
Output a comment
|
NodeInfo |
getMarkedNode()
On completion of tree building, get the node that was marked using markNextNode().
|
void |
markNextNode(int nodeKind)
Indicate that the next node to be created will be of a given type, and request the monitor to remember
the identity of this node.
|
void |
namespace(int namespaceCode,
int properties)
Notify a namespace.
|
void |
processingInstruction(java.lang.String target,
java.lang.CharSequence data,
int locationId,
int properties)
Processing Instruction
|
void |
startContent()
Notify the start of the content, that is, the completion of all attributes and namespaces.
|
void |
startDocument(int properties)
Start of a document node.
|
append, close, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, open, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startElement, usesTypeAnnotationsappend, getPipelineConfiguration, getSystemIdpublic LinkedBuilderMonitor(LinkedTreeBuilder builder)
public void markNextNode(int nodeKind)
BuilderMonitormarkNextNode in class BuilderMonitornodeKind - the kind of node that will be created nextpublic void startDocument(int properties)
throws XPathException
ProxyReceiverstartDocument in interface ReceiverstartDocument in class ProxyReceiverproperties - bit-significant integer indicating properties of the document node.
The definitions of the bits are in class ReceiverOptionsXPathExceptionpublic void startContent()
throws XPathException
ProxyReceiverstartContent in interface ReceiverstartContent in class ProxyReceiverXPathExceptionpublic void characters(java.lang.CharSequence chars,
int locationId,
int properties)
throws XPathException
ProxyReceivercharacters in interface Receivercharacters in class ProxyReceiverchars - The characterslocationId - an integer which can be interpreted using a LocationProvider
to return information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - Bit significant value. The following bits are defined:
XPathExceptionpublic void comment(java.lang.CharSequence chars,
int locationId,
int properties)
throws XPathException
ProxyReceivercomment in interface Receivercomment in class ProxyReceiverchars - The content of the commentlocationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - Additional information about the comment.XPathExceptionpublic void processingInstruction(java.lang.String target,
java.lang.CharSequence data,
int locationId,
int properties)
throws XPathException
ProxyReceiverprocessingInstruction in interface ReceiverprocessingInstruction in class ProxyReceivertarget - The PI name. This must be a legal name (it will not be checked).data - The data portion of the processing instructionlocationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - Additional information about the PI.XPathExceptionpublic void attribute(int nameCode,
int typeCode,
java.lang.CharSequence value,
int locationId,
int properties)
throws XPathException
ProxyReceiverattribute in interface Receiverattribute in class ProxyReceivernameCode - The name of the attribute, as held in the name pooltypeCode - The type of the attribute, as held in the name poolvalue - the string value of the attributelocationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - Bit significant value. The following bits are defined:
XPathExceptionpublic void namespace(int namespaceCode,
int properties)
throws XPathException
ProxyReceivernamespace in interface Receivernamespace in class ProxyReceivernamespaceCode - an integer: the top half is a prefix code, the bottom half a URI code.
These may be translated into an actual prefix and URI using the name pool. A prefix code of
zero represents the empty prefix (that is, the default namespace). A URI code of zero represents
a URI of "", that is, a namespace undeclaration.properties - The most important property is REJECT_DUPLICATES. If this property is set, the
namespace declaration will be rejected if it conflicts with a previous declaration of the same
prefix. If the property is not set, the namespace declaration will be ignored if it conflicts
with a previous declaration. This reflects the fact that when copying a tree, namespaces for child
elements are emitted before the namespaces of their parent element. Unfortunately this conflicts
with the XSLT rule for complex content construction, where the recovery action in the event of
conflicts is to take the namespace that comes last. XSLT therefore doesn't recover from this error:
it sets the REJECT_DUPLICATES flag, and this is treated as a hard error.XPathExceptionpublic NodeInfo getMarkedNode()
BuilderMonitorgetMarkedNode in class BuilderMonitor