Re: [jibx-users] Possible Encoding issue ?

2004-08-13 Thread Tilman Linden
Angel,

did you think about utilizing the DomElementMapper from the
org.jibx.extras package to (un)marshal the XmlResultSet? Or has that
nothing to do with DOM?

Tilman

 
 The better way of handling this is with a custom marshaller/unmarshaller 
 for your XmlResultSet, where you can work at the level of elements, 
 attributes, and character data, and JiBX will handle the XML details for 
 you. 
 That way you'll be able to unmarshal the data back to objects, too, 
 while if you just write it out there's no way for JiBX to unmarshal it 
 for you.
 
   - Dennis
 
   wrote:
 
 Would that explain this ?
 
 ?xml version=1.0 encoding=UTF-8?
 dresp-message
 class-namegr.talent.messaging.message.DataResponseMessage/class-name
 user-hash/
 datalt;result-set
 row-count='1'gt;lt;rowgt;lt;l_code01gt;A128lt;/l_code01gt;lt;lab
 elnamegt;?-.
 ..lt;/labelnamegt;lt;streettypegt;AVE.lt;/streettypegt;lt;r_el
 tagt;14578lt;/r_eltagt;lt;lengthgt;134.772lt;/lengthgt;lt;r_code01g
 t;A161lt;/r_code01gt;lt;r_code91gt;A2110100lt;/r_code91gt;lt;clas
 s_idgt;3lt;/class_idgt;lt;l_code91gt;A2100800lt;/l_code91gt;lt;l_elt
 agt;14671lt;/l_eltagt;lt;avenue_idgt;3lt;/avenue_idgt;lt;/rowgt;lt
 ;/result-setgt;/data
 recordCount1/recordCount
 /dresp-message
 
 .. within the DataResponseMessage class - which is marshalled using JiBX -
 there is an XmlResultSet class which I serialize myself, but I've set my
 encoding to be the Greek character set. Would that explain the lt; instead
 of   etc. and the garbled Greek string values in the xml ?
 



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


[jibx-users] \r\n problem

2004-08-13 Thread Stefano Fornari
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
--
Stefano Fornari - Sync4j Project Manager / Funambol CTO
===
Home:
http://www.sync4j.org
FAQ:
http://forge.objectweb.org/docman/view.php/96/39/general.html
Project Documentation:
http://forge.objectweb.org/docman/index.php?group_id=96
Documentation site:
http://sync4j.funambol.com/main.jsp?main=documentation
List archives:
http://groups.yahoo.com/group/Sync4j (login required)
http://sourceforge.net/mailarchive/forum.php?forum_id=215
Sync4j - The open source SyncML mobile application platform
---
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


Re: [jibx-users] \r\n problem

2004-08-13 Thread Dennis Sosnoski
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