[XML-SIG] 4xslt - passing parameters

Mike Olson Mike.Olson@fourthought.com
09 Nov 2002 23:22:34 -0700

> Yes, you should be able to do that. How exactly are you invoking the
> transformation? If you have a Processor instance proc, and you are calling,
> e.g.
>   proc.runStream(str)
> then you can simply add the keyword argument topLevelParams with a
> dictionary of parameters as its value. For example:
>   result = proc.runStream(str, topLevelParams={'page': 27})

I'm not sure if this works, though it might (let me know if it does). 
The problem is that the key in the dictionary must contain the namespace
of the variable as well.  So assuming the variable is referenced as
"$page" then the dictionary that is passed in must be:



> If that doesn't address your need, perhaps you could post a sample of
> your code.
> -- 
> Matt Gushee                 When a nation follows the Way,
> Englewood, Colorado, USA    Horses bear manure through
> mgushee@havenrock.com           its fields;
> http://www.havenrock.com/   When a nation ignores the Way,
>                             Horses bear soldiers through
>                                 its streets.
>                             --Lao Tzu (Peter Merel, trans.)
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://mail.python.org/mailman/listinfo/xml-sig
Mike Olson                                Principal Consultant
mike.olson@fourthought.com                +1 303 583 9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
PO Box 270590,                            http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management