[xsd-users] Serialisation issue.

Moss, David R (SELEX Comms) (UK Christchurch) david.r.moss at selex-comm.com
Thu Dec 21 10:27:14 EST 2006


Boris,

Using xsd-2.3.1.b2-i686-windows, the attached xsd files are compiled
with, among others:
--generate-polymorphic 
--generate-serialization 

And this code:

************************************************
using namespace Base;

// Load the file - ok.
auto_ptr<class UserDatabase_t> db( UserDatabase( "test-users.xml" ) );

// Write out data.
xml_schema::namespace_infomap map;
map["b"].name   = "http://www.dave.com/Base";
map["b"].schema = "test-users.xsd";

// How do you set up a mapping for noNamespaceSchemaLocation?
map[""].name      = "";
map[""].schema    = "derived-user-config.xsd";
   
UserDatabase( std::ofstream( "test-users.xml" ), *db, map );  //
Exception

************************************************

An unhandled no_prefix() exception is thrown from 

template <typename C>
      std::basic_string<C>
      prefix (const std::basic_string<C>& ns, const xercesc::DOMElement&
e)

in elements.txx.


I think I'm missing something pretty obvious to do with
noNamespaceSchemaLocation here, but any help would be appreciated.


Cheers,
Dave.

Dave Moss
SELEX Communications
Grange Road
Christchurch 
Dorset  BH23 4JE
United Kingdom
Tel: + 44 (0) 1202 404841
Email: david.r.moss at selex-comm.com


********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-users.xsd
Type: application/octet-stream
Size: 777 bytes
Desc: test-users.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061221/1279f9d6/test-users.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-users.xml
Type: text/xml
Size: 462 bytes
Desc: test-users.xml
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061221/1279f9d6/test-users.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: derived-user-config.xsd
Type: application/octet-stream
Size: 744 bytes
Desc: derived-user-config.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061221/1279f9d6/derived-user-config.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-user-config.xsd
Type: application/octet-stream
Size: 595 bytes
Desc: test-user-config.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061221/1279f9d6/test-user-config.obj


More information about the xsd-users mailing list