com.jclark.xsl.expr

Class AlternativesPattern

Implemented Interfaces:
Pattern, TopLevelPattern

(package private) class AlternativesPattern
extends java.lang.Object
implements TopLevelPattern

represents an "OR" (union) of match patterns

Constructor Summary

AlternativesPattern(TopLevelPattern pattern1, PathPattern pattern2)
construct with a head pattern1 and tail pattern2

Method Summary

PathPattern[]
getAlternatives()
boolean
matches(Node node, ExprContext context)
evaluate to a boolean

Constructor Details

AlternativesPattern

(package private)  AlternativesPattern(TopLevelPattern pattern1,
                                       PathPattern pattern2)
construct with a head pattern1 and tail pattern2

Method Details

getAlternatives

public PathPattern[] getAlternatives()
Specified by:
getAlternatives in interface TopLevelPattern
Returns:
an array of all the alternative PathPatterns

matches

public boolean matches(Node node,
                       ExprContext context)
            throws XSLException
evaluate to a boolean
Specified by:
matches in interface Pattern