High: doc: add man pages for all RAs (LF2237)

7 months ago

author
Florian Haas <florian.haas@linbit.com>
date
Sun Dec 06 22:23:20 2009 +0100
changeset 1555
f9b41ad72775
parent 1554
65c6c25a9728
child 1556
5ac4a0adf8d9

High: doc: add man pages for all RAs (LF2237)

This adds a facility to create man pages from the resource agent
metadata. The man pages list the RA description, supported parameters
(with descriptions and defaults), and supported actions (with
defaults). They also provide example configurations for the CRM shell.

Since the man pages are generated via DocBook XML, the intermediate
XML files may also be used for HTML and PDF documentation.

ra2refentry.xsl script adapted from Dejan's original effort in the
now-abandoned pacemaker-doc repository.

This fixes LF bug 2237.

Makefile.am file | annotate | diff | revisions
configure.in file | annotate | diff | revisions
doc/Makefile.am file | annotate | diff | revisions
doc/mkappendix.sh file | annotate | diff | revisions
doc/ra2refentry.xsl file | annotate | diff | revisions
doc/ralist.sh file | annotate | diff | revisions
     1.1 --- a/Makefile.am	Sat Dec 05 12:34:59 2009 +0100
     1.2 +++ b/Makefile.am	Sun Dec 06 22:23:20 2009 +0100
     1.3 @@ -19,7 +19,7 @@
     1.4  MAINTAINERCLEANFILES    = Makefile.in aclocal.m4 configure DRF/config-h.in \
     1.5                          DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar
     1.6  
     1.7 -SUBDIRS	= heartbeat tools ldirectord
     1.8 +SUBDIRS	= heartbeat tools ldirectord doc
     1.9  
    1.10  dist-clean-local:
    1.11  	rm -f autoconf automake autoheader $(TARFILE)
     2.1 --- a/configure.in	Sat Dec 05 12:34:59 2009 +0100
     2.2 +++ b/configure.in	Sun Dec 06 22:23:20 2009 +0100
     2.3 @@ -475,6 +475,9 @@
     2.4  AC_DEFINE_UNQUOTED(POWEROFF_CMD, "$POWEROFF_CMD", path to the poweroff command)
     2.5  AC_DEFINE_UNQUOTED(POWEROFF_OPTIONS, "$POWEROFF_OPTIONS", poweroff options)
     2.6  
     2.7 +AC_PATH_PROGS(XSLTPROC, xsltproc)
     2.8 +AC_SUBST(XSLTPROC)
     2.9 +
    2.10  dnl ========================================================================
    2.11  dnl Functions
    2.12  dnl ========================================================================
    2.13 @@ -742,6 +745,7 @@
    2.14  	ldirectord/logrotate.d/Makefile				\
    2.15  	ldirectord/OCF/Makefile					\
    2.16  	ldirectord/OCF/ldirectord				\
    2.17 +doc/Makefile							\
    2.18  		)
    2.19  
    2.20  dnl Now process the entire list of files added by previous 
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/doc/Makefile.am	Sun Dec 06 22:23:20 2009 +0100
     3.3 @@ -0,0 +1,140 @@
     3.4 +#
     3.5 +# doc: Linux-HA resource agents
     3.6 +#
     3.7 +# Copyright (C) 2009 Florian Haas
     3.8 +#
     3.9 +# This program is free software; you can redistribute it and/or
    3.10 +# modify it under the terms of the GNU General Public License
    3.11 +# as published by the Free Software Foundation; either version 2
    3.12 +# of the License, or (at your option) any later version.
    3.13 +# 
    3.14 +# This program is distributed in the hope that it will be useful,
    3.15 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.16 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.17 +# GNU General Public License for more details.
    3.18 +# 
    3.19 +# You should have received a copy of the GNU General Public License
    3.20 +# along with this program; if not, write to the Free Software
    3.21 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    3.22 +#
    3.23 +
    3.24 +# Please note: we can't name the man pages
    3.25 +# ocf:heartbeat:<name>. Believe me, I've tried. It looks like it
    3.26 +# works, but then it doesn't. While make can deal correctly with
    3.27 +# colons in target names (when properly escaped), it royally messes up
    3.28 +# when it is deals with _dependencies_ that contain colons. See Bug
    3.29 +# 12126 on savannah.gnu.org. But, maybe it gets fixed soon, it was
    3.30 +# first reported in 1995 and added to Savannah in in 2005...
    3.31 +MAINTAINERCLEANFILES    = Makefile.in *.xml
    3.32 +
    3.33 +radir			= ../heartbeat
    3.34 +
    3.35 +CLEANFILES              = $(man_MANS) $(xmlfiles) metadata-*.xml
    3.36 +
    3.37 +# TODO: add README and license files
    3.38 +doc_DATA		=
    3.39 +
    3.40 +man_MANS		= ocf_heartbeat_AoEtarget.7 \
    3.41 +                          ocf_heartbeat_AudibleAlarm.7 \
    3.42 +                          ocf_heartbeat_ClusterMon.7 \
    3.43 +                          ocf_heartbeat_Delay.7 \
    3.44 +                          ocf_heartbeat_Dummy.7 \
    3.45 +                          ocf_heartbeat_EvmsSCC.7 \
    3.46 +                          ocf_heartbeat_Evmsd.7 \
    3.47 +                          ocf_heartbeat_Filesystem.7 \
    3.48 +                          ocf_heartbeat_ICP.7 \
    3.49 +                          ocf_heartbeat_IPaddr.7 \
    3.50 +                          ocf_heartbeat_IPaddr2.7 \
    3.51 +                          ocf_heartbeat_IPsrcaddr.7 \
    3.52 +                          ocf_heartbeat_IPv6addr.7 \
    3.53 +                          ocf_heartbeat_LVM.7 \
    3.54 +                          ocf_heartbeat_LinuxSCSI.7 \
    3.55 +                          ocf_heartbeat_MailTo.7 \
    3.56 +                          ocf_heartbeat_ManageRAID.7 \
    3.57 +                          ocf_heartbeat_ManageVE.7 \
    3.58 +                          ocf_heartbeat_Pure-FTPd.7 \
    3.59 +                          ocf_heartbeat_Raid1.7 \
    3.60 +                          ocf_heartbeat_Route.7 \
    3.61 +                          ocf_heartbeat_SAPDatabase.7 \
    3.62 +                          ocf_heartbeat_SAPInstance.7 \
    3.63 +                          ocf_heartbeat_SendArp.7 \
    3.64 +                          ocf_heartbeat_ServeRAID.7 \
    3.65 +                          ocf_heartbeat_SphinxSearchDaemon.7 \
    3.66 +                          ocf_heartbeat_Squid.7 \
    3.67 +                          ocf_heartbeat_Stateful.7 \
    3.68 +                          ocf_heartbeat_SysInfo.7 \
    3.69 +                          ocf_heartbeat_VIPArip.7 \
    3.70 +                          ocf_heartbeat_VirtualDomain.7 \
    3.71 +                          ocf_heartbeat_WAS.7 \
    3.72 +                          ocf_heartbeat_WAS6.7 \
    3.73 +                          ocf_heartbeat_WinPopup.7 \
    3.74 +                          ocf_heartbeat_Xen.7 \
    3.75 +                          ocf_heartbeat_Xinetd.7 \
    3.76 +                          ocf_heartbeat_anything.7 \
    3.77 +                          ocf_heartbeat_apache.7 \
    3.78 +                          ocf_heartbeat_db2.7 \
    3.79 +                          ocf_heartbeat_drbd.7 \
    3.80 +                          ocf_heartbeat_eDir88.7 \
    3.81 +                          ocf_heartbeat_iSCSILogicalUnit.7 \
    3.82 +                          ocf_heartbeat_iSCSITarget.7 \
    3.83 +                          ocf_heartbeat_ids.7 \
    3.84 +                          ocf_heartbeat_iscsi.7 \
    3.85 +                          ocf_heartbeat_jboss.7 \
    3.86 +                          ocf_heartbeat_mysql.7 \
    3.87 +                          ocf_heartbeat_mysql-proxy.7 \
    3.88 +                          ocf_heartbeat_nfsserver.7 \
    3.89 +                          ocf_heartbeat_oracle.7 \
    3.90 +                          ocf_heartbeat_oralsnr.7 \
    3.91 +                          ocf_heartbeat_pgsql.7 \
    3.92 +                          ocf_heartbeat_pingd.7 \
    3.93 +                          ocf_heartbeat_portblock.7 \
    3.94 +                          ocf_heartbeat_postfix.7 \
    3.95 +                          ocf_heartbeat_rsyncd.7 \
    3.96 +                          ocf_heartbeat_scsi2reservation.7 \
    3.97 +                          ocf_heartbeat_sfex.7 \
    3.98 +                          ocf_heartbeat_syslog-ng.7 \
    3.99 +                          ocf_heartbeat_tomcat.7 \
   3.100 +                          ocf_heartbeat_vmware.7
   3.101 +
   3.102 +xmlfiles		= $(man_MANS:.7=.xml)
   3.103 +
   3.104 +STYLESHEET_PREFIX 	?= http://docbook.sourceforge.net/release/xsl/current
   3.105 +MANPAGES_STYLESHEET 	?= $(STYLESHEET_PREFIX)/manpages/docbook.xsl
   3.106 +HTML_STYLESHEET 	?= $(STYLESHEET_PREFIX)/xhtml/docbook.xsl
   3.107 +FO_STYLESHEET 		?= $(STYLESHEET_PREFIX)/fo/docbook.xsl
   3.108 +REFENTRY_STYLESHEET	?= ra2refentry.xsl
   3.109 +
   3.110 +XSLTPROC_OPTIONS 	?= --xinclude
   3.111 +XSLTPROC_MANPAGES_OPTIONS ?= $(XSLTPROC_OPTIONS)
   3.112 +XSLTPROC_HTML_OPTIONS 	?= $(XSLTPROC_OPTIONS)
   3.113 +XSLTPROC_FO_OPTIONS 	?= $(XSLTPROC_OPTIONS)
   3.114 +
   3.115 +EXTRA_DIST = $(man_MANS) $(doc_DATA)
   3.116 +
   3.117 +%.1 %.5 %.7 %.8: %.xml
   3.118 +	$(XSLTPROC) \
   3.119 +	$(XSLTPROC_MANPAGES_OPTIONS) \
   3.120 +	$(MANPAGES_STYLESHEET) $<
   3.121 +
   3.122 +# OCF_ROOT=. is necessary due to a sanity check in .ocf-shellfuncs
   3.123 +# (which tests whether $OCF_ROOT points to a directory
   3.124 +metadata-%.xml: $(radir)/%
   3.125 +	OCF_ROOT=. OCF_FUNCTIONS_DIR=$(radir) $< meta-data > $@
   3.126 +
   3.127 +ocf_heartbeat_%.xml: metadata-%.xml $(REFENTRY_STYLESHEET)
   3.128 +	$(XSLTPROC) --novalid \
   3.129 +	--stringparam package $(PACKAGE_NAME) \
   3.130 +	--stringparam version $(VERSION) \
   3.131 +	--output $@ \
   3.132 +	$(REFENTRY_STYLESHEET) $<
   3.133 +
   3.134 +ocf_resource_agents.xml: $(xmlfiles)
   3.135 +	./mkappendix.sh $(xmlfiles) > $@
   3.136 +
   3.137 +%.html: %.xml
   3.138 +	$(XSLTPROC) \
   3.139 +	$(XSLTPROC_HTML_OPTIONS) \
   3.140 +	--output $@ \
   3.141 +	$(HTML_STYLESHEET) $<
   3.142 +
   3.143 +xml: $(xmlfiles)
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/doc/mkappendix.sh	Sun Dec 06 22:23:20 2009 +0100
     4.3 @@ -0,0 +1,18 @@
     4.4 +#!/bin/sh
     4.5 +
     4.6 +cat <<EOF
     4.7 +<?xml version='1.0' encoding='utf-8' ?>
     4.8 +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
     4.9 +<appendix id="ap-ra-man-pages">
    4.10 +  <title>Resource agent manual pages</title>
    4.11 +EOF
    4.12 +
    4.13 +for manpage in $@; do
    4.14 +    cat <<EOF
    4.15 +  <xi:include href="./$manpage" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    4.16 +EOF
    4.17 +done
    4.18 +
    4.19 +cat <<EOF
    4.20 +</appendix>
    4.21 +EOF
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/doc/ra2refentry.xsl	Sun Dec 06 22:23:20 2009 +0100
     5.3 @@ -0,0 +1,283 @@
     5.4 +<?xml version="1.0" encoding="UTF-8"?>
     5.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     5.6 + version="1.0">
     5.7 +
     5.8 + <xsl:output indent="yes"
     5.9 +             doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
    5.10 +             doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
    5.11 +
    5.12 + <!--<xsl:strip-space elements="longdesc shortdesc"/>-->
    5.13 +
    5.14 + <!-- Package name. -->
    5.15 + <xsl:param name="package">resource-agents</xsl:param>
    5.16 +
    5.17 + <!-- Package version number. Must be passed in. -->
    5.18 + <xsl:param name="version"/>
    5.19 +
    5.20 + <!-- RA class -->
    5.21 + <xsl:param name="class">ocf</xsl:param>
    5.22 +
    5.23 + <!-- RA provider -->
    5.24 + <xsl:param name="provider">heartbeat</xsl:param>
    5.25 +
    5.26 + <!-- Man volume number -->
    5.27 + <xsl:param name="manvolum">7</xsl:param>
    5.28 +
    5.29 + <!--  -->
    5.30 + <xsl:param name="variable.prefix"/>
    5.31 +
    5.32 + <!-- Separator between different action/@name -->
    5.33 + <xsl:param name="separator"> | </xsl:param>
    5.34 +
    5.35 + <xsl:variable name="manpagetitleprefix"><xsl:value-of select="$class"/>_<xsl:value-of select="$provider"/>_</xsl:variable>
    5.36 +
    5.37 + <xsl:template match="/">
    5.38 +  <refentry>
    5.39 +   <xsl:apply-templates mode="root"/>
    5.40 +  </refentry>
    5.41 + </xsl:template>
    5.42 +
    5.43 + <xsl:template match="resource-agent" mode="root">
    5.44 +  <xsl:param name="this" select="self::resource-agent"/>
    5.45 +  <xsl:apply-templates select="$this" mode="refentryinfo"/>
    5.46 +  <xsl:apply-templates select="$this" mode="refmeta"/>
    5.47 +  <xsl:apply-templates select="$this" mode="refnamediv"/>   
    5.48 +  <xsl:apply-templates select="$this" mode="synopsis"/>
    5.49 +  <xsl:apply-templates select="$this" mode="description"/>
    5.50 +  <xsl:apply-templates select="$this" mode="parameters"/>
    5.51 +  <xsl:apply-templates select="$this" mode="example"/>
    5.52 + </xsl:template>
    5.53 +
    5.54 +
    5.55 + <!-- Empty Templates -->
    5.56 + <xsl:template match="node()" mode="root"/>
    5.57 + <xsl:template match="*" mode="refmeta"/>
    5.58 + <xsl:template match="*" mode="refnamediv"/>
    5.59 +
    5.60 + <xsl:template match="*" mode="synopsis"/>
    5.61 + <xsl:template match="*" mode="description"/>
    5.62 + <xsl:template match="*" mode="parameters"/>
    5.63 +
    5.64 + <!-- Mode refentryinfo -->
    5.65 + <xsl:template match="resource-agent" mode="refentryinfo">
    5.66 +   <refentryinfo>
    5.67 +     <productname><xsl:value-of select="$package"/></productname>
    5.68 +     <productnumber><xsl:value-of select="$version"/></productnumber>
    5.69 +     <corpauthor>Linux-HA contributors (see the resource agent source for information about individual authors)</corpauthor>
    5.70 +   </refentryinfo>
    5.71 + </xsl:template>
    5.72 +
    5.73 + <!-- Mode refmeta -->
    5.74 + <xsl:template match="resource-agent" mode="refmeta">
    5.75 +  <refmeta>
    5.76 +    <refentrytitle><xsl:value-of select="$manpagetitleprefix"/><xsl:value-of select="@name"/></refentrytitle>
    5.77 +    <manvolnum><xsl:value-of select="$manvolum"/></manvolnum>
    5.78 +    <refmiscinfo class="manual">OCF resource agents</refmiscinfo>
    5.79 +  </refmeta>
    5.80 + </xsl:template>
    5.81 +
    5.82 + <!-- Mode refnamediv -->
    5.83 + <xsl:template match="resource-agent" mode="refnamediv">
    5.84 +  <refnamediv>
    5.85 +    <refname><xsl:value-of select="$manpagetitleprefix"/><xsl:value-of select="@name"/></refname>
    5.86 +    <refpurpose><xsl:apply-templates select="shortdesc"/></refpurpose>
    5.87 +  </refnamediv>
    5.88 + </xsl:template>
    5.89 +
    5.90 +
    5.91 + <!-- Mode synopsis -->
    5.92 + <xsl:template match="resource-agent" mode="synopsis">
    5.93 +   <refsynopsisdiv>
    5.94 +     <cmdsynopsis sepchar=" ">
    5.95 +       <command moreinfo="none">
    5.96 +	 <xsl:value-of select="@name"/>
    5.97 +       </command>
    5.98 +       <xsl:apply-templates select="actions" mode="synopsis"/>
    5.99 +     </cmdsynopsis>
   5.100 +   </refsynopsisdiv>
   5.101 + </xsl:template>
   5.102 +
   5.103 + <xsl:template match="actions" mode="synopsis">
   5.104 +   <group choice="opt" rep="norepeat">
   5.105 +     <xsl:apply-templates select="action" mode="synopsis"/>
   5.106 +   </group>
   5.107 + </xsl:template>
   5.108 +
   5.109 + <xsl:template match="action" mode="synopsis">
   5.110 +   <arg choice="plain" rep="norepeat">
   5.111 +     <xsl:value-of select="@name"/>
   5.112 +    </arg>
   5.113 + </xsl:template>
   5.114 +
   5.115 +
   5.116 + <!-- Mode Description --> 
   5.117 + <xsl:template match="resource-agent" mode="description">
   5.118 +    <refsection>
   5.119 +      <title>Description</title>
   5.120 +      <xsl:apply-templates mode="description"/>
   5.121 +    </refsection>
   5.122 +    </xsl:template>
   5.123 +
   5.124 +  <xsl:template match="longdesc" mode="description">
   5.125 +    <para>
   5.126 +     <xsl:apply-templates mode="description"/>
   5.127 +    </para>
   5.128 +  </xsl:template>
   5.129 +
   5.130 +
   5.131 +  <!-- Mode Parameters -->
   5.132 +  <xsl:template match="resource-agent" mode="parameters">
   5.133 +    <refsection>
   5.134 +      <title>Supported Parameters</title>
   5.135 +      <xsl:choose>
   5.136 +	<xsl:when test="parameters">
   5.137 +	  <xsl:apply-templates mode="parameters"/>
   5.138 +	</xsl:when>
   5.139 +	<xsl:otherwise>
   5.140 +	  <para>
   5.141 +	    <xsl:text>This resource agent does not support any parameters.</xsl:text>
   5.142 +	  </para>
   5.143 +	</xsl:otherwise>
   5.144 +      </xsl:choose>
   5.145 +    </refsection>
   5.146 +  </xsl:template>
   5.147 +
   5.148 +  <xsl:template match="resource-agent/shortdesc|resource-agent/longdesc" mode="parameters"/>
   5.149 +
   5.150 +  <xsl:template match="parameters" mode="parameters">
   5.151 +    <variablelist>
   5.152 +      <xsl:apply-templates mode="parameters"/>
   5.153 +    </variablelist>
   5.154 +  </xsl:template>
   5.155 +  
   5.156 +  
   5.157 +  <xsl:template match="parameter" mode="parameters">
   5.158 +   <varlistentry>
   5.159 +    <term>
   5.160 +      <option><xsl:value-of select="concat($variable.prefix, @name)"/></option>
   5.161 +    </term>
   5.162 +    <listitem>
   5.163 +      <para>
   5.164 +	<xsl:apply-templates select="longdesc" mode="parameters"/>
   5.165 +	<xsl:apply-templates select="content" mode="parameters"/>
   5.166 +      </para>
   5.167 +    </listitem>
   5.168 +   </varlistentry>
   5.169 +  </xsl:template>
   5.170 +  
   5.171 +  <xsl:template match="longdesc" mode="parameters">
   5.172 +    <xsl:apply-templates select="text()" mode="parameters"/>
   5.173 +  </xsl:template>
   5.174 +  
   5.175 +  <xsl:template match="shortdesc" mode="parameters">
   5.176 +    <xsl:apply-templates select="text()" mode="parameters"/>
   5.177 +  </xsl:template>
   5.178 +  
   5.179 +  <xsl:template match="content" mode="parameters">
   5.180 +    <xsl:if test="@type != '' or @default != ''">
   5.181 +      <xsl:text>(</xsl:text>
   5.182 +      <xsl:if test="@type != ''">
   5.183 +	<xsl:value-of select="@type"/>
   5.184 +	<xsl:text>, </xsl:text>
   5.185 +      </xsl:if>
   5.186 +      <xsl:choose>
   5.187 +	  <xsl:when test="@default != ''">
   5.188 +	    <xsl:text>default </xsl:text>
   5.189 +	    <xsl:value-of select="@default"/>
   5.190 +	  </xsl:when>
   5.191 +	  <xsl:otherwise>
   5.192 +	    <xsl:text>no default</xsl:text>
   5.193 +	  </xsl:otherwise>
   5.194 +      </xsl:choose>
   5.195 +      <xsl:text>)</xsl:text>
   5.196 +    </xsl:if>
   5.197 +  </xsl:template>
   5.198 +
   5.199 +
   5.200 +  <!-- Mode Example -->
   5.201 +  <xsl:template match="resource-agent" mode="example">
   5.202 +    <refsection>
   5.203 +      <title>Example</title>
   5.204 +      <para>
   5.205 +	<xsl:text>The following is an example configuration for a </xsl:text>
   5.206 +	<xsl:value-of select="@name"/>
   5.207 +	<xsl:text> resource using the </xsl:text>
   5.208 +	<citerefentry><refentrytitle>crm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
   5.209 +	<xsl:text> shell:</xsl:text>
   5.210 +      </para>
   5.211 +      <programlisting>
   5.212 +	<xsl:text>primitive example_</xsl:text>
   5.213 +	<xsl:value-of select="@name"/>
   5.214 +	<xsl:text> </xsl:text>
   5.215 +	<xsl:value-of select="$class"/>
   5.216 +	<xsl:text>:</xsl:text>
   5.217 +	<xsl:value-of select="$provider"/>
   5.218 +	<xsl:text>:</xsl:text>
   5.219 +	<xsl:value-of select="@name"/>
   5.220 +	<xsl:text> \
   5.221 +</xsl:text>
   5.222 +	<xsl:text>  params \
   5.223 +</xsl:text>
   5.224 +	<xsl:apply-templates select="parameters" mode="example"/>
   5.225 +	<xsl:apply-templates select="actions" mode="example"/>
   5.226 +      </programlisting>
   5.227 +    </refsection>
   5.228 +  </xsl:template>
   5.229 +
   5.230 +  <!--xsl:template match="parameters" mode="example">
   5.231 +    <xsl:apply-templates mode="example"/>
   5.232 +  </xsl:template-->
   5.233 +  
   5.234 +  <xsl:template match="parameter" mode="example">
   5.235 +    <xsl:text>    </xsl:text>
   5.236 +    <xsl:value-of select="@name"/>
   5.237 +    <xsl:text>=</xsl:text>
   5.238 +    <xsl:apply-templates select="content" mode="example"/>
   5.239 +    <xsl:text> \
   5.240 +</xsl:text>
   5.241 +  </xsl:template>
   5.242 +
   5.243 +  <xsl:template match="content" mode="example">
   5.244 +    <xsl:choose>
   5.245 +      <xsl:when test="@default != ''">
   5.246 +	<xsl:value-of select="@default"/>
   5.247 +      </xsl:when>
   5.248 +      <xsl:otherwise>
   5.249 +	<replaceable><xsl:value-of select="@type"/></replaceable>
   5.250 +      </xsl:otherwise>
   5.251 +    </xsl:choose>
   5.252 +  </xsl:template>
   5.253 +
   5.254 +  <xsl:template match="actions" mode="example">
   5.255 +    <xsl:apply-templates mode="example"/>
   5.256 +  </xsl:template>
   5.257 +
   5.258 +  <xsl:template match="action" mode="example">
   5.259 +    <xsl:text>  op </xsl:text>
   5.260 +    <xsl:value-of select="@name"/>
   5.261 +    <xsl:text> </xsl:text>
   5.262 +    <xsl:apply-templates select="@*" mode="example"/>
   5.263 +    <xsl:if test="following-sibling::*">
   5.264 +      <xsl:text> \</xsl:text>
   5.265 +    </xsl:if>
   5.266 +  </xsl:template>
   5.267 +
   5.268 +  <xsl:template match="action/@*" mode="example">
   5.269 +    <xsl:choose>
   5.270 +      <xsl:when test="name() = 'name'"/>
   5.271 +      <xsl:otherwise>
   5.272 +	<xsl:value-of select="name()"/>
   5.273 +	<xsl:text>=</xsl:text>
   5.274 +	<xsl:value-of select="current()"/>
   5.275 +	<xsl:text> </xsl:text>
   5.276 +      </xsl:otherwise>
   5.277 +    </xsl:choose>
   5.278 +    <xsl:if test="following-sibling::*">
   5.279 +      <xsl:text> </xsl:text>
   5.280 +    </xsl:if>
   5.281 +  </xsl:template>
   5.282 +
   5.283 +  <xsl:template match="longdesc" mode="example"/>
   5.284 +
   5.285 +  <xsl:template match="shortdesc" mode="example"/>
   5.286 +</xsl:stylesheet>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/doc/ralist.sh	Sun Dec 06 22:23:20 2009 +0100
     6.3 @@ -0,0 +1,9 @@
     6.4 +#!/bin/sh
     6.5 +
     6.6 +RADIR=$1
     6.7 +PREFIX=$2
     6.8 +SUFFIX=$3
     6.9 +
    6.10 +for f in `find $RADIR -type f -executable`; do
    6.11 +    echo ${PREFIX}`basename $f`${SUFFIX}
    6.12 +done

mercurial