O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required