This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
.4.3 Content models There are no inferences for the algebra of types. For example, you state that (Type | none) = Type, but I don't see any inferences to back this up. Some other inferences to consider are: |- (Type1 | Type2) = (Type2 | Type1) |- (Type1 | Type1) = (Type1) |- (Type1 | (Type2 | Type3)) = ((Type1 | Type2) | Type3) Those are commutative, idempotent and associate rules, respectively. The & operator is also commutative, idempotent and associative. I believe that empty (and maybe none) is also an identity for &: |- (Type & empty) = Type Are there any rules relating | and &; relating | and , ; relating , and & ? Turning to quantifiers, I think we need the following inferences: |- Type1** = Type1* |- Type1?* = Type1* |- Type1++ = Type1+ |- Type1?? = Type1? etc. Such rules might be placed in section 8.1, "Judgments for accessing types".
This comment was on section 2.4.3, "Content models". Subsequently, I have found 8.3.2 "Subtype and type equality", which does consider the algebra of types. The solution there, to use known algorithms for regular expressions and finite state automata, looks correct and is actually algorithmic, unlike my proposal to specify the axioms from which a type algebra could be deduced. (How uncharacteristic of the Formal Semantics to actually suggest an algorithm to use to implement it!) I now suggest that this comment could be resolved by: 1. Putting a pointer from 2.4.3 to 8.3.2 so the reader knows where to find a discussion of the algebra of types. 2. Perhaps a note or example in 8.3.2 that all the expected judgments about the type hierarcy, such as |- (Type1, empty) = Type1, can be deduced using the regular expressions algorithms.
Thank you for suggesting a solution to your own comment. The XSL/XQuery WGs agreed to adopt your proposed solution to this comment. Please let us know if this response is satisfactory. If not, please respond to this message, explaining your concerns. Paul Cotton On behalf of the XML Query and XSL WGs