Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Creating complexType with simpleContent
Creating complexType with simpleContent [message #595530] Wed, 08 June 2005 17:43
Dave Carlson is currently offline Dave Carlson
Messages: 399
Registered: July 2009
Senior Member
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
Previous Topic:Adding XML Comments to XML Schema?
Next Topic:Creating complexType with simpleContent
Goto Forum:
  


Current Time: Wed Sep 17 21:42:54 GMT 2014

Powered by FUDForum. Page generated in 0.02584 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software