xsl-list
[Top] [All Lists]

Re: [xsl] Need help for XSL beautifaction

2006-05-17 09:01:03
-----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-----

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--