OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: CVS (Was Re: DOCBOOK-APPS: A perspective on DocBook and DSSSL)


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



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC