<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>HelpOnXmlPages</title></articleinfo><section><title>XML Pages &amp; XSLT Processing</title><para>If you have <ulink url="http://4suite.org/">Python4Suite</ulink> installed in your system, it is possible to save XML documents as pages. It's important to start those pages with an XML declaration &quot;<code>&lt;?xml ...&gt;</code>&quot; in the very first line. Also, you have to specify the stylesheet that is to be used to process the XML document to HTML. This is done using a <ulink url="http://www.w3.org/TR/xml-stylesheet/">standard &quot;xml-stylesheet&quot; processing instruction</ulink>, with the name of a page containing the stylesheet as the &quot;<code>href</code>&quot; parameter. </para><para>Do no forget to enable XSLT processing, see <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/HelpOnConfiguration#">HelpOnConfiguration</ulink>. </para><para>See the following example for details, which can also be found on the <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/XsltVersion#">XsltVersion</ulink> page. </para><section><title>Example</title><screen><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
]]><![CDATA[
<?xml-stylesheet href="XsltVersion" type="text/xml"?>
]]><![CDATA[
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
]]><![CDATA[
   <xsl:output method="html" omit-xml-declaration="yes" indent="no"/>
]]><![CDATA[
   <xsl:template match="/">
     This Wiki is running an XSLT engine by
     <xsl:value-of select="system-property('xsl:vendor')"/>
     (<a href="{system-property('xsl:vendor-url')}"><xsl:value-of select="system-property('xsl:vendor-url')"/></a>)
     implementing XSLT v<xsl:value-of select="system-property('xsl:version')"/>
   </xsl:template>
]]><![CDATA[
</xsl:stylesheet>]]></screen></section></section><section><title>Rendering DocBook</title><para>In order to let <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/MoinMoin#">MoinMoin</ulink> render <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/DocBook#">DocBook</ulink> pages, you will need to follow the steps described below. Afterwards, you will be able to write <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/DocBook#">DocBook</ulink> files in <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/MoinMoin#">MoinMoin</ulink> and see them as rendered HTML. Note that rendering <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/DocBook#">DocBook</ulink> pages may take some seconds of processing time (this is done after the page is saved). </para><section><title>Installing the DocBook support</title><orderedlist numeration="arabic"><listitem><para>Install 4suite and enable XSLT processing, see above. </para></listitem><listitem><para>Go to <ulink url="http://sourceforge.net/project/showfiles.php?group_id=21935&amp;package_id=16608">DocBook files at SourceForge</ulink> and download the latest archive. It contains the XSLT files necessary for HTML generation. </para></listitem><listitem><para>Extract the archive and copy the whole directories <code>html</code>, <code>lib</code>, <code>common</code> and the file <code>VERSION</code> into a directory that is writable by <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/MoinMoin#">MoinMoin</ulink> (e.g. the <code>data</code> directory). </para><itemizedlist><listitem><para>After you have upgraded 4suite, you have to delete the file <code>db_compiled.dat</code> in this directory (if it exists). </para></listitem></itemizedlist></listitem><listitem><para>Edit your wiki configuration,  the attribute <code>docbook_html_dir</code> has to point to the directory (which contains e.g. the file <code>docbook.xsl</code>) you created in the last step. </para></listitem><listitem><para>You should be able to use the <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/DocBook#">DocBook</ulink> parser now. </para></listitem></orderedlist><section><title>Using DocBook</title><para>Just write your <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/DocBook#">DocBook</ulink> file like you would have done in a different environment as well. If you want to insert links to other wiki pages, be sure to simply write the <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/WikiName#">WikiName</ulink> into the text. Note that pages that would need <code>[&quot;...&quot;]</code> links in ordinary wiki markup cannot be linked to directly, yet. </para><para><ulink url="https://wiki.hcoop.net/HelpOnXmlPages/DocBook#">DocBook</ulink> markup is either marked by <code>#format docbook</code> in the first line of the page or in a wiki page like this: </para><!--RAW HTML: XSLT option disabled, please look at <a href="/HelpOnConfiguration">HelpOnConfiguration</a>.--><screen><![CDATA[<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<book>
<bookinfo>
<author>
<firstname>Bernd</firstname>
<surname>Le Pain</surname>
</author>
<copyright>
<year>2005</year>
</copyright>
</bookinfo>
<chapter>
<title>This is a title of a chapter</title>
<sect1>
<title>This is a title of a section</title>
<para>This is a paragraph.</para>
<para>
<emphasis role="bold">
This is a paragraph in bold.
</emphasis>
</para>
</sect1>
</chapter>
</book>]]></screen><para>Note that you need to install <ulink url="https://wiki.hcoop.net/HelpOnXmlPages/DocBook#">DocBook</ulink> like described above to make this example work. </para></section></section></section></article>