## Package net.sf.saxon.value

This package provides classes representing XPath values (that is, the results of an expression).

See:
Description

Class Summary
AnyURIValue: A string value
AtomicValue: A AtomicValue is a value that isn't a sequence and isn't a node.
Base64BinaryValue: A value of type xs:base64Binary
BigIntegerValue: An integer value: note this is a subtype of decimal in XML Schema, not a primitive type.
BooleanValue: A boolean XPath value
CalendarValue: Abstract superclass for Date, Time, and DateTime
Cardinality: This class contains static methods to manipulate the cardinality property of a type.
Closure: A 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.
DateTimeValue: A value of type DateTime
DateValue: A value of type Date.
DecimalValue: A decimal value
DerivedAtomicValue: A DerivedAtomicValue is an atomic value of a user-defined type
DoubleValue: A numeric (double precision floating point) value
DurationValue: A value of type xs:duration
EmptySequence: An EmptySequence object represents a sequence containing no members.
FloatValue: A numeric (single precision floating point) value
GDayValue: Implementation of the xs:gDay data type
GMonthDayValue: Implementation of the xs:gYear data type
GMonthValue: Implementation of the xs:gMonth data type
GYearMonthValue: Implementation of the xs:gYearMonth data type
GYearValue: Implementation of the xs:gYear data type
HexBinaryValue: A value of type xs:hexBinary
IntegerValue: An integer value: note this is a subtype of decimal in XML Schema, not a primitive type.
MonthDurationValue: A value of type xsd:yearMonthDuration
NotationValue: An xs:NOTATION value.
NumericValue: NumericValue is an abstract superclass for IntegerValue, DecimalValue, FloatValue, and DoubleValue
ObjectValue: An XPath value that encapsulates a Java object.
QNameValue: A QName value.
RestrictedStringValue: A value conforming to one of the built-in subtypes of String, specifically normalizedString, token, language, Name, NCName, ID, IDREF, ENTITY, NMTOKEN.
SecondsDurationValue: A value of type xsd:dayTimeDuration
SequenceExtent: A sequence value implemented extensionally.
SequenceIntent: A SequenceIntent is sequence value that uses deferred evaluation.
SequenceType: SequenceType: a sequence type consists of a primary type, which indicates the type of item, and a cardinality, which indicates the number of occurrences permitted.
SequenceValue: A SequenceValue object represents a sequence whose members are all AtomicValues or Nodes.
SingletonNode: A value that is a sequence containing zero or one nodes
StringValue: An atomic value of type xs:string
TextFragmentValue: This class represents a temporary tree whose root document node owns a single text node.
TimeValue: A value of type xs:time
UntypedAtomicValue: An Untyped Atomic value.
Value: A value is the result of an expression but it is also an expression in its own right.

## Package net.sf.saxon.value Description

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:

Value:
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. There are subclasses of Value for the different data types: StringValue, NumericValue, SequenceValue, BooleanValue, and so on.

Although values are all fixed, the class `SequenceIntent` deserves special mention because it represents a value that has not yet been evaluated. It is actually a wrapper for a SequenceIterator that can be used to obtain the values when required. This SequenceIterator will always be context-independent, it will return the same values each time it is used. The SequenceIntent class contains logic to ensure that if the sequence is used repeatedly, the results are saved locally in memory: this is a trade-off to try and ensure a balance between repeated calculation of the same results, and holding results in memory just in case they are needed again.

This package also includes the class `Type`, which contains a number of methods for handling type inferences.

Michael H. Kay
25 April 2002