## Package net.sf.saxon.om

This package defines the interface to the Saxon tree structure.

See:
Description

Interface Summary
AtomizableIterator: A SequenceIterator is used to iterate over a sequence.
AxisIterator: A SequenceIterator is used to iterate over a sequence.
DocumentInfo: The root node of an XPath tree.
FingerprintedNode: This is a marker interface used to identify nodes that contain a namepool fingerprint.
Item: An Item is an object that can occur as a member of a sequence.
LookaheadIterator: A SequenceIterator is used to iterate over a sequence.
NamespaceResolver: Interface that supports lookup of a lexical QName to get the expanded QName.
NodeInfo: A node in the XML parse tree representing an XML element, character content, or attribute.
SequenceIterator: A SequenceIterator is used to iterate over any XPath 2 sequence (of values or nodes).
SiblingCountingNode: Interface that extends NodeInfo by providing a method to get the position of a node relative to its siblings.
TypeInfo: This is a copy of the TypeInfo interface defined in DOM Level 3.
VirtualNode: This interface is implemented by NodeInfo implementations that act as wrappers on some underlying tree.

Class Summary
AbstractNode: This class is an abstract implementation of the Saxon NodeInfo interface; it also contains concrete implementations of most of the DOM methods in terms of the NodeInfo methods.
AllElementStripper: The AllElementStripper refines the Stripper class to do stripping of all whitespace nodes in a document
ArrayIterator: ArrayIterator is used to enumerate items held in an array.
Axis: An axis, that is a direction of navigation in the document structure.
AxisIteratorImpl: A SequenceIterator is used to iterate over a sequence.
DocumentBuilderFactoryImpl: Implementation of JAXP 1.1 DocumentBuilderFactory.
DocumentBuilderImpl: This class implements the JAXP DocumentBuilder interface, allowing a Saxon TinyTree to be constructed using standard JAXP parsing interfaces.
DocumentPool: An object representing the collection of documents handled during a single transformation.
EmptyIterator: EmptyIterator: an iterator over an empty sequence.
InscopeNamespaceResolver: A NamespaceResolver that resolves namespace prefixes by reference to a node in a document for which those namespaces are in-scope.
ListIterator: Class ListIterator, iterates over a sequence of items held in a Java ArrayList, or indeed in any other kind of List
Name: This class exists to contain some static methods for validating the syntax of names.
NamePool: An object representing a collection of XML names, each containing a Namespace URI, a Namespace prefix, and a local name; plus a collection of namespaces, each consisting of a prefix/URI pair.
NamespaceConstant: This class is not instantiated, it exists to hold a set of constants representing known namespaces.
Navigator: The Navigator class provides helper classes for navigating a tree, irrespective of its implementation
Navigator.AncestorEnumeration: General-purpose implementation of the ancestor and ancestor-or-self axes
Navigator.AxisFilter: AxisFilter is an iterator that applies a NodeTest filter to the nodes returned by an underlying AxisIterator.
Navigator.BaseEnumeration: BaseEnumeration is an abstract implementation of an AxisIterator, it simplifies the implementation of the underlying AxisIterator by requiring it to provide only two methods: advance(), and getAnother()
Navigator.DescendantEnumeration: General-purpose implementation of the descendant and descendant-or-self axes, in terms of the child axis.
Navigator.FollowingEnumeration: General purpose implementation of the following axis, in terms of the ancestor, child, and following-sibling axes
Navigator.PrecedingEnumeration
Orphan: A node (implementing the NodeInfo interface) representing an attribute, text node, comment, processing instruction, or namespace that has no parent (and of course no children).
ProcInstParser: ProcInstParser is used to parse pseudo-attributes within Processing Instructions
ReverseArrayIterator: ReverseArrayIterator is used to enumerate items held in an array in reverse order.
SingletonIterator: SingletonIterator: an iterator over a sequence of zero or one values
StrippedDocument: A StrippedDocument represents a view of a real Document in which selected whitespace text nodes are treated as having been stripped.
StrippedNode: A StrippedNode is a view of a node, in a virtual tree that has whitespace text nodes stripped from it.
Validation: This class contains constants and static methods to manipulate the validation property of a type.
XMLChar: This class defines the basic XML character properties.

Exception Summary
NamePool.NamePoolLimitException
NamespaceException: A NamespaceException represents an error condition whereby a QName (for example a variable name or template name) uses a namespace prefix that is not declared
QNameException: A QNameException represents an error condition whereby a QName (for example a variable name or template name) is malformed

## Package net.sf.saxon.om Description

This package defines the interface to the Saxon tree structure. This structure is used to represent both the source document and the stylesheet.

The classes in the package are rather a miscellany. What they have in common is that they describe the way the Saxon tree structure is accessed, in a way that it independent of the two tree implementations (in packages `net.sf.saxon.tree` and `net.sf.saxon.tinytree`).

Broadly speaking, the classes fall into four categories:

- Interface classes: DocumentInfo, NodeInfo, Item, Name. These describe the interface offered by the object model to the rest of the system, including the application.
- Iterator classes: SequenceIterator, AxisIterator, ArrayIterator, EmptyIterator, SingletonIterator, and others. These classes provide mechanisms for iterating over sequences. The most general, and the one which applications are most likely to use, is the SequenceIterator interface itself. AxisIterator is a specialization of this interface whose main difference is that it cannot throw exceptions. The other classes are implementations of SequenceIterator for use in particular circumstances.
<liul>Shared implementation classes: AbstractNode, DocumentPool, NamePool, Stripper, Builder. These contain functionality that is shared between the two tree implementations. (However, there is also some shared functionality in the `net.sf.saxon.tree` package). These classes are not generally needed by applications, with the exception of NamePool, which complex applications may need to manipulate.
- Information classes: Axis, Namespace. These contain constants.

Michael H. Kay
25 April 2002