org.apache.tapestry.parse
Class ValidateRule

java.lang.Object
  extended by org.apache.commons.digester.Rule
      extended by org.apache.tapestry.parse.AbstractSpecificationRule
          extended by org.apache.tapestry.parse.ValidateRule

public class ValidateRule
extends AbstractSpecificationRule

Validates that an attribute matches a specified pattern.

Since:
3.0
Version:
$Id: ValidateRule.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Field Summary
 
Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
 
Constructor Summary
ValidateRule(RegexpMatcher matcher, String attributeName, String pattern, String errorKey)
           
 
Method Summary
 void begin(String namespace, String name, org.xml.sax.Attributes attributes)
          Validates that the attribute, if provided, matches the pattern.
 
Methods inherited from class org.apache.tapestry.parse.AbstractSpecificationRule
getLocation, getResourceLocation, getValue, setProperty
 
Methods inherited from class org.apache.commons.digester.Rule
begin, body, body, end, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidateRule

public ValidateRule(RegexpMatcher matcher,
                    String attributeName,
                    String pattern,
                    String errorKey)
Method Detail

begin

public void begin(String namespace,
                  String name,
                  org.xml.sax.Attributes attributes)
           throws Exception
Validates that the attribute, if provided, matches the pattern.

Overrides:
begin in class org.apache.commons.digester.Rule
Throws:
InvalidStringException - if the value does not match the pattern.
Exception