- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Thu, 28 Nov 2002 16:20:01 +0000
- To: xmlschema-dev@w3.org, Robin Berjon <robin.berjon@expway.fr>
- CC: Cédric Thienot <cedric.thienot@expway.fr>
Hi Robin, > 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. It's not a valid restriction, for the reason you cite -- the definition of A:ctA has a content model that contains a reference to A:eltA. In schema B, you define the content model of B:ctB to include an element called B:eltA. This isn't valid under Schema Component Constraint: Particle Valid (Restriction) [1]. Specifically B:eltA is not a valid restriction of A:eltA under clause 1 of Schema Component Constraint: Particle Restriction OK (Elt:Elt -- NameAndTypeOK) because the elements' target namespaces are not the same. I'd usually get around this using substitution groups, but that wouldn't work in your example because you can't use substitution groups with attributes, only with elements. Cheers, Jeni [1] http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict [2] http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK --- Jeni Tennison http://www.jenitennison.com/
Received on Thursday, 28 November 2002 11:20:03 UTC