Subject: Re: [xsl] Troubles with libxslt in PHP again: CDATA in <script> From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Sat, 13 Oct 2007 14:45:06 +0200 |
Hi Abel,
well, on my machine I'm using PHP 5.2.2 which is giving me problems,
but my hosting uses 5.2.5 which seems to behave yet again differently.
My template contained JavaScript based on Google Maps API's "Hello world":
http://www.google.com/maps/api_signup?url=http%3A%2F%2Flocalhost
So it looked like this:(sample truncated)
<xsl:template name="map-js">
//<![CDATA[
var children = []]><xsl:call-template name="js-children-array"/><![CDATA[]; map.setCenter(locationLatLng, ]]><xsl:value-of select="$zoom-level"/><![CDATA[);
</xsl:template>
(sample output truncated)(I hope I didn't introduce errors by cutting out not so important stuff). And what I get as output is:
<script type="text/javascript"><![CDATA[ // var children = [new Location("Denmark", 55.329144, 23.950195)]; // ]]></script>
For now I switched to "html" output method as David suggested and all is working fine.
Cheers, -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Troubles with libxslt in , Martynas Jusevicius | Thread | Re: [xsl] Troubles with libxslt in , Martynas Jusevicius |
[xsl]Problem with Position()?, Alice Ju-Hsuan Wei | Date | Re: [xsl] Troubles with libxslt in , Martynas Jusevicius |
Month |