Re: [xsl] Rule of thumb: Are XPath 2.0 or XSLT 2.0 constructs faster?

Subject: Re: [xsl] Rule of thumb: Are XPath 2.0 or XSLT 2.0 constructs faster?
From: TW <zupftom@xxxxxxxxxxxxxx>
Date: Thu, 9 Feb 2012 11:21:37 +0100
Thanks to all for your advice.  That helps deciding what to use in
what situation.

Thomas W.


2012/2/9 Andrew Welch <andrew.j.welch@xxxxxxxxx>:
>> I like pure XPath solutions because they are less verbose, but I find
>> "full" XSLT less restricting and easier to debug (especially when I
>> want to check what variable holds what value).
>
> ...and insert additional instructions like xsl:message or comments, or
> allow refactorings at certain points like an apply-templates instead
> of just getting the value.
>
> My general guide is use XPath for simple tasks, say an if-then-else,
> but when its get past trivial, eg if-then-else-if-then-else, switch to
> the longer winded choose/when, as your future self with thank you for
> it.
>
>
> --
> Andrew Welch
> http://andrewjwelch.com

Current Thread