Subject: Re: XSLT templates to eliminate duplicated information
To: Hiroki Sato <hrs@NetBSD.org>
From: Pavel Cahyna <pavel@NetBSD.org>
Date: 06/17/2007 20:14:42
On Mon, May 28, 2007 at 07:46:23AM +0900, Hiroki Sato wrote:
> Pavel Cahyna <pavel@NetBSD.org> wrote
> in <20070527210754.GA744@beta.martani.repy.czf>:
> pa> Hello,
> pa> it occured to me that if we have the website generated from XML sources,
> pa> we should use this fact in a smarter way. Information which is currently
> pa> duplicated should be kept in only one place and inserted at the right
> pa> place in the desired output format using XSLT.
> pa> I have done a step in this direction. In the list of developers, a person
> pa> may have <group> tags under his entry indicating to what groups (s)he
> pa> belongs (see htdocs/People/developers.xml). Under
> pa> htdocs/People/groups, there is a list of groups with their members.
> While I agree with that the direction is right, I think putting *.xsl
> file into share/xsl is better because duplicated .xsl/.xml files will
> be created by the translation teams. When we use XML database, the
> stylesheet(s) should be reusable as much as possible among various
> languages and the language-independent part separated into a
> language-independent directory.
I have committed this work with some modifications. There is actually
not much XSL code. I have separated some useful language-independent
templates and put them in share/xsl/selgrp.xsl. The file group.xsl is
language dependent, because it creates a list of names in English:
like Name1, Name2 and Name3. BTW I have noticed that there are no
translations of the list of developers.