Subject: XSLT templates to eliminate duplicated information
To: None <email@example.com>
From: Pavel Cahyna <firstname.lastname@example.org>
Date: 05/27/2007 23:07:54
it occured to me that if we have the website generated from XML sources,
we should use this fact in a smarter way. Information which is currently
duplicated should be kept in only one place and inserted at the right
place in the desired output format using XSLT.
I have done a step in this direction. In the list of developers, a person
may have <group> tags under his entry indicating to what groups (s)he
belongs (see htdocs/People/developers.xml). Under
htdocs/People/groups, there is a list of groups with their members.
I have created XSLT templates to autogenerate the latter from the former
when htdocs/People/groups/index.html is recreated. This way, it will be
necessary to update group membership in only one place. I have also
separated the list of developers from developers.xml to a new file,
developerlist.xml. There is also a XSLT template totext.xsl, which creates
a textual list suitable for insertion into src/distrib/notes/common.
I would like to commit this soon. The patch is at
it applies under htdocs/People.
In the future, I would like to convert the list of portmasters to a
similar format and autogenerate the list in release notes from it instead
of the src/distrib/notes/common/list-portmasters.pl script, which parses
the resulting HTML. I am sure there are many other cases of duplicated
information where a smarter approach using XSLT could help.