- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 05 Jan 2001 09:29:18 +0000
- To: Jesse Watson <jesse.watson@Par3.com>
- Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Jesse Watson <jesse.watson@Par3.com> writes:
> I'm reviewing XML Schema as a replacement for DTDs currently used at our
> company and can't find a way to do the following:
>
> Given the below XML, I want to validate that the value of the 'y'
> element's 'name' attribute is legal depending on the scope in which
> it is found. The tricky part is that I want the scope to be
> determined by the value of one of an element's attributes, rather
> than by it's name! For example, if the 'y' element is within the
> (root) 'z' element, only the value "Pat" is legal in the 'y'
> element's name attribute. But if the 'y' element is within the 'x'
> element AND the 'x' element's 'foo' attribute's value is "boyNames",
> then the legal enumeration of values is "Mark", "John", "Mike" as
> well as "Pat". Etcetera and so on for "girlNames".
Runtime/computed types, or co-constraints, are a commonly requested
absent feature from XML Schema v1.0, sorry. Strong candidate for
v1.1.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-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/
Received on Friday, 5 January 2001 04:29:26 UTC