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.1 Constructing sequences The rule under dynamic evaluation presumes that the algebra of sequences under concatenation is known, but the purpose of the Formal Semantics is to explain semantics, not presume semantics. I think you need the following rule in addition to the stated one: dynEnv |- Value = (A1, ... An), (B1, ... Bm) --------------------------------------------- dynEnv |- Value = (A1, ..., An, B1, ... Bm) Or perhaps it can be done by rewording your existing rule as follows: dynEnv |- Expr1 => (A1, ... An) dynEnv |- Expr2 => (B1, ... Bm) ------------------------------- dynEnv |- Expr1, Expr2 => (A1, ..., An, B1, ..., Bm) This includes as a special case the following: dynEnv |- Value1 = () dynEnv |- Value2 = (B1, ... Bm) ------------------------------- dynEnv |- Value1, Value2 = Value2 dynEnv |- Value1 = (A1, ... An) dynEnv |- value2 = () ------------------------------- dynEnv |- Value1, Value2 = Value2
I think having a binary rule for the sequence construction is probably better. The way sequences of values behave is described in [XQuery 3.3 Sequence Expressions] and [Data Model 2.5 Sequences]. Those rules are recalled in [Formal Semantics 2.3.1 Formal values] (second paragraph from the end of the section). We may want to add a pointer to the data model there for clarification. We may want to formalize those rules on sequences by adding something along the lines that you propose. I believe the following would be a bit cleaner, and more complete as well. But I am not completely convinced this is necessary. --------------- (Value) = Value ------------------- (), Value2 = Value2 ------------------- Value1, () = Value1 - Jerome
The working groups have decided to add the additional pointer in 2.3.1, however we are not going to add additional rules since these rules are considered part of the data model sequence behaviour. Please close the issue if you agree with the resolution or reopen the issue if you disagree.