F
Fazal
Hi,
I'am developing a project for training management in a company where
the department trains the internal employees. I have been given the job
to display the reports. Where I got stuck with the following problem.
Consider, the following xml file (Employee.xml)
<?xml version="1.0"?>
<employees>
<employee>
<name>Ravi</name>
<desc>My favourite <a
href='http://www.mail.yahoo.com'>page</a></desc>
</employee>
</employees>
Consider the XSL file for this (Employee.xsl)
<?xml version = '1.0' encoding = 'utf-8'?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
Name :<xsl:value-of
select='/employees/employee/name'/><br/>
<xsl:value-of
select='/employees/employee/desc'/>
</xsl:if>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Which gives following output:
Name :Ravi
My favourite <a href='http://www.mail.yahoo.com'>page</a>
Now my requirement is to display "page" as a hyper link instead of
displaying
<a href='http://www.mail.yahoo.com'>page</a>
I'am developing a project for training management in a company where
the department trains the internal employees. I have been given the job
to display the reports. Where I got stuck with the following problem.
Consider, the following xml file (Employee.xml)
<?xml version="1.0"?>
<employees>
<employee>
<name>Ravi</name>
<desc>My favourite <a
href='http://www.mail.yahoo.com'>page</a></desc>
</employee>
</employees>
Consider the XSL file for this (Employee.xsl)
<?xml version = '1.0' encoding = 'utf-8'?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
Name :<xsl:value-of
select='/employees/employee/name'/><br/>
<xsl:value-of
select='/employees/employee/desc'/>
</xsl:if>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Which gives following output:
Name :Ravi
My favourite <a href='http://www.mail.yahoo.com'>page</a>
Now my requirement is to display "page" as a hyper link instead of
displaying
<a href='http://www.mail.yahoo.com'>page</a>