+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<chapter xml:id="style-pi" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="EN"\r
- xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">\r
- <info>\r
- <title>Processing instructions</title>\r
- </info>\r
-\r
- <para>Processing instructions (PIs) are written into the xml when the desired output cannot be\r
- achieved with DocBook elements and attributes alone. PIs may also be used to force special\r
- formatting in only part of a document. For a more technical introduction see Bob Stayton's\r
- <link xlink:href="http://www.sagehill.net/docbookxsl/ProcessingInstructions.html"\r
- xlink:title="http://www.sagehill.net/docbookxsl/ProcessingInstructions.html">DocBook\r
- XSL: The Complete Guide</link>. There are also lists of DocBook-specific processing\r
- instructions for <link\r
- xlink:href="http://docbook.sourceforge.net/release/xsl/current/doc/pi/pi-html.html"\r
- xlink:title="http://docbook.sourceforge.net/release/xsl/current/doc/pi/pi-html.html"\r
- >html</link> and <link\r
- xlink:href="http://docbook.sourceforge.net/release/xsl/current/doc/pi/pi-fo.html"\r
- xlink:title="http://docbook.sourceforge.net/release/xsl/current/doc/pi/pi-fo.html"\r
- >pdf</link> output.</para>\r
-\r
- <para>PIs should be used sparingly: it is easier to maintain documents that achieve the desired\r
- output with DocBook elements and <link\r
- xlink:href="http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html"\r
- xlink:title="http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html"\r
- >stylesheet parameters</link>. However, there are a few cases where PIs may be\r
- necessary:</para>\r
-\r
- <itemizedlist>\r
- <listitem>\r
- <formalpara>\r
- <title>Force line break</title>\r
- <para>Line breaks should not be used for spacing between elements; this is much\r
- better done with CSS and XSL. Hoever, if entering multiple lines that must be\r
- displayed in succession but without the separation of a new paragraph, you may\r
- use the linebreak PI. The following code</para>\r
- </formalpara>\r
- <programlisting>\r
- <![CDATA[<para>First line <?linebreak?>Second line <?linebreak?>Third line</para>]]> \r
- </programlisting>\r
- <para>Will output</para>\r
- <informalexample><para>First line <?linebreak?>Second line <?linebreak?>Third line</para></informalexample>\r
-\r
- <caution><para>This only works if\r
- custom stylesheets include the following code, described in <link\r
- xlink:href="http://www.sagehill.net/docbookxsl/LineBreaks.html"\r
- xlink:title="http://www.sagehill.net/docbookxsl/LineBreaks.html">Bob Stayton's\r
- DocBook XSL</link>. Sitka's customization layer includes this template as of June\r
- 30, 2010:</para>\r
- <para>\r
- <![CDATA[<xsl:template match="processing-instruction('linebreak')">\r
- <fo:block/>\r
- </xsl:template>]]> \r
- </para></caution>\r
- </listitem>\r
- \r
- <listitem>\r
- <formalpara><title>Include external content</title><para>To insert external content into the html output use the <emphasis>dbhtml-include</emphasis> processing instruction as described in <link xlink:href="http://www.sagehill.net/docbookxsl/InsertExtHtml.html#CodeInPage" xlink:title="http://www.sagehill.net/docbookxsl/InsertExtHtml.html#CodeInPage">DocBook XSL</link>.\r
- This could be used to add a custom search box to the title page, an animated tutorial in the relevant section, or any other content in valid xhtml.</para></formalpara>\r
- </listitem>\r
- \r
- </itemizedlist>\r
-</chapter>\r