231c1c7cce72 — Norman Gray 10 months ago
Rework the process of generating release-notes.

This is a bit over-indulgent.
M Makefile +14 -5
@@ 43,20 43,21 @@ dist: $(DIST).tar.gz $(DIST).zip webpage
 	echo '@VERSIONX@' | $(edit) >$(DIST)/VERSION
 #	echo $(DIST) >$(DIST)/VERSION
 
-webpage-tarball.tar: $(DIST).tar.gz $(DIST).zip $(DIST)/VERSION showlabels.html showlabels.pdf lppl.txt
+webpage-tarball.tar: $(DIST).tar.gz $(DIST).zip $(DIST)/VERSION \
+		showlabels.html showlabels.pdf lppl.txt release-notes.html
 	rm -Rf $@ tempdir
 	mkdir tempdir
 	cd tempdir; \
 	  for f in ../$(DIST).tar.gz ../$(DIST).zip ../showlabels.pdf ../lppl.txt; \
 	  do ln $$f; \
 	done
-	$(edit) -e 's,@STYLE@,/style/base.css,' showlabels.html >tempdir/index.html
+	$(edit) -e 's,@STYLE@,/style/base.css,' -e '/@RELEASENOTES@/r release-notes.html' showlabels.html >tempdir/index.html
 	cd tempdir; tar cf ../$@ *
 	rm -Rf tempdir
 
-showlabels.dtx: showlabels.dtx.in version.sed
+showlabels.dtx: showlabels.dtx.in version.sed release-notes.tmpdtx
 	rm -f showlabels.dtx
-	$(edit) showlabels.dtx.in >showlabels.dtx.tmp && mv showlabels.dtx.tmp showlabels.dtx
+	$(edit) -e '/@RELEASENOTES@/r release-notes.tmpdtx' showlabels.dtx.in >showlabels.dtx.tmp && mv showlabels.dtx.tmp showlabels.dtx
 
 showlabels.sty: showlabels.dtx
 	rm -f showlabels.sty

          
@@ 76,6 77,14 @@ showlabels-impl.pdf: showlabels.dtx
 	mv makedocs/showlabels.pdf $@
 	rm -Rf makedocs
 
+release-notes.html: release-notes.xml
+	rm -f $@
+	xsltproc tools/release-notes-html.xslt $< >$@.tmp && mv $@.tmp $@
+
+release-notes.tmpdtx: release-notes.xml
+	rm -f $@
+	xsltproc tools/release-notes-dtx.xslt $< | sed 's/^/% /' >$@.tmp && mv $@.tmp $@
+
 # In version.sed, include substutitions
 #
 #   VERSION -> version from this file

          
@@ 106,4 115,4 @@ check: showlabels.sty
 	cd t; $(MAKE)
 
 clean:
-	rm -f *~ *.log *.aux *.dvi *.ps showlabels.pdf
+	rm -f *~ *.log *.aux *.dvi *.ps release-notes.html release-notes.tmpdtx showlabels.pdf

          
A => release-notes.xml +284 -0
@@ 0,0 1,284 @@ 
+<release-notes xmlns='http://ns.nxg.me.uk/release-notes'>
+
+<release>
+  <version>1.9</version>
+  <date>YYYY MMM DD</date>
+<note>
+<ul>
+  <li>Robustness fix: macros in arguments are now handled, so that
+  (after <code>\showlabel{index}</code>),
+  <code>\index{Poincar\'e}</code> doesn't cause an error.</li>
+  <li>The <code>\showlabel[optarg]{command}</code> optional argument
+  can now take a one-argument command.</li>
+  <li>The macro <code>\showlabeltype</code> expands to the current
+  label type, for possible use in <code>\showlabelsetlabel</code>.</li>
+</ul>
+</note>
+</release>
+
+<release>
+  <version>1.8</version>
+  <date>2016-06-09</date>
+<note>
+<p>The <code>ntheorem</code> package exposed an apparently
+long-standing incompleteness in the handling of <code>amsmath</code>
+documents.
+Fixes <a href='https://bitbucket.org/nxg/showlabels/issues/9/'>issue 9</a>.</p>
+</note>
+</release>
+
+<release>
+  <version>1.7</version>
+  <date>2015-12-08</date>
+<note>
+<p>Release v1.7.</p>
+</note>
+</release>
+
+<release>
+  <version>1.7b2</version>
+  <date>2015-12-07</date>
+<note>
+<p>Make the combination of amsmath and [inline] mode work
+(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/8/'>issue 8</a>
+– thanks to A L Dukeman for the report;
+what is it about showlabels and 6 December?!).</p>
+</note>
+</release>
+
+<release>
+  <version>1.7b1</version>
+  <date>2014-12-06</date>
+<note>
+<p>This is a much-delayed bugfix release (by coincidence
+<em>exactly</em> a year after the previous release!).</p>
+<ul>
+<li>Give <code>\showlabels</code> an optional formatting argument
+(implements <a href='https://bitbucket.org/nxg/showlabels/issue/1/'>issue 1</a>
+– thanks to Francesco Biccari for the suggestion).</li>
+<li>Special-case the IEEEtrantools package
+(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/2/'>issue 2</a>
+– thanks to Boris Kheyfets for the report and test case, and to
+Ben William Carabelli for additional analysis and a draft fix).</li>
+<li>The <code>[final]</code> option now works with the
+<code>{amsmath}</code> package
+(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/3/'>issue 3</a>
+– thanks to Guillermo Garza and Enno Nagel for the report, and to
+Guillermo for the test case).</li>
+<li>Handle the hyperref package's <code>\ref*{label}</code> variant
+(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/4/'>issue 4</a>
+– thanks to Alex Watson for the report and test case).</li>
+<li>Handle the case where a label is in a display, but not in maths mode
+(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/5/'>issue 5</a>
+– thanks to ‘bartgol’ on Stackexchange for the report and test case).</li>
+</ul>
+</note>
+</release>
+
+<release>
+  <version>1.6.6</version>
+  <date>2013-12-06</date>
+<note>
+<ul>
+<li>Add configuration interface <code>\showlabelrefline</code> and
+ensure that <code>\color</code> works in
+<code>\showlabelfont</code>.</li>
+<li>Various documentation tweaks</li>
+<li>Change licence from GPL to LPPL</li>
+<li>Fix link to repository</li>
+</ul>
+</note>
+
+</release>
+
+<release>
+  <version>1.6.5</version>
+  <date>2009-05-27</date>
+<note>
+<p>Fixed a bug in the way that labels including underscores (and
+other ‘exotic’ characters) were displayed.</p>
+</note>
+</release>
+
+<release>
+  <version>1.6.4</version>
+  <date>2008-10-10</date>
+
+<note>
+<p>Fixed another poor interaction between eqnarray and amsart.  Now
+we get equation labels in eqnarray, and we don't get marginal notes
+about <code>\eqref</code> (which is good; might this finally be fixed?).</p>
+</note>
+</release>
+
+<release>
+  <version>1.6.3</version>
+  <date>2008-07-24</date>
+
+<note>
+<p>Release 1.6.2 broke compatibility with the <em>rest</em> of
+amsmath (<code>eqnarray</code> became the only thing that worked
+within amsmath)!  Fixed.  Doh!</p>
+</note>
+</release>
+
+<release>
+  <version>1.6.2</version>
+  <date>2008-06-27</date>
+<note>
+<p>The reimplementation of eqnarray within amsart was such that
+equation labels disappeared in that case.  Fixed.</p>
+</note>
+</release>
+
+<release>
+<version>1.6.1</version>
+<date>2007-06-17</date>
+<note>
+<p>Fix an errant test, which mangled equation labels starting
+with two identical letters.</p>
+</note>
+</release>
+
+<release>
+  <version>1.6</version>
+  <date>2006-05-26</date>
+<note>
+<p>The <code>\showlabels</code> command will now work with commands
+  (such as <code>\cite</code> or <code>\includegraphics</code>) which
+  take an optional argument.</p>
+</note>
+</release>
+
+<release>
+<version>1.5a</version>
+<date>2005-03-17</date>
+<note>
+<p>Defined <code>\showlabelfont</code> using
+<code>\ttfamily</code> rather than <code>\tt</code> (I'd
+avoided doing this before to avoid a seemingly pointless
+incompatibility with LaTeX 2.09, but (a) I imagine the
+package is incompatible with that for other reasons, and (b)
+it's really not worth the hassle...).</p>
+</note>
+</release>
+
+<release>
+<version>1.5</version>
+<date>2004-10-08</date>
+<note>
+<p>Added <code>\showlabelfont</code> and
+<code>\showlabelsetlabel</code> commands, allowing
+customisation of the printed labels.  Added and documented
+options [final], [draft] (the former makes this package do
+nothing; the latter is the default behaviour).</p>
+</note>
+</release>
+
+<release>
+<version>1.4a</version>
+<date>2003-01-28</date>
+<note>
+<p>Acquired the <code>[left]</code> and
+<code>[right]</code> options, and fixed a bug which affected
+<code>\label</code> commands in captions.</p>
+</note>
+</release>
+
+<release>
+<version>1.4</version>
+<date>2001-07-24</date>
+<note>
+<p>Became (more) compatible with the
+wrapfig package.  Also, I added the
+<code>\showlabels</code> command, to have the package display
+references to commands other than <code>\label</code>
+(<code>\cite</code> and <code>\ref</code> are obvious ones),
+and an <code>[inline]</code> option to have labels (etc.)
+displayed inline where possible, rather than always in the
+margin.</p>
+</note>
+</release>
+
+<release>
+<version>1.3e</version>
+<date>2001-05-30</date>
+<note>
+<p>Became compatible with the hyperref package in
+particular, and in general with other packages which
+themselves modify the <code>\label</code> command.  This will
+work, however, only if the showlabels package is loaded after
+other packages which do this.  Notwithstanding Sebastian
+Rahtz's excellent general advice on this, showlabels should
+indeed be loaded after hyperref.</p>
+</note>
+</release>
+
+<release>
+<version>1.3e</version>
+<date>2001-05-31</date>
+<note>
+<p>After a long delay, here is an updated version of my showlabels
+package.  It corrects all the reported bugs which I could reproduce,
+namely:</p>
+<ul>
+<li>The package now formats labels correctly when the
+<code>\label</code> command appears outside either an equation or a
+<code>\caption</code> (silly of me).</li>
+
+<li>A couple of people reported problems in the interaction with the
+amsmath package.  Either these were confined to that package's earlier
+incarnations as AMS-LaTeX or the amstex package, or else there's some
+arcane circumstance I can't reproduce, so I haven't found anything to
+fix on this matter.  Note that the
+<code>\usepackage{showlabels}</code> command must come <em>after</em>
+the <code>\usepackage{amsmath}</code> command.  Bug-sightings here
+will be warmly appreciated.</li>
+
+<li>I haven't worried too much about the precise formatting of the
+labels – this is, after all, supposed to be a draft-only
+package.</li>
+</ul>
+</note>
+
+</release>
+
+<release>
+<version>1.1</version><date>2001-01-01</date>
+<note>
+<p>Modified to conform to the slightly
+different mechanism that <code>amsmath</code> uses to produce equation
+numbers.  I don't habitually use <code>amsmath</code>, so I won't
+discover any bugs or weaknesses with its support here, and I'd
+consequently be glad to be informed of any that appear.  Do note that
+the <code>\usepackage{showlabels}</code> command <em>must</em> appear
+after the <code>\usepackage{amsmath}</code> if it is to detect that
+you are using the amsmath package.  Note also that, since these
+additions appeared, AMS-LaTeX and the <code>amstex</code> package seem
+to have been declared ‘obsolete’ in favour of the <code>amsmath</code>
+package.  This package now claims conformance with the
+<code>amsmath</code> package alone, though it will probably work with
+older versions in fact.</p>
+</note>
+</release>
+
+<release>
+  <version>Updated</version>
+  <date>1992-01-29</date>
+  <note>
+<p>On 1992 January 29, Darrel Hankerson
+(<code>hank@ducvax.auburn.edu</code>), made the update to NFSS, and
+changed the name to <code>showlabel.sty</code>.</p>
+  </note>
+</release>
+
+<release>
+<version>Original</version>
+<date>1991-09-21</date>
+<note>
+<p>The package was originally released by me on 1991 September 21, under the name
+<code>labels.sty</code>.</p>
+</note>
+</release>
+
+</release-notes>

          
A => schemas.xml +3 -0
@@ 0,0 1,3 @@ 
+<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
+<namespace ns="http://ns.nxg.me.uk/release-notes" uri="tools/release-notes.rnc"/>
+</locatingRules>

          
M showlabels.dtx.in +6 -4
@@ 145,7 145,7 @@ 
 % temporarily, within a block or environment.  Use the
 % |\showlabelsinline| macro to do that.
 %
-% \subsection*{Formatting}
+% \section{Formatting}
 %
 % If you want to change the font the labels appear in, redefine the
 % |\showlabelfont| command, which by default expands to

          
@@ 201,7 201,7 @@ 
 % \end{quote}
 % suppresses the line but still positions the text between the lines.
 %
-% \subsection*{Compatibility with other packages, and other problems}
+% \section{Compatibility with other packages, and other problems}
 %
 % The \Lpackage{showlabels} package works by redefining the |\label|
 % command, along with a few internal \LaTeX\ commands.  All the other commands it

          
@@ 278,7 278,7 @@ 
 % \url{https://www.ctan.org/pkg/showlabels}.  The source is in
 % a repository online: \url{https://hg.sr.ht/~nxg/showlabels}.
 %
-% \subsection*{Other packages}
+% \section{Other packages}
 %
 % The \Lpackage{showlabels} package has a large overlap in
 % functionality with David Carlisle's \Lpackage{showkeys}, although

          
@@ 287,7 287,7 @@ 
 % want to try using \Lpackage{showkeys}, but please do mention the
 % problem, typically by email to me.
 %
-% \subsection*{History and Credits}
+% \section{History and Credits}
 %
 % I've received bug reports, fixes, or implementable suggestions from many
 % people, including

          
@@ 327,6 327,8 @@ 
 % \url{hank@ducvax.auburn.edu}, made the update to NFSS, and
 % changed the name to `showlabel.sty'.
 %
+% \subsection{Release notes}
+% \iffalse @RELEASENOTES@ \fi
 %
 % \StopEventually{}
 %

          
M showlabels.html +2 -178
@@ 106,184 106,8 @@ mail me.</li>
 conditions of the <a href='http://www.latex-project.org/lppl.txt'>LaTeX Project Public Licence</a>,
 either version 1.3 of this licence or (at your option) any later version.</p>
 
-<h3>History</h3>
-<dl>
-<dt><span class='attention'><strong>1.9, YYYY MMM DD</strong></span></dt>
-<dd><ul>
-  <li>Robustness fix: macros in arguments are now handled, so that
-  (after <code>\showlabel{index}</code>),
-  <code>\index{Poincar\'e}</code> doesn't cause an error.</li>
-  <li>The <code>\showlabel[optarg]{command}</code> optional argument
-  can now take a one-argument command.</li>
-  <li>The macro <code>\showlabeltype</code> expands to the current
-  label type, for possible use in <code>\showlabelsetlabel</code>.</li>
-</ul></dd>
-
-<dt><strong>1.8, 2016 June 9</strong></dt>
-<dd>The <code>ntheorem</code> package exposed an apparently
-long-standing incompleteness in the handling of <code>amsmath</code>
-documents.
-Fixes <a href='https://bitbucket.org/nxg/showlabels/issues/9/'>issue 9</a>.</dd>
-
-<dt><strong>1.7, 2015 December 8</strong></dt>
-<dd>Release v1.7.</dd>
-
-<dt>1.7b2, 2015 December 7</dt>
-<dd>Make the combination of amsmath and [inline] mode work
-(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/8/'>issue 8</a>
-– thanks to A L Dukeman for the report;
-what is it about showlabels and 6 December?!).</dd>
-
-<dt>1.7b1, 2014 December 6</dt>
-<dd>This is a much-delayed bugfix release (by coincidence
-<em>exactly</em> a year after the previous release!).
-<ul>
-<li>Give <code>\showlabels</code> an optional formatting argument
-(implements <a href='https://bitbucket.org/nxg/showlabels/issue/1/'>issue 1</a>
-– thanks to Francesco Biccari for the suggestion).</li>
-<li>Special-case the IEEEtrantools package
-(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/2/'>issue 2</a>
-– thanks to Boris Kheyfets for the report and test case, and to
-Ben William Carabelli for additional analysis and a draft fix).</li>
-<li>The <code>[final]</code> option now works with the
-<code>{amsmath}</code> package
-(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/3/'>issue 3</a>
-– thanks to Guillermo Garza and Enno Nagel for the report, and to
-Guillermo for the test case).</li>
-<li>Handle the hyperref package's <code>\ref*{label}</code> variant
-(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/4/'>issue 4</a>
-– thanks to Alex Watson for the report and test case).</li>
-<li>Handle the case where a label is in a display, but not in maths mode
-(fixes <a href='https://bitbucket.org/nxg/showlabels/issue/5/'>issue 5</a>
-– thanks to ‘bartgol’ on Stackexchange for the report and test case).</li>
-</ul></dd>
-
-<dt>1.6.6, 2013 December 6</dt>
-<dd><ul>
-<li>Add configuration interface <code>\showlabelrefline</code> and
-ensure that <code>\color</code> works in
-<code>\showlabelfont</code>.</li>
-<li>Various documentation tweaks</li>
-<li>Change licence from GPL to LPPL</li>
-<li>Fix link to repository</li>
-</ul>
-</dd>
-
-<dt>1.6.5, 2009 May 27</dt>
-<dd>Fixed a bug in the way that labels including underscores (and
-other ‘exotic’ characters) were displayed.</dd>
-
-<dt>1.6.4, 2008 October 10</dt>
-<dd>Fixed another poor interaction between eqnarray and amsart.  Now
-we get equation labels in eqnarray, and we don't get marginal notes
-about <code>\eqref</code> (which is good; might this finally be fixed?).</dd>
-
-<dt>1.6.3, 2008 July 24</dt>
-<dd>Release 1.6.2 broke compatibility with the <em>rest</em> of
-amsmath (<code>eqnarray</code> became the only thing that worked
-within amsmath)!  Fixed.  Doh!</dd>
-
-<dt>1.6.2, 2008 June 27</dt>
-<dd>The reimplementation of eqnarray within amsart was such that
-equation labels disappeared in that case.  Fixed.</dd>
-
-<dt>1.6.1, 2007 June 17</dt>
-<dd>Fix an errant test, which mangled equation labels starting
-with two identical letters.</dd>
-
-<dt><strong>1.6, 2006 May 26</strong></dt>
-<dd>The <code>\showlabels</code> command will now work with commands
-  (such as <code>\cite</code> or <code>\includegraphics</code>) which
-  take an optional argument.</dd>
-
-<dt>1.5a, 2005 March 17</dt>
-<dd>Defined <code>\showlabelfont</code> using
-<code>\ttfamily</code> rather than <code>\tt</code> (I'd
-avoided doing this before to avoid a seemingly pointless
-incompatibility with LaTeX 2.09, but (a) I imagine the
-package is incompatible with that for other reasons, and (b)
-it's really not worth the hassle...).</dd>
-
-<dt><strong>1.5, 2004 October 8</strong></dt>
-<dd>Added <code>\showlabelfont</code> and
-<code>\showlabelsetlabel</code> commands, allowing
-customisation of the printed labels.  Added and documented
-options [final], [draft] (the former makes this package do
-nothing; the latter is the default behaviour).
-</dd>
-
-<dt>1.4a, 2003 January 28</dt>
-<dd>Acquired the <code>[left]</code> and
-<code>[right]</code> options, and fixed a bug which affected
-<code>\label</code> commands in captions.</dd>
-
-<dt><strong>1.4, 2001 July 24</strong></dt>
-<dd>Became (more) compatible with the
-wrapfig package.  Also, I added the
-<code>\showlabels</code> command, to have the package display
-references to commands other than <code>\label</code>
-(<code>\cite</code> and <code>\ref</code> are obvious ones),
-and an <code>[inline]</code> option to have labels (etc.)
-displayed inline where possible, rather than always in the
-margin.</dd>
-
-<dt>1.3e, 2001 May 30</dt>
-<dd>Became compatible with the hyperref package in
-particular, and in general with other packages which
-themselves modify the <code>\label</code> command.  This will
-work, however, only if the showlabels package is loaded after
-other packages which do this.  Notwithstanding Sebastian
-Rahtz's excellent general advice on this, showlabels should
-indeed be loaded after hyperref.</dd>
-
-<dt><strong>1.3</strong></dt>
-<dd><p>After a long delay, here is an updated version of my showlabels
-package.  It corrects all the reported bugs which I could reproduce,
-namely:</p>
-<ul>
-<li>The package now formats labels correctly when the
-<code>\label</code> command appears outside either an equation or a
-<code>\caption</code> (silly of me).</li>
-
-<li>A couple of people reported problems in the interaction with the
-amsmath package.  Either these were confined to that package's earlier
-incarnations as AMS-LaTeX or the amstex package, or else there's some
-arcane circumstance I can't reproduce, so I haven't found anything to
-fix on this matter.  Note that the
-<code>\usepackage{showlabels}</code> command must come <em>after</em>
-the <code>\usepackage{amsmath}</code> command.  Bug-sightings here
-will be warmly appreciated.</li>
-
-<li>I haven't worried too much about the precise formatting of the
-labels – this is, after all, supposed to be a draft-only
-package.</li>
-</ul>
-</dd>
-
-<dt><strong>1.1, 2001?</strong></dt>
-<dd>Modified to conform to the slightly
-different mechanism that <code>amsmath</code> uses to produce equation
-numbers.  I don't habitually use <code>amsmath</code>, so I won't
-discover any bugs or weaknesses with its support here, and I'd
-consequently be glad to be informed of any that appear.  Do note that
-the <code>\usepackage{showlabels}</code> command <em>must</em> appear
-after the <code>\usepackage{amsmath}</code> if it is to detect that
-you are using the amsmath package.  Note also that, since these
-additions appeared, AMS-LaTeX and the <code>amstex</code> package seem
-to have been declared ‘obsolete’ in favour of the <code>amsmath</code>
-package.  This package now claims conformance with the
-<code>amsmath</code> package alone, though it will probably work with
-older versions in fact.
-</dd>
-
-<dt>Original release</dt>
-<dd>The package was originally released by me on 1991 September 21, under the name
-<code>labels.sty</code>.
-On 1992 January 29, Darrel Hankerson
-(<code>hank@ducvax.auburn.edu</code>), made the update to NFSS, and
-changed the name to <code>showlabel.sty</code>.</dd>
-
-</dl>
+<h2>History</h2>
+<!-- @RELEASENOTES@ -->
 
 <div class="signature">
 <a href="http://www.astro.gla.ac.uk/users/norman/"

          
A => tools/release-notes-dtx.xslt +80 -0
@@ 0,0 1,80 @@ 
+<transform xmlns="http://www.w3.org/1999/XSL/Transform"
+    xmlns:n='http://ns.nxg.me.uk/release-notes'
+    exclude-result-prefixes='n'
+    xmlns:date='http://exslt.org/dates-and-times'
+    extension-element-prefixes='date'
+    version="1.0">
+
+<output method='text'/>
+
+<template match='n:release-notes'>
+  <text>\begin{description}</text>
+    <apply-templates/>
+    <text>\end{description}</text>
+</template>
+
+<template match='n:release'>
+  <text>\item[</text>
+  <apply-templates select='n:version'/>
+  <text>, </text>
+  <apply-templates select='n:date'/>
+  <text>]\relax </text>
+
+  <apply-templates select='n:note'/>
+</template>
+
+<template match='n:version'>
+  <apply-templates/>
+</template>
+
+<template match='n:date'>
+  <value-of select='concat(date:year(.), " ", date:month-name(.), " ", date:day-in-month(.))'/>
+</template>
+
+<template match='n:note'>
+  <apply-templates/>
+</template>
+
+<template match='n:strong'>
+  <text>\textbf{</text>
+  <apply-templates/>
+  <text>}</text>
+</template>
+<template match='n:em'>
+  <text>\emph{</text>
+  <apply-templates/>
+  <text>}</text>
+</template>
+<template match='n:code'>
+  <text>|</text>
+  <apply-templates/>
+  <text>|</text>
+</template>
+
+<template match='n:ul'>
+  <text>\begin{itemize}</text>
+  <apply-templates/>
+  <text>\end{itemize}</text>
+</template>
+<template match='n:li'>
+  <text>\item </text>
+  <apply-templates/>
+</template>
+
+<template match='n:a'>
+  <apply-templates/>
+  <text>\footnote{\url{</text><apply-templates select='@*'/><text>}}</text>
+</template>
+
+<template match='n:p'>
+  <apply-templates/>
+  <text>
+  </text>
+</template>
+
+<template match='*'>
+  <message terminate='yes'>Unexpected element: <value-of select='.'/></message>
+</template>
+
+</transform>
+

          
A => tools/release-notes-html.xslt +59 -0
@@ 0,0 1,59 @@ 
+<transform xmlns="http://www.w3.org/1999/XSL/Transform"
+    xmlns:n='http://ns.nxg.me.uk/release-notes'
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    exclude-result-prefixes='n'
+    xmlns:date='http://exslt.org/dates-and-times'
+    extension-element-prefixes='date'
+    version="1.0">
+
+<output method='xml'
+        omit-xml-declaration='yes'/>
+
+<template match='n:release-notes'>
+  <h:dl>
+    <apply-templates/>
+  </h:dl>
+</template>
+
+<template match='n:release'>
+  <h:dt>
+    <choose>
+      <when test='not(preceding-sibling::n:release)'>
+        <h:span class='attention'>
+          <apply-templates select='n:version'/>
+          <text>, </text>
+          <apply-templates select='n:date'/>
+        </h:span>
+      </when>
+      <otherwise>
+        <apply-templates select='n:version'/>
+        <text>, </text>
+        <apply-templates select='n:date'/>
+      </otherwise>
+    </choose>
+  </h:dt>
+  <h:dd>
+    <apply-templates select='n:note'/>
+  </h:dd>
+</template>
+
+<template match='n:version'>
+  <apply-templates/>
+</template>
+
+<template match='n:date'>
+  <value-of select='concat(date:year(.), " ", date:month-name(.), " ", date:day-in-month(.))'/>
+</template>
+
+<template match='n:note'>
+  <apply-templates/>
+</template>
+
+<template match='n:*'>
+  <element name='{local-name(.)}'
+           namespace="http://www.w3.org/1999/xhtml">
+    <apply-templates/>
+  </element>
+</template>
+
+</transform>

          
A => tools/release-notes.rnc +23 -0
@@ 0,0 1,23 @@ 
+# A basic schema for release notes
+
+default namespace = 'http://ns.nxg.me.uk/release-notes'
+datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
+
+start = release-notes
+
+release-notes = element release-notes { release+ }
+
+release = element release { version, date, note }
+version = element version { text } # typically n.m[.r]
+date = element date { xsd:date }
+
+text.content = (text | ul | code | em | strong | a)+
+
+note = element note { (p | ul)+ }
+p = element p { text.content }
+ul = element ul { li+ }
+li = element li { text.content* }
+strong = element strong { text }
+em = element em { text }
+code = element code { text }
+a = element a { attribute href { xsd:anyURI }, text }