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

Re: Re: Hello XQuery ... Goodbye XSLT?


goodbye in other languages

"DuCharme, Bob (LNG-CHO)" <bob.ducharme@l...> wrote in message 
FEF4858E8AB32D4EAC2CF2A7D85386EB0B2543A4@l...">news:FEF4858E8AB32D4EAC2CF2A7D85386EB0B2543A4@l......
> Jonathan Robie wrote:
>>Dimitre Novatchev
>
>>> To avoid recursion in tree processing (isn't this what XSLT and XQuery
>>> are all about)? This should be impossible by definition.
>
>>I think you are confusing recursive data structures, which both languages
> must be
>>able to handle, with recursive algorithms.
>
> To amplify what Jonathan wrote, by recursion I was referring to algorithms
> and not data structures--in particular, the use of XSLT 1.0 named 
> templates
> that call themselves to accomplish things that can be accomplished more
> intuitively for most people with procedural code in other languages. For
> example, the repetition of something a fixed number of times.


And by recursive processing I meant such simple and fundamental things like 
the identity transformation (XSLT 1.0 terminology):

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>

Overriding the identity template rule (XSLT 2.0 terminology) provides an 
elegant and powerful pattern for solving a large class of tree 
transformation problems.
Compared to it, the non-recursive solutions are more clumsy and unnatural 
and in some cases may be very difficult to produce.

There are different types of programmers -- it is as difficult for followers 
of the functional programming school not to use recursion as to use 
recursion for programmers from the procedural school.

But this reflects individual way of thinking -- not the nature of the 
problems being solved, large group of which are inherently recursive.

Cheers,

Dimitre.

>
> When I mentioned XSLT developers who don't use recursion in an earlier
> posting, I was referring to the ones who avoid the use of recursive named
> templates.
>
> Bob DuCharme   www.snee.com/bob       <bob@
> snee.com> weblog on linking-related topics:
> http://www.oreillynet.com/pub/au/1191
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
> 




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.