... or you could just group things in a stylesheet (wuthout sorting them, of course):
<xsl:template match="sql:curAdmarea"> <xsl:for-each select="sql:row"> <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> <xsl:variable name="group-prev"><xsl:value-of select="//sql:row[position()=($pos - 1)]/sql:groupdiv"/></xsl:variable> <xsl:if test="$group-prev != sql:groupdiv"> <!-- If new group... do this --> </xsl:if> <!-- Process the rest of the row --> </xsl:for-each> </xsl:template> I took this example from a different context... but I hope you got the idea. Best regards, --------------------------------------------- Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html --------------------------------------------- > -----Original Message----- > From: Hahn Kurt (CHA) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 11:48 AM > To: '[EMAIL PROTECTED]' > Subject: RE: Returning result from two select statements in one file > > > That's a good suggestion. I'll try that! > > -----Message d'origine----- > De : Bertrand Delacretaz [mailto:[EMAIL PROTECTED]] > Envoye : jeudi, 25. avril 2002 11:46 > A : [EMAIL PROTECTED] > Objet : Re: Returning result from two select statements in one file > > > Salut Kurt, > > On Thursday 25 April 2002 11:00, Hahn Kurt (CHA) wrote: > >. . . > > Example: The first select returns a row, and dependent on the result of > > that row, a second select returns zero, one ore more rows that should be > > added to the first returned row (as if they belonged to the result from > the > > first select..). > >. . . > > How about chaining two SQLTransformers? > > 1. first SQLTransformer makes query > > 2. XSLT transform computes second query based on first results > and places it > > at the right position in XML > > 3. second SQLTransformer makes "sub-query" > > I *think* SQLTransformer leaves the rest of the document intact, in which > case this could work and be nicely modularized. > > -Bertrand > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>