org.apache.cocoon.transformation
Class EncodeURLTransformer.ElementAttributeMatching

java.lang.Object
  extended byorg.apache.cocoon.transformation.EncodeURLTransformer.ElementAttributeMatching
Enclosing class:
EncodeURLTransformer

public static class EncodeURLTransformer.ElementAttributeMatching
extends Object

A helper class for matching element names, and attribute names.

For given include-name, exclude-name decide if element-attribute pair matches. This class defines the precedence and matching algorithm.


Field Summary
protected  Pattern excludeNameRE
          Regular expression of excluding patterns
protected  Pattern includeNameRE
          Regular expression of including patterns
 
Constructor Summary
EncodeURLTransformer.ElementAttributeMatching(String includeName, String excludeName)
          Constructor for the ElementAttributeMatching object
 
Method Summary
 boolean matchesElementAttribute(String element_name, String attr_name, String value)
          Return true iff element_name attr_name pair is not matched by exclude-name, but is matched by include-name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

includeNameRE

protected Pattern includeNameRE
Regular expression of including patterns


excludeNameRE

protected Pattern excludeNameRE
Regular expression of excluding patterns

Constructor Detail

EncodeURLTransformer.ElementAttributeMatching

public EncodeURLTransformer.ElementAttributeMatching(String includeName,
                                                     String excludeName)
                                              throws PatternSyntaxException
Constructor for the ElementAttributeMatching object

Parameters:
includeName - Description of Parameter
excludeName - Description of Parameter
Throws:
PatternSyntaxException - Description of Exception
Method Detail

matchesElementAttribute

public boolean matchesElementAttribute(String element_name,
                                       String attr_name,
                                       String value)
Return true iff element_name attr_name pair is not matched by exclude-name, but is matched by include-name

Parameters:
element_name -
attr_name -
value - TODO
Returns:
boolean true iff value of attribute_name should get rewritten, else false.


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.