Ambiguous space

Earlier, it was suggested that the XML mechanism for distinguishing significant space from insignificant space (which relies totally upon the distinction between element with element content, and elements with mixed or text-only content) is not sophisticated enough for many real-world situations. Spaces and line-end codes that are considered by this mechanism to be significant, may not really be so.

The following example could be treated in two different ways. The problem is deciding whether or not the line-end code after the Paragraph start-tag is part of the text of the document:

This paragraph is bounded by element tags.[CR]

Perhaps the line-end code should be interpreted as a space. Similarly, the line-end ...

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.