[Standards-JIG] Re: Line feeds as delimiters

Peter Saint-Andre stpeter at jabber.org
Fri Jul 30 16:35:05 UTC 2004

In article <913D0D2A9071D111B7C200805FE6C6E704622FDF at us2.ebsdr.com>,
 "Helck, Christopher" <chelck at ebs.com> wrote:

> I have a client/customer who wants me to modify the XMPP output to include
> line feed characters as stanza delimiters. He claims it will be easier for
> him to parse the stanzas from the input stream.
> Does this violate the standard?
> I think this is a bad idea. The client insists that he'll never send
> embedded line feeds in text messages and since XMPP doesn't support CDATA
> that this will never be a problem. I'm having a hard time arguing with him.

Section 2.11 of the XML specification states:

2.11 End-of-Line Handling

XML parsed entities are often stored in computer files which, for 
editing convenience, are organized into lines. These lines are typically 
separated by some combination of the characters CARRIAGE RETURN (#xD) 
and LINE FEED (#xA).

To simplify the tasks of applications, the XML processor MUST behave as 
if it normalized all line breaks in external parsed entities (including 
the document entity) on input, before parsing, by translating both the 
two-character sequence #xD #xA and any #xD that is not followed by #xA 
to a single #xA character.



More information about the Standards mailing list