- From: Liam Quin <liam@w3.org>
- Date: Wed, 16 Sep 2015 13:35:09 -0400
- To: Josh Spiegel <josh.spiegel@oracle.com>
- Cc: Michael Kay <mike@saxonica.com>, Abel Braaksma <abel.braaksma@xs4all.nl>, Public Joint XSLT XQuery XPath <public-xsl-query@w3.org>
On 2015-09-16 10:20, Josh Spiegel wrote:
> Even if it is XQuery only, is putting HTML in a smart quote a valid
> use case?
Yes.
Originally I chose strings based on analyzing a variety of languages,
including JavaScript, JSON, CSS.
Most delimiters that will work look silly with short examples, but that
really isnt' a problem in practice. A real-life example might be
anywhere from 4 lines to several thousand lines of CSS or JavaScript
(with HTML snippets embedded).
So the earlier proposal of something like ~~$.... $~~ and ~~= ... =~~
works fine because it's fairly visible when you scroll quickly. I used
@{....@} I think, because they don't occur in those languages and
because the { and } let you use bracket matching in your editor.
> <script type="text/javascript">/*<![CDATA[ ……. ]> */</script>
>
> The other occurrences were things like this:
>
> <!--[if gt IE 8]>...
You will also find it in pure JavaScript, perniciously:
if (i[j]>k){ ... }
It can also occur in XQuery already outside of smart quote expressions,
as for that matter can <<< and >>>.
Liam
--
Liam Quin, W3C
XML Activity Lead;
Digital publishing; HTML Accessibility
Received on Wednesday, 16 September 2015 17:35:16 UTC