[xml] XSLT stylesheet parameters



I've got some python like this:


    xslt_params = { "editable": "yes" }
    doc = libxml2.parseDoc(html)
    result = None
    try:
        result = ss.applyStylesheet(doc, xslt_params)
        http_output = ss.saveResultToString(result)
        # Send the document to Django's http object
        print >>http, http_output
        return http
    finally:
        if result:


and a stylesheet like this:

  <?xml version="1.0" encoding="utf-8"?>
  <xsl:stylesheet  version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

      <xsl:param name="editable">no</xsl:param>

      <xsl:template match="/">
          <html>
              <body>
                  <div class="params"><xsl:value-of select="$editable"/></div>
              </body>
          </html>
      </xsl:template>


and I'm not seeing the set value for the editable parameter.

Anybody seen something like this before? I'm confused... I was pretty
sure parameters were working.

-- 
Nic Ferrier
http://www.tapsellferrier.co.uk   



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