3.5.3 Changelog in XML

Frans Englich frans.englich at telia.com
Sun Apr 23 19:02:49 BST 2006

On Sunday 23 April 2006 17:10, Philip Rodrigues wrote:
> Carsten Niehaus wrote:
> > Moin
> >
> > On IRC, Philip Rodrigues, me and others talked about the ChangeLog for
> > the .z releases we do [1]. Phil came up with some XML-magic which
> > automagically creates nice HTML from the attached xml. This makes
> > maintaining a CL easier, because for example there is no need to type the
> > bugs.kde.org-link.
> >
> > What do you think?
> Just to add a little more information: I've done this as something of a
> proof-of-concept, so the details aren't finalised.  At the moment, I have
> two XSL stylesheets to transform the XML to HTML in slightly different ways
> (group by module/product and group by change type).

Of course, there's many possible ways to that. One could let the XHTML output 
carry both the representations such that the user can select; implemented 
with perhaps CSS or ECMAScript.

It must of course neither have to be splitted into two files; one could make 
it switchable with xsl:param and xsltproc's stringparam switch.

> I've attached them 
> both, in case anyone's interested in trying them out [1].

Nice code. Many C++/procedural programming die-hards tend to not harness the 
power of templates, but write tons of xsl:if/xsl:for-each/xsl:choose, but 
that's clearly not the case ;-)

A simplification:
      Fixes bug <a>



      <xsl:value-of select="@bugno"/>


Could be replaced by:

Fixes bug <a href="http://bugs.kde.org/show_bug.cgi?id={@bugno}"
	<xsl:value-of select="@bugno"/></a>

Whitespace handling in the stylesheet in XSL-T 1.0 is sometimes a bit 
unpractical, so using concat() can also be a good alternative. A second 
version of what's above:

      Fixes bug <a>

      <xsl:attribute name="href" 
select="concat('http://bugs.kde.org/show_bug.cgi?id=', @bugno)"/>

      <xsl:value-of select="@bugno"/></a>

I prefer the first I proposed, since it's the most compact.

> Carsten tells me that some people have been adding to the current HTML
> changelog, so the most important consideration is whether those people
> would still be happy to edit the XML version (there will be a description
> of the format and how to edit/check the file if we decide to go ahead).   I
> think the XML-based method is nice and elegant, but if no-one adds their
> changes, then that elegance isn't worth very much, and we should probably
> stick with the current HTML method.
> So, is there anyone who has been adding their changes to the HTML
> changelog, but would *not* be happy to add their changes to the XML
> version?

One can always allow people to write XHTML in the descriptions instead of 
plain strings. With XML Schema, that means it would be validated, if of 



More information about the kde-core-devel mailing list