Differentiating between internal and outgoing links
Here should go questions about transforming XML with XSLT and FOP.
Differentiating between internal and outgoing links
Hi,
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:
<a>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="LINK BEGINS WITH HTTP">_blank</xsl:when>
<xsl:otherwise>_self</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</a>
Does anyone know what I could write for the criteria to make this work??
Many thanks,
Russ
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:
<a>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="LINK BEGINS WITH HTTP">_blank</xsl:when>
<xsl:otherwise>_self</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</a>
Does anyone know what I could write for the criteria to make this work??
Many thanks,
Russ
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service