garyp 01/07/24 23:24:37 Added: test/tests/contrib/garypeskin SAX2DTMDesign.html Log: Adding this for possible inclusion into some documentation somewhere. Revision Changes Path 1.1 xml-xalan/test/tests/contrib/garypeskin/SAX2DTMDesign.html Index: SAX2DTMDesign.html =================================================================== <html><head><title></title></head><body> <p>The current implementation is subject to change and this class should be accessed only through published interface methods. However, the following information is provided to aid in an understanding of how this class currently works and is provided for debugging purposes only. This implementation stores information about each node in a series of arrays. Conceptually, the arrays can be thought of as either <code>String</code> Vectors or <code>int</code> Vectors although they are implemented using some internal classes. The <code>m_chars</code> array is conceptually a Vector of <code>chars</code>. The chief arrays of interest are shown in the following table:</p> <table border="1" summary="Key arrays used: the first cell contains the array name and the second contains the conceptual type, and the third contains the description of the contents"> <tr> <th>Array Name</th> <th>Array Type</th> <th>Contents</th> </tr> <tr> <td rowspan="1" colspan="1"><code>m_locNamesPool</code></td> <td rowspan="1" colspan="1">String</td> <td rowspan="1" colspan="1">Local (prefixed) names. Field of m_expandedNameTable.</td> </tr> <tr> <td rowspan="1" colspan="1"><code>m_namespaceNames</code></td> <td rowspan="1" colspan="1">String</td> <td rowspan="1" colspan="1">Namespace URIs. Field of m_expandedNameTable.</td> </tr> <tr> <td rowspan="1" colspan="1"><code>m_exptype</code></td> <td rowspan="1" colspan="1">int</td> <td rowspan="1" colspan="1">An integer representing a unique value for a Node. The first 6 bits represent the Node type, as shown below. The next 6 bits represent an index into m_namespaceNames. The remaining 20 bits represent an index into m_locNamesPool.</td> </tr> <tr> <td rowspan="1" colspan="1"><code>m_dataOrQName</code></td> <td rowspan="1" colspan="1">int</td> <td rowspan="1" colspan="1">An index into either m_data or m_valuesOrPrefixes, as explained in the next table.</td> </tr> <tr> <td rowspan="1" colspan="1"><code>m_valuesOrPrefixes</code></td> <td rowspan="1" colspan="1">String</td> <td rowspan="1" colspan="1">Values and prefixes.</td> </tr> <tr> <td rowspan="1" colspan="1"><code>m_data</code></td> <td rowspan="1" colspan="1">int</td> <td rowspan="1" colspan="1">Entries here occur in pairs. The use of this array is explained in the next table.</td> </tr> <tr> <td rowspan="1" colspan="1"><code>m_chars</code></td> <td rowspan="1" colspan="1">char</td> <td rowspan="1" colspan="1">Characters used to form Strings as explained in the next table.</td> </tr> </table> <p>This table shows how the array values are used for each type of Node supported by this implementation. An <i>n</i> represents an index into <code>m_namespaceNames</code> for the namespace URI associated with the attribute or element. It actually consists of the 6 bits, including the rightmost two bits of the leftmost byte. The <code>eeeee</code> represents an index into <code>m_locNamesPool</code> for the value indicated in the table.</p> <table border="1" summary="Node table"> <tr> <th>NodeType</th> <th>m_exptype</th> <th>m_dataOrQName</th> <th>m_data</th> </tr> <tr> <td rowspan="1" colspan="1">Attr</td> <td rowspan="1" colspan="1"> 08<i>neeeee</i><br>-0d<i>neeeee</i><br> <i>eeeee</i> is local name of attribute.</td> <td rowspan="1" colspan="1"><b>No namespace</b>: an index into <code>m_valuesOrPrefixes</code> pointing to the attribute value. <br><b>Namespace</b>: a negative number, the absolute value of which is an index into m_data.</td> <td rowspan="1" colspan="1"><b>index</b>: an int containing the index into <code>m_valuesOrPrefixes</code> for the Attr QName. <br><b>index+1</b>: an int containing the index into <code>m_valuesOrPrefixes</code> for the attribute value.</td> </tr> <tr> <td rowspan="1" colspan="1">Comment</td> <td rowspan="1" colspan="1"> 20000000</td> <td rowspan="1" colspan="1">index into <code>m_valuesOrPrefixes</code> for comment text.</td> <td rowspan="1" colspan="1">unused</td> </tr> <tr> <td rowspan="1" colspan="1">Document</td> <td rowspan="1" colspan="1"> 24000000</td> <td rowspan="1" colspan="1">0</td> <td rowspan="1" colspan="1">unused</td> </tr> <tr> <td rowspan="1" colspan="1">Element</td> <td rowspan="1" colspan="1"> 04<i>neeeee</i><br>-07<i>neeeee</i><br> <i>eeeee</i> is local name of element.</td> <td rowspan="1" colspan="1"><b>No namespace</b>: 0. <br><b>Namespace</b>: an index into <code>m_valuesOrPrefixes</code> pointing to the QName.</td> <td rowspan="1" colspan="1">unused</td> </tr> <tr> <td rowspan="1" colspan="1">ProcessingInstruction</td> <td rowspan="1" colspan="1"> 1C0<i>eeeee</i> <br><i>eeeee</i> is the target name.</td> <td rowspan="1" colspan="1">index into <code>m_valuesOrPrefixes</code> for PI data.</td> <td rowspan="1" colspan="1">unused</td> </tr> <tr> <td rowspan="1" colspan="1">Text</td> <td rowspan="1" colspan="1"> 14000000</td> <td rowspan="1" colspan="1">an index into m_data.</td> <td rowspan="1" colspan="1"><b>index</b>: an int containing starting subscript in <code>m_chars</code> for the text. <br><b>index+1</b>: an int containing the length of the text.</td> </table> </body>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
