[Home] [By Thread] [By Date] [Recent Entries]
David schrieb:
Trouble is, on the outputted document it gives me a tag like this : This works for me: mludwig@forelle:~/Werkstatt/xsl > cat quotes.php <?php $doc = new DOMDocument; $doc->load('quotes.xsl'); $xsl = new XSLTProcessor; $xsl->importStyleSheet($doc); $doc->loadXML('<Urmel/>'); echo $xsl->transformToXML($doc); mludwig@forelle:~/Werkstatt/xsl > expand -t2 quotes.xsl <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <span> <xsl:attribute name="style">background-color: #ff4411;</xsl:attribute> <xsl:attribute name="onclick">doSomethingFun("Hello world!!!");</xsl:attribute> </span> </xsl:template> </xsl:transform> mludwig@forelle:~/Werkstatt/xsl > php quotes.php <?xml version="1.0"?> <span style="background-color: #ff4411;" onclick="doSomethingFun("Hello world!!!");"/> It's using entities without needing special instruction. Michael
|

Cart



