[xsd-users] getting "different target namespace " for CSTA XML files
Batya Hacohen
Batya.Hacohen at tadirantele.com
Tue Jun 16 03:53:09 EDT 2009
Hi Boris,
I am trying to parse the ConnectionClearedEvent XML, that I have
produced by my program.
I added the following in my code:
xml_schema::properties props;
props.no_namespace_schema_location ("file:///" + std::string (cwd) +
"\\"+"connection-cleared-event.xsd");
props.schema_location ("http://www.w3.org/2001/XMLSchema",
"file:///" + std::string (cwd) +
"\\"+"connection-cleared-event.xsd");
using namespace CSTA4;
cout << msg << endl;
std::istringstream istr (msg);
std::auto_ptr<ConnectionClearedEvent> mc
(ConnectionClearedEvent_ (istr, 0, props));
This is the input XML:
<?xml version="1.0" encoding="UTF-8" standalone="no"
?><ConnectionClearedEvent x
mlns:p1="http://www.ecma-international.org/standards/ecma-323/csta/ed4">
<monitor
CrossRefID>23</monitorCrossRefID><droppedConnection><deviceID
bitRate="constant"
mediaClass="notKnown"
typeOfNumber="dialingNumber">aaa</deviceID><callID>bbb</c
allID></droppedConnection><releasingDevice><deviceIdentifier
bitRate="constant"
mediaClass="notKnown"
typeOfNumber="dialingNumber">hhh</deviceIdentifier></relea
singDevice><cause>aCDBusy</cause></ConnectionClearedEvent>
:1:153 error: schema document
'file:///D:\xmlCompiler\CstaXMLLib\xsdsrc\connecti
on-cleared-event.xsd' has different target namespace from the one
specified in i
nstance document ''
:1:153 error: no declaration found for element 'ConnectionClearedEvent'
Please Advice
Batya
More information about the xsd-users
mailing list