- From: Brenda Bell <bbell@juicesoftware.com>
- Date: Thu, 1 Aug 2002 09:02:13 -0400
- To: xmlschema-dev@w3.org
- Message-ID: <846B0B02E1B78B49B678EDCC00EB2962FB500E@mail01.ent.juice.com>
Hi Jeni. > As I see it, the mapping is: > > (name, age, #other*) -> (name, age, (ssn, #other*)) > > The sequence (ssn, #other*) counts as pointless because it has a > minOccurs and maxOccurs of 1 and it appears in another sequence, so > the mapping is actually: > > (name, age, #other*) -> (name, age, ssn, #other*) > > The best functional mapping is then: > > name -> name > age -> age > -> ssn > #other* -> #other* > > which isn't valid because there's no particle in the base type for the > ssn particle to map on to. > I tried to work through this one before I saw your response and got as far as ignoring the pointless sequence... but I still came up with the restriction as valid because the bounds of xs:any on the base type was 0 to unbounded. I got more confused when I referenced Vlist's who says "any content valid per the restricted type must also be valid per the base type". In this case, that's true so I ran a couple of tests in XMLSpy... one with the original schema as posted and one where I physically removed the pointless sequence. It accepted both as valid. I then went back to the spec and decided that my confusion stems from this statement: "Any pointless occurrences of <sequence>, <choice> or <all> are ignored". I can read this two different ways... that the entire sequence is ignored and mapping applies to what's left... or that the pointless sequence is simply "verbose" such that you remove it from the equation and view its members as part of its containing sequence? > I think that this is a clear > example of where the rules are highly non-intuitive and don't give the > "right answer" Absolutely, undeniably correct.
Received on Thursday, 1 August 2002 08:58:54 UTC