[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Use of revision
On 2011-08-17 , at 23:13:37, Stefan Seefeld wrote:
> The specification has a version / revision number, and also tracks
> changes. It seems natural to use the "revision" / "revhistory" for those
> two. However, there are some (minor) issues:
>
> 1) How can I identify the current revision of the document ? The
> revision element is only allowed inside a revhistory, but the ordering
> of revisions within revhistory is unspecified.
>
> 2) What is the appropriate way to include the revision in the title ?
> (I'm a little confused here, as I have found the standard
> fo/titlepage.templates.xsl file from xsl-docbook 1.76.1 to refer to an
> "info/revision" element in its "set.titlepage.recto" template, yet the
> documentation in http://docbook.org/tdg51/en/html/revision.html doesn't
> allow "revision" to appear in any "info" element.
I put the edition and the revision (version) information on the copyright page instead of the title page. Here's how I did it for EPUB:
<!-- ============ -->
<!-- DocBook text -->
<!-- ============ -->
...
<chapter
role = "NotInToc"
version = "5.1"
xml:lang = "en"
xmlns = "http://docbook.org/ns/docbook"
xmlns:xlink = "http://www.w3.org/1999/xlink">
<?dbhtml filename="copyright.xhtml" ?>
<title/>
<info role="copyright">
...
<edition role="simple">
Apple iBooks edition
</edition>
<revhistory>
<revision>
<revnumber>1.0.0</revnumber>
<date>2011-08-31</date>
<authorinitials>wrg</authorinitials>
<revremark>First release to iBookstore</revremark>
</revision>
</revhistory>
</info>
...
</chapter>
<!-- ========== -->
<!-- XSLT text -->
<!-- ========== -->
...
<!-- Override template in xhtml-1_1/titlepage.templates.xsl: -->
<xsl:template match="d:chapter/d:info[@role = 'copyright']">
<div class="center">
...
<div>
<xsl:apply-templates select="d:edition[@role = 'simple']"/>
</div>
<div>
<xsl:text>Version </xsl:text>
<xsl:apply-templates select="d:revhistory/d:revision/d:revnumber"/>
<xsl:text>, </xsl:text>
<xsl:apply-templates select="d:revhistory/d:revision/d:date"/>
</div>
...
</div>
</xsl:template>
Hope this helps.
-- Bill Greene
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]