[lxml-dev] Targeted XSL transformations
Emanuele D'Arrigo
manu3d at gmail.com
Thu Jul 16 10:45:45 CEST 2009
2009/7/16 Stefan Behnel <stefan_ml at behnel.de>
> (skipping over your mail somewhat).
Oh, thank you for that! =D
> Emanuele D'Arrigo wrote:
> > I wish I could leave that to something indeed rather than having to
> > implement it myself. Unfortunately, although my original post referred to
> > xhtml, in practice I'm not dealing with a browser nor with xhtml. Instead
> > I'm attempting to write a GUI system based on Mozilla's XUL.
>
> How does that discourage CSS?
It isn't XUL or me working on a GUI system that does. But lxml does not have
an etree.CSS() function which generates a CSS transformation, does it?
However, it does have an etree.XSLT() function which generates an xslt
transformation. Isn't it?
I didn't say "generate" them - just write them down. There's also a package
> called "cssutils" which you might (or might not) find useful for your
> needs.
>
> http://cthedot.de/cssutils/
Thank you for this! I did have a look and it has all sorts of nice things.
Still, it doesn't seem to have functionality ordering the CSS rules
according to the cascade nor there is functionality to apply all those rules
at once to an xml/xhtml object. Does it?
It's common to use both: XSLT for structural tree transformations, and CSS
> for applying style information. That keeps the details of content structure
> and visual representation somewhat separated, which tends to be a rather
> big advantage.
Totally agree. But in my case the content structure is already separate from
the visual representation. It is stored in a XUL file with no style
information. Only when I apply the xsl transformations XUL content gains
style (and locale, in a separate xsl transformation) information.
I somehow suspect I wasn't particularly clear in my explanation of the
problem. Was I?
Manu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20090716/4156f745/attachment.htm
More information about the lxml-dev
mailing list