From a4266c0837e2b010c47108b153d5e4bcc375a40c Mon Sep 17 00:00:00 2001 From: Hiroki Sato <hrs@FreeBSD.org> Date: Wed, 9 Jan 2013 16:13:30 +0000 Subject: [PATCH] Fix syntax errors in translated documents. These caused a build breakage in newer libxslt which check the stylesheet syntax more strictly. |It is an error for the value of either the use attribute or the match |attribute to contain a VariableReference. | (XSL Transformations (XSLT) Version 1.0, Section 12.2) --- de_DE.ISO8859-1/htdocs/community.xsl | 6 ++++-- es_ES.ISO8859-1/htdocs/search/index-site.xsl | 2 +- fr_FR.ISO8859-1/htdocs/search/index-site.xsl | 2 +- hu_HU.ISO8859-2/htdocs/community.xsl | 6 ++++-- hu_HU.ISO8859-2/htdocs/search/index-site.xsl | 2 +- hu_HU.ISO8859-2/share/xml/templates.events.xsl | 12 ++++++------ ja_JP.eucJP/htdocs/community.xsl | 6 ++++-- ja_JP.eucJP/htdocs/search/index-site.xsl | 2 +- ja_JP.eucJP/share/xml/templates.events.xsl | 12 ++++++------ nl_NL.ISO8859-1/htdocs/community.xsl | 6 ++++-- ru_RU.KOI8-R/htdocs/community.xsl | 6 ++++-- ru_RU.KOI8-R/htdocs/search/index-site.xsl | 2 +- ru_RU.KOI8-R/share/xml/templates.events.xsl | 12 ++++++------ 13 files changed, 43 insertions(+), 33 deletions(-) diff --git a/de_DE.ISO8859-1/htdocs/community.xsl b/de_DE.ISO8859-1/htdocs/community.xsl index d8831d99b8..dbca145330 100644 --- a/de_DE.ISO8859-1/htdocs/community.xsl +++ b/de_DE.ISO8859-1/htdocs/community.xsl @@ -11,12 +11,14 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns="http://www.w3.org/1999/xhtml"> + xmlns:date="http://exslt.org/dates-and-times" + xmlns="http://www.w3.org/1999/xhtml" + extension-element-prefixes="date"> <xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/xml/libcommon.xsl"/> <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/xhtml.xsl"/> - <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number($curdate.year) - 1)]" + <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number(date:year()) - 1)]" use="location/country" /> <xsl:key name="event-by-year" match="event" use="enddate/year" /> diff --git a/es_ES.ISO8859-1/htdocs/search/index-site.xsl b/es_ES.ISO8859-1/htdocs/search/index-site.xsl index 2219184755..d8efc72a3a 100644 --- a/es_ES.ISO8859-1/htdocs/search/index-site.xsl +++ b/es_ES.ISO8859-1/htdocs/search/index-site.xsl @@ -21,7 +21,7 @@ <xsl:variable name="title">&title;</xsl:variable> - <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), $lowercase, $uppercase)"/> + <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), 'a�bcde�fghi�jklmn�o�pqrstu�vwxyz', 'A�BCDE�FGHI�JKLMN�O�PQRSTU�VWXYZ')"/> <xsl:template name="process.contentwrap"> <xsl:call-template name="html-sitemap"/> diff --git a/fr_FR.ISO8859-1/htdocs/search/index-site.xsl b/fr_FR.ISO8859-1/htdocs/search/index-site.xsl index fcb45e51b5..c85f23657d 100644 --- a/fr_FR.ISO8859-1/htdocs/search/index-site.xsl +++ b/fr_FR.ISO8859-1/htdocs/search/index-site.xsl @@ -27,7 +27,7 @@ <xsl:variable name="title">&title;</xsl:variable> - <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), $lowercase, $uppercase)"/> + <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), 'a�bc�de���fghi�jklmno�pqrstu��vwxyz', 'A�BC�DE���FGHI�JKLMNO�PQRSTU��VWXYZ')"/> <xsl:template name="process.contentwrap"> <xsl:call-template name="html-sitemap"/> diff --git a/hu_HU.ISO8859-2/htdocs/community.xsl b/hu_HU.ISO8859-2/htdocs/community.xsl index 97e0389480..2c42311291 100644 --- a/hu_HU.ISO8859-2/htdocs/community.xsl +++ b/hu_HU.ISO8859-2/htdocs/community.xsl @@ -14,12 +14,14 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns="http://www.w3.org/1999/xhtml"> + xmlns:date="http://exslt.org/dates-and-times" + xmlns="http://www.w3.org/1999/xhtml" + extension-element-prefixes="date"> <xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/xml/libcommon.xsl"/> <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/xhtml.xsl"/> - <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number($curdate.year) - 1)]" + <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number(date:year()) - 1)]" use="location/country" /> <xsl:key name="event-by-year" match="event" use="enddate/year" /> diff --git a/hu_HU.ISO8859-2/htdocs/search/index-site.xsl b/hu_HU.ISO8859-2/htdocs/search/index-site.xsl index 6614a65ac9..88509ec318 100644 --- a/hu_HU.ISO8859-2/htdocs/search/index-site.xsl +++ b/hu_HU.ISO8859-2/htdocs/search/index-site.xsl @@ -18,7 +18,7 @@ <xsl:variable name="title">&title;</xsl:variable> - <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), $lowercase, $uppercase)"/> + <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), 'a�bcde�fghi�jklmno���pqrstu���vwxyz', 'A�BCDE�FGHI�JKLMNO���PQRSTU���VWXYZ')"/> <xsl:template name="process.contentwrap"> <xsl:call-template name="html-sitemap"/> diff --git a/hu_HU.ISO8859-2/share/xml/templates.events.xsl b/hu_HU.ISO8859-2/share/xml/templates.events.xsl index ec6742936c..427722a8b9 100644 --- a/hu_HU.ISO8859-2/share/xml/templates.events.xsl +++ b/hu_HU.ISO8859-2/share/xml/templates.events.xsl @@ -57,12 +57,12 @@ <xsl:key name="event-by-country" match="event" use="location/country/@code" /> - <xsl:key name="upcoming-event-by-country" match="event[((number(enddate/year) > number($curdate.year)) or - (number(enddate/year) = number($curdate.year) and - number(enddate/month) > number($curdate.month)) or - (number(enddate/year) = number($curdate.year) and - number(enddate/month) = number($curdate.month) and - enddate/day >= $curdate.day))]" + <xsl:key name="upcoming-event-by-country" match="event[((number(enddate/year) > number(date:year())) or + (number(enddate/year) = number(date:year()) and + number(enddate/month) > number(date:month-in-year())) or + (number(enddate/year) = number(date:year()) and + number(enddate/month) = number(date:month-in-year()) and + enddate/day >= date:day-in-month()))]" use="location/country/@code" /> <xsl:variable name="charturl" select="'http://chart.apis.google.com/chart?cht=t&chs=400x200&chtm=world&chco=ffffff,ffbe38,600000&chf=bg,s,4D89F9'" /> diff --git a/ja_JP.eucJP/htdocs/community.xsl b/ja_JP.eucJP/htdocs/community.xsl index b41a21c56a..6e248ccd5a 100644 --- a/ja_JP.eucJP/htdocs/community.xsl +++ b/ja_JP.eucJP/htdocs/community.xsl @@ -9,12 +9,14 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns="http://www.w3.org/1999/xhtml"> + xmlns:date="http://exslt.org/dates-and-times" + xmlns="http://www.w3.org/1999/xhtml" + extension-element-prefixes="date"> <xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/xml/libcommon.xsl"/> <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/xhtml.xsl"/> - <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number($curdate.year) - 1)]" + <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number(date:year()) - 1)]" use="location/country" /> <xsl:key name="event-by-year" match="event" use="enddate/year" /> diff --git a/ja_JP.eucJP/htdocs/search/index-site.xsl b/ja_JP.eucJP/htdocs/search/index-site.xsl index 8bd75e0092..773babe1b3 100644 --- a/ja_JP.eucJP/htdocs/search/index-site.xsl +++ b/ja_JP.eucJP/htdocs/search/index-site.xsl @@ -16,7 +16,7 @@ <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/libcommon.xsl"/> <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/xhtml.xsl"/> - <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), $lowercase, $uppercase)"/> + <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> <xsl:variable name="title">&title;</xsl:variable> diff --git a/ja_JP.eucJP/share/xml/templates.events.xsl b/ja_JP.eucJP/share/xml/templates.events.xsl index 2acc0ab41a..7ceda80476 100644 --- a/ja_JP.eucJP/share/xml/templates.events.xsl +++ b/ja_JP.eucJP/share/xml/templates.events.xsl @@ -53,12 +53,12 @@ <xsl:key name="event-by-country" match="event" use="location/country" /> - <xsl:key name="upcoming-event-by-country" match="event[((number(enddate/year) > number($curdate.year)) or - (number(enddate/year) = number($curdate.year) and - number(enddate/month) > number($curdate.month)) or - (number(enddate/year) = number($curdate.year) and - number(enddate/month) = number($curdate.month) and - enddate/day >= $curdate.day))]" + <xsl:key name="upcoming-event-by-country" match="event[((number(enddate/year) > number(date:year())) or + (number(enddate/year) = number(date:year()) and + number(enddate/month) > number(date:month-in-year())) or + (number(enddate/year) = number(date:year()) and + number(enddate/month) = number(date:month-in-year()) and + enddate/day >= date:day-in-month()))]" use="location/country" /> <xsl:variable name="charturl" select="'http://chart.apis.google.com/chart?cht=t&chs=400x200&chtm=world&chco=ffffff,ffbe38,600000&chf=bg,s,4D89F9'" /> diff --git a/nl_NL.ISO8859-1/htdocs/community.xsl b/nl_NL.ISO8859-1/htdocs/community.xsl index 4ab6861ff1..e1c1801ced 100644 --- a/nl_NL.ISO8859-1/htdocs/community.xsl +++ b/nl_NL.ISO8859-1/htdocs/community.xsl @@ -11,12 +11,14 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns="http://www.w3.org/1999/xhtml"> + xmlns:date="http://exslt.org/dates-and-times" + xmlns="http://www.w3.org/1999/xhtml" + extension-element-prefixes="date"> <xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/xml/libcommon.xsl"/> <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/xhtml.xsl"/> - <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number($curdate.year) - 1)]" + <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number(date:year()) - 1)]" use="location/country" /> <xsl:key name="event-by-year" match="event" use="enddate/year" /> diff --git a/ru_RU.KOI8-R/htdocs/community.xsl b/ru_RU.KOI8-R/htdocs/community.xsl index bde685f1a1..09bbab0542 100644 --- a/ru_RU.KOI8-R/htdocs/community.xsl +++ b/ru_RU.KOI8-R/htdocs/community.xsl @@ -14,12 +14,14 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns="http://www.w3.org/1999/xhtml"> + xmlns:date="http://exslt.org/dates-and-times" + xmlns="http://www.w3.org/1999/xhtml" + extension-element-prefixes="date"> <xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/xml/libcommon.xsl"/> <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/xhtml.xsl"/> - <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number($curdate.year) - 1)]" + <xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number(date:year()) - 1)]" use="location/country" /> <xsl:key name="event-by-year" match="event" use="enddate/year" /> diff --git a/ru_RU.KOI8-R/htdocs/search/index-site.xsl b/ru_RU.KOI8-R/htdocs/search/index-site.xsl index 8d019d9c22..e4b4aac484 100644 --- a/ru_RU.KOI8-R/htdocs/search/index-site.xsl +++ b/ru_RU.KOI8-R/htdocs/search/index-site.xsl @@ -21,7 +21,7 @@ <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/libcommon.xsl"/> <xsl:import href="http://www.FreeBSD.org/XML/www/share/xml/xhtml.xsl"/> - <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), $lowercase, $uppercase)"/> + <xsl:key name="indexLetter" match="term" use="translate(substring(text, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> <xsl:variable name="title">&title;</xsl:variable> diff --git a/ru_RU.KOI8-R/share/xml/templates.events.xsl b/ru_RU.KOI8-R/share/xml/templates.events.xsl index 95ae873562..9c06897d62 100644 --- a/ru_RU.KOI8-R/share/xml/templates.events.xsl +++ b/ru_RU.KOI8-R/share/xml/templates.events.xsl @@ -57,12 +57,12 @@ <xsl:key name="event-by-country" match="event" use="location/country" /> - <xsl:key name="upcoming-event-by-country" match="event[((number(enddate/year) > number($curdate.year)) or - (number(enddate/year) = number($curdate.year) and - number(enddate/month) > number($curdate.month)) or - (number(enddate/year) = number($curdate.year) and - number(enddate/month) = number($curdate.month) and - enddate/day >= $curdate.day))]" + <xsl:key name="upcoming-event-by-country" match="event[((number(enddate/year) > number(date:year())) or + (number(enddate/year) = number(date:year()) and + number(enddate/month) > number(date:month-in-year())) or + (number(enddate/year) = number(date:year()) and + number(enddate/month) = number(date:month-in-year()) and + enddate/day >= date:day-in-month()))]" use="location/country" /> <xsl:variable name="charturl" select="'http://chart.apis.google.com/chart?cht=t&chs=400x200&chtm=world&chco=ffffff,ffbe38,600000&chf=bg,s,4D89F9'" />