href in xslt
I have a xml file with list of student names.And I wrote a xslt style sheet to transform the xml to a xhtml.In the xhtml,when i click on a students name,I want it to be able to scroll down to the respective students name.
For example: the xml document is
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="a.xsl"?>
<list>
<student>
<name> paul scholes </name>
<adres>old trafford,manchester,england</adres>
</student>
<student>
<name> david beckham </name>
<adres>real madrid,spain</adres>
</student>
</list>
and the XSLT style sheet code is :
<xsl:template match="/">
<h3>list of students:</h3>
<xsl:for-each select="list/student">
<xsl:value-of select="name"/>
<br/>
</xsl:for-each>
<h3>student's addreses:</h3>
<xsl:for-each select="list/student">
[u]<xsl:value-of select="name"/></u><br/>
<xsl:value-of select="adres"/>
<br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
and a sample xhtml output is:
list of students:
paul scholes
david beckham
student's addreses:
paul scholes
old trafford,manchester,england
david beckham
real madrid,spain
So for example,in the list of students,when i click on the name paul scholes,it should be able to scroll down and show the underlined paul scholes and his address.
hope you get what i intend to.
Can some one guide or tell me what code to add to make the above work?
If you add the code for me..that would be really helpfull too.thanx alot.
|