- From: Robin Berjon <robin.berjon@expway.fr>
- Date: Thu, 28 Nov 2002 17:03:11 +0100
- To: xmlschema-dev@w3.org
- CC: Cédric Thienot <cedric.thienot@expway.fr>
Hi, I have another question relating to cross-schema derivations. Given the following schemata: Schema A <schema xmlns='http://www.w3.org/2001/XMLSchema' xmlns:A='AAA' targetNamespace='AAA' elementFormDefault='qualified' attributeFormDefault='qualified' > <complexType name='ctA'> <sequence> <element name='eltA' type='integer'/> </sequence> <attribute name='attrA' type='integer'/> </complexType> </schema> Schema B <schema xmlns='http://www.w3.org/2001/XMLSchema' xmlns:A='AAA' xmlns:B='BBB' targetNamespace='BBB' elementFormDefault='qualified' attributeFormDefault='qualified' > <import namespace='AAA'/> <complexType name='ctB'> <complexContent> <restriction base='A:ctA'> <sequence> <element name='eltA' type='positiveInteger'/> </sequence> <attribute name='attrA' type='positiveInteger'/> </restriction> </complexContent> </complexType> <element name='foo' type='B:ctB'/> </schema> My question is: is that even a valid restriction? In schema B, eltA would appear to me to be in effect B:eltA, and thus not valid per ctA. I couldn't find text in the spec to make me balance either way (but then I could have missed it), though I would prefer that restriction to be impossible. If by any chance it happens to be a valid restriction, which of the two following instances (given already declared namespaces) validates? <B:foo B:attrA='1'><B:eltA/></B:foo> or <B:foo A:attrA='1'><A:eltA/></B:foo> or (worse) both? Thanks, -- Robin Berjon <robin.berjon@expway.fr> Research Engineer, Expway 7FC0 6F5F D864 EFB8 08CE 8E74 58E6 D5DB 4889 2488
Received on Thursday, 28 November 2002 11:03:43 UTC