- From: Robie, Jonathan <jonathan.robie@emc.com>
- Date: Thu, 10 Sep 2015 20:52:39 +0000
- To: Michael Kay <mike@saxonica.com>, Liam Quin <liam@w3.org>
- CC: Josh Spiegel <josh.spiegel@oracle.com>, Public Joint XSLT XQuery XPath <public-xsl-query@w3.org>
My previous modification to Liam's proposal had some characters messed up. Here it is again, this time I didn't try to compose it in Outlook .... Suppose we did this: ExtStringConstructor ::= "~~|" ExtStringText "|~~" ExtStringText := ((Char* - "~~{") | "~~{" Expr "}~~")* That makes our earlier example look like this: ~~| ~~{ "${" }~~ |~~ Here is a longer example, modified from Liam's proposal: 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() }~~ } ] } }} |~~ ; Since you can embed any arbitrary expression, you can effectively do an escape by assigning a sequence to a string variable. declare variable $double-squiggle := "~~"; declare variable $pipe := "|"; ~~| ~~{ $double-squiggle, $pipe }~~ |~~ Do we need an escape mechanism beyond that? Jonathan
Received on Thursday, 10 September 2015 20:53:34 UTC