From 24f6b288fba61504719e8c8b2664567abbdff962 Mon Sep 17 00:00:00 2001 From: "Jesus R. Camou" Date: Thu, 24 Mar 2005 23:08:47 +0000 Subject: [PATCH] Add support for $enbase in news.xml. PR: www/76403 Submitted by: Rudolf Cejka Approved by: trhodes (mentor) --- en/news/news.xml | 8 ++++---- en/news/newsflash.xsl | 11 +++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/en/news/news.xml b/en/news/news.xml index 880b6f6dd0..4d49f43fca 100644 --- a/en/news/news.xml +++ b/en/news/news.xml @@ -9,9 +9,9 @@ Each contains an optional , and then a <p>. <p> elements can contain <a> anchors. Within the "href" attribute of the anchor - $base will be replaced with the base URI necessary to reach the FreeBSD - document root, and should always be used to start URLs at www.FreeBSD.org - or one of the mirrors. + $base or $enbase will be replaced with the base URI necessary to reach + the FreeBSD document root, and should always be used to start URLs at + www.FreeBSD.org or one of the mirrors. Use the <title> element if the <p> content is lengthy. When generating synopses of this information (e.g., for syndication using RDF files), @@ -21,7 +21,7 @@ <news> <cvs:keywords xmlns:cvs="http://www.FreeBSD.org/XML/CVS" version="1.0"> <cvs:keyword name="freebsd"> - $FreeBSD: www/en/news/news.xml,v 1.281 2005/03/18 08:22:15 hrs Exp $ + $FreeBSD: www/en/news/news.xml,v 1.282 2005/03/21 15:54:54 hrs Exp $ </cvs:keyword> </cvs:keywords> diff --git a/en/news/newsflash.xsl b/en/news/newsflash.xsl index 2cba62b113..5fa4f43cd4 100644 --- a/en/news/newsflash.xsl +++ b/en/news/newsflash.xsl @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> -<!-- $FreeBSD: www/en/news/newsflash.xsl,v 1.11 2004/04/08 19:11:49 ceri Exp $ --> +<!-- $FreeBSD: www/en/news/newsflash.xsl,v 1.12 2004/12/30 17:53:43 hrs Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cvs="http://www.FreeBSD.org/XML/CVS"> @@ -79,16 +79,19 @@ </html> </xsl:template> - <!-- 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>