Illegal inclusions

Software that supports this standard must make additional checks that the incoming data can sensibly be inserted into the document.

Inappropriate inclusions

One problem that could arise is that an XPointer expression identifies an object that cannot sensibly be included (such as an attribute). Only information that could be directly embedded within an element can be inserted, including an element or elements, a comment or processing instruction, or even just a text string.

If the root element of a document is an Include element, it can only be replaced by a single element, not a range of elements. If allowed, this would create a new document that had multiple root elements (which is not well-formed XML).

Recursive inclusions ...

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.