Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 0577d24a2237617ff09bd0e03e449a74 > files > 277

docbook-style-xsl-doc-1.60.1-2mdk.noarch.rpm

<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>use.role.as.xrefstyle</title><link rel="stylesheet" href="../ref.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.0"><link rel="home" href="index.html" title="FO Parameter Reference"><link rel="up" href="rn15.html" title="Miscellaneous"><link rel="previous" href="use.svg.html" title="use.svg"><link rel="next" href="menuchoice.separator.html" title="menuchoice.separator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">use.role.as.xrefstyle</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="use.svg.html">Prev</a>&nbsp;</td><th width="60%" align="center">Miscellaneous</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="menuchoice.separator.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="use.role.as.xrefstyle"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>use.role.as.xrefstyle &#8212; Use <tt class="sgmltag-attribute">role</tt> attribute for
<tt class="sgmltag-attribute">xrefstyle</tt> on <a href="http://docbook.org/tdg/en/html/xref.html"><tt class="sgmltag-element">xref</tt></a>?</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a name="use.role.as.xrefstyle.frag"></a><table border="1" width="100%"><tr><td><p><b>&sect;100</b>: <a href="#top">&sect;199</a></p></td></tr><tr><td><pre class="src:fragment">&nbsp;&nbsp;1| &lt;xsl:param name="use.role.as.xrefstyle"
&nbsp;&nbsp;2|            select="1"/&gt;</pre></td></tr></table></div><div class="refsect1" lang="en"><h2>Description</h2><p>If non-zero, the <tt class="sgmltag-attribute">role</tt> attribute on
<a href="http://docbook.org/tdg/en/html/xref.html"><tt class="sgmltag-element">xref</tt></a> will be used to select the cross reference style.
The <a href="http://www.oasis-open.org/docbook/" target="_top">DocBook
Technical Committee</a> recently added an
<tt class="sgmltag-attribute">xrefstyle</tt> attribute for this purpose.
If the <tt class="sgmltag-attribute">xrefstyle</tt> attribute
is present, <tt class="sgmltag-attribute">role</tt> will be ignored, regardless
of this setting.</p><p>Until an official DocBook release that includes the new
attribute, this flag allows <tt class="sgmltag-attribute">role</tt>
to serve that purpose.</p></div><div class="refsect1" lang="en"><h2>Example</h2><p>The following small stylesheet shows how to configure the stylesheets to make
use of the cross reference style:</p><pre class="programlisting">&lt;?xml version="1.0"?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"&gt;

&lt;xsl:import href="../xsl/html/docbook.xsl"/&gt;

&lt;xsl:output method="html"/&gt;

&lt;xsl:param name="local.l10n.xml" select="document('')"/&gt;
&lt;l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"&gt;
  &lt;l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"&gt;
   &lt;l:context name="xref"&gt;
      &lt;l:template name="chapter" style="title" text="Chapter %n, %t"/&gt;
      &lt;l:template name="chapter" text="Chapter %n"/&gt;
    &lt;/l:context&gt;
  &lt;/l:l10n&gt;
&lt;/l:i18n&gt;

&lt;/xsl:stylesheet&gt;</pre><p>With this stylesheet, the cross references in the following document:</p><pre class="programlisting">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
                  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"&gt;
&lt;book id="book"&gt;&lt;title&gt;Book&lt;/title&gt;

&lt;preface&gt;
&lt;title&gt;Preface&lt;/title&gt;

&lt;para&gt;Normal: &lt;xref linkend="ch1"/&gt;.&lt;/para&gt;
&lt;para&gt;Title: &lt;xref xrefstyle="title" linkend="ch1"/&gt;.&lt;/para&gt;

&lt;/preface&gt;

&lt;chapter id="ch1"&gt;
&lt;title&gt;First Chapter&lt;/title&gt;

&lt;para&gt;Irrelevant.&lt;/para&gt;

&lt;/chapter&gt;
&lt;/book&gt;</pre><p>will appear as:</p><div class="informalexample"><p>Normal: Chapter 1.</p><p>Title: Chapter 1, <span class="emphasis"><em>First Chapter</em></span>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="use.svg.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="rn15.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="menuchoice.separator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">use.svg&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;menuchoice.separator</td></tr></table></div></body></html>