Chapter 2Running example

Most of the examples in this reference use the same input document: default-input.xml. To avoid repeating it in every example, it is summarized here.

 1 |<doc xmlns="https://xmlcalabash.com/ns/examples"
   |     xmlns:xi="http://www.w3.org/2001/XInclude"
   |     class="book">
   |  <chap former="1" class="test">
 5 |    <title>First Chapter</title>
   |    <p></p>
   |  </chap>
   |  <xi:include href="default-ch2.xml"/>
   |  <chap><title>Third Chapter</title>
10 |  <p></p>
   |  </chap>
   |  <app><title>Appendix</title>
   |  <p></p>
   |  </app>
15 |</doc>

Where the content of default-ch2.xml is:

  |<chap xmlns="https://xmlcalabash.com/ns/examples">
  |<title>Second Chapter</title>
  |<p></p>
  |</chap>