Re: xs:union alternative

"Tony Yip" <tony.yip@softwareag.com> writes:

> I am seeking any alternative to replace xs:union. Suppose I have an
> element which allow the following contents - "UTF-8", "GB2312" & any
> String.
>  
> Normally, I can create 2 simpleTypes (one for "any String" and one
> for pre-defined values) and using xs:union. Is there any alternative
> that I can define 1 simpleType to solve the problem.

Since the values you allow are themselves strings, you could just use
xs:string, right?  The only downside would be that you would not get
whitespace normalization.  If you want that, and don't mind _always_
having it, just use xs:token.

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: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Received on Tuesday, 17 June 2003 12:09:27 UTC