- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 19 Feb 2001 23:21:31 +0000
- To: "Joseph M. Reagle Jr." <reagle@mit.edu>
- Cc: xmlschema-dev@w3.org
"Joseph M. Reagle Jr." <reagle@mit.edu> writes: I've only got one thing to add to Eddie's (correct as far as I can see) response. > I'm playing with XMLSpy and its validator (thought there is a schema > question in here), and it objects to the following instance: > <KeyInfo> > <KeyRetrievalMethod URI="someKey" > Type="http://www.w3.org/2001/02/xmlenc#EncryptedKey"/> > </KeyInfo> > > in that KeyRetrievalMethod should be from an "##other" namespace. > > xmlenc's KeyInfo is defined as: > <complexType name='KeyInfoType'> > <complexContent> > <extension base='ds:KeyInfoType'> > <sequence> > <element ref='xenc:KeyRetrievalMethod' minOccurs='0'/> > </sequence> > </extension> > </complexContent> > </complexType> > > ds:KeyInfoType permits ANY from ##other among other things. Presuming the content model for ds:KeyInfoType is still something like <xs:choice maxOccurs="unbounded"> . .. <xs:any namespace="##other"/> </xs:choice> You have two problems: 1) the minOccurs on the choice defaults to 1, so your keyRetrievalMethod is being validated by the choice's required first iteration, as it were; 2) your content model is ambiguous -- if there were _two_ keyRetrievalMethod elements, the second could stay with the <any> or go with the added explicit <element>. Isn't what you want to _restrict_ KeyInfoType with the KeyRetrievalMethod reference? This should have the right result. 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, 19 February 2001 18:21:34 UTC