You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2002/08/23 11:28:51 UTC
DO NOT REPLY [Bug 11962] New: -
DigesterTransformer donation
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11962>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11962
DigesterTransformer donation
Summary: DigesterTransformer donation
Product: Cocoon 2
Version: Current CVS
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Other
Component: sitemap components
AssignedTo: cocoon-dev@xml.apache.org
ReportedBy: m.homeijer@devote.nl
See also "http://jakarta.apache.org/commons/digester.html"
----------- Overview --------------------
With the digester transformer it is possible to convert XML to Java classes.
This does not apply only to data, but also applies to classes that perform
functionality while they
are created and their methods are called by the digester. By using "factory-
create-rule" possibilities from the digester it is even possible to update
and existing java class structure instead of only creating new java structures.
Our primary use for it is to create a clean connection/seperation from a Cocoon
front-end and an EJB back-end.
--------- Configuration ------------------
To use the DigesterTransformer in Cocoon, the jakarta commons digester has to
be available in Cocoon (including the jars the digester depends upon).
Declaration of the transformer component:
<map:transformer logger="sitemap.transformer.digester" name="digester"
src="org.apache.cocoon.transformation.DigesterTransformer"/>
<map:generate src="data.xml"/>
<map:transform type="digester" src="digester.xml">
<map:parameter name="precommand"
value="....... .transformation.helper.PrepareDigester"/>
<map:parameter name="postcommand"
value="...... .transformation.helper.ProcessDigesterResult"/>
</map:transform>
The input for the transformer is XML data that must be transformed into java
classes.
The src attribute for the transformer specifies the xml rule input for the
digester.
The values specified in precommand and postcommand are classes that must
implement
org.apache.cocoon.transformation.helper.DigesterCommand
--------- Note ---------------
For now the transformer just outputs the input xml data. Additional data can be
output in the sax stream with the use of the precommand and postcommand
specification.
Enjoy..
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org