Differentiating between internal and outgoing links

Here should go questions about transforming XML with XSLT and FOP.
Posts: 11
Joined: Sat Jan 09, 2010 8:13 pm

Differentiating between internal and outgoing links

Post by slaterino » Wed Feb 10, 2010 5:07 pm

Does anyone know a quick way that I can differentiate between internal and outgoing links? Basically I want all outgoing links to have target=_blank and the internal ones to open in the same window. In my XML all my internal links are written as 'internal_link.php' and all outgoing as 'http://www.outgoing.com.'

I was thinking I could use xsl:attribute and have a xsl:when statement to find all links that begin with http or something like that. Is that possible? Does anyone know what criteria I could use to differentiate them?

My code will look something like this:

<xsl:attribute name="target">
<xsl:when test="LINK BEGINS WITH HTTP">_blank</xsl:when>

Does anyone know what I could write for the criteria to make this work??

Many thanks,