View Single Post
  #8 (permalink)  
Old February 2nd, 2011, 02:51 PM
inieto inieto is offline
Registered User
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sort by a composite key

Hi guys, it's me again

Thanks for your great help!

Now I'm really going to test your great knowledge on XSLT

I have this kind of tag construction:
<pagelet-slot-assignment id="PonAqOKB2ecAAAEtjkAaBHrO">
    <pagelet id="cmp_20100822_182608" domain="LeviStrauss-Dockers"></pagelet>
    <slot definition-name="slots.main.pagelet2-slotContent" parent-pagelet-id="pg_20100826_194641" domain="LeviStrauss-Dockers"></slot>
    <valid-from>08/26/10 07:46:00 pm</valid-from>
Note that the id="PonAqOKB2ecAAAEtjkAaBHrO" is auto generated
Therefore I need to sort by the combination of attributes pagelet@id and slot@parent-pagelet-id:
pagelet-slot-assignment/pagelet/@id (the "id" attribute of the pagelet tab of the pagelet-slot-assignment tab), and

The key is a composite of both attributes, avoiding the upper autogenerated id (pagelet-slot-assignment id="PonAqOKB2ecAAAEtjkAaBHrO")

Is it possible to sort it that way?

Many thanks!
Reply With Quote