[lxml-dev] Transform parameter variables

jholg at gmx.de jholg at gmx.de
Tue Aug 5 17:24:55 CEST 2008


> >Note the two stars before "the_dict". This is standard Python syntax for
> > expanding a mapping into keyword arguments.
> > 
> > Stefan
> > 
> 
> I'm Sorry - still no luck passing a dictionary as extentions parameter
> The stylesheet has a parameter: 
> <xsl:param name="area" select="'ost'"/>
> 
> The parameter is picked up in the transformation if I use:
> transform(doc, area="'3751'")
> but not when I use the_dict 
> transform(doc, {'area':'\"\'3751\'\"'}) or any other variant of a 
> dictionary or
> a dict_variable I can think of!
> 
> 

>  

  Try

 transform(doc, **{'area':"3751"}) 

 Note the two stars, read up on python syntax on function calling and

keyword parameters. 
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20080805/ab86e267/attachment.htm 


More information about the lxml-dev mailing list