This package provides classes representing XPath values (that is, the results of an expression). There are different classes for different types of value.
The principal class is:
This represents the result of evaluating an expression. But a Value is also an expression in its own right, reflecting the fact that literal values can be used syntactically wherever expressions can be used.
AtomicValue is a subclass of
that represents an atomic value: this in turn has subclasses for the different built-in data types:
StringValue, NumericValue, BooleanValue, DateValue, and so on.
There are two classes used to represent integer values:
IntegerValue for integers that
fit comfortably in 64 bits, and
BigIntegerValue for anything longer. Built-in subtypes
of xs:integer, such as
xs:short, are always represented using
IntegerValue, except for
xs:unsignedLong, which uses a
In general a value is a sequence. A sequence that is instantiated in memory is represented by a
SequenceExtent object. The code tries to pipeline execution so that a
is created as rarely as possible.
When an expression is evaluated lazily, the result is a
Closure. A Closure contains the original
expression, and a copy of the run-time context at the time evaluation was requested: that is, all the local
and other information that it depends on, such as the context item. There are two kinds of Closure, and the system
decides at compile time which to use. An ordinary Closure re-evaluates the expression every time the value is
this is used only when the compiler decides that the value is likely to be referenced only once. A MemoClosure
the value the first time it is needed, so that subsequent references do not cause repeated evaluation of the
Interface Summary Interface Description ExternalObject<T>An item that wraps an external (Java or .NET) object
Class Summary Class Description AnyURIValueAn XPath value of type xs:anyURI. AtomicValueThe AtomicValue class corresponds to the concept of an atomic value in the XPath 2.0 data model. Base64BinaryValueA value of type xs:base64Binary BigDecimalValueAn implementation class for decimal values other than integers BigDecimalValue.DecimalComparableA Comparable that performs comparison of a DecimalValue either with another DecimalValue or with some other representation of an XPath numeric value BigIntegerValueAn integer value: note this is a subtype of decimal in XML Schema, not a primitive type. BigIntegerValue.BigIntegerComparableA Comparable that performs comparison of BigInteger values either with other BigInteger values or with other representations of XPath numeric values BooleanValueA boolean XPath value CalendarValueAbstract superclass for Date, Time, and DateTime. CardinalityThis class contains static methods to manipulate the cardinality property of a type. ClosureA Closure represents a value that has not yet been evaluated: the value is represented by an expression, together with saved values of all the context variables that the expression depends on. DateTimeValueA value of type
DateValueA value of type Date. DayTimeDurationValueA value of type xs:dayTimeDuration. DecimalValueAbstract class representing the XDM type xs:decimal. DoubleValueA numeric (double precision floating point) value DurationValueA value of type xs:duration EmptySequence<T extends Item>An EmptySequence object represents a sequence containing no members. FloatingPointConverterThis is a utility class that handles formatting of numbers as strings. FloatValueA numeric (single precision floating point) value GDateValueAbstract superclass for the primitive types containing date components: xs:date, xs:gYear, xs:gYearMonth, xs:gMonth, xs:gMonthDay, xs:gDay GDayValueImplementation of the xs:gDay data type GMonthDayValueImplementation of the xs:gYear data type GMonthValueImplementation of the xs:gMonth data type GYearMonthValueImplementation of the xs:gYearMonth data type GYearValueImplementation of the xs:gYear data type HexBinaryValueA value of type xs:hexBinary Int64ValueAn integer value: note this is a subtype of decimal in XML Schema, not a primitive type. Int64Value.Int64ComparableA Comparable that performs comparison of an Int64Value either with another Int64Value or with some other representation of an XPath numeric value IntegerRangeThis class represents a sequence of consecutive ascending integers, for example 1 to 50. IntegerValueThis class represents the XPath built-in type xs:integer. MemoClosureA MemoClosure represents a value that has not yet been evaluated: the value is represented by an expression, together with saved values of all the context variables that the expression depends on. NestedIntegerValueThis class represents a dot-separated sequence of numbers such as 1.12.5, typically used as a software version number. NotationValueAn xs:NOTATION value. NumericValueNumericValue is an abstract superclass for IntegerValue, DecimalValue, FloatValue, and DoubleValue ObjectValue<T>An XPath value that encapsulates a Java object. QNameValueA QName value. QualifiedNameValueA qualified name: this is an abstract superclass for QNameValue and NotationValue, representing the XPath primitive types xs:QName and xs:NOTATION respectively SaxonDurationSaxon implementation of the JAXP class javax.xml.datatype.Duration. SaxonXMLGregorianCalendarSaxon implementation of the JAXP class javax.xml.datatype.XMLGregorianCalendar. SequenceExtentA sequence value implemented extensionally. SequenceSliceA sequence value implemented extensionally. SequenceTypeSequenceType: a sequence type consists of a primary type, which indicates the type of item, and a cardinality, which indicates the number of occurrences permitted. SingletonClosureA SingletonClosure represents a value that has not yet been evaluated: the value is represented by an expression, together with saved values of all the context variables that the expression depends on. StringToDouble11Convert a string to a double using the rules of XML Schema 1.1 StringValueAn atomic value of type xs:string. StringValue.Builder StringValue.CharacterIteratorCharacterIterator is used to iterate over the characters in a string, returning them as integers representing the Unicode code-point. StringValue.UnicodeCharacterIterator TextFragmentValueThis class represents a temporary tree whose root document node owns a single text node. TimeValueA value of type xs:time UntypedAtomicValueAn Untyped Atomic value. WhitespaceThis class provides helper methods and constants for handling whitespace Whitespace.TokenizerAn iterator that splits a string on whitespace boundaries, corresponding to the XPath 3.1 function tokenize#1 YearMonthDurationValueA value of type xs:yearMonthDuration.