[xsl] Urgent please folks, need help wih 'paging' and nested grouping-by

Subject: [xsl] Urgent please folks, need help wih 'paging' and nested grouping-by
From: "Manos Batsis" <m.batsis@xxxxxxxx>
Date: Thu, 3 Jan 2002 13:44:18 +0200
Hallo folks,

I wouldn't bore the list with this, but my deadline is very strict (I
have to finish this today) and I have no room for mistakes, so all I am
asking is a pointing towards the right approach.

I have a flat file of <row> elements like this:

<row Ent_ID="1" Ent_1="Manos" Ent_2="Batsis" Ent_3="developer">
<row Ent_ID="1" Ent_1="Helen" Ent_2="Crown" Ent_3="secretary">
<row Ent_ID="1" Ent_1="Manos" Ent_2="Dollan" Ent_3="programmer">
<!-- [...] -->
<row Ent_ID="10" Ent_1="Mickael" Ent_2="Crown" Ent_3="copyrighter">

My result file should devide the flat file to mixed <page> and <GroupBy
> elements. These can be nested within eachother; the <page> element is
used to hold up to 10 records, while the <GroupBy > elements are used to
devide the records into (what else?) groups. These groups can be based
on any attribute of the records and can contain more levels of grouping,
as well as other <page> elements (if the members of a group are more
than ten):

<page>
  <GroupBy GRoupByFields="Ent_ID" Page="1" TotalPages="1">
    <GroupBy GRoupByFields="Ent_1" Page="1" TotalPages="1">
      <GroupBy GRoupByFields="Ent_2" Page="1" TotalPages="1">
        <row Ent_ID="1" Ent_1="Manos" Ent_2="Batsis"
Ent_3="programmer"/>
     </GroupBy>			
     <GroupBy GRoupByFields="Ent_2" Page="1" TotalPages="1">
       <row Ent_ID="1" Ent_1="Manos" Ent_2="Dollan" Ent_3="programmer"/>
    </GroupBy>
  </GroupBy>
  <row Ent_ID="1" Ent_1="Helen" Ent_2="Crown" Ent_3="secretary"/>
  </GroupBy>
  <GroupBy GRoupByFields="Ent_ID" Page="1" TotalPages="1">
    <row Ent_ID="10" Ent_1="Mickael" Ent_2="Crown" Ent_3="copyrighter"/>
  </GroupBy>
</page>


So, we have multiple sorting and paging on a hard deadline. I receive
the attributes I base my grouping upon as parameters, let's say there
are three of them and their priority is as $param1, $param2, $param3.

Any help towards the right direction, would be much, much appreciated.
Thank you for your precious time.

Kindest regards,

Manos

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


Current Thread