[xsd-users] Assertion fails when parsing xerces DOMDocument with keep_dom flag

Brian Kohan Brian.Kohan at jhuapl.edu
Fri Oct 10 17:36:09 EDT 2008


I am trying to upgrade from Xerces2.7 to 3.0 and from XSD 2.3.1 to 3.2.  
The following code worked in 2.3.1 but is now generating an assertion 
failure:

  XMLPlatformUtils::Initialize();
  XercesDOMParser* parser = new XercesDOMParser();
  parser->parse(docUri);
  DOMDocument* doc = parser->adoptDocument();

  MyType* myObj = new MyType(*doc->getDocumentElement(),
               xml_schema::flags::keep_dom |
               xml_schema::flags::dont_initialize |
              xml_schema::flags::dont_validate
                      );

This code works if you remove the keep_dom flag. If left in, I get this:

/usr/local/include/xsd/cxx/tree/elements.hxx:698: 
xsd::cxx::tree::_type::dom_element_info::dom_element_info(xercesc_3_0::DOMElement&, 
xsd::cxx::tree::type&, bool): Assertion `pd != 0' failed.

I'm using the GNU/Linux x86_64 pre-built binary distribution.

Any thoughts? Am I doing something incorrectly?

Thankyou,
Brian Kohan




More information about the xsd-users mailing list