Re: [xsl] Need help for XSL beautifaction

Subject: Re: [xsl] Need help for XSL beautifaction
From: Martin Gadbois <martin.gadbois@xxxxxxxxxxxx>
Date: Wed, 17 May 2006 11:32:25 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Kay wrote:
> You could use
> 
> <xsl:copy-of select="$text-1[current()/textNo='text-1']"/>
> 
> but people might question whether it's an improvement on your original.
> Small is not always beautiful.
> 
> In XSLT 2.0 you can do
> 
> <xsl:copy-of select="if (textNo='text-1') then $text-1 else ()"/>
> 

I wonder if Michael could comment on the optimization of those
constructs: Would the <xls:if> be faster to execute than the XPath?

Just curious...

(Obviously one should always profile before optimization, but Dr. Kay is
well informed to comment...)

- --
==============         +----------------------------------------------+
Martin Gadbois         | "Windows might take you from 0 to 60 faster, |
S/W Developer          |  but to go to 100 you need Unix."            |
Colubris Networks Inc. +----------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEa0II9Y3/iTTCEDkRAmYJAJ0f5jwey2GOWz79A3EDiZiWPbm9hwCfckn4
un76rxXaqExznhnbUs8GVIU=
=LukS
-----END PGP SIGNATURE-----

Current Thread