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

Re: Right paren in urls

From: <lee@sq.com>
Date: Mon, 9 Sep 96 10:33:51 EDT
Message-Id: <9609091433.AA10087@sqrex.sq.com>
To: jrd@netcom.com, bbos@mygale.inria.fr
Cc: www-style@w3.org
> Section 7.2 ("parsing conventions")
> explains that any character can be escaped with a backslash to remove
> its special meaning.

Note, of course, that if your style sheet is included in an HTML document,
you cannot use \ to escape HTML/SGML characters such as ERO (&).

You can use an SGML comment, as suggested, to hide the style sheet from
the SGML parser.  In this case, the sequence -- is still special, and
\-- will not change this.  You can include it, however, using the rather
odd-looking sequence -\-.  It may be worth mentioning this if you can
have comments in CSS1 (I don't recall offhand what they look like,sorry)
# make all headings bold -- except H3
would cause interesting problems, but
# make all headings bold -\- except H3
would work.

What follows is an obscure and pedantic note on marked sections and character
references not intended for the faint of heart :-)

Strictly speaking, the sequences ]]> (MSC MDC) to close a marked section,
and &#nnnn; as an SGML character reference, are not recognised within a
comment, but in practice if the start of the comment was in a CDATA marked
section, the ]]> would still be recognised, and some parsers may recognise
&#37; (etc.) within cmments.

Putting your style sheet within a comment means you can't use entities
such as &eacute; -- this isn't going to be too much of a problem until CSS
gets better generated text handling, and then it will be a problem.

Again, \& would make no difference.  It is theoretically possible to
use SGML FUNCHAR to get a \ scape working in at least some cases, but it
is tricky, not widely supported, and may conflict with the use of character
sets such as Shift JIS and ISO2022.

The best way round all this is to keep the style sheet in a separate file if
any of these issues arise.

Very few HTML clients today suuport marked sections, of course.  But standards
have to think about the future.


Liam Quin, SoftQuad Inc    | lq-text freely available Unix text retrieval
lee@sq.com +1 416 544-9000 | FAQs: Metafont fonts, OPEN LOOK UI, OpenWindows
SGML: http://www.sq.com/   | We've moved; new 'phone number & postal address!
The barefoot programmer    | `who is my neighbour?'
Received on Monday, 9 September 1996 10:34:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:41 UTC