(D. Alvarado) writes:
> I have an element that I would like to validate against an XML
> schema in which the element can be either one of 50 values or an
> arbitrary number of white space characters. The values would be
> things like "AC", "AD", abd "AF" and you could see the XML element
> represented like:
>
> <myElt>AC</myElt>
> or
> <myElt>AF</myElt>
> or
> <myElt> </myElt>
>
> How would I define such an element in an XML schema?
Define a restriction of xs:token with either
* an enumeration of all your two-letter codes plus the empty string
or
* a pattern which allows the empty string plus your two letter codes
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail:
URL:
http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]