RE: [xsl] <xsl:sort> discarting all content

Subject: RE: [xsl] <xsl:sort> discarting all content
From: "Markus Karg" <karg@xxxxxxxxx>
Date: Wed, 10 Mar 2010 14:13:18 +0100
Yes, I am using XSLT 1.0 with the node-set() function. I'll try to set up a
sample ASAP.

Thanks so far
Markus

> -----Original Message-----
> From: Abel Braaksma [mailto:abel.online@xxxxxxxxx]
> Sent: Mittwoch, 10. Mdrz 2010 14:07
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] <xsl:sort> discarting all content
>
> Hi Markus,
>
> When you use XSLT 2.0 and you re-process the temporary result document
> (aka micro-pipelining), the change in order of the nodes may change the
> applicability of your matching templates. If you use XSLT 1.0 (which I
> assume considering you mention the default of Java 6), you may have
> done
> micro-pipelining using the node-set() extension of your processor, in
> which case the same issue may apply.
>
> In the same line of thought: using macro-pipelining or other kinds of
> post-processing that depend on the order of the nodes, you can see
> similar behavior.
>
> Like MK: to help you further, we'll need a minimal example of input
> XML,
> XSLT file and (current, wrong) output XML, if any and the version of
> the
> processor you use, that illustrates your issue.
>
> Kind regards,
> Abel Braaksma
>
>
>
> Markus Karg wrote:
> > Dear XSL Professionals,
> >
> > We have this rather simple XSL snippet which is working perfectly:
> >
> > <xsl:for-each select="$v">
> >     <xsl:message><xsl:value-of select="@a"/></xsl:message>
> > </xsl:for-each>
> >
> > But when we are adding ANY sorting (independent of the content of
> it's select attribute, and even if we do not provide a select attribute
> at all) the is no output anymore -- the loop is just not executed
> anymore!
> >
> > <xsl:for-each select="$v">
> >     <xsl:sort select="@x" />
> >     <xsl:message><xsl:value-of select="@a"/></xsl:message>
> > </xsl:for-each>
> >
> > We have no clue why there is output anymore. What we know is that it
> is not related to <xsl:message> as it also happens if we are trying to
> output to the normal result stream. Transformer used is the one that is
> defaulted in Java 6.

Current Thread