As mentioned above, Embperl now contains a provider for doing XSLT transformations.
More XML will come in the next releases. The easiest thing is to use the XSLT
stuff thru the predefined recipes: | EmbperlLibXSLT | | the result of Embperl will run thru the Gone libxslt | | | EmbperlXalanXSLT | | the result of Embperl will run thru Xalan-C | | | EmbperlXSLT | | the result of Embperl will run thru the XSL transformer
given by xsltproc or EMBPERL_XSLTPROC | | | LibXSLT | | run source thru the Gone libxslt | | | XalanXSLT | | run source thru Xalan-C | | | XSLT | | run source thru the XSL transformer given by xsltproc or | | | EMBPERL_XSLTPROC |
For example, including the result of an XSLT
transformation into your html page could look like this: <html><head><title>Include XML via XSLT</title></head>
<body>
<h1>Start xml</h1>
[- Execute ({inputfile => 'foo.xml', recipe => 'EmbperlXalanXSLT', xsltstylesheet => 'foo.xsl'}) ; -]
<h1>END</h1>
</body>
</html> As you already guessed, the xsltstylesheet parameter gives the name of the xsl
file. You can also use the EMBPERL_XSLTSTYLESHEET configuration directive
to set it from your configuration file. By setting EMBPERL_ESCMODE (or $escmode) to 15 you get the correct escaping
for XML.
|