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

Re: Hello XQuery ... Goodbye XSLT?


xquery mozilla
the trick with xslt is that it's a specification of what to do, not an 
instruction to do something. ie it is truly non-procedural.

the paradigm shift is from programming (giving a clear step by step set 
of instructions) to specifying (if you have an x then do y). this is 
subtle but critical.

my experience training practicing programmers to make this paradigm 
shift is that they struggle. they're programmers because they can build 
a detailed set of instructions. if you talk to managers you'll find they 
can actually do this sort of work better because their day-to-day work 
is based on broad directions not detailed instructions.

the trick is to remember you're not writing a program to work in an 
orderly fashion through a document. you're writing a specification for 
something that tells it what to do should it come across something.

there's only a very small class of languages that work like this. prolog 
is possibly the nearest of the "traditional" languages

rick

Peter Hunsberger wrote:

>On Wed, 10 Nov 2004 15:43:23 +0000 (GMT), Richard Tobin
><richard@i...> wrote:
>
><snip>why people don't get recursion</snip> 
>
>  
>
>>While this may be true, it's certainly a deficiency of XSLT that it
>>often requires you to use recursion to perform tasks that are more
>>naturally described in a non-recursive way.  A programmer may be quite
>>happy using recursion to implement tasks he thinks of as recursive,
>>but still find it frustrating to translate, say, simple string-editing
>>to a recursive algorithm.
>>    
>>
>
>I don't think I'd call it a deficiency, but yes one person's natural
>act might be painful for another...
>
>I'd be willing to hazard a guess that there's a percentage of people
>who get recursion but find translating it into the XSLT syntax the
>straw that breaks the Camel's back, so to speak?   I'm usually OK with
>the XSLT syntax up until the point I've got to do something like you
>describe.  At that point the syntax becomes heavy weight enough that
>writing the simple algorithm with all that extra verbiage is a pain. 
>I think this is something where XSLT 2 and XPath 2 help a lot, with
>them, for some things, recursion is no longer necessary...
>
>  
>

begin:vcard
fn:Rick  Marshall
n:Marshall;Rick 
email;internet:rjm@z...
tel;cell:+61 411 287 530
x-mozilla-html:TRUE
version:2.1
end:vcard


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.