[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Practical Suggestion for XSLT Performance Improvement


Subject: Re: Practical Suggestion for XSLT Performance Improvement
From: "Oren Ben-Kiki" <oren@xxxxxxxxxxxxx>
Date: Sun, 10 Oct 1999 11:05:39 +0200

Clark C. Evans <clark.evans@xxxxxxxxxxxxxxxxxxxx> wrote:
> > In an editor, for example, if a user alters a document at one
> > point - let's say they insert a new element -  the stylesheet can
> > be re-applied locally to get a close approximation of the result
> > of rendering the entire document.
>
> This is true _only if_ the stylesheet author sticks to
> <template match="..." /> constructs.  As soon as the stylesheet
> author writes any significant portion of the document with a
> <for-each select="$complicated-xpath-expression" /> construct,
> you have lost the war.

Actually, it is worse then that. The war is lost if you use
select="$complicated-path" _anywhere at all_, even in the humblest
<xsl:value-of>. You also get in trouble by using multiple
<xsl:apply-templates> on the same input tree fragment, and passing data
computed in one invocation to another.

In short, the war is probably lost anyway. I note that the proposed
recommendation still restricts the use of result tree fragments, as if
there's still a chance of winning it. Well, it is listed in the considered
future features list, so not all hope is lost...

Have fun,

    Oren Ben-Kiki


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread