This package defines the interface to the Saxon tree structure. This structure is used to represent both the source document and the stylesheet. Essentially, this class represents Saxon's realization of the XPath data model.
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
Broadly speaking, the classes fall into four categories:
- Interface classes: DocumentInfo, NodeInfo, Item, ValueRepresentation. 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.
- Shared implementation classes: DocumentPool, NamePool, Navigator, XMLChar.
These contain functionality that is shared between the various tree implementations. (However, there is
also some shared functionality in the
net.sf.saxon.treepackage). These classes are not generally needed by applications, with the exception of NamePool, which complex applications may need to manipulate.
- Information classes: Axis, NamespaceConstant. These contain constants.
Interface Summary Interface Description ActionA functional interface that simply encapsulates a callback action of any kind, allowing the action to fail with an XPathException. AtomicSequenceInterface representing a sequence of atomic values. AtomizedValueIteratorInterface implemented by an iterator that can deliver atomized results. AttributeMapAttributeMap represents an immutable collection of attributes available on a particular element node. FocusIteratorAn iterator that maintains the values of position() and current(), typically implemented as a wrapper over an iterator which does not maintain these values itself. FunctionXDM 3.0 introduces a third kind of item, beyond nodes and atomic values: the function. GroundedValueA value that exists in memory and that can be directly addressed IdentityComparableThe IdentityComparable class provides a way to compare objects for strong equality. ItemAn Item is an object that can occur as a member of a sequence. ItemConsumer<T extends Item>A FunctionalInterface for any method that processes individual items, and which may generate exceptions. MutableDocumentInfoInterface representing the document node of a mutable document MutableNodeInfoAn extension of the NodeInfo interface defining a node that can be updated. NamespaceBindingSetRepresents a set of namespace bindings NamespaceResolverAbstract class that supports lookup of a lexical QName to get the expanded QName. NodeInfoThe NodeInfo interface represents a node in Saxon's implementation of the XPath 2.0 data model. NodeNameThis interface represents a node name. NotationSetA set of declared notations (in the sense of XSD xs:notation) SequenceThis interface represents an XDM Value, that is, a sequence of items. SequenceIteratorA SequenceIterator is used to iterate over any XPath 2 sequence (of values or nodes). SpaceStrippingRuleInterface for deciding whether a particular element is to have whitespace text nodes stripped TreeInfoThis interface represents information about a tree as a whole.
Class Summary Class Description AbsolutePathRepresents the path from the root of an XDM tree to a specific node, as a sequence of (name, position) pairs AbsolutePath.PathElementInner class representing one step in the path AllElementsSpaceStrippingRuleA whitespace stripping rule that strips all elements unless xml:space indicates that whitespace should be preserved. AtomicArrayA sequence of atomic values, implemented using an underlying arrayList. AtomicCounterAn integer that can be incremented atomically with thread safety AttributeInfoThis class contains immutable information about an attribute. AttributeInfo.DeletedAttributeInfo.Deleted is a subclass used to mark a deleted attribute (in XQuery Update) AxisInfoAn axis, that is a direction of navigation in the document structure. CodedNameAn implementation of NodeName that encapsulates an integer fingerprint, a string prefix, and a reference to the NamePool from which the fingerprint was allocated. CopyOptionsNon-instantiable class to define options for the
NodeInfo.copy(net.sf.saxon.event.Receiver, int, net.sf.saxon.s9api.Location)method
DocumentKeyThis class encapsulates a string used as the value of the document-uri() property of a document, together with a normalized representation of the string used for equality comparisons. DocumentPoolAn object representing the collection of documents handled during a single transformation. EmptyAtomicSequenceAn implementation of AtomicSequence that contains no items. EmptyAttributeMapAn implementation of AttributeMap representing an empty AttributeMap EnumSetToolA couple of utility methods for handling EnumSet objects. FingerprintedQNameA QName triple (prefix, URI, local) with the additional ability to hold an integer fingerprint. FocusTrackingIteratorAn iterator that maintains the values of position() and current(), as a wrapper over an iterator which does not maintain these values itself. FunctionSerialNumberAllocator GenericTreeInfoA generic (model-independent) implementation of the TreeInfo interface, suitable for use with all tree models where the object representing the document node does not itself act as the TreeInfo implementation GroundedValueAsIterableA class that wraps a
GroundedValueas a Java
IgnorableSpaceStrippingRuleA whitespace stripping rule that strips whitespace text node children from all elements having an element-only content model, regardless of the value of the xml:space attribute IteratorWrapperClass IteratorWrapper - provides a SequenceIterator over a Java Iterator. LargeAttributeMapAn implementation of AttributeMap suitable for larger collections of attributes (say, more than five). LazySequenceA sequence that wraps an iterator, without being materialized. MemoSequenceA Sequence implementation that represents a lazy evaluation of a supplied iterator. MemoSequence.ProgressiveIteratorA ProgressiveIterator starts by reading any items already held in the reservoir; when the reservoir is exhausted, it reads further items from the inputIterator, copying them into the reservoir as they are read. NameCheckerThe NameChecker performs validation and analysis of XML names. NameOfNodeAn implementation of NodeName that gets the name of an existing NodeInfo object. NamePoolA NamePool holds a collection of expanded names, each containing a namespace URI, and a local name. NamespaceBindingRepresents the binding of a prefix to a URI. NamespaceDeltaMapHolds a set of namespace bindings as a simple immutable map from prefixes to URIs. NamespaceMapHolds a set of namespace bindings as a simple immutable map from prefixes to URIs. NodeSourceA JAXP Source object representing a Saxon
NoElementsSpaceStrippingRuleA whitespace stripping rule that retains all whitespace text nodes NoNamespaceNameAn implementation of NodeName for the common case of a name in no namespace One<T extends Item>A sequence containing exactly one item. OneOrMore<T extends Item>A value that is a sequence containing one or more items. PrefixPoolA prefix pool maintains a two-way mapping from namespace prefixes (as strings) to integer prefix codes. QNameParserParser to handle QNames in either lexical QName or EQName syntax, including resolving any prefix against a URIResolver. SelectedElementsSpaceStrippingRuleA whitespace stripping rule that strips elected elements unless xml:space indicates that whitespace should be preserved. SequenceToolUtility class for manipulating sequences. SingletonAttributeMapAn implementation of AttributeMap for use when there is exactly one attribute SmallAttributeMapAn implementation of AttributeMap suitable for small collections of attributes (typically, up to five). StandardNamesWell-known names used in XSLT processing. StructuredQNameThis class provides an economical representation of a QName triple (prefix, URI, and localname). StylesheetSpaceStrippingRuleA whitespace stripping rule that strips whitespace according to the rules defined for XSLT stylesheets TreeModelA TreeModel represents an implementation of the Saxon NodeInfo interface, which itself is essentially an implementation of the XDM model defined in W3C specifications (except that Saxon's NodeInfo understands the 13 XPath axes, rather than merely supporting parent and child properties). ZeroOrMore<T extends Item>A sequence value implemented extensionally. ZeroOrOne<T extends Item>A value that is a sequence containing zero or one items.
Enum Summary Enum Description GenreThe Genre of an item is the top-level classification of its item type: one of Atomic, Node, Function, Map, Array, or External
Exception Summary Exception Description NamePool.NamePoolLimitExceptionUnchecked Exception raised when some limit in the design of the name pool is exceeded QNameExceptionA QNameException represents an error condition whereby a QName (for example a variable name or template name) is malformed