[xsde-users] using same TypeNames in different NameSpaces in
inheritance chain
Песоцкий Максим
aazmp at yandex.ru
Tue Dec 11 06:50:40 EST 2018
Hi
Could someone please tell if
i use incorrect xsd schema
or incorrect xsde compiler parameters
or if type serializer is incorrectly generated
tested with 3.3.0-a8 version for linux and git version
with XSDE_REUSE_STYLE_TIEIN flag
in attachment archive there are
xsd-schemas, (level1.xsd, level2.xsd)
runCompiler.sh (with two calls to xsdeCompiler)
main.cpp (creates aggregator for derived type element and calls its root_serializer )
i have two schemas (level1.xsd, level2.xsd), each in it's own namespace (level1, level2 respectiely)
level2.xsd imports level1.xsd
on level1 i declare a type level1:ElemType and element level1:Elem of this type
on level2 - level2:ElemType derived from level1:ElemType and element level2:Elem, that substitutes level1:Elem
on level1 my element have one field a1 (int)
and on level2 field a2 (double) is added
when i create top level aggregator level2::Elem_saggr and try to serialize with its root_serializer()
program is stopped at this assertion (in file level2-sskel.cxx):
int ElemType_sskel::
a1 ()
{
assert (this->ElemType_impl_); // <---- here this->ElemType_impl_ == 0x0
return this->ElemType_impl_->a1 ();
}
it checks ElemType_impl_ of derived type, not base
if this check is replaced with
assert (level1::ElemType_sskel::ElemType_impl_);
then it passes ok
or if in level2.xsd schema derived type is named differently ElemType2
this function becomes
int ElemType2_sskel::
a1 ()
{
assert (this->ElemType_impl_);
return this->ElemType_impl_->a1 ();
}
and checks base ElemType_impl_, which is not null
is it correct to have same type names (in different namespaces) for derived types?
or maybe its incorrect to use TIEIN reuse style in that case?
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xsdeNameOverlap.tar.gz
Type: application/x-gzip
Size: 1583 bytes
Desc: not available
Url : https://codesynthesis.com/pipermail/xsde-users/attachments/20181211/f80f7076/xsdeNameOverlap.tar.bin
More information about the xsde-users
mailing list