Subject: Re: better integration of news pages for NetBSD and pkgsrc
To: None <k.heinz.mai.fuenf@onlinehome.de>
From: Hiroki Sato <hrs@NetBSD.org>
List: netbsd-docs
Date: 05/29/2005 23:07:03
----Security_Multipart(Sun_May_29_23_07_03_2005_226)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

[I sent this mail again because the previous one was rejected from
 netbsd-doc@ due to the attachment files]

Klaus Heinz <k.heinz.mai.fuenf@onlinehome.de> wrote
  in <20050529005352.GA457@silence.homedns.org>:

k.> This format puts the date information into the id attribute instead of
k.> mixing it with the title string.
k.> 
k.> It will not be necessary to change the id attributes of all news items
k.> in htdocs/Changes/index.xml, but we probably should do that anyway for
k.> the ones recently added (maybe up to 5).
k.> 
k.> Is it ok to implement that?
k.> Does someone have a better idea?

 If we do not have to stick to the current format for news items,
 I suggest to switch over to separating the news items from other
 normal documents which use them.

 Patches for proof of this concept are attached.  news2004.xml
 is a file simply converted from Changes/2004.xml by using newsconv.pl,
 and this is a news item database which can be used from various
 documents.  The format is something like this:

 <entries>
   <entry year="2004" month="12" day="6">
     <title>pkgsrc now frozen</title>

     <category>pkgsrc</category>

     <description>
       <para>As <ulink url="#pkgsrc-freeze-2004Q4">announced previously</ulink>,
         the <ulink url="../Documentation/pkgsrc/">NetBSD Packages Collection</ulink>
         is now frozen in preparation of the fourth stable branch
         <code>pkgsrc-2004Q4</code>.</para>
     </description>
   </entry>
 </entries>

 <entries> is the root element, and <entry> is a container corresponds to
 a news item.  <category> can be used to classify this item (empty string
 is allowed), and in <description> we can use DocBook vocabulary.

 news.xsl converts this database to another .xml file, and other documents
 can include the .xml file directly by using XInclude (see 2004.xml in the
 attached patches).  So, how to use this database depends on news.xsl.
 In the attached patch, selection of news items by "category" is implemented,
 but other features for query and/or output formats can
 also be implemented without modification to news.xml itself.

 Would this approach be overkill or laborious?  I think use of this
 sort of database is useful to avoid scatter of duplicated data
 such as news items, mailing lists, mirror sites, description of
 ports, and others which can be shared in multiple documents.

 [originally attached files can be found at:
   http://people.allbsd.org/~hrs/NetBSD/news-db.tar.gz]

-- 
| Hiroki SATO

----Security_Multipart(Sun_May_29_23_07_03_2005_226)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQBCmcyHTyzT2CeTzy0RAvdaAKCFc52fPiYlCprvfyxegiMmiwDQkQCghMq5
xQV6vgAezAspDEfuPpXTdpA=
=6KEZ
-----END PGP SIGNATURE-----

----Security_Multipart(Sun_May_29_23_07_03_2005_226)----