<?file-breaker start chap04.xml?><chapter>
<title>The very long title<?lb?>that seemed to go on forever and ever</title>
<?xml2pdf vspace 10pt?>
The first PI has a target called file-breaker and
its data is chap04.xml. A program reading this
document will look for a PI with that target keyword and will act on
that data. In this case, the goal is to create a new file and save
the following XML into it.
The second PI has only a target, lb. We have
actually seen this example used in documents to tell an XML processor
to create a line break at that point. This example has two problems.
First, the PI is a replacement for a space character;
that's bad because any program that
doesn't recognize the PI will not know that a space
should be between the two words. It would be better to place a space
after the PI and let the target processor remove any following space
itself. Second, the target is an instruction, not an actual name of a
program. A more unique name like the one in the next PI,
xml2pdf, would be better (with the
lb appearing as data instead).
PIs are convenient for developers. They have no solid rules that
specify how to name a target or what kind of data to use, but in
general, target names ought to be very specific and data should be
very short.
<!-- this is invisible to the parser -->
This is perfectly visible XML content.
<!--
<para>This paragraph is no longer part of the document.</para>
-->
Note that these comments look and work exactly like their HTML
counterparts.
The only thing you can't put inside a comment is
another comment. You can't even feint at nesting
comments; the string " -- ", for
example, is illegal in a comment, no matter how you use it.