W3C home > Mailing lists > Public > www-style@w3.org > September 2012

Re: Comment syntax

From: Liam R E Quin <liam@w3.org>
Date: Mon, 03 Sep 2012 12:36:56 -0400
To: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>
Cc: (wrong string) “Gamer_Z.” "Yaro\"" <zmyaro@gmail.com>, WWW Style <www-style@w3.org>, "Jens O. Meiert" <jens@meiert.com>
Message-ID: <1346690216.30494.135.camel@localhost.localdomain>
On Mon, 2012-09-03 at 16:25 +0800, Kang-Hao (Kenny) Lu wrote:
> (12/09/03 2:33), Liam R E Quin wrote:
> > On Tue, 2012-08-28 at 15:08 +0800, Kang-Hao (Kenny) Lu wrote:
> [...]

>  So, modern browsers (at least
> WebKit, Firefox and Opera) don't do attribute value normalization.

I'm not surprised, thanks for checking. Web browsers oday are a long way
away from SGML.


> Anyway, if you know whether and how and how much XHTML agents handle
> //-style comments in on* attributes with special care, you might want to
> share it.

All XML processors will do the attribute value normalization, so
anything using the output of an XML parser e.g. to build a DOM tree will
see attributes as containing spaces, not newlines.

There's no real possibility of treating some attributes differently.

If we'd been designing XML as an HTML replacement we might have
specified the language differently, but that wasn't our goal :-)

But since, as you point out, // doesn't work for JavaScript in XHTML,
maybe it's OK that it won't work for CSS either...


Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
Co-author, 5th edition, "Beginning XML", Wiley, July 2012. It began.
Received on Monday, 3 September 2012 16:37:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:21 UTC