net.sf.saxon.expr
Class AppendExpression

java.lang.Object
  extended by net.sf.saxon.expr.ComputedExpression
      extended by net.sf.saxon.expr.BinaryExpression
          extended by net.sf.saxon.expr.AppendExpression
All Implemented Interfaces:
Serializable, Expression

public final class AppendExpression
extends BinaryExpression

An expression representing a sequence that is the concatenation of two given sequences. This implements the "comma" operator in XPath sequence expressions.

See Also:
Serialized Form

Nested Class Summary
static class AppendExpression.AppendIterator
          Iterator that concatenates the results of two supplied iterators
 
Field Summary
 
Fields inherited from class net.sf.saxon.expr.BinaryExpression
operands, operator
 
Fields inherited from class net.sf.saxon.expr.ComputedExpression
lineNumber, NO_ARGUMENTS, staticProperties
 
Constructor Summary
AppendExpression(Expression p1, int op, Expression p2)
          Constructor
 
Method Summary
 int computeCardinality()
          Determine the static cardinality of the expression
 ItemType getItemType()
          Determine the data type of the items returned by this expression
 SequenceIterator iterate(XPathContext c)
          Iterate over the value of the expression.
 Expression simplify()
          Simplify the expression
 
Methods inherited from class net.sf.saxon.expr.BinaryExpression
analyze, display, displayOperator, equals, getSubExpressions, hashCode, isCommutative, promote, setDetails
 
Methods inherited from class net.sf.saxon.expr.ComputedExpression
computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getDependencies, getIntrinsicDependencies, getLineNumber, getSpecialProperties, markTailFunctionCalls, setLineNumber, typeError
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppendExpression

public AppendExpression(Expression p1,
                        int op,
                        Expression p2)
Constructor

Parameters:
p1 - the left-hand operand
op - the operator (always ",")
p2 - the right-hand operand
Method Detail

getItemType

public final ItemType getItemType()
Determine the data type of the items returned by this expression

Returns:
the data type

computeCardinality

public final int computeCardinality()
Determine the static cardinality of the expression

Overrides:
computeCardinality in class BinaryExpression

simplify

public Expression simplify()
                    throws XPathException
Simplify the expression

Specified by:
simplify in interface Expression
Overrides:
simplify in class BinaryExpression
Returns:
the simplified expression
Throws:
XPathException - if an error is discovered during expression rewriting

iterate

public SequenceIterator iterate(XPathContext c)
                         throws XPathException
Iterate over the value of the expression.

Specified by:
iterate in interface Expression
Overrides:
iterate in class ComputedExpression
Parameters:
c - The context for evaluation
Returns:
a SequenceIterator representing the concatenation of the two operands
Throws:
XPathException - if any dynamic error occurs evaluating the expression