xsl-list
[Top] [All Lists]

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

2012-02-09 04:21:46
Thanks to all for your advice.  That helps deciding what to use in
what situation.

Thomas W.


2012/2/9 Andrew Welch <andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com>:
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

--~------------------------------------------------------------------
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>
--~--


--~------------------------------------------------------------------
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>
--~--