jd.xml.xslt.pattern
Class OrPattern

java.lang.Object
  extended byjd.xml.xslt.pattern.Pattern
      extended byjd.xml.xslt.pattern.OrPattern

public class OrPattern
extends Pattern

OrPattern represents the or pattern (lhs|rhs).


Constructor Summary
OrPattern(Pattern lhs, Pattern rhs)
           
 
Method Summary
 void accept(PatternVisitor visitor)
          Accept a PatternVisitor.
 double calculatePriority()
          The OrPattern does not have a default priority, because the processor must treat the template rule of with such a pattern as a set of rules, on for each alternative pattern, when it resolves template conflicts.
 Pattern[] getPatterns()
          Return the patterns of this OrPattern.
 boolean match(XPathContext context)
          Test if the context node matches the pattern.
 
Methods inherited from class jd.xml.xslt.pattern.Pattern
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrPattern

public OrPattern(Pattern lhs,
                 Pattern rhs)
Method Detail

getPatterns

public Pattern[] getPatterns()
Return the patterns of this OrPattern.


match

public boolean match(XPathContext context)
Test if the context node matches the pattern.

Specified by:
match in class Pattern

calculatePriority

public double calculatePriority()
The OrPattern does not have a default priority, because the processor must treat the template rule of with such a pattern as a set of rules, on for each alternative pattern, when it resolves template conflicts. Therefore constant 0.0 is returned.

Overrides:
calculatePriority in class Pattern

accept

public void accept(PatternVisitor visitor)
Accept a PatternVisitor.

Specified by:
accept in class Pattern