|
Subject:
|
XSL and href calls ...
|
|
Posted By:
|
asearle
|
Post Date:
|
9/21/2006 9:27:41 AM
|
Hi Everyone,
I have href links (hyperlink calls) in my XML and these work fine using the following syntax in my XSL template ...
<xsl:attribute name="href"> <xsl:value-of select="MenuTargetObject" /> </xsl:attribute>
Now I would like to force the browser to open the new page in a separate window (HTML syntax: target="_blank" ) but am not sure how to declare this in my XSL.
I've done some googling but it didn't return anything useful so I am hoping that someone can send me a tip?
Many thanks, Alan Searle.
|
|
Reply By:
|
mhkay
|
Reply Date:
|
9/21/2006 10:33:29 AM
|
You can write
<xsl:attribute name="target">_blank</xsl:attribute>
though more concise is:
<a href="{MenuTargetObject}" target="_blank"> (generate the link text) </a>
Michael Kay http://www.saxonica.com/ Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|
|
Reply By:
|
asearle
|
Reply Date:
|
9/21/2006 11:02:12 AM
|
Thanks very much this: Worked perfectly!
|