[xsl] RE: bad programming for speedup?

Subject: [xsl] RE: bad programming for speedup?
From: christoph.naber@xxxxxxxxxxxxxxxxxxx
Date: Tue, 24 Jul 2007 16:43:26 +0200
Hello,

I'm sorry that my imprecise description of the problem caused some
confusion.

I'm using XSLTPROC for transformation, which AFAIK only supports XSLT 1.0.
I had written a mail with input/output examples but I did not send it when
I received the recursion-hint from Michael, sorry for that.

> Have you tried the other suggestions? Mainly Andrew's method (or mine
> even, if the below does what I think it does).

I just edited the stylesheet according to Justins suggestions. And I read
through Andrew's method. This way to code XSLT is very new for me. I
learned XSLT at the university, but as you (and me too) may have already
noticed, the professor only taught us the very basics.

> Please allow me to make some suggestions on your code below:

The more, the better.

I tried to rewrite the stylesheet. I think its better not to post my
version with the key here to avoid more "eyes that hurt" :)

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method="xml" indent="yes"/>

        <xsl:template match="node() | @*">
                <xsl:copy>
                        <xsl:apply-templates select="@* | node()[1]" />
                </xsl:copy>
                <xsl:apply-templates select="following-sibling::*[1]" />
        </xsl:template>

        <xsl:template match="row" >
                <table>
                        <xsl:apply-templates select="." mode="more2come"/>
                </table>
                <xsl:apply-templates select="following-sibling::*[
not(self::row)][1]" />
        </xsl:template>

        <xsl:template match="row" mode="more2come">
                <xsl:copy>
                        <xsl:apply-templates select="@* | node()[1]" />
                </xsl:copy>
                <xsl:apply-templates
select="following-sibling::*[1][self::row]" mode="more2come" />
        </xsl:template>

</xsl:stylesheet>


Thank you all for your answers, I'm very astonished about so much response
to a dumb question.

Greets
Christoph Naber


If you are not the intended addressee, please inform us immediately that you
have received this e-mail by mistake and delete it. We thank you for your
support.

Current Thread