"""Demonstrates how to pass top-level XSLT parameters in Pyana. Notice how, in the first call to transformToString, "Python" is quoted twice. This is because the value of parameters are treated as XPath and literal strings must be quoted, just like they must be in normal XPaths e.g. """ import Pyana inputExampleXSL = r''' ''' inputExampleXML = r''' The only thing better than XSLT is ''' print Pyana.transform2String(source=inputExampleXML, style=inputExampleXSL, params={'lang': '"Python"'}) print Pyana.transform2String(source=inputExampleXML, style=inputExampleXSL, params={'lang': 'concat("Py", "thon")'})