| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private Properties | fDOMConfigProperties
DOMConfiguration Properties |
| private int | fElementDepth
stores the current element depth |
| private DOMErrorHandler | fErrorHandler
ErrorHandler |
| private static final Map | fFeatureMap
This table is a quick lookup of a property key (String) to the integer that is the bit to flip in the fFeatures field, so the integers should have values 1,2,4,8,16... |
| private int | fFeatures
DOM Configuration Parameters |
| private LSSerializerFilter | fFilter
LSSerializerFilter |
| private boolean | fInEntityRef
Keeps track if we are in an entity reference when entities=true |
| private boolean | fIsLevel3DOM
Is the Node a Level 3 DOM node |
| private boolean | fIsXMLVersion11
XML Version, default 1.0 |
| private LexicalHandler | fLexicalHandler
If the serializer is an instance of a LexicalHandler |
| protected NamespaceSupport | fLocalNSBinder
stores all namespace bindings on the current element |
| private LocatorImpl | fLocator
Locator object for this TreeWalker |
| private String | fNewLine
New Line character to use in serialization |
| pack-priv boolean | fNextIsRaw
Flag indicating whether following text to be processed is raw text |
| protected NamespaceSupport | fNSBinder
stores namespaces in scope |
| private SerializationHandler | fSerializer
The SerializationHandler, it extends ContentHandler and when this class is instantiated via the constructor provided, a SerializationHandler object is passed to it. |
| private int | |
| private String | fXMLVersion
Stores the version of the XML document to be serialize |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final String | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | DOM3TreeWalker(SerializationHandler serialHandler, DOMErrorHandler errHandler, LSSerializerFilter filter, String newLine)
Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | Returns: True if the node is to be serialized else false if the node is to be rejected or skipped.The Node to serialize node, int nodeType)Applies a filter on the node to serialize |
| protected void | checkUnboundPrefixInEntRef(Node node)
If the configuration parameter "namespaces" is set to true, this methods checks if an entity whose replacement text contains unbound namespace prefixes is referenced in a location where there are no bindings for the namespace prefixes and if so raises a LSException with the error-type "unbound-prefix-in-entity-reference" |
| private final void | |
| protected void | |
| protected void | |
| protected void | initProperties(Properties
DOMConfiguraiton properties that were set and which are
to be used while serializing the DOM. properties)Initializes fFeatures based on the DOMConfiguration Parameters set. |
| protected void | Returns: a boolean indiacating if the comment is well-formed or not.Checks if an attr node is well-formed, by checking it's Name and value for well-formedness. |
| protected void | isCDATASectionWellFormed(CDATASection node)
Checks if an CDATASection node is well-formed, by checking it's data for well-formedness. |
| protected void | Returns: a boolean indiacating if the comment is well-formed or not.The contents of the comment node data)Checks if a comment node is well-formed |
| protected void | Returns: a boolean indiacating if the comment is well-formed or not.Checks if an element node is well-formed, by checking its Name for well-formedness. |
| protected void | isEntityReferneceWellFormed(EntityReference node)
Checks if an EntityRefernece node is well-formed, by checking it's node name. |
| protected void | isPIWellFormed(ProcessingInstruction node)
Checks if a PI node is well-formed, by checking it's Name and data for well-formedness. |
| protected void | isTextWellFormed(Text node)
Checks if an Text node is well-formed, by checking if it contains invalid XML characters. |
| protected boolean | isValidQName(String
prefix of qualified name prefix, String local part of qualified name local, boolean xml11Version)Taken from org.apache.xerces.dom.CoreDocumentImpl Checks if the given qualified name is legal with respect to the version of XML to which this document must conform. |
| protected boolean | isWFXMLChar(String chardata, Character
A reference to the character to be returned that was determined invalid. refInvalidChar)Checks if a XML character is well-formed |
| protected Character | Returns: Character A reference to the character to be returned that was determined invalid.Checks if a XML character is well-formed. |
| protected boolean | |
| protected void | recordLocalNSDecl(Node node)
Records local namespace declarations, to be used for normalization later |
| protected void | serializeAttList(Element
The OwnerElement whose Attr Nodes are to be serialized. node)Serializes the Attr Nodes of an Element. |
| protected void | serializeCDATASection(CDATASection
The CDATASection Node to serialize node)Serializes an CDATASection Node. |
| protected void | |
| protected void | serializeDocType(DocumentType
The Docuemnt Type Node to serialize node, boolean Invoked at the start or end of node. Default true. bStart)Serializes a Document Type Node. |
| protected void | serializeElement(Element
The Element Node to serialize node, boolean Invoked at the start or end of node. bStart)Serializes an Element Node. |
| protected void | serializeEntityReference(EntityReference
The EntityReference Node to serialize node, boolean Inicates if called from start or endNode bStart)Serializes an EntityReference Node. |
| protected void | serializePI(ProcessingInstruction
The ProcessingInstruction Node to serialize node)Serializes an ProcessingInstruction Node. |
| protected void | |
| protected void | |
| public void | |
| public void |
| CANONICAL | back to summary |
|---|---|
| private static final int CANONICAL | |
| CDATA | back to summary |
|---|---|
| private static final int CDATA | |
| CHARNORMALIZE | back to summary |
|---|---|
| private static final int CHARNORMALIZE | |
| COMMENTS | back to summary |
|---|---|
| private static final int COMMENTS | |
| DISCARDDEFAULT | back to summary |
|---|---|
| private static final int DISCARDDEFAULT | |
| DTNORMALIZE | back to summary |
|---|---|
| private static final int DTNORMALIZE | |
| ELEM_CONTENT_WHITESPACE | back to summary |
|---|---|
| private static final int ELEM_CONTENT_WHITESPACE | |
| ENTITIES | back to summary |
|---|---|
| private static final int ENTITIES | |
| fDOMConfigProperties | back to summary |
|---|---|
| private Properties fDOMConfigProperties DOMConfiguration Properties | |
| fElementDepth | back to summary |
|---|---|
| private int fElementDepth stores the current element depth | |
| fErrorHandler | back to summary |
|---|---|
| private DOMErrorHandler fErrorHandler ErrorHandler | |
| fFeatureMap | back to summary |
|---|---|
| private static final Map<String, Integer> fFeatureMap This table is a quick lookup of a property key (String) to the integer that is the bit to flip in the fFeatures field, so the integers should have values 1,2,4,8,16... | |
| fFeatures | back to summary |
|---|---|
| private int fFeatures DOM Configuration Parameters | |
| fFilter | back to summary |
|---|---|
| private LSSerializerFilter fFilter LSSerializerFilter | |
| fInEntityRef | back to summary |
|---|---|
| private boolean fInEntityRef Keeps track if we are in an entity reference when entities=true | |
| fIsLevel3DOM | back to summary |
|---|---|
| private boolean fIsLevel3DOM Is the Node a Level 3 DOM node | |
| fIsXMLVersion11 | back to summary |
|---|---|
| private boolean fIsXMLVersion11 XML Version, default 1.0 | |
| fLexicalHandler | back to summary |
|---|---|
| private LexicalHandler fLexicalHandler If the serializer is an instance of a LexicalHandler | |
| fLocalNSBinder | back to summary |
|---|---|
| protected NamespaceSupport fLocalNSBinder stores all namespace bindings on the current element | |
| fLocator | back to summary |
|---|---|
| private LocatorImpl fLocator Locator object for this TreeWalker | |
| fNewLine | back to summary |
|---|---|
| private String fNewLine New Line character to use in serialization | |
| fNextIsRaw | back to summary |
|---|---|
| pack-priv boolean fNextIsRaw Flag indicating whether following text to be processed is raw text | |
| fNSBinder | back to summary |
|---|---|
| protected NamespaceSupport fNSBinder stores namespaces in scope | |
| fSerializer | back to summary |
|---|---|
| private SerializationHandler fSerializer The SerializationHandler, it extends ContentHandler and when this class is instantiated via the constructor provided, a SerializationHandler object is passed to it. | |
| fWhatToShowFilter | back to summary |
|---|---|
| private int fWhatToShowFilter | |
| fXMLVersion | back to summary |
|---|---|
| private String fXMLVersion Stores the version of the XML document to be serialize | |
| IGNORE_CHAR_DENORMALIZE | back to summary |
|---|---|
| private static final int IGNORE_CHAR_DENORMALIZE | |
| INFOSET | back to summary |
|---|---|
| private static final int INFOSET | |
| NAMESPACEDECLS | back to summary |
|---|---|
| private static final int NAMESPACEDECLS | |
| NAMESPACES | back to summary |
|---|---|
| private static final int NAMESPACES | |
| NORMALIZECHARS | back to summary |
|---|---|
| private static final int NORMALIZECHARS | |
| PRETTY_PRINT | back to summary |
|---|---|
| private static final int PRETTY_PRINT | |
| SCHEMAVALIDATE | back to summary |
|---|---|
| private static final int SCHEMAVALIDATE | |
| SPLITCDATA | back to summary |
|---|---|
| private static final int SPLITCDATA | |
| VALIDATE | back to summary |
|---|---|
| private static final int VALIDATE | |
| WELLFORMED | back to summary |
|---|---|
| private static final int WELLFORMED | |
| XML_PREFIX | back to summary |
|---|---|
| private static final String XML_PREFIX | |
| XML_URI | back to summary |
|---|---|
| private static final String XML_URI | |
| XMLDECL | back to summary |
|---|---|
| private static final int XMLDECL | |
| XMLNS_PREFIX | back to summary |
|---|---|
| private static final String XMLNS_PREFIX | |
| XMLNS_URI | back to summary |
|---|---|
| private static final String XMLNS_URI | |
| DOM3TreeWalker | back to summary |
|---|---|
| pack-priv DOM3TreeWalker(SerializationHandler serialHandler, DOMErrorHandler errHandler, LSSerializerFilter filter, String newLine) Constructor. | |
| applyFilter | back to summary |
|---|---|
| protected boolean applyFilter(Node node, int nodeType) Applies a filter on the node to serialize
| |
| checkUnboundPrefixInEntRef | back to summary |
|---|---|
| protected void checkUnboundPrefixInEntRef(Node node) If the configuration parameter "namespaces" is set to true, this methods checks if an entity whose replacement text contains unbound namespace prefixes is referenced in a location where there are no bindings for the namespace prefixes and if so raises a LSException with the error-type "unbound-prefix-in-entity-reference" | |
| dispatachChars | back to summary |
|---|---|
| private final void dispatachChars(Node node) throws SAXException Optimized dispatch of characters. | |
| endNode | back to summary |
|---|---|
| protected void endNode(Node node) throws SAXException End processing of given node
| |
| fixupElementNS | back to summary |
|---|---|
| protected void fixupElementNS(Node node) throws SAXException Fixes an element's namespace | |
| initProperties | back to summary |
|---|---|
| protected void initProperties(Properties properties) Initializes fFeatures based on the DOMConfiguration Parameters set.
| |
| isAttributeWellFormed | back to summary |
|---|---|
| protected void isAttributeWellFormed(Node node) Checks if an attr node is well-formed, by checking it's Name and value for well-formedness.
| |
| isCDATASectionWellFormed | back to summary |
|---|---|
| protected void isCDATASectionWellFormed(CDATASection node) Checks if an CDATASection node is well-formed, by checking it's data for well-formedness. Note that the presence of a CDATA termination mark in the contents of a CDATASection is handled by the parameter spli-cdata-sections | |
| isCommentWellFormed | back to summary |
|---|---|
| protected void isCommentWellFormed(String data) Checks if a comment node is well-formed
| |
| isElementWellFormed | back to summary |
|---|---|
| protected void isElementWellFormed(Node node) Checks if an element node is well-formed, by checking its Name for well-formedness.
| |
| isEntityReferneceWellFormed | back to summary |
|---|---|
| protected void isEntityReferneceWellFormed(EntityReference node) Checks if an EntityRefernece node is well-formed, by checking it's node name. Then depending on whether it is referenced in Element content or in an Attr Node, checks if the EntityReference references an unparsed entity or a external entity and if so throws raises the appropriate well-formedness error. | |
| isPIWellFormed | back to summary |
|---|---|
| protected void isPIWellFormed(ProcessingInstruction node) Checks if a PI node is well-formed, by checking it's Name and data for well-formedness. | |
| isTextWellFormed | back to summary |
|---|---|
| protected void isTextWellFormed(Text node) Checks if an Text node is well-formed, by checking if it contains invalid XML characters. | |
| isValidQName | back to summary |
|---|---|
| protected boolean isValidQName(String prefix, String local, boolean xml11Version) Taken from org.apache.xerces.dom.CoreDocumentImpl Checks if the given qualified name is legal with respect to the version of XML to which this document must conform. | |
| isWFXMLChar | back to summary |
|---|---|
| protected boolean isWFXMLChar(String chardata, Character refInvalidChar) Checks if a XML character is well-formed
| |
| isWFXMLChar | back to summary |
|---|---|
| protected Character isWFXMLChar(String chardata) Checks if a XML character is well-formed. If there is a problem with the character a non-null Character is returned else null is returned.
| |
| isXMLName | back to summary |
|---|---|
| protected boolean isXMLName(String s, boolean xml11Version) Taken from org.apache.xerces.dom.CoreDocumentImpl Check the string against XML's definition of acceptable names for elements and attributes and so on using the XMLCharacterProperties utility class | |
| recordLocalNSDecl | back to summary |
|---|---|
| protected void recordLocalNSDecl(Node node) Records local namespace declarations, to be used for normalization later | |
| serializeAttList | back to summary |
|---|---|
| protected void serializeAttList(Element node) throws SAXException Serializes the Attr Nodes of an Element.
| |
| serializeCDATASection | back to summary |
|---|---|
| protected void serializeCDATASection(CDATASection node) throws SAXException Serializes an CDATASection Node.
| |
| serializeComment | back to summary |
|---|---|
| protected void serializeComment(Comment node) throws SAXException Serializes a Comment Node.
| |
| serializeDocType | back to summary |
|---|---|
| protected void serializeDocType(DocumentType node, boolean bStart) throws SAXException Serializes a Document Type Node.
| |
| serializeElement | back to summary |
|---|---|
| protected void serializeElement(Element node, boolean bStart) throws SAXException Serializes an Element Node.
| |
| serializeEntityReference | back to summary |
|---|---|
| protected void serializeEntityReference(EntityReference node, boolean bStart) throws SAXException Serializes an EntityReference Node.
| |
| serializePI | back to summary |
|---|---|
| protected void serializePI(ProcessingInstruction node) throws SAXException Serializes an ProcessingInstruction Node.
| |
| serializeText | back to summary |
|---|---|
| protected void serializeText(Text node) throws SAXException Serializes an Text Node.
| |
| startNode | back to summary |
|---|---|
| protected void startNode(Node node) throws SAXException Start processing given node
| |
| traverse | back to summary |
|---|---|
| public void traverse(Node pos) throws SAXException Perform a pre-order traversal non-recursive style. Note that TreeWalker assumes that the subtree is intended to represent a complete (though not necessarily well-formed) document and, during a traversal, startDocument and endDocument will always be issued to the SAX listener.
| |
| traverse | back to summary |
|---|---|
| public void traverse(Node pos, Node top) throws SAXException Perform a pre-order traversal non-recursive style. Note that TreeWalker assumes that the subtree is intended to represent a complete (though not necessarily well-formed) document and, during a traversal, startDocument and endDocument will always be issued to the SAX listener. | |