commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sky Chen <>
Subject Fwd: [digester] declare plugin in xml rule file
Date Sun, 01 Mar 2015 11:54:57 GMT
There is nothing like Plugin-create-rule in digester-rules.dtd. The doc
says a class used as a plugin may dynamically add its own rules to the
digester by providing an xmlrules file which defines the associated parsing
rules. But there is no example showing how to define "associated parsing

Suppose I want to create an instance of plugin "SteelBar" which implements
"Bar" interface with this config.xml:

   <plugin id="SteelBar" class="SteelBar" />

   <bar plugin-id="SteelBar" name="spam"/>

I would like to write my rule.xml as:

    <pattern value="foo">
         <object-create-rule classname="Foo"/>

        <pattern value="bar">
            <plugin-create-rule classname="Bar"
            <set-next-rule methodname="addBar"/>

Without "plugin-create-rule" in dtd, how could I archive this?

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