File: Root_nodes_and_conditionals.xml

package info (click to toggle)
publican 4.3.2-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,364 kB
  • sloc: javascript: 17,390; perl: 13,081; xml: 11,558; makefile: 167; python: 29; sh: 29
file content (35 lines) | stat: -rw-r--r-- 1,754 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE important [
<!ENTITY % BOOK_ENTITIES SYSTEM "Users_Guide.ent">
%BOOK_ENTITIES;
<!ENTITY % sgml.features "IGNORE">
<!ENTITY % xml.features "INCLUDE">
<!ENTITY % DOCBOOK_ENTS PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.5//EN" "/usr/share/xml/docbook/schema/dtd/4.5/dbcentx.mod">
%DOCBOOK_ENTS;
]>
<important version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
	<info>
		<title>Root nodes and conditional tagging</title>

	</info>
	 <para>
		If the root node of an XML file is excluded with a conditional, your document will not build, because empty files are not valid XML. For example, if <filename>Installation_and_configuration_on_Fedora.xml</filename> contains a single chapter:
	</para>
	 
<programlisting language="XML">&lt;?xml version='1.0' encoding='utf-8' ?&gt;
&lt;!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]&gt;
&lt;chapter id="chap-Installation_and_configuration_on_Fedora" condition="Fedora"&gt;
&lt;title&gt;Installation and configuration on Fedora&lt;/title&gt;

[text of chapter]

&lt;/chapter&gt;</programlisting>
	 <para>
		and this chapter is included in <filename>User_Guide.xml</filename> with an <tag>&lt;xi:include&gt;</tag> tag, the document will not build with <prompt>$</prompt> <command>condition: Ubuntu</command> set in the <filename>publican.cfg</filename> file.
	</para>
	 <para>
		To exclude this chapter, add a condition to the <tag>&lt;xi:include&gt;</tag> tag in <filename>User_Guide.xml</filename>, not to the <tag>&lt;chapter&gt;</tag> tag in <filename>Installation_and_configuration_on_Fedora.xml</filename>.
	</para>
</important>