Re: CSS and XSL

Subject: Re: CSS and XSL
From: "Frank Boumphrey" <bckman@xxxxxxxxxxxxx>
Date: Sun, 14 Feb 1999 22:27:40 -0500
As far as I see it CSS and XSL serve two different clientels. Those who
merely want to decorate a parse tree and those who want to transform it.


 XSL and CSS use two different methods to decorate the parse tree.

I

XML document + CSS Style sheet
==============================

XML Document -->
	xml parse tree-->
	content handler [add styles and display instructions here]-->
		display device

Pros:
If there are new styling instructions, in a browser, there is no need to
construct a new parse tree. Just reflow the document with the new styling.
This is very lenienton resources.

Cons:

Complex decoration of the parse tree is really limited decorating the
existing parse tree. new flow objects etc. are difficult to implement.



XML document + XSL Style sheet.
==============================

XML document -->
	xml parse tree-->
		xsl parser-->
			new XML tree-->
			content handler
			[add styles and display instructions here]-->
				display device
Pros:
New flow objects are trivial to implement.

Cons:
Style changes involve restructuring of the parse tree, and then decorating
it.


why not put CSS in XML syntax. Well to retain all the information it would
not only be more verbose, it would also be more difficult to parse.

 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:

<css-style>
	<css-rule>
		<css-selector type="element">body</css-selector>
			<css-declaration>
				<css-property>background-color</css-property>
				<css-value>red</css-value>
			<css-declaration>

			<css-declaration>
				<css-property>color</css-property>
				<css-value>green</css-value>
			<css-declaration>
	<css-rule>

	<css-rule>
		<css-selector type="class">emphasis</css-selector>
			<css-declaration>
				<css-property>font-weight</css-property>
				<css-value>bold</css-value>
			<css-declaration>

			<css-declaration>
				<css-property>font-style</css-property>
				<css-value>italic</css-value>
			<css-declaration>
	<css-rule>
</css-style>

I think XSL has a fabulous future as a transformation language (even though
at present I choose to use the DOM for this), but as a style language, I
really don't see where it is going. I would welcome a split in the two
functions.


Frank.


----- Original Message -----
From: Simon St.Laurent <simonstl@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Sunday, February 14, 1999 6:48 PM
Subject: Re: CSS and XSL


>At 01:09 PM 2/14/99 -0800, Don Park wrote:
>>SOLUTION:
>>
>>I would like us to keep our focus on the subject of splitting the XSL spec
>>into XTL and XFO.  Discussion of the XSS issues should be moved to CSS
>>mailing list especially because it will meet more resistance there.  Trial
>>by fire will bare the true merit of the proposal.
>
>Excellent idea.  If it wins over the community of CSS users, it probably
>makes sense.  If it doesn't, at least this list will be quieter.
>
>
>Simon St.Laurent
>XML: A Primer / Building XML Applications (April)
>Sharing Bandwidth / Cookies
>http://www.simonstl.com
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Current Thread