Creating complexType with simpleContent [message #595530] |
Wed, 08 June 2005 13:43 |
Eclipse User |
|
|
|
I'm trying to construct a schema via the API, where a complexType extends a
simpleType (maybe indirectly via another complexType with simpleContent). I
can't get the output XSD file to produce <simpleContent> in that
complexType.
For example, a small excerpt from OAGIS 8.0 schema:
<xs:complexType name="Name">
<xs:simpleContent>
<xs:extension base="LingualString"/>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="LingualString">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="lang" type="xs:language"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Reviewing the XSDPrototypicalSchema.java example, simpleContent is produced
only by adding an anonymous simpleType as content. I tried setting the
contentTypeCategory directly, but no affect on the generated schema.
complexType.setContentTypeCategory(XSDContentTypeCategory.SI MPLE_LITERAL);
I always get <xs:complexContent> in both of these types, which is incorrect.
Is this a bug? I am using EMF/XSD 2.1 20050428 build.
Thanks,
Dave Carlson
|
|
|
Powered by
FUDForum. Page generated in 0.03249 seconds