- From: Kasimier Buchcik <kbuchcik@4commerce.de>
- Date: Mon, 23 Aug 2004 12:51:48 +0200
- To: <xmlschema-dev@w3.org>
Hi, I just subscribed to the list; this is the first mail I received, so I apologise if my thoughts may be a bit out of context or already taken into account. on 8/23/2004 10:40 AM Michael Kay wrote: >>You misunderstood me. To define a complex type and want >>element A to be >>of type X1 FROM namespace N1 and element B to be of type X2 FROM >>namespace N2 is not questioned by me. But why somebody want >>to define a >>complex type to be IN namespace N1 and an element of this >>type to be IN >>namespace N2? (Thats the case if you define a target namespace in the >>schema and miss the elementFormDefault) Hmm, in conjunction with simple types, one uses types with a different target namespace - namely [1] - every time one of the built-in simple types (e.g. xsd:boolean) is used. An example for complex types: it makes sense to have an element of type 'anyType'; 'anyType' has a target namespace of [1]. Maby the reasons to have a complex type with an other target namespace are just not as obvious as with simple types. I'm not sure if this is intended by the authors of the spec, but to me the type is comparable to a class, the element to a instance variable in a programming language. So all the properties (comparable to attributes and the content model) have to be as declared by the class; but the variable can be used as a local, global or class variable. I.e. the context where I use the variable is free to be chosen (comparable to the namespace and position of the element). In fact I hope that XML Schemata will be used as a pool for complex types to be reused. > > > I think one should put the question the other way around. Why should the > language disallow such a combination? Generally, a language should allow > everything that makes sense (=has well-defined semantics), it should not > disallow things merely because they don't appear to be useful. > > Michael Kay > [1] http://www.w3.org/2001/XMLSchema [2] http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/datatypes.html#schema Regards, Kasimier
Received on Monday, 23 August 2004 10:42:52 UTC