commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Veerasamy, Thirumalai (Cognizant)" <VThiru...@chn.cognizant.com>
Subject [Digester] Recursive nodes - One to many
Date Thu, 22 Jan 2004 14:26:11 GMT
Hi,

  I have a requirement where the node names could be unknown but the their properties or known.
Again its child could again be unknown. See the example below.

<contexts>
 <context>
  <id>1</id>
  <description>About our beloved anna</description>
 </context>
 <context>
  <id>5</id>
  <description>Paranur Utsavam</description>
  <year>
   <id>51</id>
   <description>Paranur Utsavam 1999</description>
   <day>
    <id>511</id>
    <description>Paranur Utsavam 1999 Day 01</description>
   </day>
  </year>
 </context>
</contexts>

  Here every node will have two properties id and description. Context is a known node, but
the year, day or unknown node. It could be year, month and day or year, month, week and day,
etc., Each node can repeat again (eg., all months under year, which in turn will have weeks,
etc.,)

  How do a write a rule for that (/contexts/context/*/id???). It doesn't work. If I am missing
something let me know. 

  In case this is difficult of impossible, then I will make the node name as known (<entry>)
instead of generic (year, month, day, xyz).

<contexts>
 <context>
  <id>1</id>
  <description>About our beloved anna</description>
 </context>
 <context>
  <id>5</id>
  <description>Paranur Utsavam</description>
  <entry>
   <id>51</id>
   <description>Paranur Utsavam 1999</description>
   <entry>
    <id>511</id>
    <description>Paranur Utsavam 1999 Day 01</description>
   </entry >
  </entry >
 </context>
</contexts>

  How do I recursively add the entries. Hope I explained the situation clearly.

Regards,
Thiru



Mime
View raw message