| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
| <!--NewPage-->
|
| <HTML>
|
| <HEAD>
|
| <!-- Generated by javadoc on Thu Nov 22 17:12:56 EST 2007 -->
|
| <TITLE>
|
| Xalan-Java 2.7.1: Class DTMTreeWalker
|
| </TITLE>
|
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
|
| </HEAD>
|
| <BODY BGCOLOR="white">
|
|
|
| <!-- ========== START OF NAVBAR ========== -->
|
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
| <TR>
|
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
| <TR ALIGN="center" VALIGN="top">
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DTMTreeWalker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
| </TR>
|
| </TABLE>
|
| </TD>
|
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
| </EM>
|
| </TD>
|
| </TR>
|
|
|
| <TR>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../../../org/apache/xml/dtm/ref/DTMStringPool.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../../org/apache/xml/dtm/ref/EmptyIterator.html"><B>NEXT CLASS</B></A></FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="DTMTreeWalker.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| <!-- ======== START OF CLASS DATA ======== -->
|
| <H2>
|
| <FONT SIZE="-1">
|
| org.apache.xml.dtm.ref</FONT>
|
| <BR>
|
| Class DTMTreeWalker</H2>
|
| <PRE>
|
| java.lang.Object
|
| |
|
| +--<B>org.apache.xml.dtm.ref.DTMTreeWalker</B>
|
| </PRE>
|
| <DL>
|
| <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/xalan/transformer/TreeWalker2Result.html">TreeWalker2Result</A></DD>
|
| </DL>
|
| <HR>
|
| <DL>
|
| <DT>public class <B>DTMTreeWalker</B><DT>extends java.lang.Object</DL>
|
|
|
| <P>
|
| This class does a pre-order walk of the DTM tree, calling a ContentHandler |
| interface as it goes. As such, it's more like the Visitor design pattern |
| than like the DOM's TreeWalker. |
| |
| I think normally this class should not be needed, because |
| of DTM#dispatchToEvents.
|
| <P>
|
| <DL>
|
| <DT><B>Usage:</B><DD><i><font size="-1" color="#00FF00"> **For advanced use only**</font></i></DD> |
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <P>
|
| <!-- ======== INNER CLASS SUMMARY ======== -->
|
|
|
|
|
| <!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
|
| <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=2><FONT SIZE="+2">
|
| <B>Constructor Summary</B></FONT></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE><B><A HREF="../../../../../org/apache/xml/dtm/ref/DTMTreeWalker.html#DTMTreeWalker()">DTMTreeWalker</A></B>()</CODE>
|
|
|
| <BR>
|
| Constructor.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE><B><A HREF="../../../../../org/apache/xml/dtm/ref/DTMTreeWalker.html#DTMTreeWalker(org.xml.sax.ContentHandler, org.apache.xml.dtm.DTM)">DTMTreeWalker</A></B>(<A HREF="../../../../../org/xml/sax/ContentHandler.html">ContentHandler</A> contentHandler, |
| <A HREF="../../../../../org/apache/xml/dtm/DTM.html">DTM</A> dtm)</CODE>
|
|
|
| <BR>
|
| Constructor.</TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <!-- ========== METHOD SUMMARY =========== -->
|
|
|
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=2><FONT SIZE="+2">
|
| <B>Method Summary</B></FONT></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> <A HREF="../../../../../org/xml/sax/ContentHandler.html">ContentHandler</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../../org/apache/xml/dtm/ref/DTMTreeWalker.html#getcontentHandler()">getcontentHandler</A></B>()</CODE>
|
|
|
| <BR>
|
| Get the ContentHandler used for the tree walk.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../../org/apache/xml/dtm/ref/DTMTreeWalker.html#setcontentHandler(org.xml.sax.ContentHandler)">setcontentHandler</A></B>(<A HREF="../../../../../org/xml/sax/ContentHandler.html">ContentHandler</A> ch)</CODE>
|
|
|
| <BR>
|
| Set the ContentHandler used for the tree walk.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../../org/apache/xml/dtm/ref/DTMTreeWalker.html#setDTM(org.apache.xml.dtm.DTM)">setDTM</A></B>(<A HREF="../../../../../org/apache/xml/dtm/DTM.html">DTM</A> dtm)</CODE>
|
|
|
| <BR>
|
| Set the DTM to be traversed.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../../org/apache/xml/dtm/ref/DTMTreeWalker.html#traverse(int)">traverse</A></B>(int pos)</CODE>
|
|
|
| <BR>
|
| Perform a non-recursive pre-order/post-order traversal, |
| operating as a Visitor.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../../org/apache/xml/dtm/ref/DTMTreeWalker.html#traverse(int, int)">traverse</A></B>(int pos, |
| int top)</CODE>
|
|
|
| <BR>
|
| Perform a non-recursive pre-order/post-order traversal, |
| operating as a Visitor.</TD>
|
| </TR>
|
| </TABLE>
|
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
| <TD><B>Methods inherited from class java.lang.Object</B></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE>equals,
|
| getClass,
|
| hashCode,
|
| notify,
|
| notifyAll,
|
| toString,
|
| wait,
|
| wait,
|
| wait</CODE></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <P>
|
|
|
| <!-- ============ FIELD DETAIL =========== -->
|
|
|
|
|
| <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=1><FONT SIZE="+2">
|
| <B>Constructor Detail</B></FONT></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <A NAME="DTMTreeWalker()"><!-- --></A><H3>
|
| DTMTreeWalker</H3>
|
| <PRE>
|
| public <B>DTMTreeWalker</B>()</PRE>
|
| <DL>
|
| <DD>Constructor.</DL>
|
| <HR>
|
|
|
| <A NAME="DTMTreeWalker(org.xml.sax.ContentHandler, org.apache.xml.dtm.DTM)"><!-- --></A><H3>
|
| DTMTreeWalker</H3>
|
| <PRE>
|
| public <B>DTMTreeWalker</B>(<A HREF="../../../../../org/xml/sax/ContentHandler.html">ContentHandler</A> contentHandler, |
| <A HREF="../../../../../org/apache/xml/dtm/DTM.html">DTM</A> dtm)</PRE>
|
| <DL>
|
| <DD>Constructor.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>contentHandler</CODE> - The implemention of the |
| contentHandler operation (toXMLString, digest, ...)</DL>
|
| </DD>
|
| </DL>
|
|
|
| <!-- ============ METHOD DETAIL ========== -->
|
|
|
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=1><FONT SIZE="+2">
|
| <B>Method Detail</B></FONT></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <A NAME="setDTM(org.apache.xml.dtm.DTM)"><!-- --></A><H3>
|
| setDTM</H3>
|
| <PRE>
|
| public void <B>setDTM</B>(<A HREF="../../../../../org/apache/xml/dtm/DTM.html">DTM</A> dtm)</PRE>
|
| <DL>
|
| <DD>Set the DTM to be traversed.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>dtm</CODE> - The Document Table Model to be used.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getcontentHandler()"><!-- --></A><H3>
|
| getcontentHandler</H3>
|
| <PRE>
|
| public <A HREF="../../../../../org/xml/sax/ContentHandler.html">ContentHandler</A> <B>getcontentHandler</B>()</PRE>
|
| <DL>
|
| <DD>Get the ContentHandler used for the tree walk.<DD><DL>
|
| <DT><B>Returns:</B><DD>the ContentHandler used for the tree walk</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setcontentHandler(org.xml.sax.ContentHandler)"><!-- --></A><H3>
|
| setcontentHandler</H3>
|
| <PRE>
|
| public void <B>setcontentHandler</B>(<A HREF="../../../../../org/xml/sax/ContentHandler.html">ContentHandler</A> ch)</PRE>
|
| <DL>
|
| <DD>Set the ContentHandler used for the tree walk.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>ch</CODE> - the ContentHandler to be the result of the tree walk.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="traverse(int)"><!-- --></A><H3>
|
| traverse</H3>
|
| <PRE>
|
| public void <B>traverse</B>(int pos) |
| throws <A HREF="../../../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD>Perform a non-recursive pre-order/post-order traversal, |
| operating as a Visitor. startNode (preorder) and endNode |
| (postorder) are invoked for each node as we traverse over them, |
| with the result that the node is written out to m_contentHandler.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>pos</CODE> - Node in the tree at which to start (and end) traversal -- |
| in other words, the root of the subtree to traverse over.<DT><B>Throws:</B><DD>TransformerException - </DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="traverse(int, int)"><!-- --></A><H3>
|
| traverse</H3>
|
| <PRE>
|
| public void <B>traverse</B>(int pos, |
| int top) |
| throws <A HREF="../../../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD>Perform a non-recursive pre-order/post-order traversal, |
| operating as a Visitor. startNode (preorder) and endNode |
| (postorder) are invoked for each node as we traverse over them, |
| with the result that the node is written out to m_contentHandler.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>pos</CODE> - Node in the tree where to start traversal<DD><CODE>top</CODE> - Node in the tree where to end traversal. |
| If top==DTM.NULL, run through end of document.<DT><B>Throws:</B><DD>TransformerException - </DL>
|
| </DD>
|
| </DL>
|
| <!-- ========= END OF CLASS DATA ========= -->
|
| <HR>
|
|
|
| <!-- ========== START OF NAVBAR ========== -->
|
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
| <TR>
|
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
| <TR ALIGN="center" VALIGN="top">
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DTMTreeWalker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
| </TR>
|
| </TABLE>
|
| </TD>
|
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
| </EM>
|
| </TD>
|
| </TR>
|
|
|
| <TR>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../../../org/apache/xml/dtm/ref/DTMStringPool.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../../org/apache/xml/dtm/ref/EmptyIterator.html"><B>NEXT CLASS</B></A></FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="DTMTreeWalker.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| Copyright © 2006 Apache XML Project. All Rights Reserved.
|
| </BODY>
|
| </HTML>
|