[xsd-users] New feature

Deane Yang deane at kalotay.com
Tue Sep 19 16:42:27 EDT 2006


Boris,

Boris Kolpackov wrote:
>> I just noticed this part of the manual, and it does look like what I was
>> asking for. I just wanted to confirm that a round trip works, namely:
>> C++ object -> XML -> C++ object
>> results in the same object as the original.
>>     
>
> Yes, that's how it works. You can also save to a binary format (e.g.,
> CDR): C++ object-> Binary -> C++ object.
>   
I've almost got this working, but I can't quite figure out the namespace 
stuff. How do I set "noNamespaceSchemaLocation"?

If I do something like

xml_schema::namespace_infomap map;

map["t"].name = "";
map["t"].schema = "test.xsd";

then the XML file generated contains 
"noNamespaceSchemaLocation="test.xsd"", but it also contains 
"xmlns:t=""", so when I run that through XSD, XSD complains that the 
value of this attribute is invalid.

And, if I set the name to something nonempty, then of course, it sets 
SchemaLocation and not noNamespaceSchemaLocation.

Any help you can provide for this would be greatly appreciated.

Regards,
Deane

-- 
Deane Yang
Head of Research
Andrew Kalotay Associates
61 Broadway, Suite 1400
New York NY 10006
Tel: 212 482 0900, then press 5
Email: deane at kalotay.com
Web: http://www.kalotay.com




More information about the xsd-users mailing list