-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Derek,

You can have any sort of XML inside a configuration point (if that is
what you are asking).  The XML would then be translated into an object
tree and given to your service (or could be retrieved using the
getConfiguration on the Registry.

So for your example below, a sample schema (for the configurastion
point) could be:

<configuration-point id="foo">
  <schema>
    <element name="books">
      <element name="book">
        <element name="name">
          <conversion class="some.class.Name" parent-method="addName"/>
        </element>
        <element name="chapters">
          <conversion class="some.class.Chapter"
parent-method="addChapter"/>
        </element>
        <conversion class="some.class.Book" parent-method="addBook"/>
      </element>
    </element>
  </schema>
</configuration-point>

The grammar used is based on Digester, so if you are familiar with that
it should be pretty straight forward.   Note you would need to code up
the beans which the schema referes to (Book, Chapter, etc).

Hope that answers your question to some degree.

Cheers,

Johan


Derek Brown wrote:
> Hello,
> 
> To phrase my question better, is there a way to have
> nested elements in module schemas?
> 
> Thanks
> 
> --- Derek Brown <[EMAIL PROTECTED]> wrote:
> 
> 
>>Hello,
>>
>>I would like to implement hivemind configurations in
>>my application but have a few questions. I have a
>>folder in my web app (Tapestry), it contains a
>>number
>>of xml files. Their structure is something like:
>>
>><books>
>>  <book>
>>    <name/>
>>    <chapters/>
>>  </book>
>></books>
>>
>>I would like to scan for all the xml files in a
>>directory and be able to create Book objects.
>>
>>How do I specify where to find these files? Can this
>>be done in a module file? It would be ideal to
>>combine
>>all the xml files, so I just get a list of the Book
>>objects, since the root element is irrelevant.
>>
>>Thanks
>>
>>
>>              
>>____________________________________________________
>>Start your day with Yahoo! - make it your home page 
>>http://www.yahoo.com/r/hs 
>> 
>>
>>
> 
> ---------------------------------------------------------------------
> 
>>To unsubscribe, e-mail:
>>[EMAIL PROTECTED]
>>For additional commands, e-mail:
>>[EMAIL PROTECTED]
>>
>>
> 
> 
> 
> 
>               
> __________________________________ 
> Yahoo! Mail 
> Stay connected, organized, and protected. Take the tour: 
> http://tour.mail.yahoo.com/mailtour.html 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDDtkSHS6c76+IdrwRAptEAKCkCyCTDI9XitwTr11qGQH2/0ZJNgCgsFxD
haxal+BG4KJaKC5j/NhVy2c=
=SG40
-----END PGP SIGNATURE-----

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

Reply via email to