All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.saxon.value.package-info Maven / Gradle / Ivy

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2018-2023 Saxonica Limited
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/**
 * 

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. AtomicValue is a subclass of Value * 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:int and xs:short, are always represented using * an IntegerValue, except for xs:unsignedLong, which uses a BigIntegerValue. *

*

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 SequenceExtent * 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 * variables * 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 * referenced; * this is used only when the compiler decides that the value is likely to be referenced only once. A MemoClosure * remembers * the value the first time it is needed, so that subsequent references do not cause repeated evaluation of the * expression.

*/ package net.sf.saxon.value;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy