[lxml-dev] XML Documents & I18N (the way Cocoon does it)
Alexis Georges
velvetcrafter.subscriber at gmail.com
Tue Apr 28 19:39:24 CEST 2009
Hello everyone,
I am maintaining a multilingual website which works with XML, XSLT to
generate XHTML.
I am working with Apache Cocoon (http://cocoon.apache.org/2.1/) using
(among other things) their I18NTransformer. Basically I can use
elements in the I18N (http://apache.org/cocoon/i18n/2.1) namespace,
and then tell Cocoon to apply the I18NTransfomer to the document; this
replaces the I18N elements with a localized value (eg. a formatted
date/number, a translated label/attribute, etc...).
I have been looking at lxml a little bit to see if I could move to a
Python-based framework for the website. I am not quite sure how to go
about the I18N part though.
Using the Babel library (http://babel.edgewall.org/) along with
request headers to generate localized data, I have everything I need.
What is missing is the "parser" for the I18N elements. All I can think
of right now is to implement a SAX parser, the way Cocoon does (in
Java).
Does anyone have suggestions? Am I making this too complicated?
Thanks!
Alexis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20090428/1bb0d079/attachment.htm
More information about the lxml-dev
mailing list