Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] What to escape when serializing XML

From: "Pete Cordell" <petexmldev@--------------.--->
To: "Frans Englich" <frans.englich@-----.--->,<xml-dev@-----.---.--->
Date: 1/3/2007 8:38:00 PM
----- Original Message From: "Frans Englich"
> On Wednesday 03 January 2007 10:00, Henri Sivonen wrote:
>> On Jan 2, 2007, at 17:11, Pete Cordell wrote:
>> > In terms of end-of-line encoding, the approach seems to be to
>> > output what is convenient (CR, LF, or CRLF) and have the receiving
>> > application sort out the situation.
>
> So let me summarize.
>
>...
>
> * End of line characters since the parser normalizes those as well(2.11
> End-of-Line Handling)

On this point I think it might depend what your actual intent is.  If you 
want a byte-for-byte copy after serialization/deserialization, then escaping 
end of line characters is necessary.

However, if you want to convey values that consist of lines of text between 
different platforms, then escaping them may not be appropriate.  For 
example, end-of-lines generated on a Windows system could easily be encoded 
as CRLF.  But it wouldn't be appropriate to force a Unix application to 
consume such an end-of-line convention.  In this case, leaving CR and LF 
unescaped (in element values at least) and leaving the processing to that 
described in section 2.11 mentioned earlier might be more appropriate.

(As much for my own clarification as anything, in the <input 
type='hidden'... example quoted elsewhere needs the first byte-for-byte case 
as the server generating the content eventually becomes the consumer after 
round tripping through the browser.)

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or http://www.xml2cpp.com)
=============================================


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent