From: Norman Walsh Date: Tue, 25 Sep 2001 11:51:18 +0000 (+0000) Subject: Support automatic collation of year ranges in copyright X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fc16e93a58c77ea585601f91bb2bde22162bf79;p=docbook-dsssl Support automatic collation of year ranges in copyright --- diff --git a/xsl/common/common.xsl b/xsl/common/common.xsl index a5d3e255f..21464fc9e 100644 --- a/xsl/common/common.xsl +++ b/xsl/common/common.xsl @@ -1098,5 +1098,177 @@ pointed to by the link is one of the elements listed in + +Print a set of years with collapsed ranges + + +This template prints a list of year elements with consecutive +years printed as a range. In other words: + +1992 +1993 +1994]]> + +is printed 1992-1994, whereas: + +1992 +1994]]> + +is printed 1992, 1994. + +This template assumes that all the year elements contain only +decimal year numbers, that the elements are sorted in increasing +numerical order, that there are no duplicates, and that all the years +are expressed in full century+year +(1999 not 99) notation. + + + + +years + +The initial set of year elements. + + +print.ranges + +If non-zero, multi-year ranges are collapsed. If zero, all years +are printed discretely. + + +single.year.ranges + +If non-zero, two consecutive years will be printed as a range, +otherwise, they will be printed discretely. In other words, a single +year range is 1991-1992 but discretely it's +1991, 1992. + + + + + + +This template returns the formatted list of years. + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + , + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + , + + , + + + + - + + , + + + + + + + + + + + + + diff --git a/xsl/fo/param.xsl b/xsl/fo/param.xsl index a5c72761a..6c4ceeb15 100644 --- a/xsl/fo/param.xsl +++ b/xsl/fo/param.xsl @@ -1264,5 +1264,27 @@ Otherwise, nested fo:blocks will be used. + + + + +Collate copyright years into ranges? + +If non-zero, copyright years will be collated into ranges. + + + + + + + +Print single-year ranges (e.g., 1998-1999) + +If non-zero, year ranges that span a single year will be printed +in range notation (1998-1999) instead of discrete notation +(1998, 1999). + + + diff --git a/xsl/fo/titlepage.xsl b/xsl/fo/titlepage.xsl index d5a299b1d..d8f5f16ff 100644 --- a/xsl/fo/titlepage.xsl +++ b/xsl/fo/titlepage.xsl @@ -240,9 +240,6 @@ - - - @@ -251,13 +248,17 @@ copyright - - - - - + + + + + + + + , diff --git a/xsl/html/param.xsl b/xsl/html/param.xsl index 1ddc2cd8b..3704d575c 100644 --- a/xsl/html/param.xsl +++ b/xsl/html/param.xsl @@ -1211,12 +1211,16 @@ will be passed through to the HTML as a class attribute on a + + + + + + + +Collate copyright years into ranges? + +If non-zero, copyright years will be collated into ranges. + + + + + + + +Print single-year ranges (e.g., 1998-1999) + +If non-zero, year ranges that span a single year will be printed +in range notation (1998-1999) instead of discrete notation +(1998, 1999). + + + diff --git a/xsl/html/titlepage.xsl b/xsl/html/titlepage.xsl index 9256e4f4d..cfa5704a7 100644 --- a/xsl/html/titlepage.xsl +++ b/xsl/html/titlepage.xsl @@ -232,9 +232,6 @@ - - -

@@ -244,13 +241,14 @@ copyright - - - - +