Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 2709

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:52 GMT 2011 -->
<TITLE>
net.sf.saxon.tree.tiny
</TITLE>

<META NAME="date" CONTENT="2011-12-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="net.sf.saxon.tree.tiny";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../net/sf/saxon/tree/linked/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../../net/sf/saxon/tree/util/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?net/sf/saxon/tree/tiny/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<H2>
Package net.sf.saxon.tree.tiny
</H2>
This package is an implementation of the Saxon internal tree structure,
designed to minimize memory usage, and the costs of allocating and garbage-collecting
Java objects.
<P>
<B>See:</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Interface Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/AppendableCharSequence.html" title="interface in net.sf.saxon.tree.tiny">AppendableCharSequence</A></B></TD>
<TD>Defines a CharSequence to which characters can be appended</TD>
</TR>
</TABLE>
&nbsp;

<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/CharSlice.html" title="class in net.sf.saxon.tree.tiny">CharSlice</A></B></TD>
<TD>This is an implementation of the JDK 1.4 CharSequence interface: it implements
 a CharSequence as a view of an array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/CompressedWhitespace.html" title="class in net.sf.saxon.tree.tiny">CompressedWhitespace</A></B></TD>
<TD>This class provides a compressed representation of a sequence of whitespace characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/LargeStringBuffer.html" title="class in net.sf.saxon.tree.tiny">LargeStringBuffer</A></B></TD>
<TD>This is an implementation of the JDK 1.4 CharSequence interface: it implements
 a CharSequence as a list of arrays of characters (the individual arrays are known
 as segments).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyAttributeCollection.html" title="class in net.sf.saxon.tree.tiny">TinyAttributeCollection</A></B></TD>
<TD>An implementation of the AttributeCollection interface based directly on the
 TinyTree data structure.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyBuilder.html" title="class in net.sf.saxon.tree.tiny">TinyBuilder</A></B></TD>
<TD>The TinyBuilder class is responsible for taking a stream of SAX events and constructing
 a Document tree, using the "TinyTree" implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyBuilderCondensed.html" title="class in net.sf.saxon.tree.tiny">TinyBuilderCondensed</A></B></TD>
<TD>Variant of the TinyBuilder to create a tiny tree in which multiple text nodes or attribute
 nodes sharing the same string value economize on space by only holding the value once.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyBuilderMonitor.html" title="class in net.sf.saxon.tree.tiny">TinyBuilderMonitor</A></B></TD>
<TD>Monitor construction of a TinyTree.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyDocumentImpl.html" title="class in net.sf.saxon.tree.tiny">TinyDocumentImpl</A></B></TD>
<TD>A node in the XML parse tree representing the Document itself (or equivalently, the root
 node of the Document).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyElementImpl.html" title="class in net.sf.saxon.tree.tiny">TinyElementImpl</A></B></TD>
<TD>A node in the XML parse tree representing an XML element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyNodeImpl.html" title="class in net.sf.saxon.tree.tiny">TinyNodeImpl</A></B></TD>
<TD>A node in a TinyTree representing an XML element, character content, or attribute.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyParentNodeImpl.html" title="class in net.sf.saxon.tree.tiny">TinyParentNodeImpl</A></B></TD>
<TD>TinyParentNodeImpl is an implementation of a non-leaf node (specifically, an Element node
 or a Document node)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyTextImpl.html" title="class in net.sf.saxon.tree.tiny">TinyTextImpl</A></B></TD>
<TD>A node in the XML parse tree representing character content</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyTree.html" title="class in net.sf.saxon.tree.tiny">TinyTree</A></B></TD>
<TD>A data structure to hold the contents of a tree.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/TinyTreeEventIterator.html" title="class in net.sf.saxon.tree.tiny">TinyTreeEventIterator</A></B></TD>
<TD>This implementation of the Saxon event-pull interface starts from a document, element,
 text, comment, or processing-instruction node in a TinyTree,
 and returns the events corresponding to that node and its descendants (including
 their attributes and namespaces).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../net/sf/saxon/tree/tiny/WhitespaceTextImpl.html" title="class in net.sf.saxon.tree.tiny">WhitespaceTextImpl</A></B></TD>
<TD>A node in the XML parse tree representing a text node with compressed whitespace content</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package net.sf.saxon.tree.tiny Description
</H2>

<P>
<p>This package is an implementation of the Saxon internal tree structure,
designed to minimize memory usage, and the costs of allocating and garbage-collecting
Java objects.</p>

<p>The data structure consists of a set of arrays, held in the <code>TinyTree</code> object.
A <code>TinyTree</code> represents one or more root document or element nodes, together with their
subtrees. If there is more than one root node, these will often be members of a sequence, but
this is not essential and is never assumed.
The arrays are in three groups. </p>

<p>The principal group of arrays contain one entry for each node other
than namespace and attribute nodes. These arrays are in document order. The following
information is maintained for each node: the
depth in the tree, the name code, the index of the next sibling, and two fields labelled "alpha" and "beta".
 The meaning of "alpha" and
"beat" depends on the node type. For text nodes, comment nodes, and processing instructions
these fields index into a StringBuffer holding the text. For element nodes, "alpha" is
an index into the attributes table, and "beta" is an offset into the namespaces table.
Either of these may be set to -1 if there are no attributes/namespaces.</p>

<p>A name code is an integer value that indexes into the NamePool object: it can be
used to determine the prefix, local name, or namespace URI of an element or attribute name.</p>

<p>The attribute group holds the following information for each attribute node: parent
element, prefix, name code, attribute type, and attribute value. Attributes
for the same element are adjacent.</p>

<p>The namespace group holds one entry per namespace declaration (not one per namespace
node). The following information is held: a pointer to the element on which the namespace
was declared, and a namespace code. A namespace code is an integer, which the NamePool can
resolve into a prefix and a namespace URI: the top 16 bits identify the prefix, the bottom
16 bits the URI.</p>

<p>The data structure contains no Java object references: the links between elements and
attributes/namespaces are all held as integer offsets. This reduces size, and also makes
the whole structure relocatable (though this capability is not currently exploited).
 All navigation is done by serial traversal of the arrays, using
the node depth as a guide. An array of pointers to the preceding sibling is created on
demand, the first time that backwards navigation is attempted. There are no parent pointers;
Saxon attempts to remember the parent while navigating down the tree, and where this is not
possible it locates the parent by searching through the following siblings; the last sibling
points back to the parent. The absence of the other pointers is a trade-off between tree-building time and
transformation time: I found that in most cases, more time was spent creating these pointers
than actually using them. Occasionally, however, in trees with a very large fan-out, locating
ancestors can be slow.</p>

<p>When the tree is navigated, transient ("flyweight") nodes are created as Java objects.
These disappear as soon as they are no longer needed. Note that to compare two nodes for
identity, you can use either the isSameNode() method, or compare the results of 
generateId(). Comparing the Java objects using "==" is incorrect.</p>

<p>The tree structure implements the DOM interface as well as the Saxon NodeInfo interface.
There are limitations in the DOM support, however: especially (a) the tree is immutable, so
all updating methods throw an exception; (b) namespace declarations are not exposed as
attributes, and (c) only the core DOM classes are provided.</p>

<p>The primary way of navigating the tree is through the XPath axes, accessible through the
iterateAxis() method. The familiar DOM methods such as getNextSibling() and getFirstChild()
are not provided as an intrinsic part of the <code>NodeInfo</code> interface: all navigation
is done by iterating the axes, and each tree model provides its own implementations of the axes.
However, there are helper methods in the shared <code>Navigator</code> class which many
of these implementations choose to use.</p>

<p align="center"><i>Michael H. Kay<br/>
Saxonica Limited<br/>
9 February 2005</i></p>
<P>

<P>
<DL>
</DL>
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../net/sf/saxon/tree/linked/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../../net/sf/saxon/tree/util/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?net/sf/saxon/tree/tiny/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.
</BODY>
</HTML>