[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: CSS and XSL

Subject: RE: CSS and XSL
From: "Jelks Cabaniss" <jelks@xxxxxxxx>
Date: Mon, 15 Feb 1999 14:24:38 -0500
css for select
> 	why not:
>
> 	<css:style>
> 		<css:rule select="body" type="element">
> 			<css:property name="background-color" value="red" />
> 			<css:property name="color" value="green" />
> 		</css:rule>
> 		<css:rule select="emphasis" type="class">
> 			<css:property name="font-weight value="bold" />
> 			<css:property name="font-style" value="italic" />
> 		</css:rule>
> 	</css:style>
>
> 	This is hardly more verbose than CSS itself but is XML, and can be built
> via XSL. Same number of lines as your example (assuming you include the
> <style> </style> wrapper). I'll race you to parse the two :-)

Don't you think *mentally* parsing

	body { background-color: red; color: green; }
	.emphasis { font-weight: bold; font-style: italic; }

is easier on eyes and brain than the proposed above XSL equivalent?

As to *machine* parsing, what's the deal?  *Approximate* pseudo code:

   Loop through declared styles:
      Non-whitespace before '{' becomes SELECTOR.
      Repeat until '}':
         Non-whitespace before ':' becomes PROPERTY.
         Non-whitespace between ':' and (';' or '}') becomes VALUE.
      End Repeat
   End Loop

Avoid *that* just so we can have pointy-bracket parsers for Style?

Why not have XFL just parse (as above), then apply the styles to the XTLed tree?


/Jelks




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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.