commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Krebs" <>
Subject [Digester] xmlrulesets help!
Date Fri, 26 Nov 2004 19:57:52 GMT
I have a group of different components and each one has a set of digester rules in an xml
file. I like the idea of being able to reuse these rulesets in components that are built from
other components. The way I am trying to go about this is using the <include> tag.

I'm having a tough time figuring out the right pattern matching rules to use so that xml rules
will work independently as well as when they are included in another xml rule set. I would
think wild card pattern matching could do this. Below are two xml rulesets (the second is
the content that is referenced in the <include> tag in the first file) 

The issue I'm having is the object-create-rule in the second xml file does not get created.
I don't see why this is because its using a wildcard pattern matching and it should not mater
if its nested right? 
(I bolded the two critical rules that should provide the link) 

Any help would be much appreciated, instead of kicking back enjoying turkey last night I was
trying to figure out how to digest xml. - Duncan 

<object-create-rule pattern="*/collectionwriter-session" classname="com.krebsnet.commons.excelwriters.wcollectionwriter.session.CollectionWriterSession"/>
<object-create-rule pattern="*/collectionwriter-session/columns/column/" classname="com.krebsnet.commons.excelwriters.wcollectionwriter.ExcelColumn"/>
<bean-property-setter-rule pattern="*/collectionwriter-session/columns/column/column-name"
propertyname="columnName" />
<bean-property-setter-rule pattern="*/collectionwriter-session/columns/column/collection-property"
propertyname="collectionProperty" />
<include **reference to file below***/> <!-- this file should create the "CellStyleRefObject"-->
<!-- next rule should have the cellStyleRef on top of the stack, but its not getting created-->
<set-next-rule pattern="*/collectionwriter-session/columns/column/cell-style" methodname="setCellStyleRef"
<set-next-rule methodname="addExcelColumn" pattern="*/collectionwriter-session/columns/column/"></set-next-rule>

<!-- second xml file -->
<pattern value="*/cell-style">
<object-create-rule classname="com.krebsnet.commons.poibook.cellstyleref.CellStyleRef"/>
<pattern value="data-format">
<bean-property-setter-rule propertyname="dataFormat" />

example file below. 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message