Re: Is there a good reason to use an entity code for double quotes inside the code element

On Sun, 2017-11-19 at 17:19 +0900, Martin J. Dürst wrote:
> On 2017/11/19 16:28, Liam R. E. Quin wrote:
> > On Sat, 2017-11-18 at 22:26 -0800, Matt King wrote:
> > 
> > > Is there a good reason to use " instead of " when writing
> > > code
> > > samples in our specs?
> > 
> > None that i'm aware of. You need & and < though.
> 
> If there's one, then it's probably "No need to have to think about 
> whether I'm in an attribute, or in content." That can come in handy
> in programs, or when you expect a lot of copying of content from
> attribute values to content and back.

Agreed but i doubt that happens with the XMLSPec DTD - putting human-
visible content in attributes is an XML anti-pattern of course :)

It's more likely to be from people not remembering what to quote.

Matt, and others - if you're using CDATA sections, by the way, to avoid
having to remember what to quote, be careful to avoid ]]> appearing
inside them, which does sometimes happen with embedded JavaScript -
    if (arr[i+offestes[i]]>j) { ....

Best,

Liam

-- 
Liam Quin, W3C, http://www.w3.org/People/Quin/
Staff contact for Verifiable Claims WG, SVG WG, XQuery WG
XML at W3C
Web slave for http://www.fromoldbooks.org/

Received on Sunday, 19 November 2017 21:52:32 UTC