This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Converting Strict XHTML + CSS with XSLT


Hi Joerg,

> I think selectors can be translated to XPath match patterns easily.
> The whole process would be:
>
> - XMLify CSS, including transforming CSS selectors to XPath
> - generate a XSLT from the XCSS which will attach XCSS styles
>    to matched elements
> - run the "enrichment" XSLT on the XHTML
> - run the final transformation.

Yeah, interesting idea. One potential difficulty I can see with it,
though, is that in CSS a single element can match multiple rules, and
the styles from all of those rules are applied (with different
priorities depending on the specificity of the selector). I think it
would be quite hard to mirror that behaviour with XSLT templates...
perhaps if you created multiple XSLT stylesheets from the CSS, each
stylesheet reflecting a different priority and used xsl:apply-imports
within each of them...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]