Add enbase support to oldnewsflash.xsl.
Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> Approved by: trhodes (mentor)
This commit is contained in:
parent
8a78290f1e
commit
7eb2d9dd0d
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=24215
1 changed files with 7 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
|
||||
<!-- $FreeBSD: www/en/news/oldnewsflash.xsl,v 1.5 2002/02/12 08:41:37 sobomax Exp $ -->
|
||||
<!-- $FreeBSD: www/en/news/oldnewsflash.xsl,v 1.6 2004/01/12 21:26:59 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
|
||||
|
|
@ -99,16 +99,19 @@
|
|||
|
||||
<xsl:template match="date"/> <!-- Deliberately left blank -->
|
||||
|
||||
<!-- When the href attribute contains a '$base', expand it to the current
|
||||
value of the $base variable. -->
|
||||
<!-- When the href attribute contains a '$base' or '$enbase', expand it
|
||||
to the current value of the $base or $enbase variable. -->
|
||||
|
||||
<!-- All your $base are belong to us. Ho ho ho -->
|
||||
<!-- All your $base or $enbase are belong to us. Ho ho ho -->
|
||||
<xsl:template match="a">
|
||||
<a><xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(@href, '$base')">
|
||||
<xsl:value-of select="concat(substring-before(@href, '$base'), $base, substring-after(@href, '$base'))"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(@href, '$enbase')">
|
||||
<xsl:value-of select="concat(substring-before(@href, '$enbase'), $enbase, substring-after(@href, '$enbase'))"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@href"/>
|
||||
</xsl:otherwise>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue