|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Making Link in text
Have a difficulty in producing the expected output.
Any pointer would help.
Input
<P>Please click <LINK>http://www.google.com</LINK>
<LINK_TEXT>
Google
</LINK_TEXT>
on the link below or copy and paste the address
onto your web browser's address window. Once you're on the web page, |
you will be instructed
</P>
xslt
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:template match="P">
<P>
<xsl:call-template name="markup">
<xsl:with-param name="content" select="." />
<xsl:with-param name="link" select="//LINK" />
<xsl:with-param name="text" select="//LINK_TEXT" />
</xsl:call-template>
</P>
</xsl:template>
</body>
</html>
</xsl:template>
<xsl:template match="P" name="markup" >
<xsl:param name="link" />
<xsl:param name="text" />
<a href="{$link}">
<xsl:value-of select="$text" />
</a>
</xsl:template>
</xsl:stylesheet>
Desired output.
<html>
<body>
<P>Please click
<a href="http://www.google.com">
Google
</a>
on the link below or copy and paste the address
onto your web browser's address window. Once you're on the web page, |
you will be instructed
</P>
</body>
</html>
Thanks,
S
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








