Subject: [xsl] Making Link in text From: Senthilukvelaan <skumaravelan@xxxxxxxxxxxxxx> Date: Fri, 12 Sep 2008 00:41:32 -0700 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: use-when in the xsl:inlcu, Vladimir Nesterovsky | Thread | Re: [xsl] Making Link in text, Jonas Mellin |
Re: [xsl] How to display figure if , David Carlisle | Date | Re: [xsl] Making Link in text, Jonas Mellin |
Month |