VirtualBox

source: vbox/trunk/doc/manual/docbook-refentry-to-manpage.xsl@ 91991

Last change on this file since 91991 was 91217, checked in by vboxsync, 3 years ago

doc: Extract man page date from an *info/pubdate node
(cf. get.refentry.date). Detect and dissect RCS Date keyword.
bugref:9186

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1<?xml version="1.0"?>
2<!--
3 docbook-to-man.xsl:
4 XSLT stylesheet that renders a refentry into a troff manpage.
5
6 Copyright (C) 2006-2020 Oracle Corporation
7
8 This file is part of VirtualBox Open Source Edition (OSE), as
9 available from http://www.virtualbox.org. This file is free software;
10 you can redistribute it and/or modify it under the terms of the GNU
11 General Public License (GPL) as published by the Free Software
12 Foundation, in version 2 as it comes in the "COPYING" file of the
13 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15-->
16
17<xsl:stylesheet
18 version="1.0"
19 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
20
21 <xsl:import href="manpages/docbook.xsl"/>
22
23 <!--
24 <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
25 <xsl:strip-space elements="*"/>
26 -->
27
28 <!--
29 Extract manual's date from an *info/pubdate node (cf.
30 get.refentry.date). Detect RCS Date keyword.
31 -->
32 <xsl:template match="pubdate">
33 <xsl:choose>
34 <!-- careful with that keyword -->
35 <xsl:when test="starts-with(text(), concat('$', 'Date:'))">
36 <!-- Fetch the ISO 8601 date from inside -->
37 <xsl:value-of select="substring(text(), 8, 10)"/>
38 </xsl:when>
39 <xsl:otherwise>
40 <!-- Use as-is -->
41 <xsl:value-of select="text()"/>
42 </xsl:otherwise>
43 </xsl:choose>
44 </xsl:template>
45
46</xsl:stylesheet>
47
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette