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:

<para>[CR]
This paragraph is bounded by element tags.[CR]
</para>

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

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.