Subject: [xsl] Help regarding displaying anchors/links present in an xml element along with other text. From: "Singh, Revant" <Revant.Singh@xxxxxxxxx> Date: Mon, 15 Aug 2005 15:40:19 -0600 |
Hi All, I have been struggling to get an anchor/link to be displayed as an anchor/link on my html page.The xml element contains text data, which also has some anchors on it. My xsl is not able to display these as anchors in the transformed html docs.It just displays the link text name.Kindly note the llines in red in the below codes: XML: This is a piece of the xml in use - <States_In_Region_Only fle=""> CO IA </States_In_Region_Only> <Business_Units fle=""> HR IT </Business_Units> <Action fle=""> <a href="http://www.google.com">trial1</a> </Action> <Issue fle=""> <p>The link is: <a href="http://www.yahoo.com">revant's link</a></p> </Issue> <TEST_REGIONS> <TEST_REGION name="States_In_Region_Only">States In-Region Only</TEST_REGION> <TEST_REGION name="Business_Units">Business Units</TEST_REGION> <TEST_REGION name="Action">Action</TEST_REGION> <TEST_REGION name="Issue">Issue</TEST_REGION> </TEST_REGIONS> xsl:This is the xsl where i am trying to display the contents on a html page... <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:template match="TEST_CONTENT"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <SCRIPT language="Javascript"><![CDATA[ function openConsole(ref_url, name) { h=window.open(ref_url, name, 'toolbar=no,height=480,width=800,directories=no,status=no,scrollbars=yes ,resizable=yes,menubar=no'); h.focus(); } ]]></SCRIPT> <TITLE><xsl:value-of select="TEST_TITLE"/></TITLE> <link rel="stylesheet" type="text/css" href="/TestSupportSite/css/style.css" /> </HEAD> <BODY > <TABLE width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td align="top"><div class="rightcol"> <xsl:for-each select="/TEST_CONTENT//TEST_REGION"> <xsl:if test="@name='States_In_Region_Only'"> <h2 class="descrheadings"><xsl:value-of select="."/> </h2>: <span class="descrdata"><xsl:value-of select="/TEST_CONTENT//States_In_Region_Only"/></span><br></br> </xsl:if> <xsl:if test="@name='Business_Units'"> <h2 class="descrheadings"><xsl:value-of select="."/></h2>: <span class="descrdata"><xsl:value-of select="/TEST_CONTENT//Business_Units"/></span> </xsl:if> <xsl:if test="@name='Issue'"> <h2 class="descrheadings"><xsl:value-of select="."/></h2>: <span class="descrdata"><xsl:value-of select="/TEST_CONTENT//Issue" disable-output-escaping="yes"/></span> </xsl:if> </xsl:for-each> </div> <xsl:for-each select="/TEST_CONTENT//TEST_REGION"> <xsl:if test="@name='Action'"> <h2 class="sectionheading"><xsl:value-of select="."/></h2> <span class="descrdata"><xsl:value-of select="/TEST_CONTENT//Action" disable-output-escaping="yes"/></span> </xsl:if> </xsl:for-each> </td> </tr> </TABLE> </BODY> </HTML> </xsl:template> </xsl:stylesheet> I want that Revant's link and trial1 should be displayed as anchors (which is not happeneing)(Note that i am using css classes wherever required) Any help is greatly appreciated. Thanks, Revant -----Original Message----- From: David Carlisle [mailto:davidc@xxxxxxxxx] Sent: Monday, August 15, 2005 3:07 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Complicated Variable/Xpath update > <xsl:value-of select="//linkSource[@href = almost always // is slow and performance is vastly improved by using a key. Michael has already posted the key useage in this thread. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Recursion of variable, watchstone@xxxxxxxxx | Thread | [xsl] XPATH: how to get position of, Jule Kleine |
[xsl] Recursion of variable, watchstone@xxxxxxxxx | Date | Re: [xsl] Recursion of variable, David Carlisle |
Month |