It works fine!
Thank's

-----Message d'origine-----
De: Michael Kay
A: 'Willy Goldgewicht'
Cc: saxon-help@lists.sourceforge.net
Date: 24/01/03 19:58
Objet: RE: [SAXON] nested saxon:group

Please don't go off-list - it means people can find the question in the
archives but not the answer!
 
I think that the only way you can simulate current-group() using the
saxon:group construct is by something along the lines
 
<saxon:group select="foo" group-by="@key1">
  xx
  <xsl:variable name="x">
  <saxon:item>
     <xsl:copy-of select="."/>
  </saxon:item>
  </xsl:variable>
  <saxon:group select="saxon:node-set($x)/*">
  yyy
    ... etc ...
 
But my brain may be rusty - it's a long time since I used <saxon:group>;
and I can't swear that the above will work without actually trying it.
 

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com

-----Original Message-----
From: Willy Goldgewicht [mailto:Willy.Goldgewicht@valtech.fr]
Sent: 24 January 2003 11:09
To: michael.h.kay@ntlworld.com
Subject: RE: [SAXON] nested saxon:group


Here is my complete saxon 7.3.1 stylesheet :
 
<xsl:transform
 xmlns:xsl=" http://www.w3.org/1999/XSL/Transform
<http://www.w3.org/1999/XSL/Transform> "
 xmlns:saxon=" http://saxon.sf.net/ <http://saxon.sf.net/> "
 version="1.0"
>
 
<xsl:output indent='yes' method='xml'/>
 
<xsl:param name="client" select="19461" />
 
<xsl:template match='/'>
<Report>
<advertiser advertiser-name="{$client}">
  <xsl:for-each-group select="//villes" group-by="@region">
  <xsl:sort select="@region"/>
  <region region-name=" {@region <mailto:{@region> }">
   <xsl:for-each-group  select="current-group()"
group-by="@agglomeration">
   <xsl:sort select="@agglomeration"/>
    <agglomeration agglomeration-name=" {@agglomeration
<mailto:{@agglomeration> }" >
      <xsl:for-each-group  select="current-group()" group-by="@city">
    <xsl:sort select="@city"/>
     <xsl:variable name="temp" select="@leaf_id"/>
     <xsl:variable name="banner"
select="document('details.xml')//detail[@cityid=$temp and
@id_advertiser=$client][1]/@disp" /> 
   <city city-name=" {@city <mailto:{@city> }">
   <displayable banner="{$banner}" creative="{$banner}">
    <xsl:for-each select="document('details.xml')//detail[@cityid=$temp
and @id_advertiser=$client]" >
     <xsl:sort data-type="number" select="@nomob"/>
     <structure-detail number=" {@nomob <mailto:{@nomob> }" familly="
{@comob <mailto:{@comob> }" adress=" {@address <mailto:{@address> }" />
    </xsl:for-each>
   </displayable>
   </city>
  </xsl:for-each-group>
  </agglomeration>
 </xsl:for-each-group>
 </region>
  </xsl:for-each-group>
</advertiser>
</Report>
</xsl:template>
 
It is quite simple : it uses 3 nested for-each-group to produce a 3
levels geographical hierarchy : region - agglomeration - city
 
Now, I must downgrade to saxon 6.5.2. I can use your specific extensions
(I do not have the constraint to use standard xslt and your product is
the best one !).
 
I can replace for-each-group by saxon:group and saxon:item. But how can
I replace the current-group() function?
Ideally, a saxon function will be the best (maybe using the muenchian
trick?) in which case I will be able to automatically downgrade my
stylesheets via a specific stylesheet.
 
Thank's

-----Message d'origine-----
De : Michael Kay [mailto:michael.h.kay@ntlworld.com]
Envoyé : vendredi 24 janvier 2003 11:46
À : 'Willy Goldgewicht'; saxon-help@lists.sourceforge.net
Objet : RE: [SAXON] nested saxon:group


The XSLT 2.0 <xsl:for-each-group> is considerably more powerful (and
also much better specified) than the <saxon:group> extension in 6.5.2.
You would need to explain the actual problem to see what workaround
might be possible.
 
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com

-----Original Message-----
From: saxon-help-admin@lists.sourceforge.net
[mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Willy
Goldgewicht
Sent: 23 January 2003 14:58
To: 'saxon-help@lists.sourceforge.net'
Subject: [SAXON] nested saxon:group



It is quite easy to nest for-each-group elements with Saxon 7.3 and the
current-group() fonction.
How can I nest saxon:group elements with Saxon 6.5.2 ? How can I replace
the current-group() fonction?
Thank's

========================================================================
=
Ce message et toutes les pièces jointes sont propriété de VALTECH et
susceptibles de contenir des informations confidentielles à l'intention
exclusive de ses destinataires. Si vous avez reçu ce message par erreur
ou si celui ci vous est parvenu incomplet ou altéré, merci d'en avertir
l'expéditeur par retour.Toute utilisation, diffusion ou publication non
expressément autorisée par VALTECH par écrit est strictement interdite.
 
------------------------------------------------------------------------
--
This message and any attachments are Valtech property and may contain
confidential information intended solely for the addressees. If you are
not the intended recipient of this message or if you have received it
incomplete or altered, please notify the author by replying to this
e-mail
immediately. Any unauthorised use, diffusion or dissemination not
expressly authorised by VALTECH in writing is strictly prohibited.
========================================================================
=
Copyright Valtech 2002




========================================================================
=

Ce message et toutes les pièces jointes sont propriété de VALTECH et

susceptibles de contenir des informations confidentielles à l'intention

exclusive de ses destinataires. Si vous avez reçu ce message par erreur

ou si celui ci vous est parvenu incomplet ou altéré, merci d'en avertir

l'expéditeur par retour.Toute utilisation, diffusion ou publication non

expressément autorisée par VALTECH par écrit est strictement interdite.

------------------------------------------------------------------------
--

This message and any attachments are Valtech property and may contain

confidential information intended solely for the addressees. If you are

not the intended recipient of this message or if you have received it

incomplete or altered, please notify the author by replying to this
e-mail

immediately. Any unauthorised use, diffusion or dissemination not

expressly authorised by VALTECH in writing is strictly prohibited.

========================================================================
=

Copyright Valtech 2002





=========================================================================
Ce message et toutes les pièces jointes sont propriété de VALTECH et
susceptibles de contenir des informations confidentielles à l'intention
exclusive de ses destinataires. Si vous avez reçu ce message par erreur
ou si celui ci vous est parvenu incomplet ou altéré, merci d'en avertir
l'expéditeur par retour.Toute utilisation, diffusion ou publication non
expressément autorisée par VALTECH par écrit est strictement interdite.
 --------------------------------------------------------------------------
This message and any attachments are Valtech property and may contain
confidential information intended solely for the addressees. If you are
not the intended recipient of this message or if you have received it
incomplete or altered, please notify the author by replying to this e-mail
immediately. Any unauthorised use, diffusion or dissemination not
expressly authorised by VALTECH in writing is strictly prohibited.
=========================================================================
Copyright Valtech 2002