Opening xml links in separate pages with xsl

admin

Administrator
Staff member
I apologize in advance if I don't always use the proper terms but this is new to me. I have a list generated in xml...here's an example:

<?xml-stylesheet type="text/xsl" href=http://www.webdeveloper.com/forum/archive/index.php/"index3.xsl"?>


<links>
<link>
<title>Title of Attribute</title>
<desc>Description of Attribute</desc>
<link>http://hyperlink.xml</link>
<version>undefined</version>
</link>
</links>

This is part of the "index3.xsl" content controlling "link":

<xsl:template match="link">
<tr>
<xsl:if test="(position() mod 2 = 1)">
<xsl:attribute name="bgcolor">#F0F8FF</xsl:attribute>
</xsl:if>
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="title" />
</a>
</td>
<td><xsl:value-of select="version" /></td>
<td><xsl:value-of select="desc" /></td>
</tr>
</xsl:template>

As is, the value inside the "link" tag takes the viewer from the current page to where the link points. I'd like to find a way to open a new browser window when the link is clicked. I've tried to Google this and looked through O'Reilly's "Learning XML" book in the XLST section with no luck. Anyone have any ideas?

Thanks.

-Trip
 
Back
Top