Here's an informal description of what that ruleset is about. 
Informally, we want to be able to parse things like:

  <foo>
    ...
    <bar>
      ...
      <catalog name="xyz">
        <chain name="abc">
          <command .../>
          <command .../>
        </chain>
      </catalog>
      ...
    </bar>
    ...
  </foo>

With a few extra wrinkles:

* I want to be able to substitute the names of the elements that have
  default names "catalog", "chain", and "name" above.  This is done by
  instantiating a ConfigRuleSet and setting the corresponding properties
  before using that RuleSet instance to set up a ConfigParser.

* I want to be able to change the names of some attributes that the
  configuration rules look for, such as "class" (for the FQCN of a chain
  or command instance), customized the same way.

* I want to be able to define "alias" elements for commands that are used
  a lot, so I don't have to specify the FQCN on every one of them.  For example,
  the following element (from the unit tests):

    <define name="adding-command"
      className="org.apache.commons.chain.impl.AddingCommand"/>

  means I can use the following:

    <adding-command .../>

  instead of the more verbose:

    <command className="org.apache.commons.chain.impl.AddingCommand" .../>

  every time I want to use that particular command.

I'm particularly pround of that custom Digester rule :-), but it is
definitely an intricate one, because it calculates and adds some
additional rules during the parse, instead of before.

Craig


On Fri, 10 Dec 2004 16:52:54 -0000, Pilgrim, Peter
<[EMAIL PROTECTED]> wrote:
> 
> > -----Original Message-----
> > From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> >
> > Also in jakarta news
> >
> > http://jakarta.apache.org/site/news/news-2004-2ndHalf.html
> >
> > and its listed in the "Releases" section on the Commons Chain site:
> >
> > http://jakarta.apache.org/commons/chain/
> >
> ==////==
> 
> Cheers Niall
> 
> The reason I downloaded the chain again, because I want to study
> the chain implementation. I think the Chain would make a good
> invocation AOP/IoC element, if you want to inject some complicated
> rules driven advice ... but not this thread
> 
> I also wanted looked close at the Digester rules in the Chain
> implementation. I am not if I follow everything in it.
> 
> Does any one have a HOWTO and GUIDE into writing Digester rules,
> config set and possibly regexp rules?
> 
> I have written some Digester stuff and now I want to refactor it
> because there is a lot of commonality with the XML grammar (DTD)
> and the stuff I have now is becoming terser every version.
> 
> mtia
> 
> --
> Peter Pilgrim
> Operations/IT - Credit Suisse First Boston,
> 10 South Colonnade, London E14 4QJ, United Kingdom
> Tel: +44-(0)207-883-4497
> 
> ==============================================================================
> This message is for the sole use of the intended recipient. If you received
> this message in error please delete it and notify us. If this message was
> misdirected, CSFB does not waive any confidentiality or privilege. CSFB
> retains and monitors electronic communications sent through its network.
> Instructions transmitted over this system are not binding on CSFB until they
> are confirmed by us. Message transmission is not guaranteed to be secure.
> ==============================================================================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to