[xsd-users] xsd

Boris Kolpackov boris at codesynthesis.com
Tue Aug 1 14:51:31 EDT 2006


Hi Bastien,

Bastien Cojan <Bastien.Cojan at cadcorp.com> writes:

> When I try to generate a parser from the following schema, I get this
> error :
>
> error C2991: redefinition of template parameter '_xsd_test_'
>
> In the generated code
>
> ...
>
>     <xsd:complexType name="test_type">
>         <xsd:sequence>
>             <xsd:element name="test" type="xsd:string" />
>         </xsd:sequence>
>     </xsd:complexType>
>     <xsd:complexType name="hello_type">
>         <xsd:complexContent>
>             <xsd:extension base="test_type">
>                 <xsd:sequence>
>                     <xsd:element name="greeting" type="xsd:string" />
>                     <xsd:element name="name" type="xsd:string" maxOccurs="unbounded" />
>                     <xsd:element name="test" type="xsd:string" />
>                 </xsd:sequence>
>             </xsd:extension>
>         </xsd:complexContent>
>     </xsd:complexType>
>
> ...
>
> It seems like it does not detect the test element inside the extension.

This is a known limitation of the C++/Parser mapping. The 'test'
element in the extension should be detected as the same as in the
base type and should either be escaped or the base's hook should
be reused (we are not at the moment sure which way is better).
We do such detection across the particle hierarchy in the same
type but not across the type inheritance hierarchy.


We could probably fix this if you are interested in using the
C++/Parser mapping in your application and would like to help
figure our the details.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060801/8cc3b7a4/attachment.pgp


More information about the xsd-users mailing list