[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: bad programming for speedup?

Subject: RE: bad programming for speedup?
From: christoph.naber@xxxxxxxxxxxxxxxxxxx
Date: Tue, 24 Jul 2007 16:43:26 +0200
 RE: bad programming for speedup?
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.