************************************************************************************
Problem using an External Javascript file in an XSL stylesheet (My FIRST question ...
hope someone can help !)
************************************************************************************
The xsl fragment below, shows a simple bit of inline javascript, which works fine
(when commenting tags are removed ).
HOWEVER, when I try to put the inline stuff inside an external file (add.js in this
case), the file is ignored.
I've searched around, some people suggest adding a space using:
<script language="JavaScript" type="text/javascript" src="add.js"> </script>
Others suggest defining an entity (with <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp
" ">]> using in place of  )
Others suggest replacing the   with <xsl:comment>no inline script</xsl:comment>
I've tried all these, with no success.
Hopefully this problem will get a solution
regards
GeorgeS
<head>
<title>
<xsl:value-of select="title"/>
</title>
<!--<script type="text/javascript">
// this function uses the DOM to bring focus to the Shirt_Number textbox:
function start(){
document.forms['form1'].elements['Shirt_Number'].focus()
}
// this function uses the DOM to highlight the form text boxes:
function highlight(set){
set.style.backgroundColor="yellow";
}
// this function uses the DOM to remove highlight from the form text boxes:
function dehighlight(set){
set.style.backgroundColor="white";
}
</script>-->
<link rel="stylesheet" href="{$contextPath}/styles/main.css" title="Default
Style"/>
<style type="text/css">body {background-color: #ffffcc; color: navy;} b.red
{color:red;}</style>
<script language="JavaScript" type="text/javascript" src="add.js"></script>
</head>
<body onload="start()">
: