[lxml-dev] setting xslt output encoding with lxml

Stefan Behnel stefan_ml at behnel.de
Sat Apr 4 22:03:10 CEST 2009


Stefan Behnel wrote:
> chris hoke wrote:
>> To set the XSL output encoding I normally use <xsl:output encoding="..."/>
>> in the stylesheet.
>>
>> At least in the Java based XSLT processors it is possible to set some
>> attributes of xsl:output from the "outside" meaning when initializing or
>> starting the transformation. So it is possible for example to overwrite any
>> encoding specified in <xsl:output... with a different encoding.
> 
> lxml.etree does not currently support this.

I skimmed through the libxslt source and it looks like such a feature is
not easily available. So the best way to do it is actually to copy and
modify the stylesheet document as I explained.

Stefan


More information about the lxml-dev mailing list