This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: CVS (Was Re: A perspective on DocBook and DSSSL)
- To: Dan York <dyork at e-smith dot com>
- Subject: Re: CVS (Was Re: DOCBOOK-APPS: A perspective on DocBook and DSSSL)
- From: Ramon Casellas <casellas at infres dot enst dot fr>
- Date: Thu, 19 Apr 2001 16:35:57 +0200 (MEST)
- Cc: Peter Eisentraut <peter_e at gmx dot net>, Richard Sharpe <sharpe at ns dot aus dot com>,docbook-apps at lists dot oasis-open dot org
On Wed, 18 Apr 2001, Dan York wrote:
> > <date><?cvsdate value="$Date$"></date>
That's what I am currently implementing in the DB2LaTeX stylesheets...
doc.xml
--------------
<doc>
<?cvs $Id: abstract.mod.xsl,v 1.3 2001/04/16 16:02:37 rcasellas Exp $ ?>
<?cvs $Author: rcasellas $ ?>
<?cvs $Revision: 1.3 $ ?>
</doc>
doc.xsl
--------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml"/>
<xsl:template match="doc">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="processing-instruction('cvs')">
<xsl:choose>
<xsl:when test="contains(.,'Author')">
<xsl:element name="theauthor">
<xsl:value-of select="substring-after(substring-before(.,' $'),'$Author: ')"/>
</xsl:element>
</xsl:when>
<xsl:when test="contains(.,'Id:')">
<xsl:element name="theId">
<xsl:value-of select="substring-after(substring-before(.,'$'),'$Id: ')"/>
</xsl:element>
</xsl:when>
<xsl:when test="contains(.,'Revision:')">
<xsl:element name="therevision">
<xsl:value-of select="substring-after(substring-before(.,'$'),'$Revision: ')"/>
</xsl:element>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
out.xml
---------
<?xml version="1.0" encoding="utf-8"?>
<theId>abstract.mod.xsl,v 1.3 2001/04/16 16:02:37 rcasellas Exp</theId>
<theauthor>rcasellas</theauthor>
<therevision>1.3</therevision>
Hope this helps
Regards
R.
// Ramon Casellas GET/ENST/INFRES/RHD/C206
// http://db2latex.sourceforge.net
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org