Feature request - anonymous simplecontent type definition within complex type definition

At present, when defining complex types with simple content,
the schema REC requires a separate named type definition as the
basis for the complex type definition, e.g.

<xs:complexType name="ExampleType">
    <xs:extension base="SomeSimpleType">

Often the base type will require further restriction of the
inbuilt schema datatypes with the effect that an additional
"helper" type is required.

Whilst such additional types are typically short, and in Henry
Thompson's words on xmlscham-dev "why fuss over saving three or
four lines?", I believe it would be advantageous to allow anonymous
definition of the base type within the complex type definition.

Its only four lines, but in a larger schema, it can be an
extra type definition for every case of a element with simple content but
having attributes.

For schemas with a decent number of modelled entities, its starts to become

The results can be

1. A lot of "helper" types which have a one-off use and tend to
clutter schemas and obscure the meaning.

2. A physically much larger schema to deal with.

3. It also forces the use of named types - you can't use anonymous types
   for such elements, i.e. even if the element declaration uses an anonymous
   type, you still need a named type for the simple content.

These are not huge issues in their own right - its a useability problem
rather than a functional one.

This request was triggered by a query on xmlschema-dev where a user,
reflecting my own experience, attempted to combine the simple content
restriction with the complex type extension.

The fact that the person was led to start the way they did suggests it
is the "natural" way to think about the situation.

I thus submit this request for your consideration.


P.S. I am emailing this following a request from Henry to do so.

Received on Tuesday, 18 June 2002 08:49:33 UTC