This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CVS (Was Re: 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


------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]