Open new browser window with xsl file

P

postings

Hi

Currently I have some RSS displayed using this stylesheet:
----------------------------------------------------------------

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:eek:utput method="html" />

<xsl:template match="/">
<ul>
<xsl:for-each select="rss/channel/item">
<li><a href="{link}"><xsl:value-of select="title" /></a></li>
</xsl:for-each>
</ul>
</xsl:template>

</xsl:stylesheet>
----------------------------------------------------------------

Does anybody know how I could alter the code so that when the user
clicks on the link, it opens in a new browser window?

Many thanks

Alex
 
M

Martin Honnen

<li><a href="{link}"><xsl:value-of select="title" /></a></li>

Does anybody know how I could alter the code so that when the user
clicks on the link, it opens in a new browser window?

More of an HTML question than an XSLT question. HTML 4.0 for that has
the target attribute e.g.
<a href="page.html" target="_blank">link</a>
But note that nowadays with tabbed browsing and browsers focussing on
allowing users to specify whether/where to open new windows your
suggestion in the markup to open the link in a new window might well be
ignored or result in a new tab instead of a new window.
 
P

postings

Thanks Martin.

I should have seen this, the answer is so obvious now. Silly me.

Thanks for your help

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top