Dodgy script tag Options
NeilG
Posted: Tuesday, July 01, 2008 6:20:13 PM

Rank: Aficionado

Joined: 12/15/2006
Posts: 112
Hi,

Am I missing something here?
I have some XSLT to render out script tags in the <head>:
Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">

<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:param name="currentPage"/>
<xsl:param name="sitesOfficesID" select="macro/sitesOfficesID"/>

<xsl:template match="/">
  <xsl:if test="$currentPage/@id = $sitesOfficesID">
    <script type="text/javascript" src="/scripts/cce.js"></script>
  </xsl:if>
</xsl:template>

</xsl:stylesheet>


Problem is, it renders a script tag like this:
Code:
<script type="text/javascript" src="/scripts/cce.js" />


Instead of wiht the closing tag:
Code:
<script type="text/javascript" src="/scripts/cce.js"></script>


HELP!


___________________________________________________________________________________

Neil
neehouse
Posted: Tuesday, July 01, 2008 6:21:47 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,069
Location: Charleston, West Virginia, United States
change the output to html

Code:

<xsl:output method="html" omit-xml-declaration="yes"/>


• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
NeilG
Posted: Tuesday, July 01, 2008 6:23:36 PM

Rank: Aficionado

Joined: 12/15/2006
Posts: 112
Sussed:
Umbraco Forum post.




___________________________________________________________________________________

Neil
NeilG
Posted: Tuesday, July 01, 2008 6:24:24 PM

Rank: Aficionado

Joined: 12/15/2006
Posts: 112
Cheers Casey, that worked too! :d/


___________________________________________________________________________________

Neil
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.