pi.xsl 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296
  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:xlink="http://www.w3.org/1999/xlink"
  5. exclude-result-prefixes="doc"
  6. version='1.0'>
  7. <!-- ********************************************************************
  8. $Id: pi.xsl 9022 2011-07-14 19:21:36Z bobstayton $
  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=""><info><title>HTML Processing Instruction Reference</title>
  15. <releaseinfo role="meta">
  16. $Id: pi.xsl 9022 2011-07-14 19:21:36Z bobstayton $
  17. </releaseinfo>
  18. </info>
  19. <partintro xml:id="partintro">
  20. <title>Introduction</title>
  21. <para>This is generated reference documentation for all
  22. user-specifiable processing instructions (PIs) in the DocBook
  23. XSL stylesheets for HTML output.
  24. <note>
  25. <para>You add these PIs at particular points in a document to
  26. cause specific “exceptions” to formatting/output behavior. To
  27. make global changes in formatting/output behavior across an
  28. entire document, it’s better to do it by setting an
  29. appropriate stylesheet parameter (if there is one).</para>
  30. </note>
  31. </para>
  32. </partintro>
  33. </doc:reference>
  34. <!-- ==================================================================== -->
  35. <doc:pi name="dbhtml_background-color" xmlns="">
  36. <refpurpose>Sets background color for an image</refpurpose>
  37. <refdescription>
  38. <para>Use the <tag class="xmlpi">dbhtml background-color</tag> PI before or
  39. after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>,
  40. <tag>imagedata</tag>, or <tag>videodata</tag> element) as a
  41. sibling to the element, to set a background color for the
  42. image.</para>
  43. </refdescription>
  44. <refsynopsisdiv>
  45. <synopsis><tag class="xmlpi">dbhtml background-color="<replaceable>color</replaceable>"</tag></synopsis>
  46. </refsynopsisdiv>
  47. <refparameter>
  48. <variablelist>
  49. <varlistentry><term>background-color="<replaceable>color</replaceable>"</term>
  50. <listitem>
  51. <para>An HTML color value</para>
  52. </listitem>
  53. </varlistentry>
  54. </variablelist>
  55. </refparameter>
  56. <refsee role="tcg">
  57. <para><link role="tcg"
  58. xlink:href="BGcolor.html"
  59. >Background color</link></para>
  60. </refsee>
  61. </doc:pi>
  62. <xsl:template name="pi.dbhtml_background-color">
  63. <xsl:param name="node" select="."/>
  64. <xsl:call-template name="dbhtml-attribute">
  65. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  66. <xsl:with-param name="attribute" select="'background-color'"/>
  67. </xsl:call-template>
  68. </xsl:template>
  69. <doc:pi name="dbhtml_bgcolor" xmlns="">
  70. <refpurpose>Sets background color on a CALS table row or table cell</refpurpose>
  71. <refdescription>
  72. <para>Use the <tag class="xmlpi">dbhtml bgcolor</tag> PI as child of a CALS table row
  73. or cell to set a background color for that table row or cell.</para>
  74. </refdescription>
  75. <refsynopsisdiv>
  76. <synopsis><tag class="xmlpi">dbhtml bgcolor="<replaceable>color</replaceable>"</tag></synopsis>
  77. </refsynopsisdiv>
  78. <refparameter>
  79. <variablelist>
  80. <varlistentry><term>bgcolor="<replaceable>color</replaceable>"</term>
  81. <listitem>
  82. <para>An HTML color value</para>
  83. </listitem>
  84. </varlistentry>
  85. </variablelist>
  86. </refparameter>
  87. <refsee role="tcg">
  88. <para><link role="tcg"
  89. xlink:href="BGtableColor.html#CellBGColor"
  90. >Cell background color</link></para>
  91. </refsee>
  92. </doc:pi>
  93. <xsl:template name="pi.dbhtml_bgcolor">
  94. <xsl:param name="node" select="."/>
  95. <xsl:call-template name="dbhtml-attribute">
  96. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  97. <xsl:with-param name="attribute" select="'bgcolor'"/>
  98. </xsl:call-template>
  99. </xsl:template>
  100. <doc:pi name="dbhtml_cellpadding" xmlns="">
  101. <refpurpose>Specifies cellpadding in CALS table or qandaset output</refpurpose>
  102. <refdescription>
  103. <para>Use the <tag class="xmlpi">dbhtml cellpadding</tag> PI as a child of a
  104. CALS <tag>table</tag> or <tag>qandaset</tag> to specify the value
  105. for the HTML <literal>cellpadding</literal> attribute in the
  106. output HTML table.</para>
  107. </refdescription>
  108. <refsynopsisdiv>
  109. <synopsis><tag class="xmlpi">dbhtml cellpadding="<replaceable>number</replaceable>"</tag></synopsis>
  110. </refsynopsisdiv>
  111. <refparameter>
  112. <variablelist>
  113. <varlistentry><term>cellpadding="<replaceable>number</replaceable>"</term>
  114. <listitem>
  115. <para>Specifies the cellpadding</para>
  116. </listitem>
  117. </varlistentry>
  118. </variablelist>
  119. </refparameter>
  120. <refsee role="params">
  121. <para><parameter>html.cellpadding</parameter></para>
  122. </refsee>
  123. <refsee role="tcg">
  124. <para><link role="tcg"
  125. xlink:href="CellSpacing.html"
  126. >Cell spacing and cell padding</link>,
  127. <link role="tcg" xlink:href="QandAformat.html"
  128. >Q and A formatting</link></para>
  129. </refsee>
  130. </doc:pi>
  131. <xsl:template name="pi.dbhtml_cellpadding">
  132. <xsl:param name="node" select="."/>
  133. <xsl:call-template name="dbhtml-attribute">
  134. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  135. <xsl:with-param name="attribute" select="'cellpadding'"/>
  136. </xsl:call-template>
  137. </xsl:template>
  138. <doc:pi name="dbhtml_cellspacing" xmlns="">
  139. <refpurpose>Specifies cellspacing in CALS table or qandaset output</refpurpose>
  140. <refdescription>
  141. <para>Use the <tag class="xmlpi">dbhtml cellspacing</tag> PI as a child of a
  142. CALS <tag>table</tag> or <tag>qandaset</tag> to specify the value
  143. for the HTML <literal>cellspacing</literal> attribute in the
  144. output HTML table.</para>
  145. </refdescription>
  146. <refsynopsisdiv>
  147. <synopsis><tag class="xmlpi">dbhtml cellspacing="<replaceable>number</replaceable>"</tag></synopsis>
  148. </refsynopsisdiv>
  149. <refparameter>
  150. <variablelist>
  151. <varlistentry><term>cellspacing="<replaceable>number</replaceable>"</term>
  152. <listitem>
  153. <para>Specifies the cellspacing</para>
  154. </listitem>
  155. </varlistentry>
  156. </variablelist>
  157. </refparameter>
  158. <refsee role="params">
  159. <para><parameter>html.cellspacing</parameter></para>
  160. </refsee>
  161. <refsee role="tcg">
  162. <para><link role="tcg"
  163. xlink:href="CellSpacing.html"
  164. >Cell spacing and cell padding</link>,
  165. <link role="tcg"
  166. xlink:href="QandAformat.html"
  167. >Q and A formatting</link></para>
  168. </refsee>
  169. </doc:pi>
  170. <xsl:template name="pi.dbhtml_cellspacing">
  171. <xsl:param name="node" select="."/>
  172. <xsl:call-template name="dbhtml-attribute">
  173. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  174. <xsl:with-param name="attribute" select="'cellspacing'"/>
  175. </xsl:call-template>
  176. </xsl:template>
  177. <doc:pi name="dbhtml_class" xmlns="">
  178. <refpurpose>Set value of the class attribute for a CALS table row</refpurpose>
  179. <refdescription>
  180. <para>Use the <tag class="xmlpi">dbhtml class</tag> PI as a child of a
  181. <tag>row</tag> to specify a <literal>class</literal>
  182. attribute and value in the HTML output for that row.</para>
  183. </refdescription>
  184. <refsynopsisdiv>
  185. <synopsis><tag class="xmlpi">dbhtml class="<replaceable>name</replaceable>"</tag></synopsis>
  186. </refsynopsisdiv>
  187. <refparameter>
  188. <variablelist>
  189. <varlistentry><term>class="<replaceable>name</replaceable>"</term>
  190. <listitem>
  191. <para>Specifies the class name</para>
  192. </listitem>
  193. </varlistentry>
  194. </variablelist>
  195. </refparameter>
  196. <refsee role="tcg">
  197. <para><link role="tcg"
  198. xlink:href="CSSTableCells.html"
  199. >Table styles in HTML output</link></para>
  200. </refsee>
  201. </doc:pi>
  202. <xsl:template name="pi.dbhtml_class">
  203. <xsl:param name="node" select="."/>
  204. <xsl:call-template name="dbhtml-attribute">
  205. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  206. <xsl:with-param name="attribute" select="'class'"/>
  207. </xsl:call-template>
  208. </xsl:template>
  209. <doc:pi name="dbhtml_dir" xmlns="">
  210. <refpurpose>Specifies a directory name in which to write files</refpurpose>
  211. <refdescription>
  212. <para>When chunking output, use the <tag class="xmlpi">dbhtml dir</tag> PI
  213. as a child of a chunk source to cause the output of that
  214. chunk to be written to the specified directory; also, use it
  215. as a child of a <tag>mediaobject</tag> to specify a
  216. directory into which any long-description files for that
  217. <tag>mediaobject</tag> will be written.</para>
  218. <para>The output directory specification is inherited by all
  219. chunks of the descendants of the element. If descendants need
  220. to go to a different directory, then add another
  221. <tag class="xmlpi">dbhtml dir</tag> processing
  222. instruction as a child of the source element
  223. for that chunk, and specify the path relative to the
  224. ancestor path.</para>
  225. <para>For example, to put most chunk files into
  226. <filename class="directory">shared</filename>
  227. but one chapter into
  228. <filename class="directory">exception</filename>
  229. at the same level, use:</para>
  230. <programlisting><![CDATA[<book>
  231. <?dbhtml dir="shared"?>
  232. ...
  233. <chapter>
  234. <?dbhtml dir="../exception"?>
  235. </chapter>
  236. </book>
  237. ]]></programlisting>
  238. </refdescription>
  239. <refsynopsisdiv>
  240. <synopsis><tag class="xmlpi">dbhtml dir="<replaceable>path</replaceable>"</tag></synopsis>
  241. </refsynopsisdiv>
  242. <refparameter>
  243. <variablelist>
  244. <varlistentry><term>dir="<replaceable>path</replaceable>"</term>
  245. <listitem>
  246. <para>Specifies the pathname for the directory</para>
  247. </listitem>
  248. </varlistentry>
  249. </variablelist>
  250. </refparameter>
  251. <refsee role="params">
  252. <para><parameter>base.dir</parameter></para>
  253. </refsee>
  254. <refsee role="tcg">
  255. <para><link role="tcg"
  256. xlink:href="Chunking.html#dbhtmlDirPI"
  257. >dbhtml dir processing instruction</link></para>
  258. </refsee>
  259. </doc:pi>
  260. <xsl:template name="pi.dbhtml_dir">
  261. <xsl:param name="node" select="."/>
  262. <xsl:call-template name="dbhtml-attribute">
  263. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  264. <xsl:with-param name="attribute" select="'dir'"/>
  265. </xsl:call-template>
  266. </xsl:template>
  267. <doc:pi name="dbhtml_filename" xmlns="">
  268. <refpurpose>Specifies a filename for a chunk</refpurpose>
  269. <refdescription>
  270. <para>When chunking output, use the <tag class="xmlpi">dbhtml filename</tag>
  271. PI as a child of a chunk source to specify a filename for
  272. the output file for that chunk. Include the filename suffix.</para>
  273. <para>You cannot include a directory path in the filename value,
  274. or your links may not work. Add a
  275. <tag class="xmlpi">dbhtml dir</tag> processing instruction
  276. to specify the output directory. You can also combine the two
  277. specifications in one processing instruction:
  278. <tag class="xmlpi">dbhtml dir="mydir" filename="myfile.html"</tag>.</para>
  279. </refdescription>
  280. <refsynopsisdiv>
  281. <synopsis><tag class="xmlpi">dbhtml filename="<replaceable>filename</replaceable>"</tag></synopsis>
  282. </refsynopsisdiv>
  283. <refparameter>
  284. <variablelist>
  285. <varlistentry><term>filename="<replaceable>path</replaceable>"</term>
  286. <listitem>
  287. <para>Specifies the filename for the file</para>
  288. </listitem>
  289. </varlistentry>
  290. </variablelist>
  291. </refparameter>
  292. <refsee role="params">
  293. <para><parameter>use.id.as.filename</parameter></para>
  294. </refsee>
  295. <refsee role="tcg">
  296. <para><link role="tcg"
  297. xlink:href="Chunking.html#DbhtmlFilenames"
  298. >dbhtml filenames</link></para>
  299. </refsee>
  300. </doc:pi>
  301. <xsl:template name="pi.dbhtml_filename">
  302. <xsl:param name="node" select="."/>
  303. <xsl:call-template name="dbhtml-attribute">
  304. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  305. <xsl:with-param name="attribute" select="'filename'"/>
  306. </xsl:call-template>
  307. </xsl:template>
  308. <doc:pi name="dbhtml_funcsynopsis-style" xmlns="">
  309. <refpurpose>Specifies presentation style for a funcsynopsis</refpurpose>
  310. <refdescription>
  311. <para>Use the <tag class="xmlpi">dbhtml funcsynopsis-style</tag> PI as a child of
  312. a <tag>funcsynopsis</tag> or anywhere within a funcsynopsis
  313. to control the presentation style for output of all
  314. <tag>funcprototype</tag> instances within that funcsynopsis.</para>
  315. </refdescription>
  316. <refsynopsisdiv>
  317. <synopsis><tag class="xmlpi">dbhtml funcsynopsis-style="kr"|"ansi"</tag></synopsis>
  318. </refsynopsisdiv>
  319. <refparameter>
  320. <variablelist>
  321. <varlistentry><term>funcsynopsis-style="kr"</term>
  322. <listitem>
  323. <para>Displays <tag>funcprototype</tag> output in K&amp;R style</para>
  324. </listitem>
  325. </varlistentry>
  326. <varlistentry><term>funcsynopsis-style="ansi"</term>
  327. <listitem>
  328. <para>Displays <tag>funcprototype</tag> output in ANSI style</para>
  329. </listitem>
  330. </varlistentry>
  331. </variablelist>
  332. </refparameter>
  333. <refsee role="params">
  334. <para><parameter>funcsynopsis.style</parameter></para>
  335. </refsee>
  336. </doc:pi>
  337. <xsl:template name="pi.dbhtml_funcsynopsis-style">
  338. <xsl:param name="node" select="."/>
  339. <xsl:call-template name="dbhtml-attribute">
  340. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  341. <xsl:with-param name="attribute" select="'funcsynopsis-style'"/>
  342. </xsl:call-template>
  343. </xsl:template>
  344. <doc:pi name="dbhtml_img.src.path" xmlns="">
  345. <refpurpose>Specifies a path to the location of an image file</refpurpose>
  346. <refdescription>
  347. <para>Use the <tag class="xmlpi">dbhtml img.src.path</tag> PI before or
  348. after an image (<tag>graphic</tag>,
  349. <tag>inlinegraphic</tag>, <tag>imagedata</tag>, or
  350. <tag>videodata</tag> element) as a sibling to the element,
  351. to specify a path to the location of the image; in HTML
  352. output, the value specified for the
  353. <code>img.src.path</code> attribute is prepended to the
  354. filename.</para>
  355. </refdescription>
  356. <refsynopsisdiv>
  357. <synopsis><tag class="xmlpi">dbhtml img.src.path="<replaceable>path</replaceable>"</tag></synopsis>
  358. </refsynopsisdiv>
  359. <refparameter>
  360. <variablelist>
  361. <varlistentry><term>img.src.path="<replaceable>path</replaceable>"</term>
  362. <listitem>
  363. <para>Specifies the pathname to prepend to the name of the image file</para>
  364. </listitem>
  365. </varlistentry>
  366. </variablelist>
  367. </refparameter>
  368. <refsee role="params">
  369. <para><parameter>img.src.path</parameter></para>
  370. </refsee>
  371. <refsee role="tcg">
  372. <para><link role="tcg"
  373. xlink:href="GraphicsLocations.html#UsingFileref"
  374. >Using fileref</link></para>
  375. </refsee>
  376. </doc:pi>
  377. <xsl:template name="pi.dbhtml_img.src.path">
  378. <xsl:param name="node" select="."/>
  379. <xsl:call-template name="dbhtml-attribute">
  380. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  381. <xsl:with-param name="attribute" select="'img.src.path'"/>
  382. </xsl:call-template>
  383. </xsl:template>
  384. <doc:pi name="dbhtml_label-width" xmlns="">
  385. <refpurpose>Specifies the label width for a qandaset</refpurpose>
  386. <refdescription>
  387. <para>Use the <tag class="xmlpi">dbhtml label-width</tag> PI as a child of a
  388. <tag>qandaset</tag> to specify the width of labels.</para>
  389. </refdescription>
  390. <refsynopsisdiv>
  391. <synopsis><tag class="xmlpi">dbhtml label-width="<replaceable>width</replaceable>"</tag></synopsis>
  392. </refsynopsisdiv>
  393. <refparameter>
  394. <variablelist>
  395. <varlistentry><term>label-width="<replaceable>width</replaceable>"</term>
  396. <listitem>
  397. <para>Specifies the label width (including units)</para>
  398. </listitem>
  399. </varlistentry>
  400. </variablelist>
  401. </refparameter>
  402. <refsee role="tcg">
  403. <para><link role="tcg"
  404. xlink:href="QandAformat.html"
  405. >Q and A formatting</link></para>
  406. </refsee>
  407. </doc:pi>
  408. <xsl:template name="pi.dbhtml_label-width">
  409. <xsl:param name="node" select="."/>
  410. <xsl:call-template name="dbhtml-attribute">
  411. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  412. <xsl:with-param name="attribute" select="'label-width'"/>
  413. </xsl:call-template>
  414. </xsl:template>
  415. <doc:pi name="dbhtml_linenumbering.everyNth" xmlns="">
  416. <refpurpose>Specifies interval for line numbers in verbatims</refpurpose>
  417. <refdescription>
  418. <para>Use the <tag class="xmlpi">dbhtml linenumbering.everyNth</tag> PI as a child
  419. of a “verbatim” element – <tag>programlisting</tag>,
  420. <tag>screen</tag>, <tag>synopsis</tag> — to specify
  421. the interval at which lines are numbered.</para>
  422. </refdescription>
  423. <refsynopsisdiv>
  424. <synopsis><tag class="xmlpi">dbhtml linenumbering.everyNth="<replaceable>N</replaceable>"</tag></synopsis>
  425. </refsynopsisdiv>
  426. <refparameter>
  427. <variablelist>
  428. <varlistentry><term>linenumbering.everyNth="<replaceable>N</replaceable>"</term>
  429. <listitem>
  430. <para>Specifies numbering interval; a number is output
  431. before every <replaceable>N</replaceable>th line</para>
  432. </listitem>
  433. </varlistentry>
  434. </variablelist>
  435. </refparameter>
  436. <refsee role="params">
  437. <para><parameter>linenumbering.everyNth</parameter></para>
  438. </refsee>
  439. <refsee role="tcg">
  440. <para><link role="tcg"
  441. xlink:href="AnnotateListing.html#LineNumbering"
  442. >Line numbering</link></para>
  443. </refsee>
  444. </doc:pi>
  445. <xsl:template name="pi.dbhtml_linenumbering.everyNth">
  446. <xsl:param name="node" select="."/>
  447. <xsl:call-template name="dbhtml-attribute">
  448. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  449. <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
  450. </xsl:call-template>
  451. </xsl:template>
  452. <doc:pi name="dbhtml_linenumbering.separator" xmlns="">
  453. <refpurpose>Specifies separator text for line numbers in verbatims</refpurpose>
  454. <refdescription>
  455. <para>Use the <tag class="xmlpi">dbhtml linenumbering.separator</tag> PI as a child
  456. of a “verbatim” element – <tag>programlisting</tag>,
  457. <tag>screen</tag>, <tag>synopsis</tag> — to specify
  458. the separator text output between the line numbers and content.</para>
  459. </refdescription>
  460. <refsynopsisdiv>
  461. <synopsis><tag class="xmlpi">dbhtml linenumbering.separator="<replaceable>text</replaceable>"</tag></synopsis>
  462. </refsynopsisdiv>
  463. <refparameter>
  464. <variablelist>
  465. <varlistentry><term>linenumbering.separator="<replaceable>text</replaceable>"</term>
  466. <listitem>
  467. <para>Specifies the text (zero or more characters)</para>
  468. </listitem>
  469. </varlistentry>
  470. </variablelist>
  471. </refparameter>
  472. <refsee role="params">
  473. <para><parameter>linenumbering.separator</parameter></para>
  474. </refsee>
  475. <refsee role="tcg">
  476. <para><link role="tcg"
  477. xlink:href="AnnotateListing.html#LineNumbering"
  478. >Line numbering</link></para>
  479. </refsee>
  480. </doc:pi>
  481. <xsl:template name="pi.dbhtml_linenumbering.separator">
  482. <xsl:param name="node" select="."/>
  483. <xsl:call-template name="dbhtml-attribute">
  484. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  485. <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
  486. </xsl:call-template>
  487. </xsl:template>
  488. <doc:pi name="dbhtml_linenumbering.width" xmlns="">
  489. <refpurpose>Specifies width for line numbers in verbatims</refpurpose>
  490. <refdescription>
  491. <para>Use the <tag class="xmlpi">dbhtml linenumbering.width</tag> PI as a child
  492. of a “verbatim” element – <tag>programlisting</tag>,
  493. <tag>screen</tag>, <tag>synopsis</tag> — to specify
  494. the width set aside for line numbers.</para>
  495. </refdescription>
  496. <refsynopsisdiv>
  497. <synopsis><tag class="xmlpi">dbhtml linenumbering.width="<replaceable>width</replaceable>"</tag></synopsis>
  498. </refsynopsisdiv>
  499. <refparameter>
  500. <variablelist>
  501. <varlistentry><term>linenumbering.width="<replaceable>width</replaceable>"</term>
  502. <listitem>
  503. <para>Specifies the width (inluding units)</para>
  504. </listitem>
  505. </varlistentry>
  506. </variablelist>
  507. </refparameter>
  508. <refsee role="params">
  509. <para><parameter>linenumbering.width</parameter></para>
  510. </refsee>
  511. <refsee role="tcg">
  512. <para><link role="tcg"
  513. xlink:href="AnnotateListing.html#LineNumbering"
  514. >Line numbering</link></para>
  515. </refsee>
  516. </doc:pi>
  517. <xsl:template name="pi.dbhtml_linenumbering.width">
  518. <xsl:param name="node" select="."/>
  519. <xsl:call-template name="dbhtml-attribute">
  520. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  521. <xsl:with-param name="attribute" select="'linenumbering.width'"/>
  522. </xsl:call-template>
  523. </xsl:template>
  524. <doc:pi name="dbhtml_list-presentation" xmlns="">
  525. <refpurpose>Specifies presentation style for a variablelist or
  526. segmentedlist</refpurpose>
  527. <refdescription>
  528. <para>Use the <tag class="xmlpi">dbhtml list-presentation</tag> PI as a child of
  529. a <tag>variablelist</tag> or <tag>segmentedlist</tag> to
  530. control the presentation style for the list (to cause it, for
  531. example, to be displayed as a table).</para>
  532. </refdescription>
  533. <refsynopsisdiv>
  534. <synopsis><tag class="xmlpi">dbhtml list-presentation="list"|"table"</tag></synopsis>
  535. </refsynopsisdiv>
  536. <refparameter>
  537. <variablelist>
  538. <varlistentry><term>list-presentation="list"</term>
  539. <listitem>
  540. <para>Displays the list as a list</para>
  541. </listitem>
  542. </varlistentry>
  543. <varlistentry><term>list-presentation="table"</term>
  544. <listitem>
  545. <para>Displays the list as a table</para>
  546. </listitem>
  547. </varlistentry>
  548. </variablelist>
  549. </refparameter>
  550. <refsee role="params">
  551. <itemizedlist>
  552. <listitem>
  553. <para><parameter>variablelist.as.table</parameter></para>
  554. </listitem>
  555. <listitem>
  556. <para><parameter>segmentedlist.as.table</parameter></para>
  557. </listitem>
  558. </itemizedlist>
  559. </refsee>
  560. <refsee role="tcg">
  561. <para><link role="tcg"
  562. xlink:href="Variablelists.html#VarListFormatting"
  563. >Variable list formatting in HTML</link></para>
  564. </refsee>
  565. </doc:pi>
  566. <xsl:template name="pi.dbhtml_list-presentation">
  567. <xsl:param name="node" select="."/>
  568. <xsl:call-template name="dbhtml-attribute">
  569. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  570. <xsl:with-param name="attribute" select="'list-presentation'"/>
  571. </xsl:call-template>
  572. </xsl:template>
  573. <doc:pi name="dbhtml_list-width" xmlns="">
  574. <refpurpose>Specifies the width of a variablelist or simplelist</refpurpose>
  575. <refdescription>
  576. <para>Use the <tag class="xmlpi">dbhtml list-width</tag> PI as a child of a
  577. <tag>variablelist</tag> or a <tag>simplelist</tag> presented
  578. as a table, to specify the output width.</para>
  579. </refdescription>
  580. <refsynopsisdiv>
  581. <synopsis><tag class="xmlpi">dbhtml list-width="<replaceable>width</replaceable>"</tag></synopsis>
  582. </refsynopsisdiv>
  583. <refparameter>
  584. <variablelist>
  585. <varlistentry><term>list-width="<replaceable>width</replaceable>"</term>
  586. <listitem>
  587. <para>Specifies the output width (including units)</para>
  588. </listitem>
  589. </varlistentry>
  590. </variablelist>
  591. </refparameter>
  592. <refsee role="tcg">
  593. <para><link role="tcg"
  594. xlink:href="Variablelists.html#VarListFormatting"
  595. >Variable list formatting in HTML</link></para>
  596. </refsee>
  597. </doc:pi>
  598. <xsl:template name="pi.dbhtml_list-width">
  599. <xsl:param name="node" select="."/>
  600. <xsl:call-template name="dbhtml-attribute">
  601. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  602. <xsl:with-param name="attribute" select="'list-width'"/>
  603. </xsl:call-template>
  604. </xsl:template>
  605. <doc:pi name="dbhtml_row-height" xmlns="">
  606. <refpurpose>Specifies the height for a CALS table row</refpurpose>
  607. <refdescription>
  608. <para>Use the <tag class="xmlpi">dbhtml row-height</tag> PI as a child of a
  609. <tag>row</tag> to specify the height of the row.</para>
  610. </refdescription>
  611. <refsynopsisdiv>
  612. <synopsis><tag class="xmlpi">dbhtml row-height="<replaceable>height</replaceable>"</tag></synopsis>
  613. </refsynopsisdiv>
  614. <refparameter>
  615. <variablelist>
  616. <varlistentry><term>row-height="<replaceable>height</replaceable>"</term>
  617. <listitem>
  618. <para>Specifies the row height (including units)</para>
  619. </listitem>
  620. </varlistentry>
  621. </variablelist>
  622. </refparameter>
  623. <refsee role="tcg">
  624. <para><link role="tcg"
  625. xlink:href="RowHeight.html"
  626. >Row height</link></para>
  627. </refsee>
  628. </doc:pi>
  629. <xsl:template name="pi.dbhtml_row-height">
  630. <xsl:param name="node" select="."/>
  631. <xsl:call-template name="dbhtml-attribute">
  632. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  633. <xsl:with-param name="attribute" select="'row-height'"/>
  634. </xsl:call-template>
  635. </xsl:template>
  636. <doc:pi name="dbhtml_start" xmlns="">
  637. <refpurpose>(obsolete) Sets the starting number on an ordered list</refpurpose>
  638. <refdescription>
  639. <para><emphasis>This PI is obsolete</emphasis>. The intent of
  640. this PI was to provide a means for setting a specific starting
  641. number for an ordered list. Instead of this PI, set a value
  642. for the <literal>override</literal> attribute on the first
  643. <tag>listitem</tag> in the list; that will have the same
  644. effect as what this PI was intended for.</para>
  645. </refdescription>
  646. <refsynopsisdiv>
  647. <synopsis><tag class="xmlpi">dbhtml start="<replaceable>character</replaceable>"</tag></synopsis>
  648. </refsynopsisdiv>
  649. <refparameter>
  650. <variablelist>
  651. <varlistentry><term>start="<replaceable>character</replaceable>"</term>
  652. <listitem>
  653. <para>Specifies the character to use as the starting
  654. number; use 0-9, a-z, A-Z, or lowercase or uppercase
  655. Roman numerals</para>
  656. </listitem>
  657. </varlistentry>
  658. </variablelist>
  659. </refparameter>
  660. <refsee role="tcg">
  661. <para><link role="tcg"
  662. xlink:href="Orderedlists.html#ListStartNum"
  663. >List starting number</link></para>
  664. </refsee>
  665. </doc:pi>
  666. <xsl:template name="pi.dbhtml_start">
  667. <xsl:param name="node" select="."/>
  668. <xsl:call-template name="pi-attribute">
  669. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  670. <xsl:with-param name="attribute" select="'start'"/>
  671. </xsl:call-template>
  672. </xsl:template>
  673. <doc:pi name="dbhtml_stop-chunking" xmlns="">
  674. <refpurpose>Do not chunk any descendants of this element.</refpurpose>
  675. <refdescription>
  676. <para>When generating chunked HTML output, adding this PI as the child of an element that contains elements that would normally be generated on separate pages if generating chunked output causes chunking to stop at this point. No descendants of the current element will be split into new HTML pages:
  677. <programlisting><![CDATA[<section>
  678. <title>Configuring pencil</title>
  679. <?dbhtml stop-chunking?>
  680. ...
  681. </section>]]></programlisting>
  682. </para>
  683. </refdescription>
  684. <refsynopsisdiv>
  685. <synopsis><tag class="xmlpi">dbhtml stop-chunking</tag></synopsis>
  686. </refsynopsisdiv>
  687. <refsee role="tcg">
  688. <para><link role="tcg"
  689. xlink:href="Chunking.html"
  690. >Chunking into multiple HTML files</link></para>
  691. </refsee>
  692. </doc:pi>
  693. <!-- The code that handles the stop-chunking pi is in chunk-common.xsl -->
  694. <doc:pi name="dbhtml_table-summary" xmlns="">
  695. <refpurpose>Specifies summary for CALS table, variablelist, segmentedlist, or qandaset output</refpurpose>
  696. <refdescription>
  697. <para>Use the <tag class="xmlpi">dbhtml table-summary</tag> PI as a child of
  698. a CALS <tag>table</tag>, <tag>variablelist</tag>,
  699. <tag>segmentedlist</tag>, or <tag>qandaset</tag> to specify
  700. the text for the HTML <literal>summary</literal> attribute
  701. in the output HTML table.</para>
  702. </refdescription>
  703. <refsynopsisdiv>
  704. <synopsis><tag class="xmlpi">dbhtml table-summary="<replaceable>text</replaceable>"</tag></synopsis>
  705. </refsynopsisdiv>
  706. <refparameter>
  707. <variablelist>
  708. <varlistentry><term>table-summary="<replaceable>text</replaceable>"</term>
  709. <listitem>
  710. <para>Specifies the summary text (zero or more characters)</para>
  711. </listitem>
  712. </varlistentry>
  713. </variablelist>
  714. </refparameter>
  715. <refsee role="tcg">
  716. <para><link role="tcg"
  717. xlink:href="Variablelists.html#VarListFormatting"
  718. >Variable list formatting in HTML</link>,
  719. <link role="tcg" xlink:href="TableSummary.html"
  720. >Table summary text</link></para>
  721. </refsee>
  722. </doc:pi>
  723. <xsl:template name="pi.dbhtml_table-summary">
  724. <xsl:param name="node" select="."/>
  725. <xsl:call-template name="dbhtml-attribute">
  726. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  727. <xsl:with-param name="attribute" select="'table-summary'"/>
  728. </xsl:call-template>
  729. </xsl:template>
  730. <doc:pi name="dbhtml_table-width" xmlns="">
  731. <refpurpose>Specifies the width for a CALS table</refpurpose>
  732. <refdescription>
  733. <para>Use the <tag class="xmlpi">dbhtml table-width</tag> PI as a child of a
  734. CALS <tag>table</tag> to specify the width of the table in
  735. output.</para>
  736. </refdescription>
  737. <refsynopsisdiv>
  738. <synopsis><tag class="xmlpi">dbhtml table-width="<replaceable>width</replaceable>"</tag></synopsis>
  739. </refsynopsisdiv>
  740. <refparameter>
  741. <variablelist>
  742. <varlistentry><term>table-width="<replaceable>width</replaceable>"</term>
  743. <listitem>
  744. <para>Specifies the table width (including units or as a percentage)</para>
  745. </listitem>
  746. </varlistentry>
  747. </variablelist>
  748. </refparameter>
  749. <refsee role="params">
  750. <para><parameter>default.table.width</parameter></para>
  751. </refsee>
  752. <refsee role="tcg">
  753. <para><link role="tcg"
  754. xlink:href="Tables.html#TableWidth"
  755. >Table width</link></para>
  756. </refsee>
  757. </doc:pi>
  758. <xsl:template name="pi.dbhtml_table-width">
  759. <xsl:param name="node" select="."/>
  760. <xsl:call-template name="dbhtml-attribute">
  761. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  762. <xsl:with-param name="attribute" select="'table-width'"/>
  763. </xsl:call-template>
  764. </xsl:template>
  765. <doc:pi name="dbhtml_term-presentation" xmlns="">
  766. <refpurpose>Sets character formatting for terms in a variablelist</refpurpose>
  767. <refdescription>
  768. <para>Use the <tag class="xmlpi">dbhtml term-presentation</tag> PI as a child
  769. of a <tag>variablelist</tag> to set character formatting for
  770. the <tag>term</tag> output of the list.</para>
  771. </refdescription>
  772. <refsynopsisdiv>
  773. <synopsis><tag class="xmlpi">dbhtml term-presentation="bold"|"italic"|"bold-italic"</tag></synopsis>
  774. </refsynopsisdiv>
  775. <refparameter>
  776. <variablelist>
  777. <varlistentry><term>term-presentation="<replaceable>bold</replaceable>"</term>
  778. <listitem>
  779. <para>Specifies that terms are displayed in bold</para>
  780. </listitem>
  781. </varlistentry>
  782. <varlistentry><term>term-presentation="<replaceable>italic</replaceable>"</term>
  783. <listitem>
  784. <para>Specifies that terms are displayed in italic</para>
  785. </listitem>
  786. </varlistentry>
  787. <varlistentry><term>term-presentation="<replaceable>bold-italic</replaceable>"</term>
  788. <listitem>
  789. <para>Specifies that terms are displayed in bold-italic</para>
  790. </listitem>
  791. </varlistentry>
  792. </variablelist>
  793. </refparameter>
  794. <refsee role="tcg">
  795. <para><link role="tcg"
  796. xlink:href="Variablelists.html#VarListFormatting"
  797. >Variable list formatting in HTML</link></para>
  798. </refsee>
  799. </doc:pi>
  800. <xsl:template name="pi.dbhtml_term-presentation">
  801. <xsl:param name="node" select="."/>
  802. <xsl:call-template name="dbhtml-attribute">
  803. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  804. <xsl:with-param name="attribute" select="'term-presentation'"/>
  805. </xsl:call-template>
  806. </xsl:template>
  807. <doc:pi name="dbhtml_term-separator" xmlns="">
  808. <refpurpose>Specifies separator text among terms in a varlistentry</refpurpose>
  809. <refdescription>
  810. <para>Use the <tag class="xmlpi">dbhtml term-separator</tag> PI as a child
  811. of a <tag>variablelist</tag> to specify the separator text
  812. among <tag>term</tag> instances.</para>
  813. </refdescription>
  814. <refsynopsisdiv>
  815. <synopsis><tag class="xmlpi">dbhtml term-separator="<replaceable>text</replaceable>"</tag></synopsis>
  816. </refsynopsisdiv>
  817. <refparameter>
  818. <variablelist>
  819. <varlistentry><term>term-separator="<replaceable>text</replaceable>"</term>
  820. <listitem>
  821. <para>Specifies the text (zero or more characters)</para>
  822. </listitem>
  823. </varlistentry>
  824. </variablelist>
  825. </refparameter>
  826. <refsee role="params">
  827. <para><parameter>variablelist.term.separator</parameter></para>
  828. </refsee>
  829. <refsee role="tcg">
  830. <para><link role="tcg"
  831. xlink:href="Variablelists.html#VarListFormatting"
  832. >Variable list formatting in HTML</link></para>
  833. </refsee>
  834. </doc:pi>
  835. <xsl:template name="pi.dbhtml_term-separator">
  836. <xsl:param name="node" select="."/>
  837. <xsl:call-template name="dbhtml-attribute">
  838. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  839. <xsl:with-param name="attribute" select="'term-separator'"/>
  840. </xsl:call-template>
  841. </xsl:template>
  842. <doc:pi name="dbhtml_term-width" xmlns="">
  843. <refpurpose>Specifies the term width for a variablelist</refpurpose>
  844. <refdescription>
  845. <para>Use the <tag class="xmlpi">dbhtml term-width</tag> PI as a child of a
  846. <tag>variablelist</tag> to specify the width for
  847. <tag>term</tag> output.</para>
  848. </refdescription>
  849. <refsynopsisdiv>
  850. <synopsis><tag class="xmlpi">dbhtml term-width="<replaceable>width</replaceable>"</tag></synopsis>
  851. </refsynopsisdiv>
  852. <refparameter>
  853. <variablelist>
  854. <varlistentry><term>term-width="<replaceable>width</replaceable>"</term>
  855. <listitem>
  856. <para>Specifies the term width (including units)</para>
  857. </listitem>
  858. </varlistentry>
  859. </variablelist>
  860. </refparameter>
  861. <refsee role="tcg">
  862. <para><link role="tcg"
  863. xlink:href="Variablelists.html#VarListFormatting"
  864. >Variable list formatting in HTML</link></para>
  865. </refsee>
  866. </doc:pi>
  867. <xsl:template name="pi.dbhtml_term-width">
  868. <xsl:param name="node" select="."/>
  869. <xsl:call-template name="dbhtml-attribute">
  870. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  871. <xsl:with-param name="attribute" select="'term-width'"/>
  872. </xsl:call-template>
  873. </xsl:template>
  874. <doc:pi name="dbhtml_toc" xmlns="">
  875. <refpurpose>Specifies whether a TOC should be generated for a qandaset</refpurpose>
  876. <refdescription>
  877. <para>Use the <tag class="xmlpi">dbhtml toc</tag> PI as a child of a
  878. <tag>qandaset</tag> to specify whether a table of contents
  879. (TOC) is generated for the <tag>qandaset</tag>.</para>
  880. </refdescription>
  881. <refsynopsisdiv>
  882. <synopsis><tag class="xmlpi">dbhtml toc="0"|"1"</tag></synopsis>
  883. </refsynopsisdiv>
  884. <refparameter>
  885. <variablelist>
  886. <varlistentry><term>toc="0"</term>
  887. <listitem>
  888. <para>If zero, no TOC is generated</para>
  889. </listitem>
  890. </varlistentry>
  891. <varlistentry><term>toc="1"</term>
  892. <listitem>
  893. <para>If <code>1</code> (or any non-zero value),
  894. a TOC is generated</para>
  895. </listitem>
  896. </varlistentry>
  897. </variablelist>
  898. </refparameter>
  899. <refsee role="tcg">
  900. <para><link role="tcg"
  901. xlink:href="QandAtoc.html"
  902. >Q and A list of questions</link>,
  903. <link role="tcg"
  904. xlink:href="QandAformat.html"
  905. >Q and A formatting</link></para>
  906. </refsee>
  907. </doc:pi>
  908. <xsl:template name="pi.dbhtml_toc">
  909. <xsl:param name="node" select="."/>
  910. <xsl:call-template name="dbhtml-attribute">
  911. <xsl:with-param name="pis" select="$node/processing-instruction('dbhtml')"/>
  912. <xsl:with-param name="attribute" select="'toc'"/>
  913. </xsl:call-template>
  914. </xsl:template>
  915. <doc:pi name="dbcmdlist" xmlns="">
  916. <refpurpose>Generates a hyperlinked list of commands</refpurpose>
  917. <refdescription>
  918. <para>Use the <tag class="xmlpi">dbcmdlist</tag> PI as the child of any
  919. element (for example, <tag>refsynopsisdiv</tag>) containing multiple
  920. <tag>cmdsynopsis</tag> instances; a hyperlinked navigational
  921. “command list” will be generated at the top of output for that
  922. element, enabling users to quickly jump
  923. to each command synopsis.</para>
  924. </refdescription>
  925. <refsynopsisdiv>
  926. <synopsis><tag class="xmlpi">dbcmdlist</tag></synopsis>
  927. </refsynopsisdiv>
  928. <refparameter>
  929. <para>[No parameters]</para>
  930. </refparameter>
  931. </doc:pi>
  932. <xsl:template name="pi.dbcmdlist">
  933. <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
  934. <xsl:if test="count($cmdsynopses)&lt;1">
  935. <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
  936. </xsl:message>
  937. </xsl:if>
  938. <dl>
  939. <xsl:call-template name="process.cmdsynopsis.list">
  940. <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
  941. </xsl:call-template>
  942. </dl>
  943. </xsl:template>
  944. <doc:pi name="dbfunclist" xmlns="">
  945. <refpurpose>Generates a hyperlinked list of functions</refpurpose>
  946. <refdescription>
  947. <para>Use the <tag class="xmlpi">dbfunclist</tag> PI as the child of any
  948. element (for example, <tag>refsynopsisdiv</tag>) containing multiple
  949. <tag>funcsynopsis</tag> instances; a hyperlinked
  950. navigational “function list” will be generated at the top of
  951. output for that element, enabling users to quickly
  952. jump to to each function synopsis.</para>
  953. </refdescription>
  954. <refsynopsisdiv>
  955. <synopsis><tag class="xmlpi">dbfunclist</tag></synopsis>
  956. </refsynopsisdiv>
  957. <refparameter>
  958. <para>[No parameters]</para>
  959. </refparameter>
  960. </doc:pi>
  961. <xsl:template name="pi.dbfunclist">
  962. <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
  963. <xsl:if test="count($funcsynopses)&lt;1">
  964. <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
  965. </xsl:message>
  966. </xsl:if>
  967. <dl>
  968. <xsl:call-template name="process.funcsynopsis.list">
  969. <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
  970. </xsl:call-template>
  971. </dl>
  972. </xsl:template>
  973. <doc:pi name="dbhtml-include_href" xmlns="">
  974. <refpurpose>Copies an external well-formed HTML/XML file into current doc</refpurpose>
  975. <refdescription>
  976. <para>Use the <tag class="xmlpi">dbhtml-include href</tag> PI anywhere in a
  977. document to cause the contents of the file referenced by the
  978. <code>href</code> pseudo-attribute to be copied/inserted “as
  979. is” into your HTML output at the point in document order
  980. where the PI occurs in the source.</para>
  981. <note>
  982. <para>The referenced file may contain plain text (as long as
  983. it is “wrapped” in an <tag>html</tag> element — see the
  984. note below) or markup in any arbitrary vocabulary,
  985. including HTML — but it must conform to XML
  986. well-formedness constraints (because the feature in XSLT
  987. 1.0 for opening external files, the
  988. <function>document()</function> function, can only handle
  989. files that meet XML well-formedness constraints).</para>
  990. <para>Among other things, XML well-formedness constraints
  991. require a document to have <emphasis>a single root
  992. element</emphasis>. So if the content you want to
  993. include is plain text or is markup that does
  994. <emphasis>not</emphasis> have a single root element,
  995. <emphasis role="strong">wrap the content in an
  996. <tag>html</tag> element</emphasis>. The stylesheets will
  997. strip out that surrounding <tag>html</tag> “wrapper” when
  998. they find it, leaving just the content you want to
  999. insert.</para>
  1000. </note>
  1001. </refdescription>
  1002. <refsynopsisdiv>
  1003. <synopsis><tag class="xmlpi">dbhtml-include href="<replaceable>URI</replaceable>"</tag></synopsis>
  1004. </refsynopsisdiv>
  1005. <refparameter>
  1006. <variablelist>
  1007. <varlistentry><term>href="<replaceable>URI</replaceable>"</term>
  1008. <listitem>
  1009. <para>Specifies the URI for the file to include; the URI
  1010. can be, for example, a remote <literal>http:</literal>
  1011. URI, or a local filesystem <literal>file:</literal>
  1012. URI</para>
  1013. </listitem>
  1014. </varlistentry>
  1015. </variablelist>
  1016. </refparameter>
  1017. <refsee role="params">
  1018. <para><parameter>textinsert.extension</parameter></para>
  1019. </refsee>
  1020. <refsee role="tcg">
  1021. <para><link role="tcg"
  1022. xlink:href="InsertExtHtml.html"
  1023. >Inserting external HTML code</link>,
  1024. <link role="tcg"
  1025. xlink:href="ExternalCode.html"
  1026. >External code files</link></para>
  1027. </refsee>
  1028. </doc:pi>
  1029. <xsl:template name="pi.dbhtml-include">
  1030. <xsl:param name="href">
  1031. <xsl:call-template name="dbhtml-attribute">
  1032. <xsl:with-param name="pis" select="."/>
  1033. <xsl:with-param name="attribute">href</xsl:with-param>
  1034. </xsl:call-template>
  1035. </xsl:param>
  1036. <xsl:choose>
  1037. <xsl:when test="$href != ''">
  1038. <xsl:variable name="content" select="document($href,/)"/>
  1039. <xsl:choose>
  1040. <xsl:when test="$content/*">
  1041. <xsl:choose>
  1042. <xsl:when test="$content/*[1][self::html]">
  1043. <!-- include just the children of html wrapper -->
  1044. <xsl:copy-of select="$content/*[1]/node()"/>
  1045. </xsl:when>
  1046. <xsl:otherwise>
  1047. <xsl:copy-of select="$content"/>
  1048. </xsl:otherwise>
  1049. </xsl:choose>
  1050. </xsl:when>
  1051. <xsl:otherwise>
  1052. <xsl:message>
  1053. <xsl:text>ERROR: dbhtml-include processing instruction </xsl:text>
  1054. <xsl:text>href has no content.</xsl:text>
  1055. </xsl:message>
  1056. </xsl:otherwise>
  1057. </xsl:choose>
  1058. </xsl:when>
  1059. <xsl:otherwise>
  1060. <xsl:message>
  1061. <xsl:text>ERROR: dbhtml-include processing instruction has </xsl:text>
  1062. <xsl:text>missing or empty href value.</xsl:text>
  1063. </xsl:message>
  1064. </xsl:otherwise>
  1065. </xsl:choose>
  1066. </xsl:template>
  1067. <!-- There are two templates matching this PI in htmlhelp-common.xsl -->
  1068. <doc:pi name="dbhh" xmlns="">
  1069. <refpurpose>Sets topic name and topic id for context-sensitive HTML Help</refpurpose>
  1070. <refdescription>
  1071. <para>Use the <tag class="xmlpi">dbhh</tag> PI as a child of components
  1072. that should be used as targets for context-sensitive help requests.</para>
  1073. </refdescription>
  1074. <refsynopsisdiv>
  1075. <synopsis><tag class="xmlpi">dbhh topicname="<replaceable>name</replaceable>" topicid="<replaceable>id</replaceable>"</tag></synopsis>
  1076. </refsynopsisdiv>
  1077. <refparameter>
  1078. <variablelist>
  1079. <varlistentry><term>topicname="<replaceable>name</replaceable>"</term>
  1080. <listitem>
  1081. <para>Specifies a unique string constant that identifies a help topic</para>
  1082. </listitem>
  1083. </varlistentry>
  1084. <varlistentry><term>topicid="<replaceable>id</replaceable>"</term>
  1085. <listitem>
  1086. <para>Specifies a unique integer value for the <literal>topicname</literal> string</para>
  1087. </listitem>
  1088. </varlistentry>
  1089. </variablelist>
  1090. </refparameter>
  1091. <refsee role="tcg">
  1092. <para><link role="tcg"
  1093. xlink:href="HtmlHelp.html#HHContextHelp"
  1094. >Context-sensitive help</link></para>
  1095. </refsee>
  1096. </doc:pi>
  1097. <!-- ==================================================================== -->
  1098. <xsl:template name="dbhtml-attribute">
  1099. <!-- * dbhtml-attribute is an interal utility template for retrieving -->
  1100. <!-- * pseudo-attributes/parameters from PIs -->
  1101. <xsl:param name="pis" select="processing-instruction('dbhtml')"/>
  1102. <xsl:param name="attribute">filename</xsl:param>
  1103. <xsl:call-template name="pi-attribute">
  1104. <xsl:with-param name="pis" select="$pis"/>
  1105. <xsl:with-param name="attribute" select="$attribute"/>
  1106. </xsl:call-template>
  1107. </xsl:template>
  1108. <!-- ==================================================================== -->
  1109. <xsl:template match="processing-instruction()">
  1110. </xsl:template>
  1111. <xsl:template match="processing-instruction('dbhtml')">
  1112. <!-- nop -->
  1113. </xsl:template>
  1114. <!-- ==================================================================== -->
  1115. <xsl:template match="processing-instruction('dbcmdlist')">
  1116. <xsl:call-template name="pi.dbcmdlist"/>
  1117. </xsl:template>
  1118. <xsl:template name="process.cmdsynopsis.list">
  1119. <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
  1120. <xsl:param name="count" select="1"/>
  1121. <xsl:choose>
  1122. <xsl:when test="$count>count($cmdsynopses)"></xsl:when>
  1123. <xsl:otherwise>
  1124. <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
  1125. <dt>
  1126. <a>
  1127. <xsl:attribute name="href">
  1128. <xsl:text>#</xsl:text>
  1129. <xsl:call-template name="object.id">
  1130. <xsl:with-param name="object" select="$cmdsyn"/>
  1131. </xsl:call-template>
  1132. </xsl:attribute>
  1133. <xsl:choose>
  1134. <xsl:when test="$cmdsyn/@xreflabel">
  1135. <xsl:call-template name="xref.xreflabel">
  1136. <xsl:with-param name="target" select="$cmdsyn"/>
  1137. </xsl:call-template>
  1138. </xsl:when>
  1139. <xsl:otherwise>
  1140. <xsl:apply-templates select="$cmdsyn" mode="xref-to">
  1141. <xsl:with-param name="target" select="$cmdsyn"/>
  1142. </xsl:apply-templates>
  1143. </xsl:otherwise>
  1144. </xsl:choose>
  1145. </a>
  1146. </dt>
  1147. <xsl:call-template name="process.cmdsynopsis.list">
  1148. <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
  1149. <xsl:with-param name="count" select="$count+1"/>
  1150. </xsl:call-template>
  1151. </xsl:otherwise>
  1152. </xsl:choose>
  1153. </xsl:template>
  1154. <!-- ==================================================================== -->
  1155. <xsl:template match="processing-instruction('dbfunclist')">
  1156. <xsl:call-template name="pi.dbfunclist"/>
  1157. </xsl:template>
  1158. <xsl:template name="process.funcsynopsis.list">
  1159. <xsl:param name="funcsynopses"/><!-- empty node list by default -->
  1160. <xsl:param name="count" select="1"/>
  1161. <xsl:choose>
  1162. <xsl:when test="$count>count($funcsynopses)"></xsl:when>
  1163. <xsl:otherwise>
  1164. <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
  1165. <dt>
  1166. <a>
  1167. <xsl:attribute name="href">
  1168. <xsl:text>#</xsl:text>
  1169. <xsl:call-template name="object.id">
  1170. <xsl:with-param name="object" select="$cmdsyn"/>
  1171. </xsl:call-template>
  1172. </xsl:attribute>
  1173. <xsl:choose>
  1174. <xsl:when test="$cmdsyn/@xreflabel">
  1175. <xsl:call-template name="xref.xreflabel">
  1176. <xsl:with-param name="target" select="$cmdsyn"/>
  1177. </xsl:call-template>
  1178. </xsl:when>
  1179. <xsl:otherwise>
  1180. <xsl:apply-templates select="$cmdsyn" mode="xref-to">
  1181. <xsl:with-param name="target" select="$cmdsyn"/>
  1182. </xsl:apply-templates>
  1183. </xsl:otherwise>
  1184. </xsl:choose>
  1185. </a>
  1186. </dt>
  1187. <xsl:call-template name="process.funcsynopsis.list">
  1188. <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
  1189. <xsl:with-param name="count" select="$count+1"/>
  1190. </xsl:call-template>
  1191. </xsl:otherwise>
  1192. </xsl:choose>
  1193. </xsl:template>
  1194. <!-- ==================================================================== -->
  1195. <xsl:template match="processing-instruction('dbhtml-include')">
  1196. <xsl:call-template name="pi.dbhtml-include"/>
  1197. </xsl:template>
  1198. <!-- ==================================================================== -->
  1199. <xsl:template name="dbhtml-dir">
  1200. <xsl:param name="context" select="."/>
  1201. <!-- directories are now inherited from previous levels -->
  1202. <xsl:variable name="ppath">
  1203. <xsl:if test="$context/parent::*">
  1204. <xsl:call-template name="dbhtml-dir">
  1205. <xsl:with-param name="context" select="$context/parent::*"/>
  1206. </xsl:call-template>
  1207. </xsl:if>
  1208. </xsl:variable>
  1209. <xsl:variable name="path">
  1210. <xsl:call-template name="pi.dbhtml_dir">
  1211. <xsl:with-param name="node" select="$context"/>
  1212. </xsl:call-template>
  1213. </xsl:variable>
  1214. <xsl:choose>
  1215. <xsl:when test="$path = ''">
  1216. <xsl:if test="$ppath != ''">
  1217. <xsl:value-of select="$ppath"/>
  1218. </xsl:if>
  1219. </xsl:when>
  1220. <xsl:otherwise>
  1221. <xsl:if test="$ppath != ''">
  1222. <xsl:value-of select="$ppath"/>
  1223. <xsl:if test="substring($ppath, string-length($ppath), 1) != '/'">
  1224. <xsl:text>/</xsl:text>
  1225. </xsl:if>
  1226. </xsl:if>
  1227. <xsl:value-of select="$path"/>
  1228. <xsl:text>/</xsl:text>
  1229. </xsl:otherwise>
  1230. </xsl:choose>
  1231. </xsl:template>
  1232. </xsl:stylesheet>