Beyond entity inclusion, there is another mechanism for including external text and documents. It’s called XInclude.
XML Inclusions, or XInclude, is still a working draft specification at W3C (http://www.w3.org/TR/xinclude/), but it is being implemented with reasonable confidence as a step up from external entities. XInclude allows on-the-spot replacement of text or markup, without a DTD or entity reference. It also has a fallback mechanism in case something goes haywire.
The main feature of XInclude is the
element. The namespace name for XInclude is
http://www.w3.org/2003/XInclude, and the common
This hack is based on the November 2003 working draft of XInclude
The candidate recommendation for XInclude was issued in April 2004,
just as I was finishing this book. The candidate rec specifies a
previous namespace name,
http://www.w3.org/2001/XInclude. I am using the
older namespace URI so that it works with the software
I’m using here, but it’s likely
that the software will catch up with the current version of the
specification soon, and you’ll have to change the
namespace URI to get it to work.
include element has seven possible attributes:
attribute is mandatory unless
xpointer is present (and vice versa), because you have to point to the included text or markup using ...