[xslt] Re: passing info from 'apply' to an EntityLoader



On Fri, Dec 10, 2004 Daniel Villard wrote:
| From C you can use the _private pointer in the transformation
| context to store informations. But I don't think it's available from
| the Python bindings. Another option is to make your authentication
| informations parameters to the stylesheet, it should be easier to
| retrieve them from Python.

Daniel,

Thank you for responding, your help as always wonderful.  I'm not 
clear as to how I can do this.  It's easy to set an argument via
style.applyStylesheet(document, { 'userid': "'12345'" }) but how
do I access 'userid' from the resolver?

 def resolver(URI, ID, cntx):
     userid = ?
     ...
 
 libxml2.setEntityLoader(resolver)

Kind Regards,

Clark


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]