[xsd-users] RE: Support for redefine

Moss, David R (SELEX Comms) (UK Christchurch) david.r.moss at selex-comm.com
Fri Feb 2 10:09:07 EST 2007


Boris,

> 2. xsi:type: instance have the same element name for base and derived
>    but will need xsi:type attribute for derive. Access is polymorphic
>    (can use dynamic_cast to distinguish between base and derived).

This looks like the best approach but with the code below and the
attached files I'm getting the error:

error: Unresolved type 'd:DServices_t' found in xsi:type handling


#include <memory>
#include <iostream>
#include "derived-user-config.hxx"
using namespace std;

main()
{
  try
  {
    using namespace Base;
    auto_ptr<class UserDatabase_t> db( UserDatabase( "test-users.xml" )
);
  }
  catch( xml_schema::exception const& e)
  {
    cerr << e << endl;
  }
}

This feels like another 'I'm missing something obvious' moment...!

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: derived-user-config.xsd
Type: application/octet-stream
Size: 922 bytes
Desc: derived-user-config.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070202/52364d78/derived-user-config.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-user-config.xsd
Type: application/octet-stream
Size: 651 bytes
Desc: test-user-config.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070202/52364d78/test-user-config.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-users.xsd
Type: application/octet-stream
Size: 683 bytes
Desc: test-users.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070202/52364d78/test-users.obj


More information about the xsd-users mailing list