Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » Creating complexType with simpleContent
Creating complexType with simpleContent [message #595530] Wed, 08 June 2005 13:43
Eclipse UserFriend
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: Thu Jul 03 12:44:26 EDT 2025

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

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

Back to the top