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

Re: Re: Can XLink be fixed?


convert css to xml
Norman Walsh wrote:
> / "Simon St.Laurent" <simonstl@s...> was heard to say:
> | Sure, though I'll admit that one of my projects with MOE is supporting
> | CSS both as an annotation and as an explicit CSS-in-XML syntax.  
> 
> CSS-in-XML sounds like a good idea. Let's see, it's a bag of
> properties attached to a CSS Selector. (<rant>What happened to the
> Last Call comments to rename the "Selectors" document[1] to "CSS3
> Selectors". More paperwork to dig through...Sigh.</rant>)
> 
> The bag of properties thing would be easy to deal with, but the set of
> selectors is starting to look awfully ugly. "nth-last-child()"...Eeek!?
> Simplicity is loosing everywhere, ain't it?

Do we really want or need to convert those selectors to XML? CSS-in-XML 
is a discussion that surfaces every three to six months on a number of 
mailing lists. Basically it would seem that you want to convert the 
selectors to XML if your goal is to munge them using basic XML tools 
(say display them with syntax colouring using XSLT) but you don't if 
you're looking for an easy way to decorate a tree (and would prefer an 
XML syntax ovre SAC, which is a largish underspecified API, at least 
compared to SAX).

Converting CSS selectors to XPath shouldn't be excessively complex 
provided we allow ourselves to use a few extension functions where there 
is no possible mapping and drop the interactivity bits. Most of the 
structural selectors can be mapped directly, and a number of the more 
complex-looking ones can probably be converted to predicates revolving 
around position() and a little arithmetic. Imho the useful 80% of CSS 
selectors can be covered by XPath, with the exclusion of class that will 
probably need an extension function by itself.

-- 
Robin Berjon <robin.berjon@e...>
Research Engineer, Expway


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.