You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simon Kitching <si...@ecnetwork.co.nz> on 2003/09/22 02:28:14 UTC

[digester] further usage examples

Hi,

When I posted my original example of digester usage (now checked in as
"digester/src/examples/api/addressbook") I promised more.

Well, attached is a proposed follow-on example entitled "Catalog"
(library catalog), that demonstrates:

* how to use Digester.getRoot() to retrieve the "root" object
  created when parsing an input file.
* how to use the "factory create" rule to create java objects which
  do not have default (no-argument) constructors.
* how to use ExtendedBaseRules to get trailing-wildcard support
* how to use the BeanPropertySetterRule
* how to use the "set properties" rule (advanced usage) to map xml
  attributes to java bean properties with names different from the
  xml attribute name.
* how to use the SetPropertyRule.
* how to use the ObjectParamRule to pass a constant string to a method.

If this is acceptable, I would suggest checking all this in as:
  digester/src/examples/api/catalog

Regards,

Simon

Re: [digester] further usage examples

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Saturday, September 27, 2003, at 08:26 AM, dion@multitask.com.au wrote:
> Simon Kitching <si...@ecnetwork.co.nz> wrote on 27/09/2003 05:01:47 PM:
>
>> On Fri, 2003-09-26 at 08:11, robert burrell donkin wrote:
>>> hi simon
>>>
>>> committed. many thanks and keep up the good work. i'll look forward to
> the
>>> next installment :)
>>>
>>> (i still want to find a way to get maven to generate html from the
> source
>>> but that'll probably need to wait a little while.)
>>
>> Well, the attached are not more examples, but instead a build
>> infrastructure for the examples.
>
> Maven can generate HTML from source using the jxr plugin....

thanks dion :)

(i've been wondering how to get the example on the web site for a while)

- robert


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


Re: [digester] further usage examples

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Saturday, September 27, 2003, at 08:26 AM, dion@multitask.com.au wrote:
> Simon Kitching <si...@ecnetwork.co.nz> wrote on 27/09/2003 05:01:47 PM:
>
>> On Fri, 2003-09-26 at 08:11, robert burrell donkin wrote:
>>> hi simon
>>>
>>> committed. many thanks and keep up the good work. i'll look forward to
> the
>>> next installment :)
>>>
>>> (i still want to find a way to get maven to generate html from the
> source
>>> but that'll probably need to wait a little while.)
>>
>> Well, the attached are not more examples, but instead a build
>> infrastructure for the examples.
>
> Maven can generate HTML from source using the jxr plugin....

thanks dion :)

(i've been wondering how to get the example on the web site for a while)

- robert


Re: [digester] further usage examples

Posted by di...@multitask.com.au.
Simon Kitching <si...@ecnetwork.co.nz> wrote on 27/09/2003 05:01:47 PM:

> On Fri, 2003-09-26 at 08:11, robert burrell donkin wrote:
> > hi simon
> > 
> > committed. many thanks and keep up the good work. i'll look forward to 
the 
> > next installment :)
> > 
> > (i still want to find a way to get maven to generate html from the 
source 
> > but that'll probably need to wait a little while.)
> 
> Well, the attached are not more examples, but instead a build
> infrastructure for the examples.

Maven can generate HTML from source using the jxr plugin....
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/



Re: [digester] further usage examples

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
committed. many thanks.

it should be possible to use maven (thanks dion!) to generate some 
documentation for the examples. will probably need some jelly to tie 
everything together. i don't have the time to do this right now so if 
anyone wants to volunteer to get this working, please post something to 
the list and i'll hold off.

- robert

On Saturday, September 27, 2003, at 08:01 AM, Simon Kitching wrote:

> On Fri, 2003-09-26 at 08:11, robert burrell donkin wrote:
>> hi simon
>>
>> committed. many thanks and keep up the good work. i'll look forward to 
>> the
>> next installment :)
>>
>> (i still want to find a way to get maven to generate html from the source
>> but that'll probably need to wait a little while.)
>
> Well, the attached are not more examples, but instead a build
> infrastructure for the examples.
>
> With this you can (among other things) type "ant compile.examples"
> in the main digester dir to check all the examples build (before
> a new release for example).
>
> Includes:
>  new build.xml for each example
>  new build.xml in src/examples/api, which builds all examples
>  new build.properties.sample in src/examples/api
>
>  patch to readme.txt files in example directories
>
>  patch to main build.xml adding target "compile.examples"
>  patch to package.html to note that examples are available.
>
> This should finish up the examples stuff as far as I am concerned.
>
> It would indeed be cool to have the examples available as HTML on the
> maven-generated website or similar! Some day perhaps...
>
> Now back to Plugins....
>
> Cheers,
>
> Simon
>   ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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


Re: [digester] further usage examples

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
committed. many thanks.

it should be possible to use maven (thanks dion!) to generate some 
documentation for the examples. will probably need some jelly to tie 
everything together. i don't have the time to do this right now so if 
anyone wants to volunteer to get this working, please post something to 
the list and i'll hold off.

- robert

On Saturday, September 27, 2003, at 08:01 AM, Simon Kitching wrote:

> On Fri, 2003-09-26 at 08:11, robert burrell donkin wrote:
>> hi simon
>>
>> committed. many thanks and keep up the good work. i'll look forward to 
>> the
>> next installment :)
>>
>> (i still want to find a way to get maven to generate html from the source
>> but that'll probably need to wait a little while.)
>
> Well, the attached are not more examples, but instead a build
> infrastructure for the examples.
>
> With this you can (among other things) type "ant compile.examples"
> in the main digester dir to check all the examples build (before
> a new release for example).
>
> Includes:
>  new build.xml for each example
>  new build.xml in src/examples/api, which builds all examples
>  new build.properties.sample in src/examples/api
>
>  patch to readme.txt files in example directories
>
>  patch to main build.xml adding target "compile.examples"
>  patch to package.html to note that examples are available.
>
> This should finish up the examples stuff as far as I am concerned.
>
> It would indeed be cool to have the examples available as HTML on the
> maven-generated website or similar! Some day perhaps...
>
> Now back to Plugins....
>
> Cheers,
>
> Simon
>   ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [digester] further usage examples

Posted by di...@multitask.com.au.
Simon Kitching <si...@ecnetwork.co.nz> wrote on 27/09/2003 05:01:47 PM:

> On Fri, 2003-09-26 at 08:11, robert burrell donkin wrote:
> > hi simon
> > 
> > committed. many thanks and keep up the good work. i'll look forward to 
the 
> > next installment :)
> > 
> > (i still want to find a way to get maven to generate html from the 
source 
> > but that'll probably need to wait a little while.)
> 
> Well, the attached are not more examples, but instead a build
> infrastructure for the examples.

Maven can generate HTML from source using the jxr plugin....
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/



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


Re: [digester] further usage examples

Posted by Simon Kitching <si...@ecnetwork.co.nz>.
On Fri, 2003-09-26 at 08:11, robert burrell donkin wrote:
> hi simon
> 
> committed. many thanks and keep up the good work. i'll look forward to the 
> next installment :)
> 
> (i still want to find a way to get maven to generate html from the source 
> but that'll probably need to wait a little while.)

Well, the attached are not more examples, but instead a build
infrastructure for the examples.

With this you can (among other things) type "ant compile.examples"
in the main digester dir to check all the examples build (before
a new release for example).

Includes: 
 new build.xml for each example
 new build.xml in src/examples/api, which builds all examples
 new build.properties.sample in src/examples/api

 patch to readme.txt files in example directories

 patch to main build.xml adding target "compile.examples"
 patch to package.html to note that examples are available.

This should finish up the examples stuff as far as I am concerned.

It would indeed be cool to have the examples available as HTML on the
maven-generated website or similar! Some day perhaps...

Now back to Plugins....

Cheers,

Simon

Re: [digester] further usage examples

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi simon

committed. many thanks and keep up the good work. i'll look forward to the 
next installment :)

(i still want to find a way to get maven to generate html from the source 
but that'll probably need to wait a little while.)

- robert

On Monday, September 22, 2003, at 01:28 AM, Simon Kitching wrote:

> Hi,
>
> When I posted my original example of digester usage (now checked in as
> "digester/src/examples/api/addressbook") I promised more.
>
> Well, attached is a proposed follow-on example entitled "Catalog"
> (library catalog), that demonstrates:
>
> * how to use Digester.getRoot() to retrieve the "root" object
>   created when parsing an input file.
> * how to use the "factory create" rule to create java objects which
>   do not have default (no-argument) constructors.
> * how to use ExtendedBaseRules to get trailing-wildcard support
> * how to use the BeanPropertySetterRule
> * how to use the "set properties" rule (advanced usage) to map xml
>   attributes to java bean properties with names different from the
>   xml attribute name.
> * how to use the SetPropertyRule.
> * how to use the ObjectParamRule to pass a constant string to a method.
>
> If this is acceptable, I would suggest checking all this in as:
>   digester/src/examples/api/catalog
>
> Regards,
>
> Simon
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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


Re: [digester] further usage examples

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi simon

committed. many thanks and keep up the good work. i'll look forward to the 
next installment :)

(i still want to find a way to get maven to generate html from the source 
but that'll probably need to wait a little while.)

- robert

On Monday, September 22, 2003, at 01:28 AM, Simon Kitching wrote:

> Hi,
>
> When I posted my original example of digester usage (now checked in as
> "digester/src/examples/api/addressbook") I promised more.
>
> Well, attached is a proposed follow-on example entitled "Catalog"
> (library catalog), that demonstrates:
>
> * how to use Digester.getRoot() to retrieve the "root" object
>   created when parsing an input file.
> * how to use the "factory create" rule to create java objects which
>   do not have default (no-argument) constructors.
> * how to use ExtendedBaseRules to get trailing-wildcard support
> * how to use the BeanPropertySetterRule
> * how to use the "set properties" rule (advanced usage) to map xml
>   attributes to java bean properties with names different from the
>   xml attribute name.
> * how to use the SetPropertyRule.
> * how to use the ObjectParamRule to pass a constant string to a method.
>
> If this is acceptable, I would suggest checking all this in as:
>   digester/src/examples/api/catalog
>
> Regards,
>
> Simon
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org