- From: Robie, Jonathan <jonathan.robie@emc.com>
- Date: Thu, 8 Oct 2015 14:23:20 +0000
- To: Josh Spiegel <josh.spiegel@oracle.com>, Michael Kay <mike@saxonica.com>
- CC: Public Joint XSLT XQuery XPath <public-xsl-query@w3.org>
I like both changes. 1. Changing EnclosedExpr to "{" Expr? "}" is obviously a grammar change (@mdyck), and would require WG approval on Tuesday, I think. I really like it, because I often write a set of empty functions before I write the function expression, e.g. declare function local:dingsbums($x) { }; With the current grammar, I have to put something in there, so I write something like this: declare function local:dingsbums($x) { 1 }; 2. Changing string-join to accept xs:anyAtomicType* is definitely more convenient. Should string-join() also use ' ' as the default separator? I can always specify string-join($x, '') if I don't want that. Jonathan ________________________________________ From: Josh Spiegel [josh.spiegel@oracle.com] Sent: Thursday, October 08, 2015 10:09 AM To: Michael Kay Cc: Robie, Jonathan; Public Joint XSLT XQuery XPath Subject: Re: Fixes to string constructors now in internal WD Makes sense. Let’s also make the enclosed expression optional and modify string-join to accept xs:anyAtomicType* instead of xs:string*. Thanks, Josh > On Oct 8, 2015, at 1:45 AM, Michael Kay <mike@saxonica.com> wrote: > > >> On 8 Oct 2015, at 03:53, Josh Spiegel <josh.spiegel@oracle.com> wrote: >> >> >>> each string constructor interpolation $i is evaluated, then converted to a string using the expression string-join($i ! string(.)) >> >> I agree with Mike about atomization and lean towards separating the values with spaces because it seems more consistent with the behavior of constructor content (3.9.1.3 Content, e. iii) and sequence normalization. e.g. >> >> ($i ! (. cast as xs:string)) => string-join(‘ ‘) > > I’m OK with that. (Can’t help feeling that’s what string-join() itself should do: string-join(1 to 4, ‘ ‘) => “1 2 3 4”.) >> >> (the cast expr will atomize) >> >>> StringConstructorInterpolation ::= "`{" Expr "}`" >> >> >> Can we make it “Expr?” instead of “Expr” > > If we do that, I think we should do it in EnclosedExpr as well. > > Michael Kay > Saxonica
Received on Thursday, 8 October 2015 14:24:09 UTC