- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 15 Oct 2001 15:55:26 +0100
- To: Rahul Srivastava <Rahul.Srivastava@Sun.COM>
- Cc: xmlschema-dev@w3.org
Rahul Srivastava <Rahul.Srivastava@Sun.COM> writes:
> Let me give an example...
>
> <xsd:attribute name="Attr" type="xsd:string"/>
>
> <xsd:attributeGroup name="GroupB">
> <xsd:attribute ref="Attr" use="required"/>
> </xsd:attributeGroup>
>
> <xsd:attributeGroup name="GroupA">
> <xsd:attribute ref="Attr" use="optional"/>
> <xsd:attributeGroup ref="GroupB"/>
> </xsd:attributeGroup>
>
> Here, the attributeGroup - GroupA, has two attributes, both having the same
> name, from same targetNamespace, but different use.
>
> So, how do we compute union of attribute uses in this case, OR, is
> it straight way an error.
It's an error.
To achieve something like this, you need a type definition which ref's
Attr, and another derived by restriction which makes that ref
'required'.
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 Monday, 15 October 2001 10:54:43 UTC