pi.xsl 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
  4. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  5. exclude-result-prefixes="doc"
  6. version='1.0'>
  7. <!-- ********************************************************************
  8. $Id$
  9. ********************************************************************
  10. This file is part of the XSL DocBook Stylesheet distribution.
  11. See ../README or http://docbook.sf.net/release/xsl/current/ for
  12. copyright and other information.
  13. ******************************************************************** -->
  14. <doc:reference xmlns="">
  15. <referenceinfo>
  16. <releaseinfo role="meta">
  17. $Id$
  18. </releaseinfo>
  19. <authorgroup>
  20. <author>
  21. <orgname>The DocBook Project Development Team</orgname>
  22. </author>
  23. </authorgroup>
  24. <copyright>
  25. <year>2007</year>
  26. <holder>The DocBook Project</holder>
  27. </copyright>
  28. </referenceinfo>
  29. <title>FO Processing Instruction Reference</title>
  30. <partintro id="partintro">
  31. <title>Introduction</title>
  32. <para>This is generated reference documentation for all
  33. user-configurable processing instructions (PIs) in the DocBook
  34. XSL stylesheets for FO output.
  35. <note>
  36. <para>You add these PIs at particular points in a document to
  37. cause specific “exceptions” to formatting/output behavior. To
  38. make global changes in formatting/output behavior across an
  39. entire document, it’s better to do it by setting an
  40. appropriate stylesheet parameter (if there is one).</para>
  41. </note>
  42. </para>
  43. </partintro>
  44. </doc:reference>
  45. <!-- ==================================================================== -->
  46. <doc:pi name="dbfo_background-color" xmlns="">
  47. <refpurpose>Sets background color for an image</refpurpose>
  48. <refdescription>
  49. <para>Use the <tag>dbfo background-color</tag> PI before or
  50. after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>,
  51. <tag>imagedata</tag>, or <tag>videodata</tag> element) as a
  52. sibling to the element, to set a background color for the
  53. image.</para>
  54. </refdescription>
  55. <refsynopsisdiv>
  56. <synopsis><tag class="xmlpi">dbfo background-color="<replaceable>color</replaceable>"</tag></synopsis>
  57. </refsynopsisdiv>
  58. <refparameter>
  59. <variablelist>
  60. <varlistentry><term>background-color="<replaceable>color</replaceable>"</term>
  61. <listitem>
  62. <para>FIXME: A color value? [In hex, as a name, or what?]</para>
  63. </listitem>
  64. </varlistentry>
  65. </variablelist>
  66. </refparameter>
  67. </doc:pi>
  68. <xsl:template name="pi.dbfo_background-color">
  69. <xsl:param name="node" select="."/>
  70. <xsl:call-template name="dbfo-attribute">
  71. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  72. <xsl:with-param name="attribute" select="'background-color'"/>
  73. </xsl:call-template>
  74. </xsl:template>
  75. <doc:pi name="dbfo_bgcolor" xmlns="">
  76. <refpurpose>Sets background color on an table row or table cell</refpurpose>
  77. <refdescription>
  78. <para>Use the <tag>dbfo bgcolor</tag> PI as child of a table row
  79. or cell to set a background color for that table row or cell.</para>
  80. </refdescription>
  81. <refsynopsisdiv>
  82. <synopsis><tag class="xmlpi">dbfo bgcolor="<replaceable>color</replaceable>"</tag></synopsis>
  83. </refsynopsisdiv>
  84. <refparameter>
  85. <variablelist>
  86. <varlistentry><term>bgcolor="<replaceable>color</replaceable>"</term>
  87. <listitem>
  88. <para>FIXME: A color value? [In hex, as a name, or what?]</para>
  89. </listitem>
  90. </varlistentry>
  91. </variablelist>
  92. </refparameter>
  93. </doc:pi>
  94. <xsl:template name="pi.dbfo_bgcolor">
  95. <xsl:param name="node" select="."/>
  96. <xsl:call-template name="dbfo-attribute">
  97. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  98. <xsl:with-param name="attribute" select="'bgcolor'"/>
  99. </xsl:call-template>
  100. </xsl:template>
  101. <doc:pi name="dbfo_float-type" xmlns="">
  102. <refpurpose>Specifies float behavior for a sidebar</refpurpose>
  103. <refdescription>
  104. <para>Use the <tag>dbfo float-type</tag> PI to specify the float
  105. behavior for a <tag>sidebar</tag> (to cause the sidebar to be
  106. displayed as a marginal note).</para>
  107. </refdescription>
  108. <refsynopsisdiv>
  109. <synopsis><tag class="xmlpi">dbfo float-type="margin.note"</tag></synopsis>
  110. </refsynopsisdiv>
  111. <refparameter>
  112. <variablelist>
  113. <varlistentry><term>float-type="margin.note"</term>
  114. <listitem>
  115. <para>Specifies that the <tag>sidebar</tag> should be
  116. displayed as a marginal note.</para>
  117. </listitem>
  118. </varlistentry>
  119. </variablelist>
  120. </refparameter>
  121. </doc:pi>
  122. <xsl:template name="pi.dbfo_float-type">
  123. <xsl:param name="node" select="."/>
  124. <xsl:call-template name="dbfo-attribute">
  125. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  126. <xsl:with-param name="attribute" select="'float-type'"/>
  127. </xsl:call-template>
  128. </xsl:template>
  129. <doc:pi name="dbfo_glossary-presentation" xmlns="">
  130. <refpurpose>Specifies presentation style for a glossary</refpurpose>
  131. <refdescription>
  132. <para>Use the <tag>dbfo glossary-presentation</tag> PI as a child of
  133. a <tag>glossary</tag> to control its presentation style.</para>
  134. </refdescription>
  135. <refsynopsisdiv>
  136. <synopsis><tag class="xmlpi">dbfo glossary-presentation="list"|"blocks"</tag></synopsis>
  137. </refsynopsisdiv>
  138. <refparameter>
  139. <variablelist>
  140. <varlistentry><term>glossary-presentation="list"</term>
  141. <listitem>
  142. <para>Displayed the glossary as a list</para>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry><term>glossary-presentation="blocks"</term>
  146. <listitem>
  147. <para>Displays the glossary as blocks</para>
  148. </listitem>
  149. </varlistentry>
  150. </variablelist>
  151. </refparameter>
  152. </doc:pi>
  153. <xsl:template name="pi.dbfo_glossary-presentation">
  154. <xsl:param name="node" select="."/>
  155. <xsl:call-template name="dbfo-attribute">
  156. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  157. <xsl:with-param name="attribute" select="'glossary-presentation'"/>
  158. </xsl:call-template>
  159. </xsl:template>
  160. <doc:pi name="dbfo_glosslist-presentation" xmlns="">
  161. <refpurpose>Specifies presentation style for a glosslist</refpurpose>
  162. <refdescription>
  163. <para>Use the <tag>dbfo glosslist-presentation</tag> PI as a child of
  164. a <tag>glosslist</tag> to control its presentation style.</para>
  165. </refdescription>
  166. <refsynopsisdiv>
  167. <synopsis><tag class="xmlpi">dbfo glosslist-presentation="list"|"blocks"</tag></synopsis>
  168. </refsynopsisdiv>
  169. <refparameter>
  170. <variablelist>
  171. <varlistentry><term>glosslist-presentation="list"</term>
  172. <listitem>
  173. <para>Displayed the glosslist as a list</para>
  174. </listitem>
  175. </varlistentry>
  176. <varlistentry><term>glosslist-presentation="blocks"</term>
  177. <listitem>
  178. <para>Displays the glosslist as blocks</para>
  179. </listitem>
  180. </varlistentry>
  181. </variablelist>
  182. </refparameter>
  183. </doc:pi>
  184. <xsl:template name="pi.dbfo_glosslist-presentation">
  185. <xsl:param name="node" select="."/>
  186. <xsl:call-template name="dbfo-attribute">
  187. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  188. <xsl:with-param name="attribute" select="'glosslist-presentation'"/>
  189. </xsl:call-template>
  190. </xsl:template>
  191. <doc:pi name="dbfo_glossterm-width" xmlns="">
  192. <refpurpose>Specifies the glossterm width for a glossary or
  193. glosslist</refpurpose>
  194. <refdescription>
  195. <para>Use the <tag>dbfo glossterm-width</tag> PI as a child of a
  196. <tag>glossary</tag> or <tag>glosslist</tag> to specify the
  197. width for output of <tag>glossterm</tag> instances in the
  198. output.</para>
  199. </refdescription>
  200. <refsynopsisdiv>
  201. <synopsis><tag class="xmlpi">dbfo glossterm-width="<replaceable>width</replaceable>"</tag></synopsis>
  202. </refsynopsisdiv>
  203. <refparameter>
  204. <variablelist>
  205. <varlistentry><term>glossterm-width="<replaceable>width</replaceable>"</term>
  206. <listitem>
  207. <para>FIXME: Specifies the glossterm width (in what units?)</para>
  208. </listitem>
  209. </varlistentry>
  210. </variablelist>
  211. </refparameter>
  212. </doc:pi>
  213. <xsl:template name="pi.dbfo_glossterm-width">
  214. <xsl:param name="node" select="."/>
  215. <xsl:call-template name="dbfo-attribute">
  216. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  217. <xsl:with-param name="attribute" select="'glossterm-width'"/>
  218. </xsl:call-template>
  219. </xsl:template>
  220. <doc:pi name="dbfo_keep-together" xmlns="">
  221. <refpurpose>Specifies “keep” behavior for a table, example,
  222. figure, or equation</refpurpose>
  223. <refdescription>
  224. <para>Use the <tag>dbfo keep-together</tag> PI as a child of a
  225. formal object (<tag>table</tag>, <tag>example</tag>,
  226. <tag>figure</tag>, or <tag>equation</tag>) or their informal
  227. equivalents) to specify “keep” behavior for the object (to
  228. allow the object to “break” across a page).</para>
  229. </refdescription>
  230. <refsynopsisdiv>
  231. <synopsis><tag class="xmlpi">dbfo keep-together="auto"|"always"</tag></synopsis>
  232. </refsynopsisdiv>
  233. <refparameter>
  234. <variablelist>
  235. <varlistentry><term>keep-together="auto"</term>
  236. <listitem>
  237. <para>Enables the object to break across a page</para>
  238. </listitem>
  239. </varlistentry>
  240. <varlistentry><term>keep-together="always"</term>
  241. <listitem>
  242. <para>Prevents the object from breaking across a page (the
  243. default stylesheet behavior)</para>
  244. </listitem>
  245. </varlistentry>
  246. </variablelist>
  247. </refparameter>
  248. </doc:pi>
  249. <xsl:template name="pi.dbfo_keep-together">
  250. <xsl:param name="node" select="."/>
  251. <xsl:call-template name="dbfo-attribute">
  252. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  253. <xsl:with-param name="attribute" select="'keep-together'"/>
  254. </xsl:call-template>
  255. </xsl:template>
  256. <doc:pi name="dbfo_label-width" xmlns="">
  257. <refpurpose>Specifies the label width for an itemizedlist,
  258. orderedlist, or qandaset</refpurpose>
  259. <refdescription>
  260. <para>Use the <tag>dbfo label-width</tag> PI as a child of an
  261. <tag>itemizedlist</tag>, <tag>orderedlist</tag>, or
  262. <tag>qandaset</tag> to specify the width of labels.</para>
  263. </refdescription>
  264. <refsynopsisdiv>
  265. <synopsis><tag class="xmlpi">dbfo label-width="<replaceable>width</replaceable>"</tag></synopsis>
  266. </refsynopsisdiv>
  267. <refparameter>
  268. <variablelist>
  269. <varlistentry><term>label-width="<replaceable>width</replaceable>"</term>
  270. <listitem>
  271. <para>FIXME: Specifies the label width (in what units?)</para>
  272. </listitem>
  273. </varlistentry>
  274. </variablelist>
  275. </refparameter>
  276. </doc:pi>
  277. <xsl:template name="pi.dbfo_label-width">
  278. <xsl:param name="node" select="."/>
  279. <xsl:call-template name="dbfo-attribute">
  280. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  281. <xsl:with-param name="attribute" select="'label-width'"/>
  282. </xsl:call-template>
  283. </xsl:template>
  284. <doc:pi name="dbfo_linenumbering.everyNth" xmlns="">
  285. <refpurpose>Specifies the interval at which lines are numbered
  286. output of verbatim environments</refpurpose>
  287. <refdescription>
  288. <para>Use the <tag>dbfo linenumbering.everyNth</tag> PI as a child
  289. of a “verbatim” element – <tag>programlisting</tag>,
  290. <tag>screen</tag>, <tag>synopsis</tag> — to specify
  291. the interval at which lines are numbered.</para>
  292. </refdescription>
  293. <refsynopsisdiv>
  294. <synopsis><tag class="xmlpi">dbfo linenumbering.everyNth="<replaceable>N</replaceable>"</tag></synopsis>
  295. </refsynopsisdiv>
  296. <refparameter>
  297. <variablelist>
  298. <varlistentry><term>linenumbering.everyNth="<replaceable>N</replaceable>"</term>
  299. <listitem>
  300. <para>FIXME: Specifies numbering interval; a number is
  301. output before every <replaceable>N</replaceable>th line</para>
  302. </listitem>
  303. </varlistentry>
  304. </variablelist>
  305. </refparameter>
  306. </doc:pi>
  307. <xsl:template name="pi.dbfo_linenumbering.everyNth">
  308. <xsl:param name="node" select="."/>
  309. <xsl:call-template name="dbfo-attribute">
  310. <xsl:with-param name="pis"
  311. select="$node/processing-instruction('dbfo')"/>
  312. <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
  313. </xsl:call-template>
  314. </xsl:template>
  315. <doc:pi name="dbfo_linenumbering.separator" xmlns="">
  316. <refpurpose>Specifies the separator text used between line numbers
  317. and content in output of verbatim environments</refpurpose>
  318. <refdescription>
  319. <para>Use the <tag>dbfo linenumbering.separator</tag> PI as a child
  320. of a “verbatim” element – <tag>programlisting</tag>,
  321. <tag>screen</tag>, <tag>synopsis</tag> — to specify
  322. the separator text output between the line numbers and content.</para>
  323. </refdescription>
  324. <refsynopsisdiv>
  325. <synopsis><tag class="xmlpi">dbfo linenumbering.separator="<replaceable>text</replaceable>"</tag></synopsis>
  326. </refsynopsisdiv>
  327. <refparameter>
  328. <variablelist>
  329. <varlistentry><term>linenumbering.separator="<replaceable>text</replaceable>"</term>
  330. <listitem>
  331. <para>FIXME: Specifies the text (zero or more characters)</para>
  332. </listitem>
  333. </varlistentry>
  334. </variablelist>
  335. </refparameter>
  336. </doc:pi>
  337. <xsl:template name="pi.dbfo_linenumbering.separator">
  338. <xsl:param name="node" select="."/>
  339. <xsl:call-template name="dbfo-attribute">
  340. <xsl:with-param name="pis"
  341. select="$node/processing-instruction('dbfo')"/>
  342. <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
  343. </xsl:call-template>
  344. </xsl:template>
  345. <doc:pi name="dbfo_linenumbering.width" xmlns="">
  346. <refpurpose>Specifies the width set aside for line numbers in
  347. output of verbatim environments</refpurpose>
  348. <refdescription>
  349. <para>Use the <tag>dbfo linenumbering.width</tag> PI as a child
  350. of a “verbatim” element – <tag>programlisting</tag>,
  351. <tag>screen</tag>, <tag>synopsis</tag> — to specify
  352. the width set aside for line numbers.</para>
  353. </refdescription>
  354. <refsynopsisdiv>
  355. <synopsis><tag class="xmlpi">dbfo linenumbering.width="<replaceable>width</replaceable>"</tag></synopsis>
  356. </refsynopsisdiv>
  357. <refparameter>
  358. <variablelist>
  359. <varlistentry><term>linenumbering.width="<replaceable>width</replaceable>"</term>
  360. <listitem>
  361. <para>FIXME: Specifies the width (in what units?)</para>
  362. </listitem>
  363. </varlistentry>
  364. </variablelist>
  365. </refparameter>
  366. </doc:pi>
  367. <xsl:template name="pi.dbfo_linenumbering.width">
  368. <xsl:param name="node" select="."/>
  369. <xsl:call-template name="dbfo-attribute">
  370. <xsl:with-param name="pis"
  371. select="$node/processing-instruction('dbfo')"/>
  372. <xsl:with-param name="attribute" select="'linenumbering.width'"/>
  373. </xsl:call-template>
  374. </xsl:template>
  375. <doc:pi name="dbfo_list-width" xmlns="">
  376. <refpurpose>Specifies the width of a horizontal simplelist</refpurpose>
  377. <refdescription>
  378. <para>Use the <tag>dbfo list-width</tag> PI as a child of a
  379. <tag>simplelist</tag> whose <tag class="attribute">class</tag>
  380. value is <literal>horizontal</literal>, to specify the width
  381. of the <tag>simplelist</tag>.</para>
  382. </refdescription>
  383. <refsynopsisdiv>
  384. <synopsis><tag class="xmlpi">dbfo list-width="<replaceable>width</replaceable>"</tag></synopsis>
  385. </refsynopsisdiv>
  386. <refparameter>
  387. <variablelist>
  388. <varlistentry><term>list-width="<replaceable>width</replaceable>"</term>
  389. <listitem>
  390. <para>FIXME: Specifies the <tag>simplelist</tag> width (in what units?)</para>
  391. </listitem>
  392. </varlistentry>
  393. </variablelist>
  394. </refparameter>
  395. </doc:pi>
  396. <xsl:template name="pi.dbfo_list-width">
  397. <xsl:param name="node" select="."/>
  398. <xsl:call-template name="dbfo-attribute">
  399. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  400. <xsl:with-param name="attribute" select="'list-width'"/>
  401. </xsl:call-template>
  402. </xsl:template>
  403. <doc:pi name="dbfo_list-presentation" xmlns="">
  404. <refpurpose>Specifies presentation style for a variablelist or
  405. segmentedlist</refpurpose>
  406. <refdescription>
  407. <para>Use the <tag>dbfo list-presentation</tag> PI as a child of
  408. a <tag>variablelist</tag> or <tag>segmentedlist</tag> to
  409. control the presentation style for the list (to cause it, for
  410. example, to be displayed as a table).</para>
  411. </refdescription>
  412. <refsynopsisdiv>
  413. <synopsis><tag class="xmlpi">dbfo list-presentation="list"|"blocks"|"table"</tag></synopsis>
  414. </refsynopsisdiv>
  415. <refparameter>
  416. <variablelist>
  417. <varlistentry><term>list-presentation="list"</term>
  418. <listitem>
  419. <para>Displayed the list as a list</para>
  420. </listitem>
  421. </varlistentry>
  422. <varlistentry><term>list-presentation="blocks"</term>
  423. <listitem>
  424. <para>(<tag>variablelist</tag> only) Displays the list as blocks</para>
  425. </listitem>
  426. </varlistentry>
  427. <varlistentry><term>list-presentation="table"</term>
  428. <listitem>
  429. <para>(<tag>segmentedlist</tag> only) Displays the list as a table</para>
  430. </listitem>
  431. </varlistentry>
  432. </variablelist>
  433. </refparameter>
  434. </doc:pi>
  435. <xsl:template name="pi.dbfo_list-presentation">
  436. <xsl:param name="node" select="."/>
  437. <xsl:call-template name="dbfo-attribute">
  438. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  439. <xsl:with-param name="attribute" select="'list-presentation'"/>
  440. </xsl:call-template>
  441. </xsl:template>
  442. <doc:pi name="dbfo_orientation" xmlns="">
  443. <refpurpose>Specifies the orientation for table row or cell</refpurpose>
  444. <refdescription>
  445. <para>Use the <tag>dbfo orientation</tag> PI as a child of an
  446. <tag>table</tag> row or cell to specify the orientation
  447. (rotation) for the row or cell.</para>
  448. </refdescription>
  449. <refsynopsisdiv>
  450. <synopsis><tag class="xmlpi">dbfo orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</tag></synopsis>
  451. </refsynopsisdiv>
  452. <refparameter>
  453. <variablelist>
  454. <varlistentry><term>orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</term>
  455. <listitem>
  456. <para>Specifies the number of degrees by which the cell or
  457. row is rotated</para>
  458. </listitem>
  459. </varlistentry>
  460. </variablelist>
  461. </refparameter>
  462. </doc:pi>
  463. <xsl:template name="pi.dbfo_orientation">
  464. <xsl:param name="node" select="."/>
  465. <xsl:call-template name="dbfo-attribute">
  466. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  467. <xsl:with-param name="attribute" select="'orientation'"/>
  468. </xsl:call-template>
  469. </xsl:template>
  470. <doc:pi name="dbfo_pgwide" xmlns="">
  471. <refpurpose>Species whether an <tag>equation</tag> or
  472. <tag>example</tag> should rendered across the full width of a
  473. page</refpurpose>
  474. <refdescription>
  475. <para>Use the <tag>dbfo pgwide</tag> PI as a child of an
  476. <tag>equation</tag> or <tag>example</tag> to specify that the
  477. content should rendered across the full width of the page.</para>
  478. </refdescription>
  479. <refsynopsisdiv>
  480. <synopsis><tag class="xmlpi">dbfo pgwide="0"|"1"</tag></synopsis>
  481. </refsynopsisdiv>
  482. <refparameter>
  483. <variablelist>
  484. <varlistentry><term>pgwide="0"</term>
  485. <listitem>
  486. <para>If zero, the content is rendered across the current
  487. text flow</para>
  488. </listitem>
  489. </varlistentry>
  490. <varlistentry><term>pgwide="1"</term>
  491. <listitem>
  492. <para>If <code>1</code> (or any non-zero value), the
  493. content is rendered across the full width of the page</para>
  494. </listitem>
  495. </varlistentry>
  496. </variablelist>
  497. </refparameter>
  498. </doc:pi>
  499. <xsl:template name="pi.dbfo_pgwide">
  500. <xsl:param name="node" select="."/>
  501. <xsl:call-template name="dbfo-attribute">
  502. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  503. <xsl:with-param name="attribute" select="'pgwide'"/>
  504. </xsl:call-template>
  505. </xsl:template>
  506. <doc:pi name="dbfo_rotated-width" xmlns="">
  507. <refpurpose>Specifies the width for a table <tag>entry</tag> or
  508. <tag>row</tag></refpurpose>
  509. <refdescription>
  510. <para>Use the <tag>dbfo rotated-width</tag> PI as a child of an
  511. <tag>entry</tag> or <tag>row</tag> instance to specify the
  512. width of that the <tag>entry</tag> or <tag>row</tag>; or
  513. use it higher up in table to cause the width to be inherited
  514. recursively down.</para>
  515. </refdescription>
  516. <refsynopsisdiv>
  517. <synopsis><tag class="xmlpi">dbfo rotated-width="<replaceable>width</replaceable>"</tag></synopsis>
  518. </refsynopsisdiv>
  519. <refparameter>
  520. <variablelist>
  521. <varlistentry><term>rotated-width="<replaceable>width</replaceable>"</term>
  522. <listitem>
  523. <para>FIXME: Specifies the width of a row or cell (in what units?)</para>
  524. </listitem>
  525. </varlistentry>
  526. </variablelist>
  527. </refparameter>
  528. </doc:pi>
  529. <xsl:template name="pi.dbfo_rotated-width">
  530. <xsl:param name="node" select="."/>
  531. <xsl:call-template name="dbfo-attribute">
  532. <xsl:with-param name="pis"
  533. select="$node/processing-instruction('dbfo')"/>
  534. <xsl:with-param name="attribute" select="'rotated-width'"/>
  535. </xsl:call-template>
  536. </xsl:template>
  537. <doc:pi name="dbfo_sidebar-width" xmlns="">
  538. <refpurpose>Specifies the width of a sidebar</refpurpose>
  539. <refdescription>
  540. <para>Use the <tag>dbfo sidebar-width</tag> PI as a child of a
  541. <tag>sidebar</tag> to specify the width of the sidebar.</para>
  542. </refdescription>
  543. <refsynopsisdiv>
  544. <synopsis><tag class="xmlpi">dbfo sidebar-width="<replaceable>width</replaceable>"</tag></synopsis>
  545. </refsynopsisdiv>
  546. <refparameter>
  547. <variablelist>
  548. <varlistentry><term>sidebar-width="<replaceable>width</replaceable>"</term>
  549. <listitem>
  550. <para>FIXME: Specifies the <tag>sidebar</tag> width (in what units?)</para>
  551. </listitem>
  552. </varlistentry>
  553. </variablelist>
  554. </refparameter>
  555. </doc:pi>
  556. <xsl:template name="pi.dbfo_sidebar-width">
  557. <xsl:param name="node" select="."/>
  558. <xsl:call-template name="dbfo-attribute">
  559. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  560. <xsl:with-param name="attribute" select="'sidebar-width'"/>
  561. </xsl:call-template>
  562. </xsl:template>
  563. <doc:pi name="dbfo_table-width" xmlns="">
  564. <refpurpose>Specifies the width for a table or for revhistory
  565. output</refpurpose>
  566. <refdescription>
  567. <para>Use the <tag>dbfo table-width</tag> PI as a child of a
  568. <tag>table</tag> or <tag>revhistory</tag> instance (which is
  569. rendered as a table in output) to specify the width of the
  570. table in output.</para>
  571. </refdescription>
  572. <refsynopsisdiv>
  573. <synopsis><tag class="xmlpi">dbfo table-width="<replaceable>width</replaceable>"</tag></synopsis>
  574. </refsynopsisdiv>
  575. <refparameter>
  576. <variablelist>
  577. <varlistentry><term>table-width="<replaceable>width</replaceable>"</term>
  578. <listitem>
  579. <para>FIXME: Specifies the table width (in what units?)</para>
  580. </listitem>
  581. </varlistentry>
  582. </variablelist>
  583. </refparameter>
  584. </doc:pi>
  585. <xsl:template name="pi.dbfo_table-width">
  586. <xsl:param name="node" select="."/>
  587. <xsl:call-template name="dbfo-attribute">
  588. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  589. <xsl:with-param name="attribute" select="'table-width'"/>
  590. </xsl:call-template>
  591. </xsl:template>
  592. <doc:pi name="dbfo_term-width" xmlns="">
  593. <refpurpose>Specifies the term width for a variablelist</refpurpose>
  594. <refdescription>
  595. <para>Use the <tag>dbfo term-width</tag> PI as a child of a
  596. <tag>variablelist</tag> to specify the width for
  597. <tag>term</tag> output.</para>
  598. </refdescription>
  599. <refsynopsisdiv>
  600. <synopsis><tag class="xmlpi">dbfo term-width="<replaceable>width</replaceable>"</tag></synopsis>
  601. </refsynopsisdiv>
  602. <refparameter>
  603. <variablelist>
  604. <varlistentry><term>term-width="<replaceable>width</replaceable>"</term>
  605. <listitem>
  606. <para>FIXME: Specifies the term width (in what units?)</para>
  607. </listitem>
  608. </varlistentry>
  609. </variablelist>
  610. </refparameter>
  611. </doc:pi>
  612. <xsl:template name="pi.dbfo_term-width">
  613. <xsl:param name="node" select="."/>
  614. <xsl:call-template name="dbfo-attribute">
  615. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  616. <xsl:with-param name="attribute" select="'term-width'"/>
  617. </xsl:call-template>
  618. </xsl:template>
  619. <doc:pi name="dbfo_toc" xmlns="">
  620. <refpurpose>Species whether a TOC should be generated for a qandaset</refpurpose>
  621. <refdescription>
  622. <para>Use the <tag>dbfo toc</tag> PI as a child of a
  623. <tag>jandaset</tag> to specify whether a table of contents
  624. (TOC) is generated for the <tag>qandaset</tag>.</para>
  625. </refdescription>
  626. <refsynopsisdiv>
  627. <synopsis><tag class="xmlpi">dbfo toc="0"|"1"</tag></synopsis>
  628. </refsynopsisdiv>
  629. <refparameter>
  630. <variablelist>
  631. <varlistentry><term>toc="0"</term>
  632. <listitem>
  633. <para>If zero, no TOC is generated</para>
  634. </listitem>
  635. </varlistentry>
  636. <varlistentry><term>toc="1"</term>
  637. <listitem>
  638. <para>If <code>1</code> (or any non-zero value),
  639. a TOC is generated</para>
  640. </listitem>
  641. </varlistentry>
  642. </variablelist>
  643. </refparameter>
  644. </doc:pi>
  645. <xsl:template name="pi.dbfo_toc">
  646. <xsl:param name="node" select="."/>
  647. <xsl:call-template name="dbfo-attribute">
  648. <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
  649. <xsl:with-param name="attribute" select="'toc'"/>
  650. </xsl:call-template>
  651. </xsl:template>
  652. <!-- ==================================================================== -->
  653. <doc:pi name="dbfo-need" xmlns="">
  654. <refpurpose>Specify a need for space (a kind of soft page break)</refpurpose>
  655. <refdescription>
  656. <para>A “need” is a request for space on a page. If the
  657. requested space is not available, the page breaks and the
  658. content that follows the need request appears on the next
  659. page. If the requested space is available, then the request is
  660. ignored.</para>
  661. </refdescription>
  662. <refsynopsisdiv>
  663. <synopsis><tag class="xmlpi">dbfo-need height="<replaceable>n</replaceable>"</tag></synopsis>
  664. <synopsis><tag class="xmlpi">dbfo-need space-before="<replaceable>n</replaceable>"</tag></synopsis>
  665. </refsynopsisdiv>
  666. <refparameter>
  667. <variablelist>
  668. <varlistentry><term>height="<replaceable>n</replaceable>"</term>
  669. <listitem>
  670. <para>FIXME: the amount of height(?) needed? In what units? pt?.</para>
  671. </listitem>
  672. </varlistentry>
  673. <varlistentry><term>space-before"<replaceable>n</replaceable>"</term>
  674. <listitem>
  675. <para>FIXME: the amount of space needed before the
  676. [something]? In what units? pt?.</para>
  677. </listitem>
  678. </varlistentry>
  679. </variablelist>
  680. </refparameter>
  681. </doc:pi>
  682. <xsl:template name="pi.dbfo-need">
  683. <xsl:variable name="pi-height">
  684. <xsl:call-template name="dbfo-attribute">
  685. <xsl:with-param name="pis" select="."/>
  686. <xsl:with-param name="attribute" select="'height'"/>
  687. </xsl:call-template>
  688. </xsl:variable>
  689. <xsl:variable name="height">
  690. <xsl:choose>
  691. <xsl:when test="$pi-height != ''">
  692. <xsl:value-of select="$pi-height"/>
  693. </xsl:when>
  694. <xsl:otherwise>0pt</xsl:otherwise>
  695. </xsl:choose>
  696. </xsl:variable>
  697. <xsl:variable name="pi-before">
  698. <xsl:call-template name="dbfo-attribute">
  699. <xsl:with-param name="pis" select="."/>
  700. <xsl:with-param name="attribute" select="'space-before'"/>
  701. </xsl:call-template>
  702. </xsl:variable>
  703. <xsl:variable name="spacer">
  704. <fo:block-container width="100%" height="{$height}">
  705. <fo:block><fo:leader leader-length="0pt"/></fo:block>
  706. </fo:block-container>
  707. </xsl:variable>
  708. <xsl:choose>
  709. <xsl:when test="$fop.extensions != 0">
  710. <!-- Doesn't work in fop -->
  711. </xsl:when>
  712. <xsl:when test="$pi-before != '' and
  713. not(following-sibling::listitem) and
  714. not(following-sibling::step)">
  715. <fo:block space-after="0pt" space-before="{$pi-before}">
  716. <xsl:copy-of select="$spacer"/>
  717. </fo:block>
  718. </xsl:when>
  719. <xsl:when test="following-sibling::para">
  720. <fo:block space-after="0pt"
  721. xsl:use-attribute-sets="normal.para.spacing">
  722. <xsl:copy-of select="$spacer"/>
  723. </fo:block>
  724. </xsl:when>
  725. <xsl:when test="following-sibling::table or
  726. following-sibling::figure or
  727. following-sibling::example or
  728. following-sibling::equation">
  729. <fo:block space-after="0pt"
  730. xsl:use-attribute-sets="formal.object.properties">
  731. <xsl:copy-of select="$spacer"/>
  732. </fo:block>
  733. </xsl:when>
  734. <xsl:when test="following-sibling::informaltable or
  735. following-sibling::informalfigure or
  736. following-sibling::informalexample or
  737. following-sibling::informalequation">
  738. <fo:block space-after="0pt"
  739. xsl:use-attribute-sets="informal.object.properties">
  740. <xsl:copy-of select="$spacer"/>
  741. </fo:block>
  742. </xsl:when>
  743. <xsl:when test="following-sibling::itemizedlist or
  744. following-sibling::orderedlist or
  745. following-sibling::variablelist or
  746. following-sibling::simplelist">
  747. <fo:block space-after="0pt"
  748. xsl:use-attribute-sets="informal.object.properties">
  749. <xsl:copy-of select="$spacer"/>
  750. </fo:block>
  751. </xsl:when>
  752. <xsl:when test="following-sibling::listitem or
  753. following-sibling::step">
  754. <fo:list-item space-after="0pt"
  755. xsl:use-attribute-sets="informal.object.properties">
  756. <fo:list-item-label/>
  757. <fo:list-item-body start-indent="0pt" end-indent="0pt">
  758. <xsl:copy-of select="$spacer"/>
  759. </fo:list-item-body>
  760. </fo:list-item>
  761. </xsl:when>
  762. <xsl:when test="following-sibling::sect1 or
  763. following-sibling::sect2 or
  764. following-sibling::sect3 or
  765. following-sibling::sect4 or
  766. following-sibling::sect5 or
  767. following-sibling::section">
  768. <fo:block space-after="0pt"
  769. xsl:use-attribute-sets="section.title.properties">
  770. <xsl:copy-of select="$spacer"/>
  771. </fo:block>
  772. </xsl:when>
  773. <xsl:otherwise>
  774. <fo:block space-after="0pt" space-before="0em">
  775. <xsl:copy-of select="$spacer"/>
  776. </fo:block>
  777. </xsl:otherwise>
  778. </xsl:choose>
  779. <xsl:choose>
  780. <xsl:when test="$fop.extensions != 0">
  781. <!-- Doesn't work in fop -->
  782. </xsl:when>
  783. <xsl:when test="following-sibling::listitem or
  784. following-sibling::step">
  785. <fo:list-item space-before.precedence="force"
  786. space-before="-{$height}"
  787. space-after="0pt"
  788. space-after.precedence="force">
  789. <fo:list-item-label/>
  790. <fo:list-item-body start-indent="0pt" end-indent="0pt"/>
  791. </fo:list-item>
  792. </xsl:when>
  793. <xsl:otherwise>
  794. <fo:block space-before.precedence="force"
  795. space-before="-{$height}"
  796. space-after="0pt"
  797. space-after.precedence="force">
  798. </fo:block>
  799. </xsl:otherwise>
  800. </xsl:choose>
  801. </xsl:template>
  802. <!-- ==================================================================== -->
  803. <xsl:template name="dbfo-attribute">
  804. <!-- * dbfo-attribute is an interal utility template for retrieving -->
  805. <!-- * pseudo-attributes/parameters from PIs -->
  806. <xsl:param name="pis" select="processing-instruction('dbfo')"/>
  807. <xsl:param name="attribute">filename</xsl:param>
  808. <xsl:call-template name="pi-attribute">
  809. <xsl:with-param name="pis" select="$pis"/>
  810. <xsl:with-param name="attribute" select="$attribute"/>
  811. </xsl:call-template>
  812. </xsl:template>
  813. <!-- ==================================================================== -->
  814. <xsl:template match="processing-instruction()">
  815. </xsl:template>
  816. <!-- ==================================================================== -->
  817. <xsl:template match="processing-instruction('dbfo-need')">
  818. <xsl:call-template name="pi.dbfo-need"/>
  819. </xsl:template>
  820. </xsl:stylesheet>