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

The danger that must be avoided with recursive inclusions is the possibility of creating an infinite loop. This can occur if the included material directly contains an Include element that refers back to the original document, or to any ancestor of the original Include element in that document:



A more subtle variant of this problem occurs if there is a chain of inclusions that eventually lead back to the starting point:



Neither of these conditions is legal, and both should generate an error.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.59