http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2261 *** shadow/2261 Thu Jun 21 02:01:16 2001 --- shadow/2261.tmp.8954 Thu Jun 21 02:01:16 2001 *************** *** 0 **** --- 1,58 ---- + +============================================================================+ + | Problems during serialization, spaces and new lines added | + +----------------------------------------------------------------------------+ + | Bug #: 2261 Product: Xerces-J | + | Status: NEW Version: 1.3.1 | + | Resolution: Platform: PC | + | Severity: Critical OS/Version: Other | + | Priority: Other Component: Serialization | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + I'm updating Tamino XML database and using Xerces to perform serialization (the + db needs http queries where XML strings have to be passed). I pass the follow + (messages come from log4j output and built with serialization itself): + + 20/giu/2001 18:28:33.120 [tcpConnection-8081-1] - {ContentManager..get( news, + 7 )} from DBconnector = <?xml version="1.0" encoding="UTF-8"?> + <xql:result xmlns:xql="http://metalab.unc.edu/xql/"> + <news ino:id="4"> <metainfo date="2001-06-20 18:18:43.131" + description="The news" group="Polymedia Manager" id="7" + name="news" owner="brandizi" status="2" user="brandizi" + version="1.0"> <ancestors> <ancestor id="225" + type="project"/> <ancestor id="1080" type="structure"/> + </ancestors> </metainfo> <title>kkk kkkk</title> + <author>dwfrsgrt</author> <text/> <date/> <image/> </news> + </xql:result> + + After few instructions, if I ask again the serialization, it appears changed, + with spaces and new lines added (I think CR+LF under Windows and CR under Unix): + + 20/giu/2001 18:28:33.580 [tcpConnection-8081-1] - + {TaminoConnector.saveDocument} element passed to saveNewDoc = + <?xml version="1.0" encoding="ISO-8859-1"?> + <news> <metainfo date="2001-06-20 18:18:43.131" description="The news" + group="Polymedia Manager" id="7" name="news" owner="brandizi" + status="6" user="brandizi" version="1.0"> <ancestors> <ancestor + id="225" type="project"/> <ancestor id="1080" + type="structure"/> </ancestors> </metainfo> <title>kkk + kkkk</title> <author>dwfrsgrt</author> <text/> <date/> + <image/> </news> + + + Among the first message and the second, the only change made to DOM is removing + the 'ino:id="4"' attribute in news, invoked as usually, with a + element.removeAttribute ( "ino:id" ). But after this instruction, the + serialization string is the above, and for me the \n + spaces inserted in the + middle of <title> element (between the kkk kkkk) is completely wrong, since the + title go in the db with this extra characters and later retrieved with them, + giving a wrong output. + + I've tried, without success to look for some parser feature, to see if it's + possible to ask the serializer to preserve characters, at least the ones inside + an element withouth other child elements. \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
