Hi Peter, Found this:
"All attribute values must be quoted, even those which appear to be
numeric."
Ref: Differences with HTML 4
http://www.w3.org/TR/xhtml1/diffs.html#h-4.4
It didn't mention any particular requirements for the quotes (single or
double), although, the example given uses double quotes.
So I dug a little deeper and found...
<snip>
AttValue ::= '"' ([^<&"] | Reference)* '"'
| "'" ([^<&'] | Reference)* "'"
</snip>
Ref: Extensible Markup Language (XML) 1.0 (Third Edition)
W3C Recommendation 04 February 2004
UNDER -> 2.3 Common Syntactic Constructs
http://www.w3.org/TR/2004/REC-xml-20040204/
I read that (snip) to mean:
Any tag attribute's value must begin with a double quote and end with a
double quote OR begin with a single quote and end with a single quote. The
other guff in the middle outlines what characters are valid as values.
Basically anything bar < & and " OR an entity reference.
So, as far as I can tell, single quotes on your attribute values are
perfectly acceptable (for xhtml1).
Havent done any real testing in browsers, but I'd say it is a non-issue.
Cheers,
____________________________
James Silva
Web Production
Gruden Pty Ltd
Tel: +61 02 9956 6388
Fax: +61 02 9956 8433
Email: [EMAIL PROTECTED]
Web: http://www.gruden.com
____________________________
________________________________
From: Peter Ottery [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 25 February 2004 12:09 PM
To: Web Standards Group (E-mail)
Subject: [WSG] double quoting
Hi guys,
theres a CMS (content management system) I'm dealing with that is
converting some double quotes to single quotes, so this...
<div id="content">
...becomes...
<div id='content'>
...when published.
this is on a XHTML transitional page.
Now, I'm a bit removed from the CMS itself, but the dev guy (i'm
just a front end guy) thats dealing with it said it may take a little while
to correct this but in the meantime he didnt think it was a problem for any
browsers so it would be low priority.
Can anyone shed some light on whether this is true or whether some
browsers will choke on single quotes? I'm a little sceptical about the low
priority and am worried about crucial bits of content like this going
screwy...
cheers,
pete ottery
smime.p7s
Description: S/MIME cryptographic signature
