diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 19:43:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 19:44:49 (GMT) |
commit | 3afa4f741c26360245dc313bc368f508b26a6b96 (patch) | |
tree | 4fc9fedac990a099010fed8a4ee09ddc51c21cc5 /3rdParty/DocBook/XSL/params/use.role.as.xrefstyle.xml | |
parent | 7548dabae7d10e48816142e508be651ada9f7bc3 (diff) | |
download | swift-contrib-3afa4f741c26360245dc313bc368f508b26a6b96.zip swift-contrib-3afa4f741c26360245dc313bc368f508b26a6b96.tar.bz2 |
Added DocBook infrastructure.
Imported most of "DocBook kit".
Added placeholder for Swiften developers guide.
Diffstat (limited to '3rdParty/DocBook/XSL/params/use.role.as.xrefstyle.xml')
-rw-r--r-- | 3rdParty/DocBook/XSL/params/use.role.as.xrefstyle.xml | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/3rdParty/DocBook/XSL/params/use.role.as.xrefstyle.xml b/3rdParty/DocBook/XSL/params/use.role.as.xrefstyle.xml new file mode 100644 index 0000000..56c4470 --- /dev/null +++ b/3rdParty/DocBook/XSL/params/use.role.as.xrefstyle.xml @@ -0,0 +1,93 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="use.role.as.xrefstyle"> +<refmeta> +<refentrytitle>use.role.as.xrefstyle</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.role.as.xrefstyle</refname> +<refpurpose>Use <tag class="attribute">role</tag> attribute for +<tag class="attribute">xrefstyle</tag> on <tag>xref</tag>?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="use.role.as.xrefstyle.frag"> +<xsl:param name="use.role.as.xrefstyle" select="1"/> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> + +<para>In DocBook documents that conform to a schema older than V4.3, this parameter allows +<tag class="attribute">role</tag> to serve the purpose of specifying the cross reference style.</para> + +<para>If non-zero, the <tag class="attribute">role</tag> attribute on +<tag>xref</tag> will be used to select the cross reference style. +In DocBook V4.3, the <tag class="attribute">xrefstyle</tag> attribute was added for this purpose. +If the <tag class="attribute">xrefstyle</tag> attribute is present, +<tag class="attribute">role</tag> will be ignored, regardless of the setting +of this parameter.</para> + +</refsection> + +<refsection><info><title>Example</title></info> + +<para>The following small stylesheet shows how to configure the +stylesheets to make use of the cross reference style:</para> + +<programlisting><?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + +<xsl:import href="../xsl/html/docbook.xsl"/> + +<xsl:output method="html"/> + +<xsl:param name="local.l10n.xml" select="document('')"/> +<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> + <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"> + <l:context name="xref"> + <l:template name="chapter" style="title" text="Chapter %n, %t"/> + <l:template name="chapter" text="Chapter %n"/> + </l:context> + </l:l10n> +</l:i18n> + +</xsl:stylesheet></programlisting> + +<para>With this stylesheet, the cross references in the following document:</para> + +<programlisting><?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<book id="book"><title>Book</title> + +<preface> +<title>Preface</title> + +<para>Normal: <xref linkend="ch1"/>.</para> +<para>Title: <xref xrefstyle="title" linkend="ch1"/>.</para> + +</preface> + +<chapter id="ch1"> +<title>First Chapter</title> + +<para>Irrelevant.</para> + +</chapter> +</book></programlisting> + +<para>will appear as:</para> + +<informalexample> +<para>Normal: Chapter 1.</para> +<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para> +</informalexample> +</refsection> + +</refentry> |