commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester package.html
Date Wed, 02 Apr 2003 19:05:12 GMT
rdonkin     2003/04/02 11:05:12

  Modified:    digester build.xml
               digester/src/java/org/apache/commons/digester package.html
  Log:
  Added new Rule implementation based on a pluggable regex implementation. Also test case
and a simple regex matching implementation
  
  Revision  Changes    Path
  1.41      +12 -2     jakarta-commons/digester/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/build.xml,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- build.xml	31 Mar 2003 00:41:14 -0000	1.40
  +++ build.xml	2 Apr 2003 19:05:12 -0000	1.41
  @@ -255,7 +255,8 @@
                                  test.spr,
                                  test.xmlrules,
                                  test.node,
  -                               test.factory
  +                               test.factory,
  +                               test.regex
                                 "
      description="Run all unit test cases">
     </target>
  @@ -333,6 +334,15 @@
       </java>
     </target>
   
  +  <target name="test.regex" depends="compile.tests"
  +   description="Run tests for RegexRules">
  +    <echo message="Running tests for RegexRules ..."/>
  +    <java classname="${test.runner}" fork="yes"
  +        failonerror="${test.failonerror}">
  +      <arg value="org.apache.commons.digester.RegexRulesTestCase"/>
  +      <classpath refid="test.classpath"/>
  +    </java>
  +  </target>
   
     <target name="test.matching.extended" depends="compile.tests"
      description="Run rule Digester extended test cases">
  
  
  
  1.19      +22 -4     jakarta-commons/digester/src/java/org/apache/commons/digester/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/package.html,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- package.html	8 Jan 2003 20:22:15 -0000	1.18
  +++ package.html	2 Apr 2003 19:05:12 -0000	1.19
  @@ -764,10 +764,10 @@
       creator can use any prefix that they like).</li>
   </ul>
   
  -<p>One advanced <code>Rules</code> implementation,
  -<a href="ExtendedBaseRules.html">ExtendedBaseRules</a>, is available.  This
  -implementation adds some additional expression syntax for pattern matching
  -than the default mechanism, but it also executes more slowly.  See the
  +<h4>ExtendedBaseRules</h4>
  +<p><a href="ExtendedBaseRules.html">ExtendedBaseRules</a>,
  +adds some additional expression syntax for pattern matching
  +to the default mechanism, but it also executes more slowly.  See the
   JavaDocs for more details on the new pattern matching syntax, and suggestions
   on when this implementation should be used.  To use it, simply do the
   following as part of your Digester initialization:</p>
  @@ -776,6 +776,24 @@
     Digester digester = ...
     ...
     digester.setRules(new ExtendedBaseRules());
  +  ...
  +</pre>
  +
  +<h4>RegexRules</h4>
  +<p><a href="RegexRules.html">RegexRules</a> is an advanced <code>Rules</code>

  +implementation which does not build on the default pattern matching rules.
  +It uses a pluggable RegexMatcher implementation to test if a path matches the pattern
  +for a Rule. All matching rules are returned (note that this behaviour differs from 
  +longest matching rule of the default pattern matching rules). See the Java Docs for more
details.
  +</p>
  +<p>
  +Example usage:
  +</p>
  +
  +<pre>
  +  Digester digester = ...
  +  ...
  +  digester.setRules(new RegexRules(new SimpleRegexMatcher()));
     ...
   </pre>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message