[xsd-users] Problem with duplicate Ids

BURGESS, Mark, FM Mark.BURGESS at rbos.com
Fri Dec 23 11:28:26 EST 2005


Our firewall didn't like me including an exe in the zip file so I have
resent without.

Hopefully this one will get through...



-----Original Message-----
From: BURGESS, Mark, FM 
Sent: 23 December 2005 16:23
To: 'Boris Kolpackov'; BURGESS, Mark, FM
Cc: 'xsd-users at codesynthesis.com'; SHAH, Sima, FM
Subject: RE: [xsd-users] Problem with duplicate Ids


Hi Boris,

Thanks for taking a look. Sorry the initial question wasn't clear, I just
cut and pasted the problem from my original code in case you could see
immediately what I had done wrong.

I have now created a cut down complete example which exhibits the same
problem. If you could take a look I would appreciate it since I'm stumped on
this one.

Thanks,

Mark.

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: 23 December 2005 15:46
To: BURGESS, Mark, FM
Cc: 'xsd-users at codesynthesis.com'; SHAH, Sima, FM
Subject: Re: [xsd-users] Problem with duplicate Ids


Mark,

BURGESS, Mark, FM <Mark.BURGESS at rbos.com> writes:

> I am trying to insert an ExecutionEnvironment with id =
> "ExecutionEnvironment:2" and an  ExecutionOperation with id = 
> "ExecutionOperation:3" and ExecutionEnvironmentRef = 
> "ExecutionEnvironment:2" into an ExecutionObjects but it throws a 
> xsd::cxx::tree::duplicate_id<char> exception and no one here can 
> figure out why.

The duplicate_id exception is thrown if you try to insert a duplicate ID
into a document tree. XML Schema requires IDs to be unique in the context of
a document.

I looked at you code and I can't see right away where the duplication could
happen (though note that it differs from what you described above, e.g., I
don't see where you pass "ExecutionOperation:3"). I also cannot build and
debug your code since it is not complete. What I suggest you do is catch
this exception and print the ID that is causing the problem. This will
hopefully give you some hints. If you still can't find the reason, it would
be helpful if you could create a minimal example that reproduces the
problem.


> const ares::ExecutionEnvironment::_xsd_MarketDataContext::type_

BTW, you should use ares::ExecutionEnvironment::MarketDataContext::type
instead of the above. All names that start with _xsd_ are for internal use
and may change in a backwards-incompatible manner. This is also described in
the manual:

http://codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/

See Section 2.8, "Mapping for Local Elements and Attributes".


hth,
-boris



***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312.       Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.                                      
Authorised and regulated by the Financial Services Authority     
 
This e-mail message is confidential and for use by the                      
addressee only. If the message is received by anyone other             
than the addressee, please return the message to the sender          
by replying to it and then delete the message from your                    
computer. Internet e-mails are not necessarily secure. The               
Royal Bank of Scotland plc does not accept responsibility for          
changes made to this message after it was sent.                              
                                                                                                        
Whilst all reasonable care has been taken to avoid the                   
transmission of viruses, it is the responsibility of the recipient to        
ensure that the onward transmission, opening or use of this             
message and any attachments will not adversely affect its               
systems or data.  No responsibility is accepted by The Royal           
Bank of Scotland plc in this regard and the recipient should carry   
out such virus and other checks as it considers appropriate.           
                                                                                                               Visit our websites at:                                                                          
http://www.rbs.co.uk/CBFM                                                        
http://www.rbsmarkets.com                                                         
                                                                                                       ********************************************************************************

-------------- next part --------------
A non-text attachment was scrubbed...
Name: scratch.zip
Type: application/octet-stream
Size: 65250 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20051223/ce0debff/scratch.obj


More information about the xsd-users mailing list