commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Safdar Kureishy" <Safdar.Kurei...@bluejungle.com>
Subject How to extend the Digester rule parser fmwk to recognize my custom rules in the rules xml file?
Date Tue, 14 Dec 2004 01:58:45 GMT
Hi,

If I have a custom rule and I want to activate it against a given
pattern. Now I do NOT want to add this rule programmatically to the
digester instance. Instead, I want to incorporate it into the Digester
rules parser framework. For example, consider the rules.xml file below:

<digester-rules>
	<pattern value="A">
		<object-create-rule classname="A"/>
		<call-method-rule pattern="Name" methodname="setName"
paramcount="0"/>

		<pattern value="B">
			<object-create-rule classname="B"/>
			<add-to-array-rule paramXYZ="ABC"/> --> #### MY
CUSTOM RULE SPECIFICATION ####
		</pattern>
	</pattern>
</digester-rules>

I have a custom rule "AddToArrayRule" that I want to get matched against
the pattern "A/B", and I have specified this using a custom element
<add-to-array-rule> in the file under the "A/B" pattern. How do I go
about adding this functionality into the digester rule parser framework?
Details would be appreciated... :)

Thanks in advance :)

Regards,
Safdar

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


Mime
View raw message