Hi Cocooners!!
I've a query into a database, and I'm getting the next results:
 
<?xml version="1.0" encoding="UTF-8" ?>
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <rowset name="lab" xmlns="http://apache.org/cocoon/SQL/2.0">
- <row>
  <nprg>90E501815</nprg>
  <npet>96139468</npet>
  <fext>19960827</fext>
  <hext>0000</hext>
  <servei>PSIQUIATRIA</servei>
  <origen>PSIQUIATRIA</origen>
  <solic />
  <llit />
- <rowset name="lab1">
- <row>
  <seccio>HEMATOLOGIA</seccio>
- <rowset name="lab2">
- <row>
  <subseccio>HEMATOL. BIOLOGICA - HEMA</subseccio>
  <codi>11100-9</codi>
  <descripcio>VPM</descripcio>
  <resu>11,1</resu>
  <unitat>fl</unitat>
  <vref>(6,0-10,5)</vref>
  </row>
- <row>
  <subseccio>HEMATOL. BIOLOGICA - HEMA</subseccio>
  <codi>11100-10</codi>
  <descripcio>PLAQUETOCRIT</descripcio>
  <resu>0,20</resu>
  <unitat>%</unitat>
  <vref />
  </row>
- <row>
  <subseccio>HEMATOL. BIOLOGICA - HEMA</subseccio>
  <codi>11100-11</codi>
  <descripcio>PDW</descripcio>
  <resu>42</resu>
  <unitat>%</unitat>
  <vref />
  </row>
- <row>
  <subseccio>HEMATOL. BIOLOGICA - HEMA</subseccio>
  <codi>11101-10</codi>
  <descripcio>MONOCITS ABSOLUTS</descripcio>
  <resu>0,57</resu>
  <unitat>x10E9/l</unitat>
  <vref>(<0,80)</vref>
  </row>
  </rowset>
  </row>
  </rowset>
  </row>
  </rowset>
  </page>
 
And after get this sql-xml I would to get the all the information of the xml file, I'm trying to group the <codi> <descripcio> <resu> <unitat> <vref> according to the <subseccio> name... (without duplicates of "subseccio")
I'm trying to do this, with the <xsl:key> .... and generate-id(.) but I'm getting some problems....
 
I would to get something like this:
 
HEMATOLOGIA
-         HEMATOL. BIOLOGICA - HEMA
                  11100-9
                  VPM
                  11,1
                  fl
                  (6,0-10,5)
- 
                 1100-10
                  PLAQUETOCRIT
                  0,20
                  %
  
                  1100-11
                  PDW
                  42
                  %
  
                   11101-10
                   MONOCITS ABSOLUTS
                   0,57
                   x10E9/l
                  (<0,80)

Reply via email to