commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kim Ragna Mertens <kim.mert...@mertens-nord.de>
Subject [digester] wildcard in plugin rules
Date Mon, 11 Feb 2013 11:59:39 GMT
Hi,

I try to use digester to parse something like :

<ptwebltl>
<not><true/></not>
</ptwebltl>


I have created a plugin for ptwebltl, containing the following rules :

pattern = ptwebltl

	 d.addObjectCreate(pattern+"/*/true", TRUE.class); // (1)
        d.addSetNext(pattern+"/*/true", addFormula);

        d.addObjectCreate(pattern + "/true", TRUE.class); //(2)
        d.addSetNext(pattern + "/true", addFormula);

	d.addObjectCreate(pattern + "/not", NOT.class);
	d.addSetNext(pattern + "/not", addFormula);


 now I am able to parse with the (2) block something like

<ptwebltl>
<true/>
</ptwebltl>

but unfortunately the first rule block does not work, no rule is found
for the pattern ptwebltl/not/true

Is it possible to use wildcards  in pluginrules ?
If I write a rule like d.addObjectCreate("*/true", TRUE.class) I got the
warning that a rule is specified that matches a pattern possible outside
the plugin scope,
If I do not use plugins, the rule work for creating a TRUE - Object
whenever it is read in the xml file.

How do I achieve the simular behavior in the plugin ?

Thanks
Lianna


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


Mime
View raw message