Re: ACTION 614-12: Smart Quotes

> I would prefer to allow users to choose any character they like in place of the “$”

This was debated and decided at Face-To-Face Meeting #554:
https://lists.w3.org/Archives/Member/w3c-xsl-query/2013Nov/0074.html

Some implementations may separate lexical processing [1] from parsing so the tokenization of a query shouldn’t, for example, depend on evaluating a declaration in the prolog.  There were also concerns that third-party parser generators may not be able to support this kind of thing.  

Thanks,
Josh

[1] http://www.w3.org/TR/xquery-xpath-parsing/

> On Sep 10, 2015, at 9:01 AM, Michael Kay <mike@saxonica.com> wrote:
> 
> Some comments on this proposal.
> 
> [201] ExtStringConstructor ::= "~~$" . ExtStringText "$~~"
> [203] ExtStringText := ((Char* - "${") | "${" Expr "}”)*
> 
> In the first production, what does the “.” signify? Is it just a typo?
> 
> In the second production, there seems to be nothing to exclude “$~~” from the body of the string.
> 
> As I mentioned before in discussion, I would prefer to allow users to choose any character they like in place of the “$”. We might find that the grammar notation is stretched to specify this, but I don’t see any serious difficulty in parsing it. There are things users might want to generate in which “${“ occurs frequently. Currently the only way of getting “${“ into the string is to write ${“${“} which is fairly horrible.
> 
> If we allowed any character, we would not need the separate construct ~~!…!~~.
> 
> It’s not stated where this construct can be used. The obvious answer is “anywhere you can use a string literal”. But there are places in XQuery where we have things that look like string literals, but are not. Notably DirAttributeValue. There are also places we use StringLiteral where we might not want to allow this syntax, for example within a VersionDecl; and I believe that URILiteral is defined syntactically to be a StringLiteral, but has some different semantic constraints.
> 
> I assume this is XQuery only, not XPath?
> 
> Does the setting of “boundary space” have any impact?
> 
> Michael Kay
> Saxonica
> 
> 
> 
> 
>> On 8 Sep 2015, at 15:49, Robie, Jonathan <jonathan.robie@emc.com> wrote:
>> 
>> ACTION 614-12 on JRobie to prepare a concrete proposal on smart quotes
>> for 2015-09-08.
>> 
>> After putting in time on this proposal, I followed the chain of reference on Liam's action item, and found this proposal.  I like it as is, and suggest that we simply incorporate it directly into the document.  Note that it looks quite different from the proposal we discussed at the F2F, but I think it is a major improvement of that proposal.
>> 
>> https://lists.w3.org/Archives/Member/w3c-xsl-query/2014Jan/0044.html
>> 
>> Jonathan
>> 
> 
> 

Received on Thursday, 10 September 2015 16:48:58 UTC