XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 27th, 2004, 05:46 AM
AnuSharma AnuSharma is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 AnuSharma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Linking in XML using XLink


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT