View Single Post
  #3 (permalink)  
Old June 15th, 2006, 07:40 AM
Lemminkäinen Lemminkäinen is offline
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A huge thanks for the speedy reply. I'm working with 2.0 so that is not a problem. There is one more complication, though - the names aren't in the same place (I made an oversight in my simplification for the example).

This is closer to the truth:

file1.xml

<thingy1 name="epsilon">
  <color>red</color>
</thingy1>
<thingy1 name="gamma">
  <color>blue</color>
<thingy1>


and in another file

file2.xml

<thingy2>
  <name>epsilon</name>
  <number>seven</number>
</thingy2>
<thingy2>
  <name>gamma</name>
  <number>four</number>
<thingy>

And I want

file3.xml

<thingy name="epsilon">
  <color>red</color>
  <number>seven</number>
</thingy>
<thingy name="gamma">
  <color>blue</color>
  <number>four</number>
<thingy>


I've never used for-each-group before, so pardon my inexperience. But great big thanks for the first reply, now I at least know that it is doable with XSLT which in and of itself is a good thing for motivation.

Reply With Quote