Lists Home |
Date Index |
I'm not quite sure exactly what you mean by "I'd like people to be able to
redefine certain types into enumerated lists", but possibly what you need to
do is define a simpleType with your enumerations as you suggest. Then add
the attribute by extending the simpleType into complexType, simpleContent.
<xs:attribute name="MyAttribute" type="???????"/>
P.S. Thanks to all those that answered my questions earlier today.
for XML to C++ data binding visit
----- Original Message -----
From: "Allison Bloodworth" <firstname.lastname@example.org>
> I have searched the XML-dev archives as well as the UBL 1.0 specification
> and CodeList Representation paper and can't find a good solution to my
> problem, so I thought I'd ask for any suggestions out there.
> I am trying to create a very flexible schema for a public Event for which
> I'd like people to be able to redefine certain types into enumerated lists
> when they use the schema. It seems that this means the types must be
> simpleTypes, since only simpleTypes can be restricted into enumerations.
> However, I'd also like these types to have an attribute that will allow
> user of the schema to indicate what language the content of the element
> (which will eventually use the type) is in. It seems that this is
> impossible, as simpleTypes cannot have attributes. UBL 1.0 seems to have a
> way of attaching this meta-data to an enumerated list/codelist (involving
> the creation of both a simpleType to hold the enumeration values, and a
> complexType to hold "supplementary components"-the metadata about the
> codelist), but it seems too complicated for my purposes as I really only
> have one attribute I want to use.
> Doesn't anyone else out there ever want to create an enumerated list that
> has an attribute attached to it? Am I missing something simple or is this
> difficult problem?
> Allison Bloodworth
> Principal Administrative Analyst
> e-Berkeley Program Office
> University of California, Berkeley
> (415) 377-8243