W3C home > Mailing lists > Public > www-svg@w3.org > October 2008

Re: [1.2T-LC] Comments and suggestions, mainly regarding the Linking section (ISSUE-2122)

From: Doug Schepers <schepers@w3.org>
Date: Mon, 13 Oct 2008 18:20:05 -0400
Message-ID: <48F3C995.4000507@w3.org>
To: Helder Magalhães <helder.magalhaes@gmail.com>
CC: www-svg <www-svg@w3.org>

Hi, Helder-

Thanks for your comment, recorded as ISSUE-2122 [1].  Response inline...

Helder Magalhães wrote (on 10/13/08 5:22 AM):
>
> 9. Inconsistent usage of quotes and/or apostrophe in markup
> 
> I noticed several inconsistent usages of the delimiter for attribute
> values in XML markup. For example, in "entity.svg" [GENERAL], current
> markup even shows both within the same document:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE svg [
>     <!ENTITY Smile "
>     <rect x='.5' y='.5' width='29' height='39' fill='black' stroke='red'/>

In this case, this is a deliberate use of the single quotes within a
block of double quotes, to avoid having to escape the quote character.
This example would not work if we used only one delimiter without
escaping it.  This works either way:

 "This is a sentence with somebody saying, 'Hi, I like to use single
quotes!'"
 'By contrast, "I like them so much, I use them preferentially."'

It makes things like this possible:

 <a xlink:title="The Queen's Hive, my friend's site on bee-keeping"
xlink:href="...">...</a>



> While I though the use of quotes was mandatory, it was quick to find a
> similar example in the XML specification [XMLLANG], so it's probably
> just an old myth in my mind. Few more samples of these mixed usage,
> now in property definition [LINKING]:

Yes, both single and double quotes are allowed in XML. [2]  In code,
this is normally a simple matter of personal preference (I normally use
single quotes in my code because it looks cleaner to me).  In cases like
the examples above, it matters.  I agree that examples are clearer when
only one quote-delimiter is used, and we do try to encourage the spec
writers to use the double-quotes.  Going forward, we will make these
consistent as we find them, but since it's merely editorial, we probably
won't have time for this version of the spec.


> xlink:type = 'simple'
> [...]
> target = '_replace' | '_self' | '_parent' | '_top' | '_blank' | "<frame-target>"
> [...]
> focusable = "true" | "false" | "auto"
> 
> Nevertheless, I'd generally recommend using the delimiter character
> consistently. I can think of cases where simpler implementations,
> which will tend to have less support for special (?) cases in XML
> parsing, may potentially fail to render SVG content for a somehow
> unrelated issue.

> [XMLLANG] http://www.w3.org/TR/2006/REC-xml-20060816/#sec-lang-tag

This is a slightly different case, where the use of double vs. single
quotes is a matter of convention to make specification keywords clear.
Again, this is not strictly necessary, but we do strive for consistency.
 In this case, we have already made a number of these corrections
(compare SVG 1.2 Tiny to SVG 1.1 Full), but have probably missed quite a
few.  It's not trivial to automate this, and it's a time-intensive task,
so we will probably spend our time resolving more critical issues in
this version, and continue to change these instances as we refine the
spec for SVG 2.0 Core.

Please let us know promptly whether or not this response is satisfactory
to you.


[1] http://www.w3.org/Graphics/SVG/WG/track/issues/2122
[2] http://www.w3.org/TR/REC-xml/#sec-notation

Regards-
-Doug Schepers
W3C Team Contact, SVG and WebApps WGs
Received on Monday, 13 October 2008 22:20:15 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:40 GMT