[xsd-users] Missing elements after serialization using XSD 3.0.0

ulbo at nykredit.dk ulbo at nykredit.dk
Thu Sep 20 11:11:14 EDT 2007


Hello codesynthesis

When I do this...

auto_ptr<schema::bec::T_BEC_Handelssystem> hs 
(schema::bec::BEC_Handelssystem (istringstream (bec), 
xsd::cxx::tree::flags::dont_validate));

xml_schema::namespace_infomap map;
map[""].name = "http://www.nykredit.dk/schema/bec";

std::ostringstream _xml;
schema::bec::BEC_Handelssystem (_xml, *hs, map, "ISO8859-1");

... I go from (actual example)

<?xml version="1.0" encoding="ISO8859-1" standalone="no" ?>
<BEC.Handelssystem xmlns="http://www.nykredit.dk/schema/bec">

  <ID.Felter>
    <LQBENR-VH>620255</LQBENR-VH>
    <RECART>O</RECART>
  </ID.Felter>

  <Data.Felter>
    <ART>11</ART>
    <IFLG>1</IFLG>
    <INDG-DATO>2007-08-10</INDG-DATO>
    <DEALER>SKV</DEALER>
    <KONTRAHENT>x</KONTRAHENT>
    <BROKER></BROKER>
    <KQB-MQNT>CZK</KQB-MQNT>
    <INDTIL>x</INDTIL>
    <INDTIL-SW>x</INDTIL-SW>
    <IKURS>1907.958973999999900</IKURS>
    <IKURS-SW>1893.098974000000000</IKURS-SW>
    <SALG-MQNT>TRY</SALG-MQNT>
    <SALG-BELQB>6017494.639999999700000</SALG-BELQB>
    <OVF-TIL></OVF-TIL>
    <OVF-TIL-SW></OVF-TIL-SW>
    <OVF-GEN>x</OVF-GEN>
    <OVF-GEN-SW>x</OVF-GEN-SW>
    <OVF-VIA></OVF-VIA>
    <OVF-VIA-SW></OVF-VIA-SW>
    <INTERN-REF></INTERN-REF>
    <VALQR-DATO1>2007-08-13</VALQR-DATO1>
    <GEBYR>14.859999999999999</GEBYR>
    <VALQR-DATO2>2007-09-14</VALQR-DATO2>
    <RECIP-KD>R</RECIP-KD>
    <RECIP-KD-SW>R</RECIP-KD-SW>
    <REG-DATO>2007-09-20</REG-DATO>
    <EKSTERN-REF>0000196934</EKSTERN-REF>
    <GEBYR-FORTEGN>J</GEBYR-FORTEGN>
    <MIFID-KUNDEKAT>D</MIFID-KUNDEKAT>
    <MIFID-GODK-K>N</MIFID-GODK-K>
  </Data.Felter>

</BEC.Handelssystem>

to

<?xml version="1.0" encoding="ISO8859-1" standalone="no" ?>
<BEC.Handelssystem xmlns="http://www.nykredit.dk/schema/bec">

  <ID.Felter>
    <LQBENR-VH>620255</LQBENR-VH>
    <RECART>O</RECART>
  </ID.Felter>

  <Data.Felter>
    <ART>11</ART>
    <IFLG>1</IFLG>
    <INDG-DATO>2007-08-10</INDG-DATO>
    <DEALER>SKV</DEALER>
    <KONTRAHENT>x</KONTRAHENT>
    <BROKER></BROKER>
    <KQB-MQNT>CZK</KQB-MQNT>
    <INDTIL>x</INDTIL>
    <INDTIL-SW>x</INDTIL-SW>
    <IKURS>1907.9589739999999</IKURS>
    <IKURS-SW>1893.098974</IKURS-SW>
    <SALG-MQNT>TRY</SALG-MQNT>
    <SALG-BELQB>6017494.6399999997</SALG-BELQB>
    <OVF-TIL></OVF-TIL>
    <OVF-TIL-SW></OVF-TIL-SW>
    <OVF-GEN>x</OVF-GEN>
    <OVF-GEN-SW>x</OVF-GEN-SW>
    <OVF-VIA></OVF-VIA>
    <OVF-VIA-SW></OVF-VIA-SW>
  </Data.Felter>

</BEC.Handelssystem>


So, elements are missing (removed) after serialization - or I'm doing 
something wrong. This is only a problem in XSD 3.0.0 - in XSD 2.3.1 it 
works fine.

Thanks

Ulrich Borowiec 



More information about the xsd-users mailing list