class="<valid chars here>"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

class="<valid chars here>"

Tei-2
I have a question.

Is that class values valid?

class="my-system"

class="my_system"

class="my/System"

class="[hidden email]"

is class case-sensitive?

class="ultraTile"
class="ultratile"

I know theres a EBNF syntax on the spec, but after finishing Doom2 in
nightmare mode I have lost almost all of my gray cells, and I get
lost, hence,.. I am here to ask humans.


--
--
ℱin del ℳensaje.
Reply | Threaded
Open this post in threaded view
|

Re: class="<valid chars here>"

Dustin Boyd

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

On Thu, Nov 20, 2008 at 03:23, Tei  wrote:

> I have a question.
>
> Is that class values valid?
>
> class="my-system"
>
> class="my_system"
>
> class="my/System"
>
> class="[hidden email]"
>
> is class case-sensitive?
>
> class="ultraTile"
> class="ultratile"

Yes, those are all valid in HTML 4.01.  @class contains a
whitespace-separated list of CDATA items.  The definition of CDATA for
HTML 4.01 is as follows:

    CDATA is a sequence of characters from the document character set
and may include character entities. [1]

Unlike @id and @name, @class appears to be completely unrestricted in
HTML 4.01.  However, when using XHTML, you must remember that the
definition of CDATA is governed by XML.  The XML grammar specifies
that character data (CDATA) is specified by the following grammar
declaration:

    CharData ::= [^' [^'. [4]

I hope this helps!

RpgFan

[1] - http://www.w3.org/TR/html4/types.html#type-cdata
[2] - http://www.w3.org/TR/xml/#NT-CharData
[3] - http://www.w3.org/TR/xml/#dt-chardata
[4] - http://www.w3.org/TR/xml/#dt-cdsection

- --
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)
Comment: http://getfiregpg.org

iEYEARECAAYFAkkljKcACgkQXd35/YlIavfiKACeL6wX/eP9kGWKxhcIYuqxXHM6
EjMAn0PWS9av8lODvS+T7iVxrlrnUWSM
=a2St
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: class="<valid chars here>"

Dustin Boyd

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

On Thu, Nov 20, 2008 at 11:33, Brett Patterson
<[hidden email]> wrote:

> No. What she is asking is this:
>
> Are the following valid class names?:
> class="my-system"
> class="my_system"
> class="my/System"
> class="[hidden email]"
>
> 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="[hidden email]"

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-----