Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml/xsl generates bad html for link 1

Status
Not open for further replies.

kdelacruz

Technical User
Oct 7, 2002
25
0
0
ES
Hi
I hope someone can help me with this

In an asp page, I am using xsl to display links using data from an xml file. It's working fine in IE6 and Netscape 7, but Netscape 6 (and possibly other browsers -- I don't have any others to test with!) have a problem because the html that's produced is not proper. The problem that occurs is the link does not appear or behave as a link -- it's just plain text.

Here's the html that's produced for a link:
Code:
<a target=&quot;_blank&quot; href=&quot;[URL unfurl="true"]http://www.frallc.com/&quot;[/URL] />Tech-Ops 2004
There is no end tag for the <a>, and there's an extra backslash at the end of the beginning <a> tag.

Here's the code in my xsl file.
Code:
<a><xsl:attribute name=&quot;target&quot;>_blank</xsl:attribute><xsl:attribute name=&quot;href&quot;>[URL unfurl="true"]http://<xsl:value-of[/URL] select=&quot;eventurl&quot;/></xsl:attribute></a><xsl:value-of select=&quot;desc&quot;/>

And from the xml file:
Code:
<eventurl>[URL unfurl="true"]www.frallc.com/</eventurl>[/URL]

I have also tried this in my xsl file:
Code:
	<xsl:element name=&quot;a&quot;>
	<xsl:attribute name=&quot;href&quot;>[URL unfurl="true"]http://<xsl:value-of[/URL] select=&quot;eventurl&quot;/></xsl:attribute>
	<xsl:attribute name=&quot;target&quot;>_blank</xsl:attribute>
	</xsl:element>
	<xsl:value-of select=&quot;desc&quot;/>
 
Worked perfectly -- there was no end tag for the <a> because I forgot to put one in -- duh!

Thanks, Chris!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top