Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - How do I re-task schemaLocation attribute? >Thread Next - RE: Is enumeration valid for NMTOKENS? Is enumeration valid for NMTOKENS?To: xmlschema-dev@--.--- Date: 3/29/2008 6:04:00 PM I came across a schema definition where the attribute type is defined as
<xs:simpleType name="someType">
<xs:restriction base="xs:NMTOKENS">
<!-- bunch of xs:enumeration elements -->
</xs:restriction>
</xs:simpleType>
I am not sure if the intent is that someType should be a list of values
where each value can be one of the enumerated values. Or it could be a
mistake and the base type should have been xs:NMTOKEN. I looked at the XML
Schema specification, but couldn't find any restriction in using a list type
as the base type for enumeration.
If the intent is to allow multiple values, then personally I would prefer
defining a type for the list elements and then another type that explicitly
uses the list and itemType to define a list of that restricted type. I would
like to know if the above definition is correct or it should be the way I
prefer.
thanks,
Siva
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
