Hi Stefano,

This normalization is actually required by XML. Here's the relevant part of the document (http://www.w3.org/TR/2000/REC-xml-20001006):

-----------------------------------------------------------------
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.
-----------------------------------------------------------------


There's no way to change this behavior, since it is a required (note the use of "must" above) part of the standard. Is the problem in your processing software, or when you output something? JiBX does not force generated output to follow this rule, since it's not a requirement of the actual XML document format but rather on the parser.

 - Dennis

Stefano Fornari wrote:

Hi All,
We are using JiBX with SyncML. Two of the most commonly used data types transported into SyncML messages are vCard and vCal objects. As per the specs, vCard|vCal are basically a list of entries <attribute>:<value>\r\n.
When we unmarshal a SyncML message (an XML document) containing a vCard|vCal, JiBX strips away the \r\n line terminator and replaces it with a simple \n.
Is this the intented behaviour or is it a bug? Is there a configurable or programmable way to prevent JiBX to change line terminators?


Thanks in advance,

Stefano



------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to