This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Grouping repeating elements


hello

I'm wondering if it's possible to group reapeating
elements to a category. I tried some of the earlier
posted solutions but couldn't solve this problem. I
think, this could be solved with a <xsl:key
...>-construction, but because I'm new to xml/xsl I
couldn't figure it out.
Any help would be appreciated.

thanks
till


initial.xml

<persons>

  <name>smith</name>
  <firstname>john</firstname>
  <age>28</age>

 <name>henderson</name>
  <firstname>chris</firstname>
  <age>68</age>

 <name>phil</name>
 <firstname>harrison</firstname>

 <name>alan</name>
  <firstname>nilsen</firstname>
  <age>28</age>

</persons>


target xml

<persons>

  <person>
  <name>smith</name>
  <firstname>john</firstname>
  <age>28</age>
  </person>

  <person>
  <name>henderson</name>
  <firstname>chris</firstname>
  <age>68</age>
  </person>

  <person>
  <name>phil</name>
  <firstname>harrison</firstname>
  </person>

  <person>
  <name>alan</name>
  <firstname>nilsen</firstname>
  <age>28</age>
  </person>

</persons>

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]