[xsd-users] Need Help!!

மகேஷ்....... మహేష్...... Mahesh peddimahesh at gmail.com
Wed Sep 29 08:24:07 EDT 2010


Hi,

Greetings for the day!!

I am using code synthesis to convert schema files to c++ objects.
When I tested with examples provided with tool it sounds good.
I am facing problem when i test with my sample xml file
===================================n =====================
<?xml version="1.0"?>
<note xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="sample.xsd">
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
</note>
========================================================
I have converted this xml to xml schema i.e. xsd using hitssw its online
tool from http://www.hitsw.com/xml_utilites/
========================================================

<?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="body">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="from">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="heading">
    <xs:complexType mixed="true" />
  </xs:element>

  <xs:element name="note">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="to" />
        <xs:element ref="from" />
        <xs:element ref="heading" />
        <xs:element ref="body" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="to">
    <xs:complexType mixed="true" />
  </xs:element>

</xs:schema>


========================================================
I have project in visual studio 2008 and when I build this project I am
getting some errors
========================================================
Error    41    fatal error LNK1120: 39 unresolved externals    C:\Documents
and Settings\mpeddi\Desktop\Sample\Sample\Debug\Sample.exe
Error    37    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall
xercesc_3_1::Wrapper4InputSource::~Wrapper4InputSource(void)"
(__imp_??1Wrapper4InputSource at xercesc_3_1@@UAE at XZ) referenced in function
__catch$??$parse at D@dom at xml@cxx at xsd@@YA?AU?$auto_ptr at VDOMDocument
@xercesc_3_1@@@0123 at AAVInputSource@xercesc_3_1@@AAVDOMErrorHandler at 6
@ABV?$properties at D@123 at K@Z$0    Sample.obj
Error    19    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall
xercesc_3_1::InputSource::~InputSource(void)"
(__imp_??1InputSource at xercesc_3_1@@UAE at XZ) referenced in function "public:
virtual __thiscall
xsd::cxx::xml::sax::std_input_source::~std_input_source(void)"
(??1std_input_source at sax@xml at cxx@xsd@@UAE at XZ)    Sample.obj
Error    39    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall
xercesc_3_1::DOMErrorHandler::~DOMErrorHandler(void)"
(__imp_??1DOMErrorHandler at xercesc_3_1@@UAE at XZ) referenced in function
"public: virtual __thiscall
xsd::cxx::xml::dom::bits::error_handler_proxy<char>::~error_handler_proxy<char>(void)"
(??1?$error_handler_proxy at D@bits at dom@xml at cxx@xsd@@UAE at XZ)    Sample.obj
Error    18    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall
xercesc_3_1::BinInputStream::~BinInputStream(void)"
(__imp_??1BinInputStream at xercesc_3_1@@UAE at XZ) referenced in function
"public: virtual __thiscall
xsd::cxx::xml::sax::std_input_stream::~std_input_stream(void)"
(??1std_input_stream at sax@xml at cxx@xsd@@UAE at XZ)    Sample.obj
Error    4    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_1::XMLPlatformUtils::Terminate(void)"
(__imp_?Terminate at XMLPlatformUtils@xercesc_3_1@@SAXXZ) referenced in
function "void __cdecl xsd::cxx::xml::terminate(void)" (?terminate at xml
@cxx at xsd@@YAXXZ)    Sample.obj
Error    2    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_1::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_3_1::PanicHandler * const,class
xercesc_3_1::MemoryManager * const)" (__imp_?Initialize at XMLPlatformUtils
@xercesc_3_1@@SAXQBD0QAVPanicHandler at 2@QAVMemoryManager at 2@@Z) referenced in
function "void __cdecl xsd::cxx::xml::initialize(void)" (?initialize at xml
@cxx at xsd@@YAXXZ)    Sample.obj
Error    15    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_3_1::XMemory::operator delete(void *)" (__imp_??3XMemory at xercesc_3_1
@@SAXPAX at Z) referenced in function
__unwindfunclet$?makeStream at std_input_source@sax at xml@cxx at xsd
@@UBEPAVBinInputStream at xercesc_3_1@@XZ$0    Sample.obj
Error    16    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void * __cdecl
xercesc_3_1::XMemory::operator new(unsigned int)"
(__imp_??2XMemory at xercesc_3_1@@SAPAXI at Z) referenced in function "public:
virtual class xercesc_3_1::BinInputStream * __thiscall
xsd::cxx::xml::sax::std_input_source::makeStream(void)const "
(?makeStream at std_input_source@sax at xml@cxx at xsd
@@UBEPAVBinInputStream at xercesc_3_1@@XZ)    Sample.obj
Error    20    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static unsigned long __cdecl
xercesc_3_1::XMLString::stringLen(wchar_t const * const)"
(__imp_?stringLen at XMLString@xercesc_3_1@@SAKQB_W at Z) referenced in function
"class std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl xsd::cxx::xml::transcode<char>(wchar_t const
*)" (??$transcode at D@xml at cxx@xsd@@YA?AV?$basic_string at DU?$char_traits at D@std@
@V?$allocator at D@2@@std@@PB_W at Z)    Sample.obj
Error    35    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static class xercesc_3_1::DOMImplementation *
__cdecl xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(wchar_t
const *)" (__imp_?getDOMImplementation at DOMImplementationRegistry
@xercesc_3_1@@SAPAVDOMImplementation at 2@PB_W at Z) referenced in function
"struct xsd::cxx::xml::dom::auto_ptr<class xercesc_3_1::DOMDocument> __cdecl
xsd::cxx::xml::dom::parse<char>(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,class
xercesc_3_1::DOMErrorHandler &,class xsd::cxx::xml::properties<char> const
&,unsigned long)" (??$parse at D@dom at xml@cxx at xsd@@YA?AU?$auto_ptr at VDOMDocument
@xercesc_3_1@@@0123 at ABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D
@2@@std@@AAVDOMErrorHandler at xercesc_3_1@@ABV?$properties at D@123 at K@Z)
Sample.obj
Error    38    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall
xercesc_3_1::Wrapper4InputSource::Wrapper4InputSource(class
xercesc_3_1::InputSource * const,bool,class xercesc_3_1::MemoryManager *
const)" (__imp_??0Wrapper4InputSource at xercesc_3_1@@QAE at QAVInputSource@1@
_NQAVMemoryManager at 1@@Z) referenced in function "struct
xsd::cxx::xml::dom::auto_ptr<class xercesc_3_1::DOMDocument> __cdecl
xsd::cxx::xml::dom::parse<char>(class xercesc_3_1::InputSource &,class
xercesc_3_1::DOMErrorHandler &,class xsd::cxx::xml::properties<char> const
&,unsigned long)" (??$parse at D@dom at xml@cxx at xsd@@YA?AU?$auto_ptr at VDOMDocument
@xercesc_3_1@@@0123 at AAVInputSource@xercesc_3_1@@AAVDOMErrorHandler at 6
@ABV?$properties at D@123 at K@Z)    Sample.obj
Error    36    error LNK2019: unresolved external symbol
"__declspec(dllimport) protected: __thiscall
xercesc_3_1::InputSource::InputSource(wchar_t const * const,class
xercesc_3_1::MemoryManager * const)" (__imp_??0InputSource at xercesc_3_1
@@IAE at QB_WQAVMemoryManager@1@@Z) referenced in function "public: __thiscall
xsd::cxx::xml::sax::std_input_source::std_input_source<char>(class
std::basic_istream<char,struct std::char_traits<char> > &,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)" (??$?0D at std_input_source@sax at xml@cxx at xsd
@@QAE at AAV?$basic_istream at DU?$char_traits at D@std@@@std@@ABV?$basic_string at DU
?$char_traits at D@std@@V?$allocator at D@2@@6@@Z)    Sample.obj
Error    5    error LNK2019: unresolved external symbol
"__declspec(dllimport) protected: __thiscall
xercesc_3_1::InputSource::InputSource(class xercesc_3_1::MemoryManager *
const)" (__imp_??0InputSource at xercesc_3_1@@IAE at QAVMemoryManager@1@@Z)
referenced in function "public: __thiscall
xsd::cxx::xml::sax::std_input_source::std_input_source(class
std::basic_istream<char,struct std::char_traits<char> > &)"
(??0std_input_source at sax@xml at cxx@xsd@@QAE at AAV?$basic_istream at DU
?$char_traits at D@std@@@std@@@Z)    Sample.obj
Error    40    error LNK2019: unresolved external symbol
"__declspec(dllimport) protected: __thiscall
xercesc_3_1::DOMErrorHandler::DOMErrorHandler(void)"
(__imp_??0DOMErrorHandler at xercesc_3_1@@IAE at XZ) referenced in function
"public: __thiscall
xsd::cxx::xml::dom::bits::error_handler_proxy<char>::error_handler_proxy<char>(class
xsd::cxx::xml::error_handler<char> &)" (??0?$error_handler_proxy at D@bits at dom
@xml at cxx@xsd@@QAE at AAV?$error_handler at D@345@@Z)    Sample.obj
Error    17    error LNK2019: unresolved external symbol
"__declspec(dllimport) protected: __thiscall
xercesc_3_1::BinInputStream::BinInputStream(void)"
(__imp_??0BinInputStream at xercesc_3_1@@IAE at XZ) referenced in function
"public: __thiscall
xsd::cxx::xml::sax::std_input_stream::std_input_stream(class
std::basic_istream<char,struct std::char_traits<char> > &)"
(??0std_input_stream at sax@xml at cxx@xsd@@QAE at AAV?$basic_istream at DU
?$char_traits at D@std@@@std@@@Z)    Sample.obj
Error    9    error LNK2001: unresolved external symbol "public: virtual
wchar_t const * __thiscall xercesc_3_1::InputSource::getSystemId(void)const
" (?getSystemId at InputSource@xercesc_3_1@@UBEPB_WXZ)    Sample.obj
Error    8    error LNK2001: unresolved external symbol "public: virtual
wchar_t const * __thiscall xercesc_3_1::InputSource::getPublicId(void)const
" (?getPublicId at InputSource@xercesc_3_1@@UBEPB_WXZ)    Sample.obj
Error    7    error LNK2001: unresolved external symbol "public: virtual
wchar_t const * __thiscall xercesc_3_1::InputSource::getEncoding(void)const
" (?getEncoding at InputSource@xercesc_3_1@@UBEPB_WXZ)    Sample.obj
Error    13    error LNK2001: unresolved external symbol "public: virtual
void __thiscall xercesc_3_1::InputSource::setSystemId(wchar_t const *
const)" (?setSystemId at InputSource@xercesc_3_1@@UAEXQB_W at Z)    Sample.obj
Error    12    error LNK2001: unresolved external symbol "public: virtual
void __thiscall xercesc_3_1::InputSource::setPublicId(wchar_t const *
const)" (?setPublicId at InputSource@xercesc_3_1@@UAEXQB_W at Z)    Sample.obj
Error    14    error LNK2001: unresolved external symbol "public: virtual
void __thiscall
xercesc_3_1::InputSource::setIssueFatalErrorIfNotFound(bool)"
(?setIssueFatalErrorIfNotFound at InputSource@xercesc_3_1@@UAEX_N at Z)
Sample.obj
Error    11    error LNK2001: unresolved external symbol "public: virtual
void __thiscall xercesc_3_1::InputSource::setEncoding(wchar_t const *
const)" (?setEncoding at InputSource@xercesc_3_1@@UAEXQB_W at Z)    Sample.obj
Error    10    error LNK2001: unresolved external symbol "public: virtual
bool __thiscall
xercesc_3_1::InputSource::getIssueFatalErrorIfNotFound(void)const "
(?getIssueFatalErrorIfNotFound at InputSource@xercesc_3_1@@UBE_NXZ)
Sample.obj
Error    25    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgXercesUserAdoptsDOMDocument"
(__imp_?fgXercesUserAdoptsDOMDocument at XMLUni@xercesc_3_1@@2QB_WB)
Sample.obj
Error    27    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgXercesSchemaFullChecking"
(__imp_?fgXercesSchemaFullChecking at XMLUni@xercesc_3_1@@2QB_WB)    Sample.obj
Error    24    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgXercesSchemaExternalSchemaLocation"
(__imp_?fgXercesSchemaExternalSchemaLocation at XMLUni@xercesc_3_1@@2QB_WB)
Sample.obj
Error    23    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation"
(__imp_?fgXercesSchemaExternalNoNameSpaceSchemaLocation at XMLUni@xercesc_3_1@@2QB_WB)
Sample.obj
Error    28    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgXercesSchema" (__imp_?fgXercesSchema at XMLUni
@xercesc_3_1@@2QB_WB)    Sample.obj
Error    22    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgXercesLoadSchema" (__imp_?fgXercesLoadSchema at XMLUni
@xercesc_3_1@@2QB_WB)    Sample.obj
Error    26    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgXercesHandleMultipleImports"
(__imp_?fgXercesHandleMultipleImports at XMLUni@xercesc_3_1@@2QB_WB)
Sample.obj
Error    29    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgDOMValidate" (__imp_?fgDOMValidate at XMLUni
@xercesc_3_1@@2QB_WB)    Sample.obj
Error    31    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgDOMNamespaces" (__imp_?fgDOMNamespaces at XMLUni
@xercesc_3_1@@2QB_WB)    Sample.obj
Error    21    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgDOMErrorHandler" (__imp_?fgDOMErrorHandler at XMLUni
@xercesc_3_1@@2QB_WB)    Sample.obj
Error    32    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgDOMEntities" (__imp_?fgDOMEntities at XMLUni
@xercesc_3_1@@2QB_WB)    Sample.obj
Error    30    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgDOMElementContentWhitespace"
(__imp_?fgDOMElementContentWhitespace at XMLUni@xercesc_3_1@@2QB_WB)
Sample.obj
Error    33    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgDOMDatatypeNormalization"
(__imp_?fgDOMDatatypeNormalization at XMLUni@xercesc_3_1@@2QB_WB)    Sample.obj
Error    34    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static wchar_t const * const
xercesc_3_1::XMLUni::fgDOMComments" (__imp_?fgDOMComments at XMLUni
@xercesc_3_1@@2QB_WB)    Sample.obj
Error    6    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static class xercesc_3_1::MemoryManager *
xercesc_3_1::XMLPlatformUtils::fgMemoryManager"
(__imp_?fgMemoryManager at XMLPlatformUtils@xercesc_3_1@@2PAVMemoryManager at 2@A)
Sample.obj
Error    3    error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static char const * const
xercesc_3_1::XMLUni::fgXercescDefaultLocale"
(__imp_?fgXercescDefaultLocale at XMLUni@xercesc_3_1@@2QBDB)    Sample.obj

========================================================

Do you have any tool which converts xml to xml schema?

Thanks,
Mahesh


More information about the xsd-users mailing list