Subject: RE: CSS and XSL From: "Jelks Cabaniss" <jelks@xxxxxxxx> Date: Mon, 15 Feb 1999 14:24:38 -0500 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: CSS and XSL, Borden, Jonathan | Thread | Fw: CSS and XSL, Oren Ben-Kiki |
Re: CSS and XSL, Simon St.Laurent | Date | RE: CSS and XSL, Jelks Cabaniss |
Month |