FLOSS Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Introduction to Mallard

XInclude

About

XInclude is a mechanism for merging one XML document into another, which is particularly useful if you reuse the same text in a number of pages. Mallard offers full XInclude support.

You must have a complete and validated file to be included. In the container file, use the include tag to add the file name of the included file and the namespace XInclude, from the URL http://www.w3.org/2001/XInclude.

For build integration, you must add the included file to the Makefile.am.

For example, you can place your license in a separate document and include that file in all of your pages.

Examples

index.page

<page xmlns="http://projectmallard.org/1.0/"
      type="guide"
      id="index">

  <info>
    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
  </info>

  <title>Write Mallard help</title>

</page>

legal.xml

<license xmlns="http://projectmallard.org/1.0/"
         href="http://creativecommons.org/licenses/by-sa/3.0/">

  <p>This work is licensed under a
  <link href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
  Attribution-ShareAlike 3.0 Unported License</link>.</p>

</license>

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.