Hai Aleena!
Adding scripts to xsl is not a big deal...you don't have to sink in desperation for such small challenges...
Anyway...let me see how I can help you...
This is a small xml file with some data..I will call it..
Script.xml...
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="script.xsl"?>
<college>
<computerscience>
<Name>Ravi</Name>
<ScholarNo>101</ScholarNo>
<Grade>Top</Grade>
<GirlFriend>Aishwarya</GirlFriend>
</computerscience>
<computerscience>
<Name>Bill Gates</Name>
<ScholarNo>102</ScholarNo>
<Grade>Okay</Grade>
<GirlFriend>Pamela</GirlFriend>
</computerscience>
<computerscience>
<Name>Geroge Bush</Name>
<ScholarNo>103</ScholarNo>
<Grade>Reasonable</Grade>
<GirlFriend>Barbie</GirlFriend>
</computerscience>
</college>
As you can see I have given a call to a stylesheet called "script.xsl"....go through this file also now.....
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
<xsl:template match="/">
<html>
<script language="javascript">
function beep()
{
alert("Hai Aleena!!You can use any script thru xsl"
}
</script>
<body>
<table border="0" bgcolor="oldlace" text="blue">
<caption>Batch of 2001</caption>
<tr>
<th>Name</th>
<th>Scholar No:</th>
<th>Grade</th>
<th>GirlFriend</th>
</tr>
<xsl:for-each select="college/computerscience">
<tr>
<td><xsl:value-of select="Name"/></td>
<td><xsl:value-of select="ScholarNo"/></td>
<td><xsl:value-of select="Grade"/></td>
<td><xsl:value-of select="GirlFriend"/></td>
</tr>
</xsl:for-each>
<tr><td align='center'><input type='button' value='ClickMe' onclick="beep()"></input></td></tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
See that is all there needs to be done..you write your own <script></script> tag anywhere and write the functions...however note one thing here...every html tag needs to be closed..so even the <input...> demands a </input>..or else an error will be generated!!!
Hope that answers your SOS....
Happy Programming,
Ravi