[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: variable outside a for-each loop: second try

Subject: Re: variable outside a for-each loop: second try
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 21 Sep 2007 21:53:10 +0200
Re:  variable outside a for-each loop: second try
Wendell Piez wrote:
At 04:08 AM 9/21/2007, Abel wrote:
And yes, many people, to their own misfortune, still manage to struggle with XSLT 1.0

I bet that on reconsideration Abel might recast this to be somewhat milder.

May I answer that in XSLT 2.0? deep-equal(//abel, //abel[. castable as xs:milder])

returns true on all occasions.


There's nothing wrong with XSLT 1.0. As with anything, it's only a "struggle" if you're working outside the boundaries of what it does well -- a wide range of tasks, indeed wider than those for which it was developed (which is part of what accounts for its present ubiquity).


Everything else being equal, Abel and others (including myself) will generally prefer XSLT 2.0 because the range of tasks for which it is well suited is wider than ever, while what was easy in XSLT 1.0 remains easy.

Maybe, since the OP is adept with C++, we could compare 1.0 and 2.0 as C with C++? The major shift being in the former from "everything is an untyped atomic type or an RTF" to "everything is a sequence of typed entities", the latter going from "everything is a pointer" to "everything is an pointer to an object". But now I am over simplifying things ;)



This doesn't mean 1.0 is useless or a mistake any more than having a GUI means the command line is now useless or a mistake. Indeed, as long as XSLT 1.0 remains as widespread as it is (and my guess that 2.0 processors will displace 1.0 processors only gradually, and perhaps never completely), programmers who know how to work within its contraints will be at an advantage compared to those who can only use 2.0, having become dependent on its features, or never having known the difference.

I totally agree. In my situation (and some may recall that from previous statements on this list) I happen to have to build one half of my stylesheets in 1.0 and the other half in 2.0. And, considering the toolset, I try to refrain from anything fancy, like needing exslt:node-set, because my stylesheets must be portable (not portable enough yet, I do use document() and hence cannot use it on Opera, but that is a well know M:D discussion ;)


Cheers,
-- Abel Braaksma

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.