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

Re: When to use conditional constructions?

Subject: Re: When to use conditional constructions?
From: Graydon <graydon@xxxxxxxxx>
Date: Mon, 31 Mar 2014 12:40:30 -0400
Re:  When to use conditional constructions?
On Mon, Mar 31, 2014 at 05:15:46PM +0100, David Carlisle scripsit:
> On 31/03/2014 17:08, Michael Kay wrote:
> >>While we're extending XPath, can we have support for named,
> >>referenceable predicate definitions?
> >
> >Isn't that the same thing as a function?
> 
> Yes, but you didn't quote the important bit:
> 
> >-- Graydon, who is going to be embarrassed if that's snuck into 3.0
> 
> Function definitions have in fact snuck in to XPath 3 by way of the let
> clause and inline function definitions.

Does that give me a way to use the same definition in multiple XPath
expressions with a definition in one place?  Inline functions are
anonymous, and any "let $localFunction := function...." I'd expect to
stay stuck in the context of that particular XPath expression --

3.10 says "The scope of a variable bound in a let expression comprises
all subexpressions of the let expression that appear after the variable
binding. "

-- so I wouldn't expect to be able to use the same definition in multiple match
attributes without defining it each time, which isn't helpful on the
"define in one place, debug, use with confidence" front.

-- Graydon

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.