You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2005/02/04 02:51:53 UTC

svn commit: r151287 [1/7] - in jakarta/commons/proper/digester/branches/digester2: ./ src/ src/conf/ src/examples/ src/examples/api/ src/examples/api/addressbook/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/commons/ src/java/org/apache/commons/digester2/ src/java/org/apache/commons/digester2/actions/ src/java/org/apache/commons/digester2/factory/ src/media/ src/test/ src/test/org/ src/test/org/apache/ src/test/org/apache/commons/ src/test/org/apache/commons/digester2/ xdocs/ xdocs/dtds/ xdocs/images/ xdocs/style/

Author: skitching
Date: Thu Feb  3 17:51:43 2005
New Revision: 151287

URL: http://svn.apache.org/viewcvs?view=rev&rev=151287
Log:
Initial import of code for digester 2.0

Added:
    jakarta/commons/proper/digester/branches/digester2/
    jakarta/commons/proper/digester/branches/digester2/LICENSE.txt
    jakarta/commons/proper/digester/branches/digester2/NOTICE.txt
    jakarta/commons/proper/digester/branches/digester2/PROPOSAL.html
    jakarta/commons/proper/digester/branches/digester2/RELEASE-NOTES.txt
    jakarta/commons/proper/digester/branches/digester2/STATUS.html
    jakarta/commons/proper/digester/branches/digester2/build.properties.sample
    jakarta/commons/proper/digester/branches/digester2/build.xml
    jakarta/commons/proper/digester/branches/digester2/checkstyle.xml
    jakarta/commons/proper/digester/branches/digester2/maven.xml
    jakarta/commons/proper/digester/branches/digester2/project.properties   (with props)
    jakarta/commons/proper/digester/branches/digester2/project.xml
    jakarta/commons/proper/digester/branches/digester2/src/
    jakarta/commons/proper/digester/branches/digester2/src/conf/
    jakarta/commons/proper/digester/branches/digester2/src/conf/MANIFEST.MF
    jakarta/commons/proper/digester/branches/digester2/src/examples/
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/AddressBook.java
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Main.java
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Person.java
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/build.xml
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/example.xml
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/log4j.xml
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/readme.txt
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/build.properties
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/build.xml
    jakarta/commons/proper/digester/branches/digester2/src/examples/api/readme.txt
    jakarta/commons/proper/digester/branches/digester2/src/examples/readme.txt
    jakarta/commons/proper/digester/branches/digester2/src/java/
    jakarta/commons/proper/digester/branches/digester2/src/java/org/
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/AbstractAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Action.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/ArrayStack.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Context.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DefaultRuleManager.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Digester.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DigestionException.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/InvalidRuleException.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/MultiHashMap.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/NestedSAXException.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/ParseException.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Path.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/RuleManager.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Substitutor.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/AbstractObjectCreationFactory.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/BeanPropertySetterAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallMethodAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CallParamAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectWithFactoryAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/NodeCreateAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/ObjectCreationFactory.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/SetNextAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/SetPropertiesAction.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/package.html
    jakarta/commons/proper/digester/branches/digester2/src/java/overview.html
    jakarta/commons/proper/digester/branches/digester2/src/media/
    jakarta/commons/proper/digester/branches/digester2/src/media/logo.xcf   (with props)
    jakarta/commons/proper/digester/branches/digester2/src/test/
    jakarta/commons/proper/digester/branches/digester2/src/test/org/
    jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/
    jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/
    jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/
    jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/ContextTestCase.java
    jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/DigesterTestCase.java
    jakarta/commons/proper/digester/branches/digester2/svn-commit.tmp
    jakarta/commons/proper/digester/branches/digester2/xdocs/
    jakarta/commons/proper/digester/branches/digester2/xdocs/dtds/
    jakarta/commons/proper/digester/branches/digester2/xdocs/dtds/digester-rules.dtd
    jakarta/commons/proper/digester/branches/digester2/xdocs/images/
    jakarta/commons/proper/digester/branches/digester2/xdocs/images/logo.jpg   (with props)
    jakarta/commons/proper/digester/branches/digester2/xdocs/images/logo.png   (with props)
    jakarta/commons/proper/digester/branches/digester2/xdocs/index.xml
    jakarta/commons/proper/digester/branches/digester2/xdocs/navigation.xml   (with props)
    jakarta/commons/proper/digester/branches/digester2/xdocs/style/
    jakarta/commons/proper/digester/branches/digester2/xdocs/style/project.css

Added: jakarta/commons/proper/digester/branches/digester2/LICENSE.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/LICENSE.txt?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/LICENSE.txt (added)
+++ jakarta/commons/proper/digester/branches/digester2/LICENSE.txt Thu Feb  3 17:51:43 2005
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: jakarta/commons/proper/digester/branches/digester2/NOTICE.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/NOTICE.txt?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/NOTICE.txt (added)
+++ jakarta/commons/proper/digester/branches/digester2/NOTICE.txt Thu Feb  3 17:51:43 2005
@@ -0,0 +1,2 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).

Added: jakarta/commons/proper/digester/branches/digester2/PROPOSAL.html
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/PROPOSAL.html?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/PROPOSAL.html (added)
+++ jakarta/commons/proper/digester/branches/digester2/PROPOSAL.html Thu Feb  3 17:51:43 2005
@@ -0,0 +1,94 @@
+<html>
+<head>
+<title>Proposal for Digester Package</title>
+</head>
+<body bgcolor="white">
+
+<div align="center">
+<h1>Proposal for <em>Digester</em> Package</h1>
+</div>
+
+<h3>(0) Rationale</h3>
+
+<p>Many Jakarta products read XML configuration files to provide
+initialization of various Java objects within the system.
+</p>
+
+<p>There are several ways of doing this now spread across various Jakarta
+projects which could all be moved toward a common implementation.
+</p>
+
+<p>A Commons package would give committers an opportunity to coordinate
+their efforts to create and maintain a efficient, feature-rich package
+under the ASF license.
+</p>
+
+<h3>(1) Scope of the Package</h3>
+
+<p>The <em>Digester</em> project shall create and maintain a XML -> Java 
+object mapping package written in the Java language to be distributed 
+under the ASF license.
+
+<h3>(1.5) Interaction With Other Packages</h3>
+
+<p><em>Digester</em> relies on:
+</p>
+
+<ul>
+  <li>Java Development Kit (Version 1.2 or later)</li>
+  <li>A JAXP 1.1 implementation</li>
+  <li>A SAX 2.0 parser conforming to the JAXP 1.1 APIs</li>
+  <li>BeanUtils from Commons - for instrospection information</li>
+  <li>Collections from Commons - inherited dependence from BeanUtils</li>
+</ul>
+
+<h3>(2) Initial Source of the Package</h3>
+
+<p>The initial codebase are an integral part of the 
+<a href="http://jakarta.apache.org/struts">Struts Framework</a>.
+However, they have very few dependencies on other aspects of Struts, and
+those dependencies have been removed in the proposed code base.
+Once accepted and released as a Jakarta Commons component, Struts will
+be modified to use the Commons version of these classes, and its internal
+versions will be deprecated.</p>
+
+<p>The proposed package name for the new component is
+org.apache.commons.digester.
+</p>
+
+<h3>(3) Required Jakarta-Commons Resources</h3>
+
+<ul>
+
+<li>CVS Repository - New directory <code>digester</code> in the 
+<code>jakarta-commons</code> CVS repository.</li>
+
+<li>Initial Committers - Most of the initial commiters are already 
+committers on jakarta-commons,so the only addition is for user id sanders.</li>
+
+<li>Mailing List - Discussions will take place on the general
+<em>jakarta-commons@jakarta.apache.org</em> mailing list. To help list
+subscribers identify messages of interest, it is suggested that the
+message subject of messages about this component be prefixed with
+[Digester].</li>
+
+<li>Bugzilla - New component "Digester" under the "Commons" product
+category, with appropriate version identifiers as needed.</li>
+
+<li>Jyve FAQ - New category "commons-digester" (when available).</li>
+</ul>
+
+
+<h3>(4) Initial Committers</h3>
+
+<p>The initial committers on the Digester component shall be:</p>
+
+<ul>
+  <li>Geir Magnusson Jr.</li>
+  <li>Craig R. McClanahan</li>
+  <li>Scott Sanders</li>
+  <li>Rodney Waldhoff</li>
+</ul>
+
+</body>
+</html>

Added: jakarta/commons/proper/digester/branches/digester2/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/RELEASE-NOTES.txt?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/RELEASE-NOTES.txt (added)
+++ jakarta/commons/proper/digester/branches/digester2/RELEASE-NOTES.txt Thu Feb  3 17:51:43 2005
@@ -0,0 +1,203 @@
+$Id: $
+
+
+                          Commons Digester Package
+                                Version 2.0 alpha
+                               Release Notes
+
+
+INTRODUCTION:
+============
+
+The Apache Jakarta Commons Digester
+Release 2.0 of the Apache Jakarta Commons Digester package is a significant
+rewrite of the original package. All the fundamental concepts remain the same,
+but the APIs have been redesigned based on the lessons learnt from the 1.x
+series of releases.
+
+IMPORTANT NOTES
+===============
+
+
+Dependencies
+------------
+The 2.0 Digester release requires:
+   Logging 1.0.x + BeanUtils 1.7
+
+MAJOR CHANGES SINCE 1.x
+=======================
+
+This section is intended for the use of those familiar with the 1.x releases
+of this product. There are many changes, but those listed below are the
+most significant.
+
+Versioning
+----------
+At the current time, the new code uses the package name
+  org.apache.commons.digester2.*
+There will no doubt be debate over whether this is a good idea, or whether
+the original
+  org.apache.commons.digester.*
+package names should be used.
+
+General principles
+------------------
+* Protected members are not used. Instead, members are private, and protected
+  setter/getter methods are provided where needed. This makes it easier in
+  future to change classes without breaking existing subclasses that have 
+  been defined by users of the Digester classes.
+
+Renamed/repackaged classes
+----------------
+* Rule --> Action
+  The term "rule" has confused a number of people over the years. The new 
+  and hopefully clearer term "action" is used instead. The word "rule" is
+  now used only to refer to a (pattern, action) pair, which is more intuitive.
+  
+* Rules --> RuleManager
+  The word "Rules" to mean *not* a collection of Rule objects, but instead
+  the pattern-matching engine that happens to *contain* a collection of Rule
+  objects was always confusing.
+  
+* RulesBase --> DefaultRuleManager
+  This should speak for itself.
+
+* All the basic action classes (formerly Rule classes) now reside in the
+  o.a.c.digester2.actions package.
+
+* ObjectCreateRule has been renamed to CreateObjectAction and
+  FactoryCreateRule has been renamed to CreateObjectWithFactoryAction.
+  
+Refactored classes
+------------------
+* Digester has been split into:
+   * Digester
+   * SAXHandler
+   * Context
+   * ActionFactory
+
+  The old Digester interface had a huge number of methods. Many of these
+  were only because Digester also implemented the interfaces necessary to:
+  (a) handle the SAX parser callbacks, and
+  (b) for the Rule (now Action) classes to store data on it during the
+      parse (the object stack etc).
+  (c) conveniently create Rule (now Action) instances.
+  
+  These pieces of functionality have now been split out into separate
+  classes, so:
+   * Digester now contains only the basic methods that users of the 
+     library need to interact with.
+   * SAXHandler handles the callbacks from the parser
+   * Context holds the object stack, current match path, and related data.
+   * ActionFactory provides the factory methods to conveniently create,
+     configure and add Action objects to a Digester or RuleManager. Moving
+     this functionality out of the Digester object also allows the Digester
+     class to be distributed with a subset (including none) of the default 
+     Action classes if desired.
+
+  Note that because parsing state is stored on the Context object now, it
+  is easier to implement the often-requested feature of being able to parse
+  multiple xml documents with the same Digester instance.
+  
+Namespace-aware parsing
+-----------------------
+The Digester now *always* uses a namespace-aware xml parser.
+The DefaultRuleManager patterns properly support namespaces, eg
+  /ns1:foo/ns2:bar/baz
+where the URIs that ns1 and ns2 correspond to have been defined via
+earlier calls to method DefaultRuleManager.addNamespace(prefix, uri).
+
+DefaultRuleManager
+------------------
+The DefaultRuleManager (formerly RulesBase) now uses a more xpath-like 
+syntax for its patterns. It still isn't full xpath support, just a little
+closer for general consistency. In particular, a leading slash is required
+on absolute paths. A pattern with no leading slash is a relative path, and
+is equivalent to the old "*/" prefix.
+
+Action (formerly Rule) API changes
+-----------------------------------
+* Action is an interface. The AbstractAction class has been defined and is
+  the recommended base for all custom actions. 
+* Action classes no longer have a "digester" member pointing to their "owner".
+  Instead, the begin/body/end methods are always passed a Context object that
+  allows them to access the object stack etc.
+* Action classes are required to avoid modification of any member variable
+  during parsing (ie from their begin/body/end methods). All data must instead
+  be stored on the provided Context object. This effectively makes an Action
+  instance both re-entrant and thread-safe.
+* The two regulations above mean that an Action instance can now be used
+  concurrently by multiple Digester instances (eg in a pool).
+* New methods startParse, endParse and bodySegment are provided, with empty
+  default implementations for specific Actions to override if they wish.
+* Deprecated methods have been removed.
+  
+Exceptions
+-----------
+A lot more methods are declared to throw explicit Exceptions, which should
+result in more reliable and explicit error-handling.
+
+Terminology
+------------
+The word "pattern" is now used exclusively for a string that is interpreted
+by a RuleManager instance.
+
+The word "path" is now used for a string that describes an absolute path
+from the root document node to the current xml element. When a pattern
+matches the path, the associated Action is executed.
+
+Xml-rules
+------------
+The xmlrules module has not yet been reimplemented. However the following
+changes are planned:
+* A RuleManager instance will be returned rather than a Digester.
+  Because a RuleManager is thread-safe, this allows a pool of Digester
+  instances to be configured with this object without having to reparse
+  the xmlrules input file.
+* the xmlrules file will be able to specify what RuleManager subclass
+  is desired (with the default being the DefaultRuleManager class).
+* The rule parser constructor will take a list of Action (formerly Rule) 
+  classes, and will auto-configure itself by using reflection against these
+  classes rather than the current system where code is written for each
+  Rule class. 
+* Because the list of Actions to support is passed in at runtime, the rule
+  parser class will not have explicit dependencies upon the default actions.
+  This allows the class to be distributed without the set of default actions
+  if desired. The ActionFactory class will provide a factory method for
+  creating a rule parser instance which knows about all the default actions
+* The input xmlrules file will be able to specify custom action classes.
+
+Other notes
+-----------
+* The Digester class now only deals in XMLReader rather than SAXParser.
+  This shouldn't remove any functionality, just simplify the code.
+* The default errorHandler methods now throw an exception for errors and 
+  fatal-errors reported by the parser rather than the old behaviour of just 
+  logging the error then continuing.
+* ParserFeatureSetterFactory and related classes have not been reimplemented,
+  and will not be reimplemented by me. If they are wanted, someone else will
+  have to do this.
+* I haven't implemented RuleSets. Are they useful to anyone?
+* the peek and pop methods on the digester, parameter and named stacks
+  now throw an exception if misused rather than return null.
+  
+Still TO-DO
+------------
+* Think about alternative ways of performing logging.
+* Think about how to support pattern syntax of "/foo[@attr=value]" style.
+  This may require a quite different API for RuleManager, so that RuleManager
+  is passed the actual Elements required, rather than a string representing
+  just the current path.
+* implement the bodySegment callback for Actions
+* break up CallParamAction into multiple simpler actions
+* refactor CallMethodAction to clean up its constructor.
+* Fix rules that store data on themselves.
+* Think about resolving dependency issues on Beanutils by allowing digester
+  to use beanutils via a local classloader. That means that it is ok to use
+  digester even in a situation where another version of beanutils is the
+  default.
+* sort out schemaLocation/schemaLanguage mess.
+* support rules to handle processing instructions.
+* Add feature to default EntityResolver behaviour to block access to any
+  non-registered entities, unless user explicitly enables this.
+

Added: jakarta/commons/proper/digester/branches/digester2/STATUS.html
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/STATUS.html?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/STATUS.html (added)
+++ jakarta/commons/proper/digester/branches/digester2/STATUS.html Thu Feb  3 17:51:43 2005
@@ -0,0 +1,91 @@
+<html>
+<head>
+<title>Status File for Jakarta Commons "Digester" Component</title>
+<head>
+<body bgcolor="white">
+
+
+<div align="center">
+<h1>The Jakarta Commons <em>Digester</em> Component</h1>
+$Id: STATUS.html,v 1.12 2004/09/09 20:38:19 rdonkin Exp $<br>
+<a href="#Introduction">[Introduction]</a>
+<a href="#Dependencies">[Dependencies]</a>
+<a href="#Release Info">[Release Info]</a>
+<a href="#Committers">[Committers]</a>
+<a href="#Action Items">[Action Items]</a>
+<br><br>
+</div>
+
+
+<a name="Introduction"></a>
+<h3>1.  INTRODUCTION</h3>
+
+ <p>
+ This scope of the <em>Digester</em> component is primarily
+ oriented to  XML -> Java object mapping.
+ </p>
+ <p>
+  A <em>Digester</em> processes an XML input stream by matching a
+  series of element nesting patterns to execute Rules that have been added
+  prior to the start of parsing.  This package was inspired by the
+  <code>XmlMapper</code> class that was part of Tomcat 3.0 and 3.1,
+  but is organized somewhat differently.
+ </p>
+
+ <p>
+  The original source was donated by the
+  <a href="http://jakarta.apache.org/struts">Struts Framework</a> subproject.
+ </p>
+
+
+<a name="Dependencies"></a>
+<h3>2.  DEPENDENCIES</h3>
+
+<p>The <em>Digester</em> component is dependent upon implementations of the following 
+standard components for development and use:</p>
+<ul>
+<li><a href="http://java.sun.com/j2se">Java Development Kit</a>
+    (Version 1.2 or later)</li>
+<li><strong>XML Parser</strong> compatible with the JAXP/1.1 specification.
+    Examples compatible implementations include:
+    <ul>
+    <li><a href="http://java.sun.com/xml">JAXP/1.1 Reference Implementation</a></li>
+    <li><a href="http://xml.apache.org/xerces-j">Xerces</a> (Version 1.3.1 or later)</li>
+    </ul></li>
+</ul>
+<p>
+It is also dependent on a compatible set of 
+<a href='http://jakarta.apache.org/commons'>Jakarta Commons</a> library components:
+</p>
+    <table border="1" width="100%" cellspacing="2" cellpadding="3">
+        <tr class="a"><th colspan="4">Compatible Dependency Sets</th></tr>   
+        <tr class="b"><td>Digester</td><td>+Logging 1.0.x</td><td>+BeanUtils 1.x</td><td>+Collections 2.x</td></tr>
+        <tr class="a"><td>Digester</td><td>+Logging 1.0.x</td><td>+BeanUtils 1.x</td><td>+Collections 3.x</td></tr>
+        <tr class="b"><td>Digester</td><td>+Logging 1.0.x</td><td>+BeanUtils 1.7</td><td>-</td></tr>
+    </table>
+
+<a name="Release Info"></a>
+<h3>3.  RELEASE INFO</h3>
+
+<p>Current Release: Version 1.6</p>
+
+
+<a name="Committers"></a>
+<h3>4.  COMMITTERS</h3>
+
+<p>The following individuals are the primary developers and maintainers of this
+component.  Developers who plan to use <em>Digester</em> in their own
+projects are encouraged to collaborate on the future development of this
+component to ensure that it continues to meet a variety of needs.</p>
+<ul>
+<li><a href="mailto:craigmcc@apache.org">Craig McClanahan</a></li>
+<li>Rodney Waldhoff</li>
+<li><a href="mailto:sanders@apache.org">Scott Sanders</a></li>
+<li><a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a></li>
+<li><a href="mailto:rdonkin@apache.org">Robert Burrell Donkin</a></li>
+<li><a href="mailto:tobrien@apache.org">Tim O'Brien</a></li>
+<li><a href="mailto:jstrachan@apache.org">James Strachan</a></li>
+<li>Simon Kitching</li>
+</ul>
+</body>
+</html>

Added: jakarta/commons/proper/digester/branches/digester2/build.properties.sample
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/build.properties.sample?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/build.properties.sample (added)
+++ jakarta/commons/proper/digester/branches/digester2/build.properties.sample Thu Feb  3 17:51:43 2005
@@ -0,0 +1,31 @@
+root=/java/jars
+jaxp.home=${root}
+jaxp.jaxp.jar=${jaxp.home}/jaxp.jar
+jaxp.parser.jar=${jaxp.home}/crimson.jar
+
+# Commons projects -- correct if 'ant dist' is run on each project in the
+# default CVS directory layout.  Note that Digester no longer depends on
+# commons-collections itself; there is a runtime dependency currently
+# inherited from commons-beanutils, however.
+commons-beanutils.home=../beanutils/dist
+commons-beanutils.jar=${commons-beanutils.home}/commons-beanutils.jar
+commons-collections.home=../collections/dist
+commons-collections.jar=${commons-collections.home}/commons-collections.jar
+commons-logging.home=../logging/dist
+commons-logging.jar=${commons-logging.home}/commons-logging.jar
+
+# junit.jar - JUnit 3.7+ Classpath
+junit.jar=${root}/junit.jar
+
+# The digester tests output logging information (including Exceptions) 
+# which can often be confusing to new developers.
+# This output is suppressed by default but can be re-enabled by
+#suppressLogOutputDuringTests=false 
+suppressLogOutputDuringTests=true
+
+# Maven Properties
+#
+# Committers using agents may need to fill in and enable the following:
+#digester.cvs=scm:cvs:lserver:rdonkin@cvs.apache.org:/home/cvs:jakarta-commons/digester/
+#maven.username=rdonkin
+

Added: jakarta/commons/proper/digester/branches/digester2/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/build.xml?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/build.xml (added)
+++ jakarta/commons/proper/digester/branches/digester2/build.xml Thu Feb  3 17:51:43 2005
@@ -0,0 +1,550 @@
+<!--
+   Copyright 2001-2004 The Apache Software Foundation
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<project name="Digester" default="compile" basedir=".">
+
+
+<!--
+        "Digester" component of the Jakarta Commons Subproject
+        $Id: build.xml,v 1.54 2004/09/09 20:38:19 rdonkin Exp $
+-->
+
+
+<!-- ========== Initialize Properties ===================================== -->
+
+
+  <property file="build.properties"/>                <!-- Component local   -->
+  <property file="../build.properties"/>             <!-- Commons local     -->
+  <property file="${user.home}/build.properties"/>   <!-- User local        -->
+
+
+<!-- ========== External Dependencies ===================================== -->
+
+
+  <!-- The directories corresponding to your necessary dependencies -->
+  <property name="jaxp.home"               value="/usr/local/jaxp1.1"/>
+  <property name="junit.home"              value="/usr/local/junit3.7"/>
+  <property name="commons.home"            value=".."/>
+  <property name="beanutils.home"          value="${commons.home}/beanutils"/>
+  <property name="collections.home"        value="${commons.home}/collections"/>
+  <property name="logging.home"            value="${commons.home}/logging"/>
+
+
+<!-- ========== Derived Values ============================================ -->
+
+
+  <!-- The locations of necessary jar files -->
+  <property name="jaxp.jaxp.jar"           value="${jaxp.home}/jaxp.jar"/>
+  <property name="jaxp.parser.jar"         value="${jaxp.home}/crimson.jar"/>
+  <property name="junit.jar"               value="${junit.home}/junit.jar"/>
+  <property name="commons-beanutils.api"   value="${beanutils.home}/dist/docs/api"/>
+  <property name="commons-beanutils.jar"   value="${beanutils.home}/dist/commons-beanutils.jar"/>
+  <property name="commons-collections.api" value="${collections.home}/dist/docs/api"/>
+  <property name="commons-collections.jar" value="${collections.home}/dist/commons-collections.jar"/>
+  <property name="commons-logging.api"     value="${logging.home}/dist/docs/api"/>
+  <property name="commons-logging.jar"     value="${logging.home}/dist/commons-logging.jar"/>
+
+
+<!-- ========== Component Declarations ==================================== -->
+
+
+  <!-- The name of this component -->
+  <property name="component.name"          value="digester"/>
+
+  <!-- The primary package name of this component -->
+  <property name="component.package"       value="org.apache.commons.digester"/>
+
+  <!-- The title of this component -->
+  <property name="component.title"         value="Digester - XML to Java Object Configuration"/>
+
+  <!-- The current version number of this component -->
+  <property name="component.version"       value="1.6"/>
+
+  <!-- The base directory for compilation targets -->
+  <property name="build.home"              value="target"/>
+
+  <!-- The base directory for component configuration files -->
+  <property name="conf.home"               value="src/conf"/>
+
+  <!-- The base directory for distribution targets -->
+  <property name="dist.home"               value="dist"/>
+
+  <!-- The base directory for component sources -->
+  <property name="source.home"             value="src/java"/>
+
+  <!-- The base directory for unit test sources -->
+  <property name="test.home"               value="src/test"/>
+
+
+<!-- ========== Compiler Defaults ========================================= -->
+
+
+  <!-- Should Java compilations set the 'debug' compiler option? -->
+  <property name="compile.debug"           value="true"/>
+
+  <!-- Should Java compilations set the 'deprecation' compiler option? -->
+  <property name="compile.deprecation"     value="false"/>
+
+  <!-- Should Java compilations set the 'optimize' compiler option? -->
+  <property name="compile.optimize"        value="true"/>
+
+  <!-- Construct compile classpath -->
+  <path id="compile.classpath">
+    <pathelement location="${build.home}/classes"/>
+    <pathelement location="${jaxp.jaxp.jar}"/>
+    <pathelement location="${jaxp.parser.jar}"/>
+    <pathelement location="${commons-beanutils.jar}"/>
+    <pathelement location="${commons-collections.jar}"/>
+    <pathelement location="${commons-logging.jar}"/>
+    <pathelement location="${junit.jar}"/>
+  </path>
+
+
+<!-- ========== Test Execution Defaults =================================== -->
+
+  <property name="suppressLogOutputDuringTests" value="true"/>
+  <property name="log.factoryopt" value="org.apache.commons.logging.Log"/>
+  <property name="log.noop" value="org.apache.commons.logging.impl.NoOpLog"/>
+  <property name="log.class" value="${log.noop}"/>
+  
+  <!--
+  <property name="logclass" value="org.apache.commons.logging.impl.NoOpLog"/>
+  -->
+
+  <!-- Construct unit test classpath -->
+  <path id="test.classpath">
+    <pathelement location="${build.home}/classes"/>
+    <pathelement location="${build.home}/tests"/>
+    <pathelement location="${junit.jar}"/>
+    <pathelement location="${jaxp.jaxp.jar}"/>
+    <pathelement location="${jaxp.parser.jar}"/>
+    <pathelement location="${commons-beanutils.jar}"/>
+    <pathelement location="${commons-collections.jar}"/>
+    <pathelement location="${commons-logging.jar}"/>
+  </path>
+
+  <!-- Should all tests fail if one does? -->
+  <property name="test.failonerror"        value="true"/>
+
+  <!-- The test runner to execute -->
+  <property name="test.runner"             value="junit.textui.TestRunner"/>
+
+
+<!-- ========== Executable Targets ======================================== -->
+
+
+  <target name="init"
+   description="Initialize and evaluate conditionals">
+    <echo message="-------- ${component.name} ${component.version} --------"/>
+    <filter  token="name"                  value="${component.package}"/>
+    <filter  token="version"               value="${component.version}"/>
+  </target>
+
+
+  <target name="prepare" depends="init"
+   description="Prepare build directory">
+    <mkdir dir="${build.home}"/>
+    <mkdir dir="${build.home}/classes"/>
+    <mkdir dir="${build.home}/conf"/>
+    <mkdir dir="${build.home}/tests"/>
+  </target>
+
+
+  <target name="static" depends="prepare"
+   description="Copy static files to build directory">
+    <tstamp/>
+    <copy  todir="${build.home}/conf" filtering="on">
+      <fileset dir="${conf.home}" includes="*.MF"/>
+    </copy>
+  </target>
+
+
+  <target name="compile" depends="static"
+   description="Compile shareable components">
+    <javac  srcdir="${source.home}"
+           destdir="${build.home}/classes"
+             debug="${compile.debug}"
+       deprecation="${compile.deprecation}"
+          optimize="${compile.optimize}">
+      <classpath refid="compile.classpath"/>
+    </javac>
+    <copy    todir="${build.home}/classes" filtering="on">
+      <fileset dir="${source.home}" excludes="**/*.java"/>
+    </copy>
+    <copy      file="LICENSE.txt"
+              todir="${build.home}/classes/META-INF"/>
+  </target>
+
+
+  <target name="compile.tests" depends="compile"
+   description="Compile unit test cases">
+    <javac  srcdir="${test.home}"
+           destdir="${build.home}/tests"
+             debug="${compile.debug}"
+       deprecation="${compile.deprecation}"
+          optimize="${compile.optimize}">
+      <classpath refid="test.classpath"/>
+    </javac>
+    <copy    todir="${build.home}/tests" filtering="on">
+      <fileset dir="${test.home}" excludes="**/*.java"/>
+    </copy>
+  </target>
+
+
+  <target name="compile.examples" depends="compile"
+   description="Compile example code">
+    <ant dir="src/examples/api" target="compile"/>
+  </target>
+
+
+  <target name="clean"
+   description="Clean build and distribution directories">
+    <delete    dir="${build.home}"/>
+    <delete    dir="${dist.home}"/>
+  </target>
+
+
+  <target name="all" depends="clean,compile"
+   description="Clean and compile all components"/>
+
+
+  <target name="javadoc" depends="compile"
+   description="Create component Javadoc documentation">
+    <mkdir      dir="${dist.home}"/>
+    <mkdir      dir="${dist.home}/docs"/>
+    <mkdir      dir="${dist.home}/docs/api"/>
+    <javadoc sourcepath="${source.home}"
+                destdir="${dist.home}/docs/api"
+           packagenames="org.apache.commons.*"
+                 author="true"
+                private="true"
+                version="true"
+               overview="src/java/overview.html"
+               doctitle="&lt;h1&gt;${component.title} (Version ${component.version})&lt;/h1&gt;"
+            windowtitle="${component.title} (Version ${component.version})"
+                 bottom='Copyright (c) 2001-2004 - Apache Software Foundation &lt;!-- 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+                 --&gt;'>
+      <link     offline="true" packagelistLoc="${commons-beanutils.api}"
+                   href="http://jakarta.apache.org/commons/beanutils/api/"/>
+      <link     offline="true" packagelistLoc="${commons-collections.api}"
+                   href="http://jakarta.apache.org/commons/collections/api/"/>
+      <link     offline="true" packagelistLoc="${commons-logging.api}"
+                   href="http://jakarta.apache.org/commons/logging/api/"/>
+      <classpath  refid="compile.classpath"/>
+    </javadoc>
+  </target>
+
+
+  <target name="dist" depends="compile,javadoc"
+   description="Create binary distribution">
+    <mkdir      dir="${dist.home}"/>
+    <copy      file="LICENSE.txt"
+              todir="${dist.home}"/>
+    <mkdir      dir="${build.home}/classes/META-INF"/>
+    <copy      file="RELEASE-NOTES.txt"
+              todir="${dist.home}"/>
+    <copy      file="NOTICE.txt"
+              todir="${dist.home}"/>
+    <jar    jarfile="${dist.home}/commons-${component.name}.jar"
+            basedir="${build.home}/classes"
+           manifest="${build.home}/conf/MANIFEST.MF"/>
+  </target>
+
+
+<!-- ========== Unit Test Targets ========================================= -->
+
+<!--
+  <target name="test" depends="compile.tests,
+                               test.digester,
+                               test.matching,
+                               test.matching.extended,
+                               test.rule,
+                               test.callmethod,
+                               test.objectparam,
+                               test.bpsr,
+                               test.spr,
+                               test.xmlrules,
+                               test.node,
+                               test.factory,
+                               test.regex,
+                               test.wdrules,
+                               test.plugins,
+                               test.others,
+                               test.substitution
+                              "
+   description="Run all unit test cases">
+  </target>
+  -->
+  <target name="test" depends="compile.tests,
+                               test.digester"
+   description="Run all unit test cases">
+  </target>
+
+  <target name="test.factory" depends="compile.tests"
+   description="Run tests for loading Digester rules from XML ...">
+    <echo message="Running factory create tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.TestFactoryCreate"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.xmlrules" depends="compile.tests"
+   description="Run tests for loading Digester rules from XML ...">
+    <echo message="Running xmlrules tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.xmlrules.DigesterLoaderTestSuite"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+
+  <target name="test.bpsr" depends="compile.tests"
+   description="Run tests for BeanPropertySetterRule ...">
+    <echo message="Running BeanPropertySetterRule tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.BeanPropertySetterRuleTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+
+  <target name="test.callmethod" depends="compile.tests"
+   description="Run tests for CallMethodRule and CallParamRule ...">
+    <echo message="Running CallMethodRule tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.CallMethodRuleTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.overlapping" depends="compile.tests"
+   description="Run tests for OverlappingCallMethodRule...">
+    <echo message="Running OverlappingCallMethodRule tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.OverlappingCallMethodRuleTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.objectparam" depends="compile.tests"
+   description="Run tests for ObjectParamRule ...">
+    <echo message="Running ObjectParamRule tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.ObjectParamRuleTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.digester" depends="compile.tests"
+   description="Run basic Digester unit tests ...">
+    <echo message="Running basic Digester tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester2.DigesterTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+
+  <target name="test.matching" depends="compile.tests"
+   description="Run rule Digester test cases">
+    <echo message="Running rule Digester tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.RulesBaseTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.regex" depends="compile.tests"
+   description="Run tests for RegexRules">
+    <echo message="Running tests for RegexRules ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.RegexRulesTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.wdrules" depends="compile.tests"
+   description="Run tests for WithDefaultsRulesWrapper">
+    <echo message="Running tests for WithDefaultsRulesWrapper ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.WDRulesWrapperTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+  
+  <target name="test.matching.extended" depends="compile.tests"
+   description="Run rule Digester extended test cases">
+    <echo message="Running rule Digester tests for ExtendedBaseRules ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.EBRTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+
+  <target name="test.rule" depends="compile.tests"
+   description="Run rule Digester unit tests ...">
+    <echo message="Running Rule tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.RuleTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.spr" depends="compile.tests"
+   description="Run tests for SetPropertyRule ...">
+    <echo message="Running SetPropertyRule tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.SetPropertyRuleTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+
+  <target name="test.node" depends="compile.tests"
+          description="Run NodeCreateRule tests ...">
+    <echo message="Running NodeCreateRule tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.NodeCreateRuleTestCase"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target>
+
+  <target name="test.plugins" depends="compile.tests"
+          description="Run Plugins tests ...">
+    <echo message="Running Plugins tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.plugins.TestAll"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target> 
+
+  <target name="test.others" depends="compile.tests"
+          description="Run Other tests ...">
+    <echo message="Running Other tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.TestOthers"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target> 
+  
+  <target name="test.substitution" depends="compile.tests"
+          description="Run Substitutions tests ...">
+    <echo message="Running Substitutions tests ..."/>
+    <condition property="logopt" value="${log.factoryopt}=${log.class}">
+      <istrue value="${suppressLogOutputDuringTests}"/>
+    </condition>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <jvmarg value="-D${logopt}"/>
+      <arg value="org.apache.commons.digester.substitution.TestAll"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </target> 
+
+</project>

Added: jakarta/commons/proper/digester/branches/digester2/checkstyle.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/checkstyle.xml?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/checkstyle.xml (added)
+++ jakarta/commons/proper/digester/branches/digester2/checkstyle.xml Thu Feb  3 17:51:43 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!-- commons codec customization of default Checkstyle behavior -->
+<module name="Checker">
+  <property name="localeLanguage" value="en"/>
+
+  <module name="TreeWalker">
+    <!-- Verify that EVERY source file has the appropriate license -->
+    <module name="Header">
+      <property name="headerFile" value="LICENSE.txt"/>
+      <property name="ignoreLines" value="2,3,4,10"/>
+    </module>
+
+    <module name="OperatorWrap">
+      <property name="option" value="eol"/>
+    </module>
+  </module>
+</module>
+

Added: jakarta/commons/proper/digester/branches/digester2/maven.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/maven.xml?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/maven.xml (added)
+++ jakarta/commons/proper/digester/branches/digester2/maven.xml Thu Feb  3 17:51:43 2005
@@ -0,0 +1,45 @@
+<!--
+   Copyright 2001-2004 The Apache Software Foundation
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project default="jar:jar">
+
+  <!-- ================================================================== -->
+  <!-- START : C O M M O N S - B U I L D                                  -->
+  <!-- ================================================================== -->
+  <!-- Required: Look and Feel for documentation within distributions     -->
+  <!-- ================================================================== -->
+  <postGoal name="xdoc:copy-resources">  
+    <copy todir="${basedir}/target/docs/style/" failonerror="false">
+      <fileset dir="${basedir}/../commons-build/xdocs/style">
+      	<include name='**/*'/>
+      	<exclude name='**/CVS/**'/>
+      </fileset>
+    </copy>
+  </postGoal>
+  <!-- ================================================================== -->
+  <!-- END: C O M M O N S - B U I L D                                     -->
+  <!-- ================================================================== -->
+  
+  <postGoal name="java:compile">
+    
+    <copy todir="${maven.build.dir}/test-classes/org/apache/commons/digester2">
+      <fileset dir="src/test/org/apache/commons/digester2">
+        <include name="*.xml"/>
+      </fileset>
+    </copy>
+    
+  </postGoal>
+
+</project>

Added: jakarta/commons/proper/digester/branches/digester2/project.properties
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/project.properties?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/project.properties (added)
+++ jakarta/commons/proper/digester/branches/digester2/project.properties Thu Feb  3 17:51:43 2005
@@ -0,0 +1,17 @@
+##
+# Properties that override Maven build defaults
+##
+
+maven.checkstyle.properties=${basedir}/checkstyle.xml
+maven.checkstyle.excludes=**/parser/*
+maven.test.failure = false
+maven.junit.fork=true
+maven.linkcheck.enable=true 
+
+maven.xdoc.jsl=../commons-build/commons-site.jsl
+maven.xdoc.date=left
+maven.xdoc.version=${pom.currentVersion}
+maven.xdoc.developmentProcessUrl=http://jakarta.apache.org/commons/charter.html
+maven.xdoc.poweredby.image=maven-feather.png
+
+digester.cvs=pserver:anoncvs@cvs.apache.org:/home/cvspublic

Propchange: jakarta/commons/proper/digester/branches/digester2/project.properties
------------------------------------------------------------------------------
    svn:executable = 

Added: jakarta/commons/proper/digester/branches/digester2/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/project.xml?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/project.xml (added)
+++ jakarta/commons/proper/digester/branches/digester2/project.xml Thu Feb  3 17:51:43 2005
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2001-2004 The Apache Software Foundation
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project>
+  <pomVersion>3</pomVersion>
+  
+  <id>commons-digester</id>
+  <inceptionYear>2001</inceptionYear>
+  <currentVersion>1.6</currentVersion>
+  <name>Digester</name>
+  <shortDescription>Rule based XML->Java object mapping module</shortDescription>
+  <description>The Digester package lets you configure an XML->Java object mapping module which triggers certain actions called rules whenever a particular pattern of nested XML elements is recognized.</description>
+  <logo>/images/logo.png</logo>
+  
+  <url>http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/</url>
+  <package>org.apache.commons.${pom.artifactId.substring(8)}</package>
+
+  <organization>
+    <name>The Apache Software Foundation</name>
+    <url>http://jakarta.apache.org</url>
+    <logo>http://jakarta.apache.org/images/original-jakarta-logo.gif</logo>
+  </organization>
+
+  <licenses>
+	<license>
+    	<name>The Apache Software License, Version 2.0</name>
+    	<url>/LICENSE.txt</url>
+    	<distribution>repo</distribution>
+	</license>
+  </licenses>
+  
+  <gumpRepositoryId>jakarta</gumpRepositoryId>
+  <issueTrackingUrl>http://issues.apache.org/bugzilla/</issueTrackingUrl>
+  <siteAddress>jakarta.apache.org</siteAddress>
+  <siteDirectory>/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}/</siteDirectory>
+  <distributionDirectory>/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}/</distributionDirectory>
+  
+  <repository>
+    <!--<connection>scm:cvs:${digester.cvs}:jakarta-commons/digester/</connection>-->
+    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}</connection>
+    <url>http://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}/</url>
+  </repository>
+  
+  <mailingLists>
+    <mailingList>
+      <name>Commons Dev List</name>
+      <subscribe>commons-dev-subscribe@jakarta.apache.org</subscribe>
+      <unsubscribe>commons-dev-unsubscribe@jakarta.apache.org</unsubscribe>
+      <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=commons-dev@jakarta.apache.org</archive>
+    </mailingList>
+    <mailingList>
+      <name>Commons User List</name>
+      <subscribe>commons-user-subscribe@jakarta.apache.org</subscribe>
+      <unsubscribe>commons-user-unsubscribe@jakarta.apache.org</unsubscribe>
+      <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=commons-user@jakarta.apache.org</archive>
+    </mailingList>
+  </mailingLists>
+
+  <versions>
+    <version>
+      <id>1.5</id>
+      <name>1.5</name>
+      <tag>DIGESTER_1_5</tag>
+    </version>
+    <version>
+      <id>1.4.1</id>
+      <name>1.4.1</name>
+      <tag>DIGESTER_1_4_1</tag>
+    </version>
+    <version>
+      <id>1.4</id>
+      <name>1.4</name>
+      <tag>DIGESTER_1_4</tag>
+    </version>
+    <version>
+      <id>1.3</id>
+      <name>1.3</name>
+      <tag>DIGESTER_1_3</tag>
+    </version>
+    <version>
+      <id>1.2</id>
+      <name>1.2</name>
+      <tag>DIGESTER_1_2</tag>
+    </version>
+    <version>
+      <id>1.1.1</id>
+      <name>1.1.1</name>
+      <tag>DIGESTER_1_1_1</tag>
+    </version>
+    <version>
+      <id>1.1</id>
+      <name>1.1</name>
+      <tag>DIGESTER_1_1</tag>
+    </version>
+    <version>
+      <id>1.0</id>
+      <name>1.0</name>
+      <tag>DIGESTER_1_0</tag>
+    </version>
+  </versions>
+
+  <developers>
+    <developer>
+      <name>Craig McClanahan</name>
+      <id>craigmcc</id>
+      <email>Craig.McClanahan@eng.sun.com</email>
+      <organization>Sun Microsystems</organization>
+    </developer>
+    <developer>
+      <name>Robert Burrell Donkin</name>
+      <id>rdonkin</id>
+      <email>rdonkin@apache.org</email>
+    </developer>
+    <developer>
+      <name>Scott Sanders</name>
+      <id>sanders</id>
+      <email>sanders@totalsync.com</email>
+    </developer>
+    <developer>
+      <name>James Strachan</name>
+      <id>jstrachan</id>
+      <email>jstrachan@apache.org</email>
+    </developer>
+    <developer>
+      <name>Jason van Zyl</name>
+      <id>jvanzyl</id>
+      <email>jvanzyl@apache.org</email>
+    </developer>
+    <developer>
+      <name>Tim OBrien</name>
+      <id>tobrien</id>
+      <email>tobrien@apache.org</email>
+    </developer>
+    <developer>
+      <name>Jean-Francois Arcand</name>
+      <id>jfarcand</id>
+      <email>jfarcand@apache.org</email>
+    </developer>
+    <developer>
+      <name>Simon Kitching</name>
+      <id>skitching</id>
+      <email>skitching@apache.org</email>
+    </developer>
+  </developers>
+
+  <contributors>
+    <contributor>
+      <name>Bradley M. Handy</name>
+      <email>bhandy@users.sf.net</email>
+    </contributor>
+    <contributor>
+      <name>Christopher Lenz</name>
+    </contributor>
+    <contributor>
+      <name>Ted Husted</name>
+    </contributor>
+    <contributor>
+      <name>David H. Martin</name>
+    </contributor>
+    <contributor>
+      <name>Henri Chen</name>
+    </contributor>
+    <contributor>
+      <name>Janek Bogucki</name>
+    </contributor>
+    <contributor>
+      <name>Mark Huisman</name>
+    </contributor>
+    <contributor>
+      <name>Paul Jack</name>
+    </contributor>
+    <contributor>
+      <name>Anton Maslovsky</name>
+    </contributor>
+    <contributor>
+      <name>Matt Cleveland</name>
+    </contributor>
+  </contributors>
+  
+  <dependencies>
+    <dependency> 
+      <id>commons-beanutils</id>
+      <version>1.6</version>
+    </dependency>
+    <dependency> 
+      <id>commons-logging</id>
+      <version>1.0</version>
+    </dependency>
+    <dependency> 
+      <id>commons-collections</id> 
+      <version>2.1</version> 
+    </dependency> 
+    <dependency>
+      <id>xml-apis</id>
+      <version>1.0.b2</version>
+    </dependency>
+    <dependency>
+      <id>junit</id>
+      <version>3.8.1</version>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <nagEmailAddress>commons-dev@jakarta.apache.org</nagEmailAddress>
+    <sourceDirectory>src/java</sourceDirectory>
+    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+    <resources>
+      <resource>
+         <directory>${pom.build.sourceDirectory}</directory>
+         <includes>
+           <include>**/*.dtd</include>
+         </includes>
+      </resource>
+    </resources>
+    <unitTest>
+      <includes>
+        <include>**/*Test.java</include>
+        <include>**/*TestCase.java</include>
+      </includes>
+      <resources>
+         <resource>
+            <directory>${pom.build.unitTestSourceDirectory}</directory>
+            <includes>
+              <include>**/*.xml</include>
+            </includes>
+         </resource>
+        <resource>
+           <directory>${pom.build.sourceDirectory}</directory>
+           <includes>
+             <include>**/*.dtd</include>
+           </includes>
+        </resource>
+      </resources>
+    </unitTest>
+  </build>
+
+  <reports>
+   <report>maven-changelog-plugin</report>
+   <report>maven-checkstyle-plugin</report>
+   <report>maven-developer-activity-plugin</report>
+   <report>maven-file-activity-plugin</report>
+   <report>maven-javadoc-plugin</report>
+   <report>maven-jdepend-plugin</report>
+   <report>maven-junit-report-plugin</report>
+   <report>maven-jxr-plugin</report>
+   <report>maven-license-plugin</report>
+   <report>maven-linkcheck-plugin</report>
+   <report>maven-pmd-plugin</report>
+   <report>maven-tasklist-plugin</report>
+<!--   <report>maven-clover-plugin</report> -->
+  </reports>
+</project>

Added: jakarta/commons/proper/digester/branches/digester2/src/conf/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/conf/MANIFEST.MF?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/conf/MANIFEST.MF (added)
+++ jakarta/commons/proper/digester/branches/digester2/src/conf/MANIFEST.MF Thu Feb  3 17:51:43 2005
@@ -0,0 +1,8 @@
+Extension-Name: org.apache.commons.digester
+Specification-Title: "Jakarta Commons Digester"
+Specification-Vendor: "Apache Software Foundation"
+Specification-Version: "1.6"
+Implementation-Title: "org.apache.commons.digester"
+Implementation-Vendor: "Apache Software Foundation"
+Implementation-Version: "1.6"
+

Added: jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/AddressBook.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/AddressBook.java?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/AddressBook.java (added)
+++ jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/AddressBook.java Thu Feb  3 17:51:43 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+import java.util.LinkedList;
+import java.util.Iterator;
+
+/**
+ * See Main.java.
+ */
+public class AddressBook {
+    LinkedList people = new LinkedList();
+    
+    public void addPerson(Person p) {
+        people.addLast(p);
+    }
+    
+    public void print() {
+        System.out.println("Address book has " + people.size() + " entries");
+
+        for(Iterator i = people.iterator(); i.hasNext(); ) {
+            Person p = (Person) i.next();
+            p.print();
+        }
+    }
+}

Added: jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Main.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Main.java?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Main.java (added)
+++ jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Main.java Thu Feb  3 17:51:43 2005
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+import org.apache.commons.digester2.Digester;
+import org.apache.commons.digester2.InvalidRuleException;
+import org.apache.commons.digester2.DigestionException;
+import org.apache.commons.digester2.factory.ActionFactory;
+
+/**
+ * A simple program to demonstrate the basic functionality of the
+ * Commons Digester module.
+ * <p>
+ * This code will parse the provided "example.xml" file to build a tree
+ * of java objects, then cause those objects to print out their values
+ * to demonstrate that the input file has been processed correctly.
+ * <p>
+ * As with all code, there are many ways of achieving the same goal;
+ * the solution here is only one possible solution to the problem.
+* <p> 
+ * Very verbose comments are included here, as this class is intended
+ * as a tutorial; if you look closely at method "addRules", you will
+ * see that the amount of code required to use the Digester is actually
+ * quite low.
+ * <p>
+ * Usage: java Main example.xml
+ */
+public class Main {
+    
+    /**
+     * Main method : entry point for running this example program.
+     * <p>
+     * Usage: java Example example.xml
+     */
+    public static void main(String[] args) {
+        if (args.length != 1) {
+            usage();
+            System.exit(-1);
+        }
+        
+        String filename = args[0];
+        
+        // Create a Digester instance
+        Digester d = new Digester();
+        
+        // Prime the digester stack with an object for rules to
+        // operate on. Note that it is quite common for "this"
+        // to be the object pushed.
+        AddressBook book = new AddressBook();
+        d.setInitialObject(book);
+        
+        // Add rules to the digester that will be triggered while
+        // parsing occurs.
+        try {
+            addRules(d);
+        } catch(InvalidRuleException ex) {
+            System.out.println("Error defining digester rules:" + ex.getMessage());
+            System.exit(-1);
+        }
+        
+        // Process the input file.
+        try {
+            java.io.File srcfile = new java.io.File(filename);
+            d.parse(srcfile);
+        }
+        catch(java.io.IOException ex) {
+            System.out.println("Error reading input file:" + ex.getMessage());
+            System.exit(-1);
+        }
+        catch(org.xml.sax.SAXException ex) {
+            System.out.println("Error parsing input file:" + ex.getMessage());
+            System.exit(-1);
+        }
+        catch(DigestionException ex) {
+            System.out.println("Error parsing input file:" + ex.getMessage());
+            System.exit(-1);
+        }
+        
+        
+        // Print out all the contents of the address book, as loaded from
+        // the input file.
+        book.print();
+    }
+    
+    private static void addRules(Digester d) throws InvalidRuleException {
+
+        ActionFactory f = new ActionFactory(d);
+
+        //--------------------------------------------------        
+        // when we encounter a "person" tag, do the following:
+
+        // create a new instance of class Person, and push that
+        // object onto the digester stack of objects
+        f.addCreateObject("/address-book/person", Person.class);
+        
+        // map *any* attributes on the tag to appropriate
+        // setter-methods on the top object on the stack (the Person
+        // instance created by the preceeding rule). 
+        //
+        // For example:
+        // if attribute "id" exists on the xml tag, and method setId 
+        // with one parameter exists on the object that is on top of
+        // the digester object stack, then a call will be made to that
+        // method. The value will be type-converted from string to
+        // whatever type the target method declares (where possible), 
+        // using the commons ConvertUtils functionality.
+        //
+        // Attributes on the xml tag for which no setter methods exist
+        // on the top object on the stack are just ignored.
+        f.addSetProperties("/address-book/person");
+
+        // call the addPerson method on the second-to-top object on
+        // the stack (the AddressBook object), passing the top object
+        // on the stack (the recently created Person object).
+        f.addSetNext("/address-book/person", "addPerson");        
+        
+        //--------------------------------------------------        
+        // when we encounter a "name" tag, call setName on the top
+        // object on the stack, passing the text contained within the
+        // body of that name element [specifying a zero parameter count
+        // implies one actual parameter, being the body text]. 
+        // The top object on the stack will be a person object, because 
+        // the pattern address-book/person always triggers the 
+        // CreateObjectAction we added previously.
+        f.addCallMethod("/address-book/person/name", "setName", 0);
+        
+        //--------------------------------------------------        
+        // when we encounter an "email" tag, call addEmail on the top
+        // object on the stack, passing two parameters: the "type"
+        // attribute, and the text within the tag body.
+        f.addCallMethod("/address-book/person/email", "addEmail", 2);
+        f.addCallParam("/address-book/person/email", 0, "type");
+        f.addCallParam("/address-book/person/email", 1);
+    }
+
+    private static void usage() {
+        System.out.println("Usage: java Main example.xml");
+    }
+}
\ No newline at end of file

Added: jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Person.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Person.java?view=auto&rev=151287
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Person.java (added)
+++ jakarta/commons/proper/digester/branches/digester2/src/examples/api/addressbook/Person.java Thu Feb  3 17:51:43 2005
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * See Main.java.
+ */
+public class Person {
+  private int id;
+  private String category;
+  private String name;
+  private HashMap emails = new HashMap();
+  
+  /** 
+   * A unique id for this person. Note that the Digester automatically
+   * converts the id to an integer.
+   */
+  public void setId(int id) {
+      this.id = id;
+  }
+  
+  public void setCategory(String category) {
+      this.category = category;
+  }
+  
+  public void setName(String name) {
+      this.name = name;
+  }
+  
+  /** we assume only one email of each type... */
+  public void addEmail(String type, String address) {
+      emails.put(type, address);
+  }
+
+  public void print() {
+      System.out.println("Person #" + id);
+      System.out.println("  category=" + category);
+      System.out.println("  name=" + name);
+      
+      for(Iterator i = emails.keySet().iterator(); i.hasNext(); ) {
+          String type = (String) i.next();
+          String address = (String) emails.get(type);
+          
+          System.out.println("  email (type " + type + ") : " + address);
+      }
+  }
+}



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