- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Tue, 15 Apr 2003 10:18:38 +0100
- To: "Giles Hogben" <giles.hogben@jrc.it>
- CC: xmlschema-dev@w3.org
Hi Giles, > The point is that I need to use the category element many times in > my schema (say 50), each time with a different allowable set of > values for name. The solution you give below does not allow reuse of > the category element + name attribute definition (does it?). In XML Schema, each declaration specifies the name and the type (content/value) of the element or attribute. You cannot say "I want to reuse this declaration but with this different type". Each time you want to have an element or attribute with a different name or type you have to have a different declaration for it. Those declarations can be local (declared within the complex type of a particular element) in order to prevent name clashes. I'm not sure what information about the category element or name attribute you want to reuse, but it might be that you can get reuse by deriving the type of each of your fifty category elements from the same type. Or it might be that you could assign a union type to the name attribute to represent the choices between sets of enumerated values, but the schema would not then check whether a particular category element had one of a particular set of values for its name attribute. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Tuesday, 15 April 2003 05:18:47 UTC