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

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: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 9 Feb 2012 04:51:35 -0800

> 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).

Since about 6 months oXygen has implemented stepping through an XPath
expression (not sure about setting breakpoints). Thus there should be
no difference in debugging XPath code and XSLT code with oXygen.

Cheers,
Dimitre Novatchev.

On Wed, Feb 8, 2012 at 11:59 PM, TW <zupftom@xxxxxxxxxxxxxx> wrote:
> Hi all,
>
> in XSLT 2.0, I quite often find that I can do things using either
> XPath or XSLT constructs. B For example, in a step-by-step calculation
> I define a number of variables, either with <xsl:variable> or XPath
> "for $x in y" expressions. B I can use <xsl:choose> or XPath's
> if/then/else (single or chained). B Sometimes a goal can be achieved
> with either <xsl:for-each>/<xsl:sort> and more complex sort criteria
> and return values, or max()/min() and some conditional treatment.
>
> 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). B But how does it look
> performance-wise? B Is there a valid rule of thumb what constructs are
> cheaper in general? B Do XSLT constructs maybe have an overhead that
> XPath ones don't?
>
> Thomas W.
>



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.


Current Thread
Keywords