Ok, har nu prøvet at konvertere det til xslt i stedet, men kan sq stadig ik få det til at spille:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="utf-8" />
<xsl:param name="html-content-type" />
<xsl:template match="/Template">
<div id="col1narrowfront">
<script type="text/javascript">
antal = 4;
var randomnumber=Math.floor(Math.random()*antal);
alert(randomnumber);
if(randomnumber = 1) {
</script>
1<xsl:value-of select="TemplateParagraph1" disable-output-escaping="yes"/>
<script type="text/javascript">
}
if(randomnumber = 2) {
</script>
2<xsl:value-of select="TemplateParagraph2" disable-output-escaping="yes"/>
<script type="text/javascript">
}
</script>
<script type="text/javascript">
}
if(randomnumber = 3) {
</script>
3<xsl:value-of select="TemplateParagraph3" disable-output-escaping="yes"/>
<script type="text/javascript">
}
</script>
<script type="text/javascript">
}
if(randomnumber = 4) {
</script>
4<xsl:value-of select="TemplateParagraph4" disable-output-escaping="yes"/>
<script type="text/javascript">
}
</script>
<textarea><xsl:value-of select="." /></textarea>
</div>
</xsl:template>
</xsl:stylesheet>