Package com.jclark.xsl.expr

Expression parsing and evaluation

This package provides facilities for parsing and evaluating XSLT expressions which include XPath expressions, template match patterns and attribute templates.

Interface Summary

BooleanExpr
CloneableNodeIterator
ExprContext packages up the context available to the XSLT engine when evaluating XPath expressions
ExtensionContext
Function all functions have the method: "makeCallExpr( ...
NameExpr
NodeSetExpr A NodeSetExpr (compiled XPath), when evaluated with a contextNode and an ExpressionContext, yields a NodeIterator
NumberExpr
PathPattern a compiled XPath expression which has an XSLT match priority
Pattern an XPATH (XSLT) match pattern
StringExpr an XPath expression which evaluates to a String
TopLevelPattern an XPath top level match pattern?
VariableSet
Variant
VariantExpr

Class Summary

AddExpr a compiled XPath expression (component) that represents the addition of two sub-expressions
AlternativesPattern represents an "OR" (union) of match patterns
AncestorAxisExpr an XPath expression component representing an ancestor axis
AncestorOrSelfAxisExpr An XPath expression component representing the ancestor-or-self axis
AncestorsOrSelfNodeIterator an Iterator that walks toward thwe document root
AndExpr
AnyElementOrAttributeTest
AppendExpr Represents the concatenation of two String Expressions
ArrayNodeIterator
AttributeAxisExpr
AttributeTest A compiled XPath component that tests a node to see if it is an attribute with a (possibly?) specified name
AxisExpr
BooleanFunction a single argument XPath function which casts its argument to a boolean Function: boolean boolean(object)

The boolean function converts its argument to a boolean as follows:

  • a number is true if and only if it is neither positive or negative zero nor NaN
  • a node-set is true if and only if it is non-empty
  • a string is true if and only if its length is non-zero
  • an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type
BooleanRelationalExpr
BooleanVariant a boolean which can provide its value as a String, Number or Object
CeilingFunction the XPath Function: number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer.
ChildAxisExpr
CloneableNodeIteratorImpl
CloneableNodeIteratorImpl.NodeList
ComposeExpr an expression which composes two sub-expressions (for each node in expr1, evaluate expr2)
ConcatFunction represents the XPath Function: string concat(string, string, string*) has the method makeCallExpr which will construct a String expression representing the concat function
ContainsFunction Represents the XPath Function: boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.
Converter
ConvertibleBooleanExpr An expression which is a boolean, but depending on its use, may be converted to a Number, String or Object
ConvertibleExpr An XPath expression (component) which can be cast to any of several types as needed
ConvertibleNodeSetExpr A compiled XPath pattern component which returns a Node set, but is convertible (castable) to a String expression, boolean expression or VariantExpression
ConvertibleNumberExpr
ConvertibleStringExpr
ConvertibleVariantExpr
CountFunction Represents the XPath Function: number count(node-set) The count function returns the number of nodes in the argument node-set.
CurrentFunction Represents the XSLT Function: node-set current() The current function returns a node-set that has the current node as its only member.
DecodeURIFunction Represents the EXSL str:encode-uri function For more information consult exsl specification at: Specification.
DelegateExprContext a base class for ExprContext classes that override some methods of an existing ExprContext, and delegate the rest of 'em to that existing ExprContest
DescendantAxisExpr XPath expression (component) representing descendant axis
DescendantOrSelfAxisExpr an XPath expression "//"
DescendantsOrSelfNodeIterator walks an entire (sub)-tree, excluding attributes
DifferenceFunction James Clark's extension function: node-set xt:difference(node-set, node-set)
DifferenceNodeIterator
DivideExpr
DocumentFunction represents the XSLT Function: node-set document(object, node-set?) The document function allows access to XML documents other than the main source document.
DocumentOrderComparator
ElementAvailableFunction the XSLT function 'element-available("qname")'
ElementOrAttributeTest
ElementTest A compiled XPath expression (component) tests a node for being an ELEMENT with a given Name
EmptyVariableSet
EncodeURIFunction Represents the EXSL str:encode-uri function For more information consult exsl specification at: Specification.
EqualsRelation
ExprParser XPAth expression parser / compiler extends the lexer ExprTokenizer
ExprTokenizer lexical analyser for XPath 1.0
ExtensionFunctionCallExpr
FalseExpr
FalseFunction a function of 0 arguments that returns false
FilterExpr
FilterNodeIterator
FilterPattern a pattern that has a predicate to eliminate some nodes
FilterPattern.Context
FloorFunction
FollowingAxisExpr
FollowingNodeIterator
FollowingSiblingAxisExpr
FormatNumberFunction
Function0 base class for all functions taking no arguments
Function1 base class for all functions taking one arguments
Function2
Function3 abstract base class for XPath functions which take 3 arguments
FunctionAvailableFunction implements XSLT function-available("qname") function XSLT sections 14.2 and 15
FunctionOpt1
GenerateIdFunction
GlobalVariableRefExpr
GreaterThanEqualsRelation
GreaterThanRelation
IdFunction the XPath function id(x)
IdPattern represents an XSLT/XPath pattern of the form id('foo')
InheritPattern
IntersectionFunction
IntersectionNodeIterator
KeyFunction the XPath function key("name", "value")
KeyPattern represents an XSLT/XPath pattern of the form key('foo', 'bar')
KeyValuesTable all the nodes which have been indexed for a given document in a given named key ...
LangFunction
LastFunction
LiteralExpr
LocalNameFunction
LocalPartFunction
LocalVariableRefExpr
MergeNodeIterator does some sort of sort/merge on NodeIterators, I think
ModuloExpr
MultiplyExpr
NameFunction
NamespaceAttributeTest
NamespaceAxisExpr
NamespaceElementTest
NamespaceFunction
NamespaceTest
NamespaceUriFunction
NegateExpr
NodeConstantExpr
NodeListSorter Like the name suggests, provides a mechanism to sort the nodes in a NodeIterator based upon the test of Comparator
NodeSetFunction
NodeSetVariant
NodeTestExpr
NodeTypeTest Simply tests if a node is of a given type e.g.
NormalizeFunction
NormalizeSpaceFunction
NotEqualsRelation
NotFunction
NullNodeIterator
NumberConstantExpr
NumberFunction
NumberRelationalExpr
NumberVariant
NumericRelation
ObjectTypeFunction Represents the EXSL exsl:object-type function For more information consult exsl specification at: Specification.
ObjectVariant
OrExpr
ParentAxisExpr
ParentPattern represents the concatenation of step patterns, right to left in a LocationPathPattern
ParseException
ParserTest
PathPatternBase a (component of) a compiled XPath pattern expression
PatternList This is where we come to find which template match pattern applies to any given node when we do an apply-templates.
PermanentNodeSetVariant
PositionFunction implements the XPath position() function, which evaluates to the current node's position in the current node set
PrecedingAxisExprThe algorithm is:
(define (preceding x)
(define (reverse-subtree x)
(append (map reverse-subtree (reverse (children x)))
(list x)))
(map (lambda (y)
(map reverse-subtree (preceding-sibling y)))
(ancestor-or-self x)))
PrecedingAxisExpr.AppendNodeIterator
PrecedingAxisExpr.LeftExpr
PrecedingAxisExpr.ReverseSubtreeExpr
PrecedingSiblingAxisExpr
ProcessingInstructionTest
RegexpMatchFunction Represents the EXSL regexp:match function For more information consult exsl specification at: Specification.
RegexpReplaceFunction Represents the EXSL regexp:replace function For more information consult exsl specification at: Specification.
RegexpTestFunction Represents the EXSL regesp:test function For more information consult exsl specification at: Specification.
Relation
ReverseAxisExpr A reverse axis (XPath) expression represents a Node set which may need to be seen in document order (thus reversed)
RootExpr an XPath expression (component) that evaluates a sub-expression with a document root Node as the contextNode
RoundFunction
SelfAxisExpr
SequenceComposeExpr Composition when expr1 is SINGLE_LEVEL and expr2 is STAYS_IN_SUBTREE.
SequenceComposeNodeIterator
SingleNodeIterator
SplitFunction Represents the EXSL str:split function For more information consult exsl specification at: Specification.
StartsWithFunction
StringFunction
StringLengthFunction
StringRelationalExpr
StringVariant
SubstringAfterFunction
SubstringBeforeFunction
SubstringFunction
SubtractExpr
SubtreeExpr descendants-or-self(node())/E when E has STAYS_IN_SUBTREE
SumFunction
SystemPropertyFunction implements the system-property() function, XSLT 1.0, section 12.4
TokenizerTest
TranslateFunction
TrueExpr
TrueFunction
UnionExpr
UnionNodeIterator
UniqueNodeIterator
UnparsedEntityURIFunction
ValueIdIterator
ValueIdIterator.Iterator
VariantBase
VariantRelationalExpr
WithCurrentExpr
WithCurrentExpr.Context
Expression parsing and evaluation

This package provides facilities for parsing and evaluating XSLT expressions which include XPath expressions, template match patterns and attribute templates.