Inclusion markup

The Namespaces standard (see Chapter 10) is used to identify the element that takes the role of an inclusion instruction. The namespace for XInclude is 'http://www.w3.org/2001/xinclude'. In the following example, this namespace is mapped to the local prefix 'xi', though any convenient name may be chosen:

<book xmlns="my_book_namespace"
      xmlns:xi="http://www.w3.org/2001/xinclude">
  ...
</book>

Include element

The XInclude namespace defines a single Include element. The Include element is meant to be replaced by the material it refers to:

<book xmlns="my_book_namespace"
      xmlns:xi="http://www.w3.org/2001/xinclude">
  ...
  <xi:include ... />
  ...
</book>

Three attributes are defined for use within this element. The first, and most important, ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.