hi,
<br>(hope this is the right list for my question)
<br>
<br>To set the XSL output encoding I normally use <xsl:output
encoding="..."/> in the stylesheet.
<br>
<br>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.
<br>
<br>Is there any way to do this with LXML?
<br>
<br>The docs only have an example to set an XSLT parameter but not an XSLT
processing configuration like the output encoding.
<br>
<br>BTW, the example on <a class="moz-txt-link-freetext" href="http://codespeak.net/lxml/xpathxslt.html#xslt">http://codespeak.net/lxml/xpathxslt.html#xslt</a>
<br>
<br>>>> xslt_tree = etree.XML('''\
<br>... <xsl:stylesheet version="1.0"
<br>... xmlns:xsl=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/XSL/Transform">"http://www.w3.org/1999/XSL/Transform"</a>>
<br>... <xsl:template match="/">
<br>... <foo><xsl:value-of select="$a" /></foo>
<br>... </xsl:template>
<br>... </xsl:stylesheet>''')
<br>>>> transform = etree.XSLT(xslt_tree)
<br>>>> f = StringIO('<a><b>Text</b></a>')
<br>>>> doc = etree.parse(f)
<br>
<br>seems to miss an <xsl:param name="a"/> parameter. I have not checked if
it works without it but I guess it would be good style to declare any
incoming parameters if not for setting a default value, would it not?
<br>
<br>
<br>thanks for any hints,
<br>Christof
<br>