]> granicus.if.org Git - docbook-dsssl/commitdiff
Feat Req #703116: add type to script
authorNorman Walsh <ndw@nwalsh.com>
Sun, 13 Apr 2003 13:18:36 +0000 (13:18 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 13 Apr 2003 13:18:36 +0000 (13:18 +0000)
website/xsl/head.xsl

index dc661d7fae89ba72b9e9b0b05502193e9004b2f6..0bd78406e4b2a4f4c86ad1d4b854f20c990d0913 100644 (file)
        <xsl:attribute name="language">JavaScript</xsl:attribute>
       </xsl:otherwise>
     </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="@type">
+       <xsl:attribute name="type">
+         <xsl:value-of select="@type"/>
+       </xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+       <xsl:attribute name="type">text/javascript</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
     <xsl:apply-templates/>
   </script>
 </xsl:template>
     </xsl:choose>
   </xsl:variable>
 
-  <script src="{$relpath}{@src}" language="{$language}"/>
+  <xsl:variable name="type">
+    <xsl:choose>
+      <xsl:when test="@type">
+       <xsl:value-of select="@type"/>
+      </xsl:when>
+      <xsl:otherwise>text/javascript</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <script src="{$relpath}{@src}" language="{$language}" type="{$type}"/>
 </xsl:template>
 
 <xsl:template match="style" mode="head.mode">