W3C home > Mailing lists > Public > www-html@w3.org > December 2002

Re: escaping escaping

From: James Card <jdcard@inreach.com>
Date: Tue, 03 Dec 2002 15:00:52 -0800
To: www-html@w3.org
Message-ID: <oprgup7qd1hbgvg2@localhost>

On Tue, 03 Dec 2002 16:58:47 -0500, fantasai <fantasai@escape.com> wrote:

> James Card wrote:
>>> I don't think this is feasible, although I accept that
>>> the effect is highly desirable : you are asking CSS
>>> to affect the interpretation of the /semantics/ of
>>> an *ML document, whereas (AFAIK) CSS is restricted
>>> to affecting the /appearance/ of such documents.
>> For a constrained set like (X)HTML where the valid elements and 
>> attributes are known in advance, it is possible to accomplish this 
>> effect using CSS.
> Actually, this would be asking CSS to affect the
> interpretation of the *syntax* of an SGML/XML
> document, and thus how the parser interprets
> character data in the document file. It is not
> possible to do any such thing using CSS, whether
> the document vocabulary is known in advance or
> not. Not only is there no valid property that
> does this, but, as Boris Zbarsky pointed out, the
> CSS processing model precludes any such behavior:
> http://www.w3.org/TR/REC-CSS2/intro.html#processing-model
>> A generic solution that would work with any well-formed XML file is 
>> probably not possible.
> But it is possible.
> http://www.w3.org/TR/REC-xml#sec-cdata-sect

Perhaps I misunderstood what Wingnut was trying to accomplish. From the 
original post: "I am looking for a container-tag or method to display html 
source without manually or dynamically escaping the lt's, gt's, quotes, 
amps, etc... during authoring. "

It seems that a collection of CSS similar to the following would come very 
close to that objective (display the HTML source).

  h1:before {content: '<h1>' !important;}
  h1[class]:before {content: '<h1 class="' attr(class)'">' !important;}
  h1:after {content: '</h1>' !important;}

There is no manipulation of DOM nodes, interpretation of semantics or 
syntax, or modifiation of document stucture in any way. It seems an elegant 
way to get the desired display, and would be simple enough to apply to 
document fragments by applying appropriate CSS selectors where required.

James Card
Califonia CAD Solutions, Inc.
209 578-5580 Voice
209 521-6493 FAX
Received on Tuesday, 3 December 2002 19:03:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:01 UTC