axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Cobb <>
Subject Re: cvs commit: xml-axis/java/src/org/apache/axis/encoding
Date Mon, 06 Aug 2001 17:05:32 GMT
Glen Daniels wrote:

>Sam, should all these "\n"s be System.getProperty("line.separator")s?

According to :
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 characters passed to an 
application by the XML processor must be as if the XML processor 
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.

I think this means it really doesn't matter whether you use \r or \r\n 
or just \n within an XML file, because they should all get  pre-parsed 
to \n

Nonetheless, it would be a good idea to verify this behavior in the 
actual parser implementation.

  - jonathan.

View raw message