This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The definition in section 2.5 reads: [Definition: A pure union type is an XML Schema union type that satisfies the following constraints: (1) {variety} is union, (2) the {facets} property is empty, (3) no type in the transitive membership of the union type has {variety} list, and (4) no type in the transitive membership of the union type is a type with {variety} union having a non-empty {facets} property]. Item (4) appears to allow unions with members that are unions and repeats item (2) in its clause, but by doing so, it does not disallow variety list (item (3) is not repeated). Perhaps we can make the definition recursive (not sure this makes this simpler)? (4) each type in the transitive membership of the union is a generalized atomic type. Though I admit I may be reading / understanding this wrong. Does "transitive membership" here mean it includes any nested union members? If so, this does not seem to be the mathematical definition of "transitive", but I'm not a mathematician and I wonder whether the definition should need to rely on such knowledge. Hardly a severe bug, the text around the definition makes clear what the intent is.
I don't think there is a bug here. If a union type U includes a union type V in its transitive membership, and V has a list type L in its transitive membership, then L is also in the transitive membership of U, so U is not a pure union type, under rule (3).
(Note: the definition of "transitive membership" of a union type is in XSD 1.1 part 2 ยง2.4.1.3. Perhaps it would be clearer if we linked to it.)
Thanks, I didn't know the term was defined somewhere. Linking would be good, since implementing XSD 1.1 is not mandatory. If we pick parts that need to be understood or implemented regardless, we should probably say so. I agree now that there is no bug (given the XSD 1.1 definition), and suggestions for improvement would potentially cause(long) debates and hardly satisfy requirements for inclusion in a possible erratum. I think then, that the following would be either simpler, or shorter, and satisfy the same constraints (just as an aside, I am not suggesting to rewrite what already works): [Definition: A pure union type is an XML Schema union type that satisfies the following constraints: (1) {variety} is union, (2) the {facets} property is empty, (3) each type in the transitive membership is an [atomic type] or has {variety} union and is a [pure union type]. (I prefer inclusive definitions, mixing exclusions with inclusions I find harder to grasp. But other readers mind find the recursiveness of the definition problematic)
This is a candidate item for XPath errata document. Editor to decide on working.
Edit comment #4: s/working/wording/
I think the following recursive definition works: A pure union type is a simple type that satisfies the following constraints: (1) {variety} is union, (2) the {facets} property is empty, (3) each type in the transitive membership of the union type is a generalized atomic type. The existing notes are adequate to explain this to the uninitiated.
That seems to go back to my original suggestion? But yes, it works well and perhaps better than my later, longer proposals. Would be nice if we could also link [transitive membership], as suggested in comment#2.
This has been resolved in the errata document: https://www.w3.org/XML/2017/qt-errata/xpath-31-errata.html#E3