Fw: CSS and XSL

Subject: Fw: CSS and XSL
From: "Oren Ben-Kiki" <oren@xxxxxxxxxxxxx>
Date: Mon, 15 Feb 1999 14:53:00 +0200
Frank Boumphrey <bckman@xxxxxxxxxxxxx> wrote:
> CSS is a compact, easy to understand, and easy to program style language.
>As written CSS syntax is sparing of resources. Even when one uses a built
in
>xml parser
>
>body{
> background-color:red;
> color:green;
> }
>
>.emphasis{
> font-weight:bold;
> font-style:italic;
> }
>
>Is  not only  terser, but technically easier to parse than:

>
>(Horrid XML version omitted)

But not that much better then:

<css:stylesheet>
 <css:rule match="body" background-color="red" color="green"/>
 <css:rule match=".[@class='emphasis']" font-weight="bold"
font-style="italic"/>
</css:stylesheet>


BTW, most of the arguments of "keeping style in a single attributes" are
directly convertible to "keeping style attributes in a single tag" - in this
case, either <css:rule> in a stylesheet or a <css:style> tag embedded inside
any other tag. This keeps DTDs clean and simple, separates references to
style attributes in the DOM (element.style.<attribute>) and in general is a
Good Thing (tm). The point is, all these advantages can be obtained within
the XML framework - there's no real reason for a single textual STYLE
attribute.

Share & Enjoy,

    Oren Ben-Kiki


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread