W3C home > Mailing lists > Public > www-html@w3.org > November 2008

Re: class="<valid chars here>"

From: Dustin Boyd <rpgfan3233@gmail.com>
Date: Thu, 20 Nov 2008 12:31:34 -0600
Message-ID: <ef7a0f3a0811201031h6c528422j3ce7e5ebd532c5d5@mail.gmail.com>
To: "Brett Patterson" <inspiron.pattersonb@gmail.com>, Tei <oscar.vives@gmail.com>, www-html@w3.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Nov 20, 2008 at 11:33, Brett Patterson
<inspiron.pattersonb@gmail.com> wrote:
> No. What she is asking is this:
>
> Are the following valid class names?:
> class="my-system"
> class="my_system"
> class="my/System"
> class="oscar.vives@foo.bar"
>
> You are talking about something completely off-subject. You see, CDATA and
> classes are different, what is valid in CDATA is not NECESSARILY valid in
> classes, case and point the above highlighted are valid, the two below that
> are not.

Actually, they are valid, in HTML 4 and XHTML 1.0 because in those,
the value of @class is CDATA.

Create a page and run it against any HTML validator.  However, I
forgot that XHTML 1.1 uses XHTML Modularization, and the following are
thus invalid in XHTML 1.1 due to the fact that in XHTML
Modularization, the value of @class is NMTOKENS (a
whitespace-separated list of NMTOKEN tokens):
class="my/System"
class="oscar.vives@foo.bar"

You can neither use '/' nor '@'.  Only letters, digits, '.', '-', '_',
':', combining characters and extenders can be used.  The definitions
of "Letter", "Digit", "CombiningChar" and "Extender" are governed by
the XML Recommendation [1].  However, it still remains case-sensitive.

Thanks for helping to clear some confusion!

RpgFan

[1] - http://www.w3.org/TR/2006/REC-xml-20060816/


- --
Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the
ratification of C++0x, and the day that I can code without logic
troubles.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkklrE8ACgkQXd35/YlIavd/ugCfca4N1W0TB54ZRQnyLurO1DtC
ecsAn06RqFhyJuM/WHaagAnc5kkbxjX/
=og9Q
-----END PGP SIGNATURE-----
Received on Thursday, 20 November 2008 18:32:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:14 GMT