OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Adding an attribute to an enumerated list

[ Lists Home | Date Index | Thread Index ]

Sounds like you need a "complex type with simple content".
 
Michael Kay


From: Allison Bloodworth [mailto:abloodworth@berkeley.edu]
Sent: 13 July 2005 18:14
To: xml-dev@lists.xml.org
Subject: [xml-dev] Adding an attribute to an enumerated list

Hi,

 

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 the 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 a difficult problem?

 

Allison Bloodworth

Principal Administrative Analyst

e-Berkeley Program Office

University of California, Berkeley

(415) 377-8243

abloodworth@berkeley.edu

 





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS