[xsd-users] Re: reference

giuseppe ferrari giuseppe500 at yahoo.it
Thu Feb 10 11:37:12 EST 2011


thanks boris.
I did  that you say ,but now how i can resolve the refid type after the document 
parsing?
i read a lot in the documentation and i searched in google , but i not able to 
understand how solve a reference
I explain my problem :
i have create a member in the nullable type and i set the ref_ attribute when i 
need , so i try to resolve the ref/id with the idref
IfcPersonBase is the reference that i must resolve:

complex_nillable_type<ifc::IfcPersonBase>* pobje = dynamic_cast< 
complex_nillable_type<ifc::IfcPersonBase>* >(pifcx);

xml_schema::idref* p = &pobje->ref_ ;
//ref =i1561
ifc::IfcPersonBase* pi = dynamic_cast<ifc::IfcPersonBase*> (ref.get());

the problem is that my xml is formed as :
<IfcPersonAndOrganization id="i1567">
   <ThePerson>
      <IfcPerson xsi:nil="true" ref="i1561"/>
   </ThePerson>
ecc...

the resolve system is trying to get the root , the parent of IfcPerson that is 
<ThePerson> that has a map with 0 elements for the resolving system, i think 
that root should be the <IfcPersonAndOrganization id="i1567"> that has the 
elements in  map, and then extract the correct reference
may be?
Thanks.        



      


More information about the xsd-users mailing list