Subject: better integration of news pages for NetBSD and pkgsrc
To: None <>
From: Klaus Heinz <>
List: netbsd-docs
Date: 05/29/2005 02:53:53

I would like to better synchronize the news items at htdocs/index.html
( and htdocs/Documentation/software/packages.html

At the moment, both pages are updated independently from each other and
packages.html is often neglected.

The news items on both pages are generated from a source file:
htdocs/index.html depends on htdocs/Changes/index.xml (and
htdocs/Changes/index.html at the moment) and packages.html contains news
items from packages.xml.

My plan is to mark news in htdocs/Changes/index.xml with an
attribute class="news.pkgsrc" iff it is relevant for

News items which are of no concern for (eg, "new binary
packages for Interix") should still be added to packages.xml.

Those two sources of news items have to be collected and sorted by date
in order to generate packages.html.
Unfortunately, I have not found a feasible way[0] to do that with XSLT
other than changing the format of the id attribute for <sect3> in

The new format should probably look like this:

  <sect2 id="yyyymm"> 
  <sect3 id="yyyymmddnn-identifier" class="news.pkgsrc"> 
  <title>A title</title>
    some paragraphs
yyyy: the year
mm: the month     
dd: the day
nn: a serial number of the entries for this day, starting at 00  
class: is an optional attribute

This format puts the date information into the id attribute instead of
mixing it with the title string.

It will not be necessary to change the id attributes of all news items
in htdocs/Changes/index.xml, but we probably should do that anyway for
the ones recently added (maybe up to 5).

Is it ok to implement that?
Does someone have a better idea?


[0] With xsl:sort I need an XPath expression which specifies the sorting
    key. If that key (the date) is not readily available as an attribute
    or computable with XPath functions (eg, if I have to extract/transform
    it with a special template from the <title>) I do not see how I could
    use xsl:sort.