|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Linking in XML using XLink
Hi,
Could anybody tell me the process of using xlink and then using that in XML file. I have created XML File : <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="DetailsStyle.xsl"?> <details xmlns:xlink="http://www.w3.org/TR/xlink/"> <Student> <no>1</no> <name xlink:type="simple" xlink:href="yahoo.com" >Riya</name> </Student> <Student> <no>4</no> <name>Seema</name> </Student> <Student> <no>2</no> <name>Deepa</name> </Student> <Student> <no>3</no> <name>Anu</name> </Student> </details> And this is a XSL file <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/XML/XLink/0.9"> <xsl:template match="/"> <html> <body> <font face = "verdana" color="red">The Total number of Students are:<xsl:value-of select="count(details/Student)"/></font> <table border="1"> <tr><td><font color="blue"><b>NAME</b></font></td></tr> <xsl:for-each select="details/Student"> <tr><td> <font color="blue"> <xsl:value-of select="name"/> </font> </td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> <xsl:template match="*[@xlink:href]"> <a href="{@xlink:href}"><xsl:apply-templates/></a> </xsl:template> </xsl:stylesheet> But this is not working fine.... no link is displayed .Could anybody pls tell me. Thanks, Anu |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Linking in XML using XLink |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|