xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: XPath's role (Was: Re: [xsl] Re: . in for)


Subject: RE: XPath's role (Was: Re: [xsl] Re: . in for)
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Mon, 7 Jan 2002 22:03:07 -0000

>
> Taking the basic example:
>
>   for $item in $sequence return some:function($item)
>
> is equivalent to:
>
> <xsl:function name="my:for">
>   <xsl:param name="sequence" type="item*" />
>   <xsl:result select="if (empty($sequence))
>                       then ()
>                       else (my:function($sequence[1]),
>                             my:for($sequence[position() > 1]))" />
> </xsl:function>
>
OK, I'll change the rules. If removing range variables means that to achieve
simple things, people have to write recursive functions, then I'd rather
keep range variables!

Two reasons: Usability and Optimization. You can argue with both, of course,
but I think the solutions using range variables are more manageable both for
implementors and for users, especially the sort of users who've written a
bit of SQL.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor