Re: Right paren in urls
> 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
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
% (etc.) within cmments.
Putting your style sheet within a comment means you can't use entities
such as é -- 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
firstname.lastname@example.org +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?'