[lxml-dev] XSLT parameter ignored?

Stefan Behnel stefan_ml at behnel.de
Fri Apr 20 13:58:59 CEST 2007


Hi,

Jeroen van Holst wrote:
> I'm trying to pass a parameter to an XSLT object as follows:
> 
>     xslt = etree.parse(stylesheet)
>     style = etree.XSLT(xslt)
>     params = {'profile.lang': 'en'}
>     result = style(doc, params)
> 
> The stylesheet is applied, but the parameter is ignored. This works in 
> libxslt, so what am I missing?

One thing you're missing is that lxml is not libxslt. It has a different API.

Have you tried

	result = style(doc, **params)

?

Stefan


More information about the lxml-dev mailing list