1773
|
1 <html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Customization</title><meta content="DocBook XSL Stylesheets V1.65.1" name="generator"><link rel="home" href="index.html" title="html2db.xsl"><link rel="up" href="index.html" title="html2db.xsl"><link rel="previous" href="ar01s07.html" title="Specification"><link rel="next" href="ar01s09.html" title="FAQ"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Customization</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="ar01s07.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="ar01s09.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="customization"></a>Customization</h2></div></div><div></div></div><p></p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="N102C9"></a>XSLT Parameters</h3></div></div><div></div></div><div class="variablelist"><dl><dt><span class="term"><tt class="literal"><xsl:param name="anchor-id-prefix" select="''/></tt></span></dt><dd><p>Prefixed to every id generated from <tt class="literal"><a name=></tt>
|
|
2 and <tt class="literal"><a href="#"></tt>. This is useful to avoid
|
|
3 collisions between multiple documents that are compiled into the
|
|
4 same book. For instance, if a number of XHTML sources are assembled
|
|
5 into chapters of a book, you style each source file with a prefix of
|
|
6 <tt class="literal"><i class="replaceable"><tt>docid</tt></i>.</tt> where <i class="replaceable"><tt>docid</tt></i> is a unique id
|
|
7 for each source file.</p></dd><dt><span class="term"><tt class="literal"><xsl:param name="document-root" select="'article'"/></tt></span></dt><dd><p>The default document root. This can be overridden by
|
|
8 <tt class="literal"><?html2db class="<i class="replaceable"><tt>name</tt></i>"></tt> within the
|
|
9 document itself, and defaults to <tt class="literal">article</tt>.</p></dd></dl></div><p></p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="processing-instructions"></a>Processing instructions</h3></div></div><div></div></div><p>Use the <tt class="literal"><?html2db?></tt> processing instruction to
|
|
10 customize the transformation of the XHTML source to Docbook:</p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Processing instruction</th><th>Content</th><th>Effect</th></tr></thead><tbody><tr><td><tt class="literal"><?html2db class="<i class="replaceable"><tt>xxx</tt></i>"?></tt></td><td><tt class="literal">body</tt></td><td>Sets the output document root to <i class="replaceable"><tt>xxx</tt></i>. Useful for
|
|
11 translating to <tt class="literal">prefix</tt>, <tt class="literal">appendix</tt>, or <tt class="literal">chapter</tt>; the default is
|
|
12 <i class="replaceable"><tt>$document-root</tt></i>.</td></tr><tr><td><a name="simplelist"></a><tt class="literal"><?html2db class="simplelist"?></tt></td><td><tt class="literal">ul</tt></td><td>Creates a vertical <tt class="literal">simplelist</tt>.<sup>[<a href="#ftn.N10330" name="N10330">a</a>]</sup></td></tr><tr><td><tt class="literal"><?html2db rowsep="1"?></tt></td><td><tt class="literal">[informal]table</tt></td><td>Sets the <tt class="literal">rowsep</tt> attribute on the generated <tt class="literal">table</tt>.<sup>[<a href="#ftn.N10349" name="N10349">b</a>]</sup></td></tr></tbody><tbody class="footnotes"><tr><td colspan="3"><div class="footnote"><p><sup>[<a href="#N10330" name="ftn.N10330">a</a>] </sup>Note that the
|
|
13 current implementation simply checks for the presence of <span class="em">any</span>
|
|
14 <tt class="literal">html2db</tt> processing instruction.</p></div><div class="footnote"><p><sup>[<a href="#N10349" name="ftn.N10349">b</a>] </sup>Note that the current implementation simply checks for the presence of <span class="em">any</span> <tt class="literal">html2db</tt> processing instruction that begins with <tt class="literal">rowsep</tt>, and assumes the vlaue is <tt class="literal">1</tt>.</p></div></td></tr></tbody></table></div><p></p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="embedding"></a>Overriding the built-in templates</h3></div></div><div></div></div><p>For cases where the previous techniques don't allow for enough
|
|
15 customization, you can override the builtin templates. You will need
|
|
16 to know XSLT in order to do this, and you will need to write a new
|
|
17 stylesheet that uses the <tt class="literal">xsl:import</tt> element to import
|
|
18 <tt class="literal">html2db.xsl</tt>.</p><p>The <a href="examples.xsl" target="_top"><tt class="literal">example.xsl</tt></a> stylesheet
|
|
19 is an example customization layer. It recognizes the <tt class="literal"><div
|
|
20 class="abstract"></tt> and <tt class="literal"><p class="note"></tt>
|
|
21 classes in the <a href="index.src.html" target="_top">source</a> for this document,
|
|
22 and generates the corresponding Docbook elements.</p><p></p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ar01s07.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="index.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="ar01s09.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">Specification </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> FAQ</td></tr></table></div></body></html> |