Subject: XSL problem
Posted By: cheez Post Date: 9/11/2006 7:28:49 AM
I have this XML design:

<root>
   <aaa>
      <bbb>
         <ccc>ABC</ccc>
         <ddd>out1</ddd>
      </bbb>
      <bbb>
         <ccc>DEF</ccc>
         <ddd>out2</ddd>
      </bbb>
   </aaa>
   <aaa>
      <bbb>
         <ccc>ABC</ccc>
         <ddd>out3</ddd>
      </bbb>
   </aaa>
</root>


and I need to generate this xml output:

<root>
   <aaa>
      <ddd>out1</ddd>
      <ddd>out3</ddd>
   </aaa>
   <aaa>
      <ddd>out2</ddd>
   </aaa>
</root>


i'm having a hard time figuring out how to get the value of "ddd" and put them under a common element "aaa" if their value of "ccc" are the same.


Reply By: ramesh.kumarm Reply Date: 9/14/2006 1:20:52 AM
Well
you can possibly do something like this to retrieve the first and the second values for the same name tags, respectively.

//root/aaa[1]/ccc[1] ->for the first.

Hope this helps!

ramesh


Go to topic 41858

Return to index page 175
Return to index page 174
Return to index page 173
Return to index page 172
Return to index page 171
Return to index page 170
Return to index page 169
Return to index page 168
Return to index page 167
Return to index page 166