W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2002

Load-and-Save DOMWriter.newLine attribute

From: <zongaro@ca.ibm.com>
Date: Tue, 30 Jul 2002 10:24:06 -0400
To: www-dom@w3.org
Cc: elitani@ca.ibm.com
Message-ID: <OF71C817F9.17E5866A-ON85256C06.004850B0@torolab.ibm.com>

Hello,

     The newLine attribute of the DOMWriter interface is described as 
follows[1]:

"The end-of-line sequence of characters to be used in the XML being 
written out. Any string is supported, but these are the recommended 
end-of-line sequences (using other character sequences than these 
recommended ones can result in a document that is either not serializable 
or not well-formed): "

     What precisely is meant by "Any string" in the text I've cited?  Does 
it mean that the value of the attribute could be equal to the string 
"EOL", or does the string have to be composed only of what are typically 
used as end-of-line characters (i.e., #xA and #xD)?

     In addition, to what does the newLine attribute apply?  In the case 
of Text or CDATASection nodes, does it apply to only #xA characters found 
in the Node to be written, or does it apply to any single character or 
sequence of characters that will, in the particular encoding, output 
device, etc., result in an end-of-line?

     For example, if a CDATA node were created containing the characters 
"a b #xD #xA c d", (where spaces are not part of the value, just there for 
legibility) and the value of the newLine attribute is "EOL", should the 
characters "a b #xD E O L c d" be written, or should the #xD #xA be 
treated as logically representing a single end-of-line, which would mean 
the characters "a b E O L c d" should be written?

Thanks,

Henry
[1] 
http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725/load-save.html#LS-DOMWriter-newLine
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   Tie Line 969-6044;  Phone (905) 413-6044
mailto:zongaro@ca.ibm.com
Received on Tuesday, 30 July 2002 10:24:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT