Lists Home |
Date Index |
- From: "Rick Jelliffe" <firstname.lastname@example.org>
- To: <email@example.com>
- Date: Thu, 11 Dec 1997 21:33:08 +1100
Attached is a repost summary of the white-space characters available in
XML from ISO 10646. Of course, it is still up to applications to implement
At the moment, spaces and newlines are very overloaded which causes all
sorts of problems. So it would solve many problems to use these characters.
For example, if you want a hard return, use the hard return character
and if you need non-collapsing white-space, use
In this particular case, one thing to do is put an attribute at the top-level element
to prevent collapsing and stripping of spaces and tabs. As far as CR/LF,
I think the XML spec can only be interpreted to mean that
<!ENTITY cr " ">
<!ENTITY lf " ">
should be preserved. This is because 2.11
"To simplify the tasks of applications, wherever an external
parsed entity or the literal entity value of an internal parsed
entity contains either the literal two-character sequence
"#xD#xA" or a standalone literal #xD, an XML processor must
pass to the application the single character #xA. (This behavior
can conveniently be produced by normalizing all line breaks
to #xA on input, before parsing.)"
So normalization *should* apply only to direct characters, not
references. However, I dont think you can trust parsers to
do this. So if you want to send facsimile documents
with whitespace preserved, you might find you have to
use a Unicode private-use-area character to substitute for CR.
Your application at the other end has to replace that character
again to reconstruct the document.
For example, you could use
<!ENTITY cr "" >
This is a case where you want to do something that is definitely
contrary to the simplifying rules of XML, so don't be alarmed
that you have to use markup (which you give a significance to)
rather than being able to do it direct.
space (1).htm (Internet Document (HTML))