- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: Mon, 17 Nov 2003 01:53:15 +0000
- To: Hans Teijgeler <hans.teijgeler@quicknet.nl>
- Cc: xmlschema-dev@w3.org
Hans Teijgeler <hans.teijgeler@quicknet.nl> writes: > * I have a complexType with attributes and child elements > * I create another complexType that I want to type by > 'restriction' with the first complexType > * Then Spy goes bananas, because apparently those child elements > are in the way > > My question 1 now is: If I want to restrict the second complexType > by making one or more inherited child elements "prohibited", what > should I do? Just leave them out -- they have to be optional in the first type defn. > My question 2 now is: If I want to restrict the second complexType > by giving one or more inherited attributes a fixed value and NOT > touch the child elements, what should I do? Repeat the attribute decls, with the addition of the 'fixed' value decl. You have to repeat the elements in the second type defn -- I realise this is the opposite of attributes, and may be a surprise -- You can use a named model group and reference it from both the first and second type defns, if there are really no changes between the two. 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 Sunday, 16 November 2003 20:53:16 UTC