Re: Comment syntax

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,
Pictures from old books:
Ankh: freenode/#xml
Co-author, 5th edition, "Beginning XML", Wiley, July 2012. It began.

Received on Monday, 3 September 2012 16:37:20 UTC