public static interface Push.Document extends Push.Container
Push.Container representing a document node.
If the document is constrained to be well-formed then the permitted sequence of events is
(COMMENT | PI)* ELEMENT (COMMENT | PI)* CLOSE.
If the document is NOT constrained to be well-formed then the permitted sequence of events is
(COMMENT | PI | TEXT | ELEMENT)* CLOSE.
| Modifier and Type | Method and Description |
|---|---|
Push.Document |
comment(java.lang.CharSequence value)
Add a comment node to the current element or document node.
|
Push.Document |
processingInstruction(java.lang.String name,
java.lang.CharSequence value)
Add a processing instruction node to the current element or document node.
|
Push.Document |
text(java.lang.CharSequence value)
Add text content to the current element node (or, in the case of a non-well-formed document,
as a child of the document node).
|
close, element, element, setDefaultNamespacePush.Document text(java.lang.CharSequence value) throws SaxonApiException
Push.ContainerMultiple consecutive calls on text() generate a single text node with concatenated
content: that is, text("one).text("two") is equivalent to text("onetwo").
text in interface Push.Containervalue - the content of the text node. Supplying a zero-length string or null is permitted,
but has no effect.tag.element("a").text("content").close()SaxonApiException - if the specified constraints are violated, or if the implementation
detects any problemsPush.Document comment(java.lang.CharSequence value) throws SaxonApiException
Push.ContainerThe method call is allowed in states START_TAG, CONTENT, and
NON_TEXT_CONTENT, and it sets the state to CONTENT.
comment in interface Push.Containervalue - the content of the comment node. The value should not contain the string "--";
it is implementation-defined whether this causes an exception, or whether some
recovery action is taken such as replacing the string by "- -". If the value
is null, no comment node is written.tag.element("a").comment("optional").close()SaxonApiException - if the specified constraints are violated, or if the implementation
detects any problemsPush.Document processingInstruction(java.lang.String name, java.lang.CharSequence value) throws SaxonApiException
Push.ContainerThe method call is allowed in states START_TAG, CONTENT, and
NON_TEXT_CONTENT, and it sets the state to CONTENT.
processingInstruction in interface Push.Containername - the name ("target") of the processing instruction. The level of validation applied
to the supplied name is implementation-defined. Must not be null.value - the content ("data") of the processing instruction node.
The value should not contain the string "?>";
it is implementation-defined whether this causes an exception, or whether some
recovery action is taken such as replacing the string by "? >". If the value
is null, no processing instruction node is written.tag.element("a").processing-instruction("target", "data").close()SaxonApiException - if the specified constraints are violated, or if the implementation
detects any problemsCopyright (c) 2004-2020 Saxonica Limited.