|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
|
Packit Service |
76cb02 |
version="1.0">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:output encoding="UTF-8" indent="yes"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
the passed <informaltable>. This translation should be done only once
|
|
Packit Service |
76cb02 |
to migrate from manual v0.2.9 to manual v0.2.10 where each parameter is
|
|
Packit Service |
76cb02 |
described like the DocBook Project does, i.e. through refentries.
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
The default parameter reference tree is like this:
|
|
Packit Service |
76cb02 |
./ : where to store the refentry XML files built by this stylesheet
|
|
Packit Service |
76cb02 |
./syn : where to store the synopsis XML files built by another XSLT
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
Example of use in the tools/ dir to put param refentries in tools/params/:
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
xsltproc -+-stringparam ref.prefix params/ \
|
|
Packit Service |
76cb02 |
param2ref.xsl ../docs/custom/param.xml
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:param name="ref.prefix"></xsl:param>
|
|
Packit Service |
76cb02 |
<xsl:param name="syn.prefix">syn/</xsl:param>
|
|
Packit Service |
76cb02 |
<xsl:param name="syn.suffix">xml</xsl:param>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:include href="../xsl/chunker.xsl"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="/">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="//informaltable"/>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="informaltable">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="//tbody/row"/>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="row">
|
|
Packit Service |
76cb02 |
<xsl:variable name="param-name" select="entry[1]/text()"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="refentry">
|
|
Packit Service |
76cb02 |
<refentry id="{$param-name}">
|
|
Packit Service |
76cb02 |
<refmeta>
|
|
Packit Service |
76cb02 |
<refentrytitle>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$param-name"/>
|
|
Packit Service |
76cb02 |
</refentrytitle>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo>
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
</refmeta>
|
|
Packit Service |
76cb02 |
<refnamediv>
|
|
Packit Service |
76cb02 |
<refname><xsl:value-of select="$param-name"/></refname>
|
|
Packit Service |
76cb02 |
<refpurpose>???</refpurpose>
|
|
Packit Service |
76cb02 |
</refnamediv>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<refsynopsisdiv>
|
|
Packit Service |
76cb02 |
<programlisting>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
namespace="http://www.w3.org/2001/XInclude">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="parse">text</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="href">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
$syn.suffix)"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:element></programlisting>
|
|
Packit Service |
76cb02 |
</refsynopsisdiv>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<refsection><title>Description</title>
|
|
Packit Service |
76cb02 |
<para>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="entry[2]/node()" mode="copy"/>
|
|
Packit Service |
76cb02 |
</para>
|
|
Packit Service |
76cb02 |
</refsection>
|
|
Packit Service |
76cb02 |
</refentry>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="write.chunk">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="filename">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$ref.prefix"/>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$param-name"/>
|
|
Packit Service |
76cb02 |
<xsl:text>.xml</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:with-param>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="method" select="'xml'"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="'-//OASIS//DTD DocBook XML V4.4//EN'"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="'http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd'"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="encoding" select="$chunker.output.encoding"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="content" select="$refentry"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="indent" select="'yes'"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="*" mode="copy">
|
|
Packit Service |
76cb02 |
<xsl:copy-of select="."/>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:stylesheet>
|