Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Problems with generating list types
Problems with generating list types [message #595344] Tue, 03 May 2005 13:50
Klaas Dellschaft is currently offline Klaas DellschaftFriend
Messages: 58
Registered: July 2009

I want to create the following list type programatically:

<xs:simpleType name="myType">
<xs:list itemType="xs:integer"/>
<xs:length value="4"/>

I create the list type with the following code:

XSDSimpleTypeDefinition simpleType = XSDFactory.eINSTANCE

If I query simpleType.getValidFacets() I get length, maxLength, minLength,
whiteSpace, enumeration and pattern as valid facets of this type so I
presumed that I can add the length-facet directly to the new list type. But
when I serialize it to a file I get

<xs:list itemType="xs:integer">
<xs:length value="4"/>

What have I done wrong? Or am I mislead by the list of valid facets and I
have to create an anonymous list type which is added as the base type of
"myType" and there it is possible to set the facets?

Previous Topic:Load XSDSchema from DOM rather than file
Next Topic:CWM and XSD
Goto Forum:

Current Time: Sun Nov 29 14:13:24 GMT 2015

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

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