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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: DOCBOOK: Including OS Version information on DocBook elements


If you keep your version numbers 'cleanish' so that
xslt can use them, then it will handle various constructs
to keep the output 'clean' to a version.
Example below.

HTH DaveP

<document>
<title>Here goes the title</title>
<sect>
<vsn>rev2.1</vsn>
  </sect>

<sect>
<vsn>rev2.2</vsn>
  </sect>
</document>

 <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="text"/>
   <xsl:template match="document">

     <xsl:variable name="rev1"
select="number(substring-after(sect[1]/vsn,'rev'))"/>
     <xsl:variable name="rev2"
select="number(substring-after(sect[2]/vsn,'rev'))"/>

     <xsl:if test="$rev2 > $rev1">
       <xsl:value-of select="$rev1"/>
        <xsl:value-of select="$rev2"/>
       <xsl:text>Rev 2 greater than rev 1</xsl:text>
     </xsl:if>

   </xsl:template>

</xsl:stylesheet>



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


Powered by eList eXpress LLC