W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Re: Using derivedBy to define lists of permitted attribute values

From: Martin Bryan <mtbryan@sgml.u-net.com>
Date: Thu, 13 Apr 2000 15:43:56 +0100
Message-ID: <033a01bfa561$4bacf4a0$57cc66c3@sgml>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
Cc: <www-xml-schema-comments@w3.org>
Henry

Thanks for the response, but you are on the wrong track. I see how constraining element content works quite nicely. The problem was that I specifically want to apply the same technique to an enumerated list of  attribute values, hence my question:

> I am trying to work out whether or not the derivedBy facet can be used to identify an element that contains a list of permitted values for an attribute. 

The area I am trying to get working is the ebXML electronic business area. We have a lot of elements which have "qualifier" attributes whose values are taken from code lists. Ideally I would like to be able to "import" up-to-date codelists as part of the schema so that maintenance of the code list can be made independent of maintenance of the schema. Having to define such lists as enumeration lists is very long winded, so I would like to use the derived by method, but I don't see how it applies to attribtues, hence my attempted example:

> <xsd:attribute name=”Code” base=”xsd:string”>
>  <xsd:simpleType name=”CodeList” base=”xsd:string” derivedBy=”xsd:list”/>
> </xsd:attribute>
> <MyCodeList xsi:type="CodeList">AB1 CD2 EF3</MyCodeList> 

Martin
Received on Thursday, 13 April 2000 11:58:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:52 UTC