- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Mon, 22 Oct 2001 16:49:40 +0100
- To: ht@cogsci.ed.ac.uk ((Henry S. Thompson))
- CC: "Tim Galle" <timgalle@cyberdude.com>, xmlschema-dev@w3.org
Henry, >> Presumably to fix the required and value constraint properties, you'd >> need to use the final attribute on the complex type definition itself? > > Yes, but then you couldn't change over1... either. I was hoping that you'd show us a sneaky way of getting around that :) What about using groups and attribute groups: <xs:complexType name="struct1" final="#all"> <xs:group ref="struct1-content" /> <xs:attribute name="final1" type="my:ft1"/> <xs:attribute name="final2" type="my:ft2"/> <xs:attribute name="final3" type="my:ft3"/> <xs:attributeGroup ref="struct1-attrs" /> </xs:complexType> <xs:group name="struct1-content"> <xs:sequence> ... </xs:sequence> </xs:group> <xs:attributeGroup name="struct1-attrs"> <xs:attribute name="over1" type="xs:decimal"/> <xs:attribute name="over2" type="xs:string"/> </xs:attributeGroup> Redefining the struct1-content group (using xs:redefine) would allow people to change the content, and redefining the struct1-attrs attribute group would allow people to change the over1/over2 attributes (or add new ones), but the final1-3 attributes wouldn't be redefinable... that's if I'm correct that it's not possible to redefine final complex types using xs:redefine? Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Monday, 22 October 2001 11:51:39 UTC