[Momonga-devel.ja:02491] HTML ChangeLog with Subversion
- From: TAKAHASHI Tamotsu <tamo@xxxxxxxxxxxxxxxxx>
- Date: Wed, 3 Mar 2004 21:59:50 +0900
tamo です。
subversion に移行中なので仕方ないと思いますが、
http://www.momonga-linux.org/ の「最近の CVS の更新」
が更新されていません。
Subversion には svn log --xml -r {20040303}:{20040301} http://...
のようにして XML を吐かせる機能があるようなので
以下のような xsl をかませば (svn log --xml | xsltproc log2html.xsl - )
それなりの HTML を得られます。
だれか調整できればよろしくお願いします。
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:output encoding="UTF-8" method="html"/>
<xsl:template match="logentry">
<li xmlns="">
rev: <xsl:value-of select="@revision"/>
by <xsl:apply-templates select="author"/>
<!-- at <xsl:apply-templates select="date"/> -->
<pre><xsl:apply-templates select="msg"/></pre>
</li>
</xsl:template>
<xsl:template match="log">
<h2><a id="cvsinfo">Recent Changes</a></h2>
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="date">
<xsl:value-of select="substring-before(., '.')"/>
</xsl:template>
</xsl:stylesheet>
--
tamo