- From: Michael Kay <mike@saxonica.com>
- Date: Fri, 11 Sep 2015 20:00:40 +0100
- To: "Robie, Jonathan" <jonathan.robie@emc.com>
- Cc: Liam Quin <liam@w3.org>, Josh Spiegel <josh.spiegel@oracle.com>, Public Joint XSLT XQuery XPath <public-xsl-query@w3.org>
I’d like to put forward the idea of using chevrons instead. This is the 21st century, after all.
>> « this is « $a || «nested example» || $here » you see »
Yes, I know non-ASCII characters can still cause a pain. But the world is slowly learning to take advantage of them. And the purpose of this facility is to make certain kinds of query more readable.
Rules:
A string constructor is a primary expression.
It starts with left-chevron and ends with right-chevron.
Within a string constructor the sequence « introduces an embedded expression, which must be followed by »
The sequence «« represents a single left chevron.
The sequence »» represents a single right chevron.
Here’s Jonathan’s JSON example:
declare variable $json := « {"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"},
{"callback": null },
{"session-id": « get-session-id() » }
]
}
}} » ;
Michael Kay
Saxonica
> On 11 Sep 2015, at 14:56, Robie, Jonathan <jonathan.robie@emc.com> wrote:
>
> Liam wrote:
>> The following should be legal though:
>>
>> ~~| this is ~~{ a ~~|nested example|~~ here }~~ you see |~~
>>
>> Similarly,
>>
>> ~~| ~~{
>> " }~~ |~~" (: just a string :)
>> }~~ |~~
>>
>> should be possible I think.
>
>
> Yes. And I think it is possible with my proposal.
>
> Are we planning an Obfuscated XQuery contest for XML Prague?
>
> Jonathan
Received on Friday, 11 September 2015 19:01:10 UTC