|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.dtm.ref.DTMDefaultBase org.apache.xml.dtm.ref.DTMDefaultBaseTraversers org.apache.xml.dtm.ref.DTMDefaultBaseIterators org.apache.xml.dtm.ref.sax2dtm.SAX2DTM org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2 org.apache.xalan.xsltc.dom.SAXImpl
public final class SAXImpl
SAXImpl is the core model for SAX input source. SAXImpl objects are usually created from an XSLTCDTMManager.
DOMSource inputs are handled using DOM2SAX + SAXImpl. SAXImpl has a few specific fields (e.g. _node2Ids, _document) to keep DOM-related information. They are used when the processing behavior between DOM and SAX has to be different. Examples of these include id function and unparsed entity.
SAXImpl extends SAX2DTM2 instead of SAX2DTM for better performance.
Nested Class Summary | |
---|---|
class |
SAXImpl.NamespaceAttributeIterator
Iterator that returns attributes within a given namespace for a node. |
class |
SAXImpl.NamespaceChildrenIterator
Iterator that returns children within a given namespace for a given node. |
class |
SAXImpl.NamespaceWildcardIterator
Iterator that handles node tests that test for a namespace, but have a wild card for the local name of the node, i.e., node tests of the form |
private class |
SAXImpl.NodeValueIterator
This is a specialised iterator for predicates comparing node or attribute values to variable or parameter values. |
class |
SAXImpl.TypedNamespaceIterator
Iterator that returns the namespace nodes as defined by the XPath data model for a given node, filtered by extended type ID. |
Nested classes/interfaces inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseIterators |
---|
DTMDefaultBaseIterators.InternalAxisIteratorBase, DTMDefaultBaseIterators.NamespaceIterator, DTMDefaultBaseIterators.NthDescendantIterator, DTMDefaultBaseIterators.RootIterator, DTMDefaultBaseIterators.SingletonIterator |
Field Summary | |
---|---|
private boolean |
_disableEscaping
|
private org.w3c.dom.Document |
_document
|
private java.lang.String |
_documentURI
|
private static int |
_documentURIIndex
|
private BitArray |
_dontEscape
|
private XSLTCDTMManager |
_dtmManager
|
private boolean |
_escaping
|
private boolean |
_hasDOMSource
|
private int |
_idx
|
private int |
_namesSize
|
private Hashtable |
_node2Ids
|
private org.w3c.dom.NodeList[] |
_nodeLists
|
private org.w3c.dom.Node[] |
_nodes
|
private Hashtable |
_nsIndex
|
private int |
_prefixCount
|
private boolean |
_preserve
|
private int |
_size
|
private int |
_textNodeToProcess
|
private int |
_uriCount
|
private int[] |
_xmlSpaceStack
|
private static DTMAxisIterator |
EMPTYITERATOR
|
private static java.lang.String |
EMPTYSTRING
|
private static java.lang.String |
PRESERVE_STRING
|
private static java.lang.String |
XML_LANG_ATTRIBUTE
|
private static java.lang.String |
XML_PREFIX
|
private static java.lang.String |
XML_STRING
|
private static java.lang.String |
XML_URI
|
private static java.lang.String |
XMLNS_PREFIX
|
private static java.lang.String |
XMLSPACE_STRING
|
Fields inherited from class org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2 |
---|
m_blocksize, m_buildIdIndex, m_extendedTypes, m_MASK, m_SHIFT, m_values, TEXT_LENGTH_BITS, TEXT_LENGTH_MAX, TEXT_OFFSET_BITS, TEXT_OFFSET_MAX |
Fields inherited from class org.apache.xml.dtm.ref.sax2dtm.SAX2DTM |
---|
m_chars, m_coalescedTextType, m_contextIndexes, m_data, m_dataOrQName, m_endDocumentOccured, m_idAttributes, m_insideDTD, m_locator, m_parents, m_prefixMappings, m_previous, m_sourceColumn, m_sourceLine, m_sourceSystemId, m_textPendingStart, m_textType, m_useSourceLocationProperty, m_valuesOrPrefixes, m_walker |
Fields inherited from class org.apache.xml.dtm.ref.DTMDefaultBase |
---|
DEFAULT_BLOCKSIZE, DEFAULT_NUMBLOCKS, DEFAULT_NUMBLOCKS_SMALL, m_documentBaseURI, m_dtmIdent, m_elemIndexes, m_expandedNameTable, m_exptype, m_firstch, m_indexing, m_mgr, m_mgrDefault, m_namespaceDeclSetElements, m_namespaceDeclSets, m_nextsib, m_parent, m_prevsib, m_shouldStripWhitespaceStack, m_shouldStripWS, m_size, m_traversers, m_wsfilter, m_xstrf, NOTPROCESSED, ROOTNODE |
Fields inherited from interface org.apache.xalan.xsltc.DOM |
---|
ADAPTIVE_RTF, FIRST_TYPE, NO_TYPE, NULL, RETURN_CURRENT, RETURN_PARENT, SIMPLE_RTF, TREE_RTF |
Fields inherited from interface org.apache.xml.dtm.DTM |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NAMESPACE_NODE, NOTATION_NODE, NTYPES, NULL, PROCESSING_INSTRUCTION_NODE, ROOT_NODE, TEXT_NODE |
Constructor Summary | |
---|---|
SAXImpl(XSLTCDTMManager mgr,
javax.xml.transform.Source source,
int dtmIdentity,
DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory,
boolean doIndexing,
boolean buildIdIndex)
Construct a SAXImpl object using the default block size. |
|
SAXImpl(XSLTCDTMManager mgr,
javax.xml.transform.Source source,
int dtmIdentity,
DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory,
boolean doIndexing,
int blocksize,
boolean buildIdIndex,
boolean newNameTable)
Construct a SAXImpl object using the given block size. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
SAX2: Receive notification of character data. |
void |
characters(int node,
SerializationHandler handler)
Copy the string value of a node directly to an output handler |
void |
comment(char[] ch,
int start,
int length)
SAX2: Report an XML comment anywhere in the document. |
void |
copy(DTMAxisIterator nodes,
SerializationHandler handler)
Copy a node-set to an output handler |
void |
copy(int node,
SerializationHandler handler)
Performs a deep copy (ref. |
private void |
copy(int node,
SerializationHandler handler,
boolean isChild)
|
void |
copy(SerializationHandler handler)
Copy the whole tree to an output handler |
private void |
copyPI(int node,
SerializationHandler handler)
Copies a processing instruction node to an output handler |
private void |
definePrefixAndUri(java.lang.String prefix,
java.lang.String uri)
|
void |
endDocument()
SAX2: Receive notification of the end of a document. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qname)
SAX2: Receive notification of the end of an element. |
int |
getAttributeNode(int type,
int element)
Returns the attribute node of a given type (if any) for an element |
java.lang.String |
getAttributeValue(int type,
int element)
Returns the value of a given attribute type of a given element |
java.lang.String |
getAttributeValue(java.lang.String name,
int element)
This method is for testing/debugging only |
DTMAxisIterator |
getAxisIterator(int axis)
This is a shortcut to the iterators that implement the supported XPath axes (only namespace::) is not supported. |
DOMBuilder |
getBuilder()
Returns an instance of the DOMBuilder inner class This class will consume the input document through a SAX2 interface and populate the tree. |
DTMAxisIterator |
getChildren(int node)
Returns an iterator with all the children of a given node |
java.lang.String |
getDocumentURI()
Returns the origin of the document from which the tree was built |
java.lang.String |
getDocumentURI(int node)
|
int |
getElementById(java.lang.String idString)
Return the node identity for a given id String |
Hashtable |
getElementsWithIDs()
%HZ% Need Javadoc |
int |
getGeneralizedType(java.lang.String name)
Returns the internal type associated with an expanded QName |
int |
getGeneralizedType(java.lang.String name,
boolean searchOnly)
Returns the internal type associated with an expanded QName |
DTMAxisIterator |
getIterator()
Returns singleton iterator containg the document root Works for them main document (mark == 0). |
java.lang.String |
getLanguage(int node)
Returns a node' defined language for a node (if any) |
short[] |
getMapping(java.lang.String[] names,
java.lang.String[] uris,
int[] types)
Get mapping from DOM element/attribute types to external types |
private short[] |
getMapping2(java.lang.String[] names,
java.lang.String[] uris,
int[] types)
Get mapping from DOM element/attribute types to external types. |
DTMAxisIterator |
getNamespaceAxisIterator(int axis,
int ns)
Do not think that this returns an iterator for the namespace axis. |
short[] |
getNamespaceMapping(java.lang.String[] namespaces)
Get mapping from DOM namespace types to external namespace types |
java.lang.String |
getNamespaceName(int node)
Returns the namespace URI to which a node belongs |
int |
getNamespaceType(int node)
Returns the namespace type of a specific node |
java.lang.String |
getNodeName(int node)
Returns the name of a node (attribute or element). |
DTMAxisIterator |
getNodeValueIterator(DTMAxisIterator iterator,
int type,
java.lang.String value,
boolean op)
|
int |
getNSType(int node)
Get mapping from DOM namespace types to external namespace types |
DTMAxisIterator |
getNthDescendant(int type,
int n,
boolean includeself)
Returns the nth descendant of a node |
SerializationHandler |
getOutputDomBuilder()
Return a SerializationHandler for output handling. |
DOM |
getResultTreeFrag(int initSize,
int rtfType)
Return a instance of a DOM class to be used as an RTF |
DOM |
getResultTreeFrag(int initSize,
int rtfType,
boolean addToManager)
Return a instance of a DOM class to be used as an RTF |
int[] |
getReverseMapping(java.lang.String[] names,
java.lang.String[] uris,
int[] types)
Get mapping from external element/attribute types to DOM types |
short[] |
getReverseNamespaceMapping(java.lang.String[] namespaces)
Get mapping from external namespace types to DOM namespace types |
protected boolean |
getShouldStripWhitespace()
Find out whether or not to strip whitespace nodes. |
int |
getSize()
Returns the number of nodes in the tree (used for indexing) |
DTMAxisIterator |
getTypedAxisIterator(int axis,
int type)
Similar to getAxisIterator, but this one returns an iterator containing nodes of a typed axis (ex.: child::foo) |
DTMAxisIterator |
getTypedChildren(int type)
Returns an iterator with all children of a specific type for a given node (element) |
DTMAxisIterator |
getTypedDescendantIterator(int type)
Returns an iterator with all descendants of a node that are of a given type. |
java.lang.String |
getUnparsedEntityURI(java.lang.String name)
The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]). |
private void |
handleTextEscaping()
Creates a text-node and checks if it is a whitespace node. |
boolean |
hasDOMSource()
Return true if the input source is DOMSource. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
SAX2: Receive notification of ignorable whitespace in element content. |
boolean |
isAttribute(int node)
Returns 'true' if a specific node is an attribute (of any type) |
boolean |
isElement(int node)
Returns 'true' if a specific node is an element (of any type) |
boolean |
lessThan(int node1,
int node2)
Returns true if node1 comes before node2 in document order |
java.lang.String |
lookupNamespace(int node,
java.lang.String prefix)
Lookup a namespace URI from a prefix starting at node. |
org.w3c.dom.Node |
makeNode(DTMAxisIterator iter)
Create an org.w3c.dom.Node from a node in an iterator The iterator most be started before this method is called |
org.w3c.dom.Node |
makeNode(int index)
Create an org.w3c.dom.Node from a node in the tree |
org.w3c.dom.NodeList |
makeNodeList(DTMAxisIterator iter)
Create an org.w3c.dom.NodeList from a node iterator The iterator most be started before this method is called |
org.w3c.dom.NodeList |
makeNodeList(int index)
Create an org.w3c.dom.NodeList from a node in the tree |
void |
migrateTo(DTMManager manager)
Migrate a DTM built with an old DTMManager to a new DTMManager. |
DTMAxisIterator |
orderNodes(DTMAxisIterator source,
int node)
Encapsulates an iterator in an OrderedIterator to ensure node order |
void |
print(int node,
int level)
Prints the whole tree to standard output |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
SAX2: Receive notification of a processing instruction. |
void |
setDocumentURI(java.lang.String uri)
Define the origin of the document from which the tree was built |
boolean |
setEscaping(boolean value)
|
void |
setFilter(StripFilter filter)
Part of the DOM interface - no function here. |
private int[] |
setupMapping(java.lang.String[] names,
java.lang.String[] uris,
int[] types,
int nNames)
Sets up a translet-to-dom type mapping table |
void |
setupMapping(java.lang.String[] names,
java.lang.String[] urisArray,
int[] typesArray,
java.lang.String[] namespaces)
|
java.lang.String |
shallowCopy(int node,
SerializationHandler handler)
Performs a shallow copy (ref. |
void |
startDocument()
SAX2: Receive notification of the beginning of a document. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attributes)
SAX2: Receive notification of the beginning of an element. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attributes,
org.w3c.dom.Node node)
Specialized interface used by DOM2SAX. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
SAX2: Begin the scope of a prefix-URI Namespace mapping. |
private void |
xmlSpaceDefine(java.lang.String val,
int node)
Call this when an xml:space attribute is encountered to define the whitespace strip/preserve settings. |
private void |
xmlSpaceRevert(int node)
Call this from endElement() to revert strip/preserve setting to whatever it was before the corresponding startElement(). |
Methods inherited from class org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2 |
---|
_exptype, _exptype2, _exptype2Type, _firstch2, _nextsib2, _parent2, _type2, addNode, charactersFlush, copyAttribute, copyAttributes, copyElement, copyNS, copyTextNode, dispatchCharactersEvents, getExpandedTypeID2, getFirstAttribute, getFirstAttributeIdentity, getIdForNamespace, getLocalName, getNextAttributeIdentity, getNextNamespaceNode2, getNodeNameX, getNodeValue, getStringValue, getStringValue, getStringValueX, getTypedAttribute |
Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers |
---|
getAxisTraverser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.xalan.xsltc.DOMEnhancedForDTM |
---|
getExpandedTypeID2 |
Methods inherited from interface org.apache.xalan.xsltc.DOM |
---|
getDocument, getExpandedTypeID, getNodeHandle, getNodeIdent, getNodeNameX, getParent, getStringValue, getStringValueX |
Methods inherited from interface org.xml.sax.ContentHandler |
---|
endPrefixMapping, setDocumentLocator, skippedEntity |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
---|
endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
Methods inherited from interface org.xml.sax.DTDHandler |
---|
notationDecl, unparsedEntityDecl |
Methods inherited from interface org.xml.sax.ext.DeclHandler |
---|
attributeDecl, elementDecl, externalEntityDecl, internalEntityDecl |
Field Detail |
---|
private int _uriCount
private int _prefixCount
private int[] _xmlSpaceStack
private int _idx
private boolean _preserve
private static final java.lang.String XML_STRING
private static final java.lang.String XML_PREFIX
private static final java.lang.String XMLSPACE_STRING
private static final java.lang.String PRESERVE_STRING
private static final java.lang.String XMLNS_PREFIX
private static final java.lang.String XML_URI
private boolean _escaping
private boolean _disableEscaping
private int _textNodeToProcess
private static final java.lang.String EMPTYSTRING
private static final DTMAxisIterator EMPTYITERATOR
private int _namesSize
private Hashtable _nsIndex
private int _size
private BitArray _dontEscape
private java.lang.String _documentURI
private static int _documentURIIndex
private org.w3c.dom.Document _document
private Hashtable _node2Ids
private boolean _hasDOMSource
private XSLTCDTMManager _dtmManager
private org.w3c.dom.Node[] _nodes
private org.w3c.dom.NodeList[] _nodeLists
private static final java.lang.String XML_LANG_ATTRIBUTE
Constructor Detail |
---|
public SAXImpl(XSLTCDTMManager mgr, javax.xml.transform.Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing, boolean buildIdIndex)
public SAXImpl(XSLTCDTMManager mgr, javax.xml.transform.Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing, int blocksize, boolean buildIdIndex, boolean newNameTable)
Method Detail |
---|
public void setDocumentURI(java.lang.String uri)
setDocumentURI
in interface DOMEnhancedForDTM
public java.lang.String getDocumentURI()
getDocumentURI
in interface DOMEnhancedForDTM
public java.lang.String getDocumentURI(int node)
getDocumentURI
in interface DOM
public void setupMapping(java.lang.String[] names, java.lang.String[] urisArray, int[] typesArray, java.lang.String[] namespaces)
setupMapping
in interface DOM
public java.lang.String lookupNamespace(int node, java.lang.String prefix) throws TransletException
lookupNamespace
in interface DOM
TransletException
public boolean isElement(int node)
isElement
in interface DOM
public boolean isAttribute(int node)
isAttribute
in interface DOM
public int getSize()
getSize
in interface DOM
public void setFilter(StripFilter filter)
setFilter
in interface DOM
public boolean lessThan(int node1, int node2)
lessThan
in interface DOM
public org.w3c.dom.Node makeNode(int index)
makeNode
in interface DOM
public org.w3c.dom.Node makeNode(DTMAxisIterator iter)
makeNode
in interface DOM
public org.w3c.dom.NodeList makeNodeList(int index)
makeNodeList
in interface DOM
public org.w3c.dom.NodeList makeNodeList(DTMAxisIterator iter)
makeNodeList
in interface DOM
public DTMAxisIterator getNodeValueIterator(DTMAxisIterator iterator, int type, java.lang.String value, boolean op)
getNodeValueIterator
in interface DOM
public DTMAxisIterator orderNodes(DTMAxisIterator source, int node)
orderNodes
in interface DOM
public DTMAxisIterator getIterator()
getIterator
in interface DOM
public int getNSType(int node)
getNSType
in interface DOM
public int getNamespaceType(int node)
getNamespaceType
in interface DOM
getNamespaceType
in class DTMDefaultBase
node
- the id of the node.
private int[] setupMapping(java.lang.String[] names, java.lang.String[] uris, int[] types, int nNames)
public int getGeneralizedType(java.lang.String name)
public int getGeneralizedType(java.lang.String name, boolean searchOnly)
public short[] getMapping(java.lang.String[] names, java.lang.String[] uris, int[] types)
getMapping
in interface DOMEnhancedForDTM
public int[] getReverseMapping(java.lang.String[] names, java.lang.String[] uris, int[] types)
getReverseMapping
in interface DOMEnhancedForDTM
private short[] getMapping2(java.lang.String[] names, java.lang.String[] uris, int[] types)
public short[] getNamespaceMapping(java.lang.String[] namespaces)
getNamespaceMapping
in interface DOMEnhancedForDTM
public short[] getReverseNamespaceMapping(java.lang.String[] namespaces)
getReverseNamespaceMapping
in interface DOMEnhancedForDTM
public void migrateTo(DTMManager manager)
migrateTo
in interface DTM
migrateTo
in class SAX2DTM
manager
- the DTMManagerpublic int getElementById(java.lang.String idString)
getElementById
in interface DOMEnhancedForDTM
getElementById
in interface DTM
getElementById
in class SAX2DTM
idString
- The id String
public boolean hasDOMSource()
hasDOMSource
in interface DOMEnhancedForDTM
private void xmlSpaceDefine(java.lang.String val, int node)
private void xmlSpaceRevert(int node)
protected boolean getShouldStripWhitespace()
getShouldStripWhitespace
in class DTMDefaultBase
private void handleTextEscaping()
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class SAX2DTM
ch
- The characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.characters(char[], int, int)
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class SAX2DTM2
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.startDocument()
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class SAX2DTM2
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.endDocument()
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes attributes, org.w3c.dom.Node node) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class SAX2DTM2
uri
- The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qname
- The qualified name (with prefix), or the
empty string if qualified names are not available.attributes
- The specified or defaulted attributes.
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qname) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class SAX2DTM2
namespaceURI
- The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qname
- The qualified XML 1.0 name (with prefix), or the
empty string if qualified names are not available.
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class SAX2DTM2
target
- The processing instruction target.data
- The processing instruction data, or null if
none is supplied.
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.processingInstruction(java.lang.String, java.lang.String)
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class SAX2DTM
ch
- The whitespace characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.ignorableWhitespace(char[], int, int)
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class SAX2DTM
prefix
- The Namespace prefix being declared.uri
- The Namespace URI mapped to the prefix.
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
private void definePrefixAndUri(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
comment
in class SAX2DTM2
ch
- An array holding the characters in the comment.start
- The starting position in the array.length
- The number of characters to use from the array.
org.xml.sax.SAXException
- The application may raise an exception.public boolean setEscaping(boolean value)
public void print(int node, int level)
public java.lang.String getNodeName(int node)
getNodeName
in interface DOM
getNodeName
in interface DTM
getNodeName
in class SAX2DTM2
node
- the id of the node.
public java.lang.String getNamespaceName(int node)
getNamespaceName
in interface DOM
public int getAttributeNode(int type, int element)
getAttributeNode
in interface DOM
public java.lang.String getAttributeValue(int type, int element)
public java.lang.String getAttributeValue(java.lang.String name, int element)
public DTMAxisIterator getChildren(int node)
getChildren
in interface DOM
public DTMAxisIterator getTypedChildren(int type)
getTypedChildren
in interface DOM
public DTMAxisIterator getAxisIterator(int axis)
getAxisIterator
in interface DOM
getAxisIterator
in interface DTM
getAxisIterator
in class DTMDefaultBaseIterators
axis
- One of Axes.ANCESTORORSELF, etc.
public DTMAxisIterator getTypedAxisIterator(int axis, int type)
getTypedAxisIterator
in interface DOM
getTypedAxisIterator
in interface DTM
getTypedAxisIterator
in class DTMDefaultBaseIterators
axis
- One of Axes.ANCESTORORSELF, etc.type
- An extended type ID.
public DTMAxisIterator getNamespaceAxisIterator(int axis, int ns)
getNamespaceAxisIterator
in interface DOM
public DTMAxisIterator getTypedDescendantIterator(int type)
public DTMAxisIterator getNthDescendant(int type, int n, boolean includeself)
getNthDescendant
in interface DOM
public void characters(int node, SerializationHandler handler) throws TransletException
characters
in interface DOM
TransletException
public void copy(DTMAxisIterator nodes, SerializationHandler handler) throws TransletException
copy
in interface DOM
TransletException
public void copy(SerializationHandler handler) throws TransletException
TransletException
public void copy(int node, SerializationHandler handler) throws TransletException
copy
in interface DOM
TransletException
private final void copy(int node, SerializationHandler handler, boolean isChild) throws TransletException
TransletException
private void copyPI(int node, SerializationHandler handler) throws TransletException
TransletException
public java.lang.String shallowCopy(int node, SerializationHandler handler) throws TransletException
shallowCopy
in interface DOM
TransletException
public java.lang.String getLanguage(int node)
getLanguage
in interface DOM
public DOMBuilder getBuilder()
public SerializationHandler getOutputDomBuilder()
getOutputDomBuilder
in interface DOM
public DOM getResultTreeFrag(int initSize, int rtfType)
getResultTreeFrag
in interface DOM
public DOM getResultTreeFrag(int initSize, int rtfType, boolean addToManager)
getResultTreeFrag
in interface DOM
initSize
- The initial size of the DOM.rtfType
- The type of the RTFaddToManager
- true if the RTF should be registered with the DTMManager.
public Hashtable getElementsWithIDs()
getElementsWithIDs
in interface DOM
public java.lang.String getUnparsedEntityURI(java.lang.String name)
getUnparsedEntityURI
in interface DOM
getUnparsedEntityURI
in interface DTM
getUnparsedEntityURI
in class SAX2DTM
name
- A string containing the Entity Name of the unparsed
entity.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |