com.icl.saxon.expr
Class SortedSelection
public class SortedSelection
A NodeSetExpression that retrieves nodes in order according to a specified sort key.
Note there is no direct XSL expression syntax that generates this.
The expression sorts a base NodeSet according to the value of a specified
sort key. The sort key may be composite. The base NodeSet will always be in document
order.
containsReferences , display , enumerate , evaluate , evaluateAsBoolean , evaluateAsNodeSet , evaluateAsNumber , evaluateAsString , getDataType , getDependencies , getStaticContext , indent , isContextDocumentNodeSet , make , outputStringValue , reduce , setStaticContext , simplify , usesCurrent |
SortedSelection
public SortedSelection(Expression s,
int k)
Constructor
s
- An expression whose value is the base nodeset to be sortedk
- the number of sort keys
display
public void display(int level)
Diagnostic print of expression structure
- display in interface Expression
getDependencies
public int getDependencies()
Determine which aspects of the context the expression depends on. The result is
a bitwise-or'ed value composed from constants such as Context.VARIABLES and
Context.CURRENT_NODE
- getDependencies in interface Expression
reduce
public Expression reduce(int dependencies,
Context context)
throws XPathException
Perform a partial evaluation of the expression, by eliminating specified dependencies
on the context.
- reduce in interface Expression
dependencies
- The dependencies to be removedcontext
- The context to be used for the partial evaluation
- a new expression that does not have any of the specified
dependencies
setSortKey
public void setSortKey(SortKeyDefinition sk,
int k)
Add a sort key and other sorting parameters
sk
- A SortKeyDefinitionk
- The index of this SortKeyDefinition. The first sort key in major-to-minor
order is numbered 0 (zero), the others are 1, 2, ... in sequence.