This document contains the XPath 2.0 and XQuery 1.0 Issues List that records pre-Last Call issues.
XPath 2.0 and XQuery 1.0 Issues
Values for Status has the following meaning:
resolved: a decision has been finalized and the document updated to reflect the decision.
decided: recommendations and decision(s) has been made by one or more of the following: a task-force, XPath WG, or XQuery WG.
draft: a proposal has been developed for possible future inclusion in a published document.
active: issue is actively being discussed.
unassigned: discussion of issue deferred.
subsumed: issue has been subsumed by another issue.
Cl has the values:
D for Document and Collections
T for basic type issues
TF for types in the context of functions
Priorities prefixed by "o-" are old, unreviewed, priority assignments.
Priority 1 is the highest, 4 is the lowest.
(stylesheet parameters used: kwSort: numeric, kwFull: full, kwDate: 00000000, kwLocus: all).
Num | Cl | Pr | Cluster | Status | Locus | Description | Responsible |
---|---|---|---|---|---|---|---|
1 | o-1 | grammar | resolved | xpath | XPath Productions | ||
2 | o-1 | grammar | subsumed | xquery | Precedence of Operators | ||
3 | o-3 | grammar | resolved | xpath | What should be the precedence of a RangeExpr be? | ||
4 | o-1 | grammar | resolved | xquery | Abstract Syntax | ||
5 | o-2 | reserved-words | resolved | xpath | Reserved words | ||
6 | o-2 | reserved-words | subsumed | xpath | 5. Reserved Words: | ||
7 | o-1 | reserved-words | subsumed | xquery | Keywords in XQuery | ||
8 | o-1 | reserved-words | resolved | xpath | Case-Sensitivity in Keywords | ||
9 | o-1 | type-conversions | resolved | xpath | Should implicit conversions be used? | ||
10 | o-2 | type-conversions | resolved | xpath | Conversions for Arithmetic | ||
11 | o-1 | type-conversions | resolved | xpath | XPath Type Coercions | ||
12 | o-2 | arithmetic-operators | resolved | xpath | Arithmetic on Sequences. | ||
13 | o-1 | arithmetic-operators | resolved | xpath | Arithmetic operators among sequences | ||
14 | o-1 | type-conversions | resolved | xpath | Should type error checking be part of the context? | ||
15 | TF | 1 | choice-context | resolved | xpath | Implicit conversion of node-sets to boolean for comparisons. | |
16 | o-1 | choice-context | subsumed | xpath | 2. Converting node sets to Boolean | ||
17 | o-1 | choice-context | subsumed | xpath | Converting general expressions to Boolean | ||
18 | o-1 | choice-context | subsumed | xpath | 1. Arithmetic on node sets | ||
19 | o-1 | nulls-empty | resolved | xpath | How should null be treated in the data model? | ||
20 | o-1 | nulls-empty | subsumed | xpath | Representation of Missing Data | ||
21 | o-1 | nulls-empty | resolved | datamodel | Handling of xsi:nil on Input | ||
22 | o-1 | 3-value-logic | resolved | xpath | Three-valued logic | ||
23 | o-1 | 3-value-logic | subsumed | xpath | Three-valued Logic | ||
24 | o-1 | 3-value-logic | subsumed | xpath | 3. Three-valued logic | ||
25 | o-1 | 3-value-logic | subsumed | xpath | Nulls, nil, and three-valued logic | ||
26 | o-3 | 3-value-logic | resolved | xpath | Should we default then to return an empty sequence? | ||
27 | o-1 | 3-value-logic | subsumed | xpath | IF and WHERE | ||
28 | o-1 | 3-value-logic | postponed | xpath | Do we need and3(), or3(), not3() built in? | ||
29 | o-1 | 3-value-logic | subsumed | xpath | Not() on Empty Sequence | ||
30 | o-2 | 3-value-logic | resolved | xfo | Should comparison operations always return null if either of the arguments are null? | ||
31 | o-2 | 3-value-logic | resolved | xpath | Empty sequence comparisons | ||
32 | o-1 | for-expr | resolved | xpath | Do we really require for at the XPath expression level? | ||
33 | o-2 | for-expr | subsumed | xpath | Do we need a simple form of for? | ||
34 | o-3 | for-expr | subsumed | xpath | Does XPath require range variables in for expressions? | ||
35 | o-1 | FLWR-expr | resolved | xquery | Separation of clauses in FLWR | ||
36 | o-1 | SOME-expr | resolved | xpath | Quantifiers with multiple bindings? | ||
37 | o-1 | datatypes | resolved | xpath | 6. Datatypes: | ||
38 | o-1 | datatypes | resolved | xfo | XML Schema Datatypes Constructors | ||
39 | o-1 | datatype promotions | resolved | xfo | Promotion Hierarchy for XML Schema Types | ||
40 | T | 1 | type-semantics | resolved | xquery | Correspondence of Types | |
41 | T | 1 | type-semantics | resolved | xquery | Static type-checking vs. Schema validation | |
42 | T | 1 | type-semantics | resolved | xquery | Implementation of and conformance levels for static type checking | |
43 | T | 1 | type-semantics | decided | xquery | Defining Behavior for Well Formed, DTD, and Schema Documents | |
44 | T | 1 | type-semantics | subsumed | xquery | Support for schema-less and incompletely validated documents | |
45 | T | 1 | type-semantics | resolved | xquery | Names in Type Definitions | |
46 | T | 3 | type-semantics | postponed | xquery | typeof() function | |
47 | T | 2 | type-semantics | decided | xquery | Subtype Substitutability | |
48 | T | 3 | type-semantics | decided | algebra | CASE not a subtype | |
49 | T | 1 | type-semantics | resolved | xquery | Substitution Groups | |
50 | TF | 1 | type-semantics | resolved | xquery | Function Definition | |
51 | TF | 1 | type-semantics | resolved | xquery | Function Resolution | |
52 | o-1 | type-semantics | resolved | xquery | Collection types | ||
53 | o-1 | type-semantics | resolved | xquery | Support for Unordered Collections | ||
54 | o-1 | type-errors | resolved | xquery | Queries with Invalid Content | ||
55 | o-1 | type-errors | resolved | xquery | Static versus Dynamic Errors | ||
56 | T | 3 | type-syntax | decided | xquery | Human-Readable Syntax for Types | |
57 | T | 3 | type-syntax | postponed | xquery | Inline XML Schema Declarations | |
58 | T | 3 | type-syntax | resolved | xquery | Importing Schemas and DTDs into query | |
59 | T | 1 | INSTANCEOF-expr | resolved | xpath | We need precise semantics for instanceof. | xquery |
60 | o-1 | CAST-expr | resolved | xquery | CAST expression | ||
61 | o-3 | CAST-expr | resolved | xpath | Do we need an explicit cast operator (or instead treat as)? | ||
62 | o-1 | CAST-expr | resolved | algebra | Mapping CAST AS | ||
63 | o-1 | TREAT-expr | resolved | xquery | Type Guard | ||
64 | o-1 | TREAT-expr | resolved | algebra | Is TREAT AS necessary? | ||
65 | o-1 | CAST/TREAT-expr | resolved | xquery | CAST and TREAT AS Syntax | ||
66 | o-1 | TYPESWITCH-expr | resolved | xquery | Typeswitch | ||
67 | o-1 | ASSERT-expr | resolved | xquery | Static Type Assertions | ||
68 | o-2 | context | resolved | xpath | Do we need a Context Item, and, if so, how should it work? | ||
69 | o-1 | context | resolved | xquery | Mapping Input Context | ||
70 | o-2 | context | resolved | xpath | Does the context include a default namespace declaration? | ||
71 | o-3 | context | resolved | xpath | Do we need a datatype names binding in the context? | ||
72 | o-2 | context | resolved | xpath | How should qname-to-collation bindings be handled? | ||
73 | o-1 | context | subsumed | xpath | Collation Sequences | ||
74 | o-1 | module-semantics | decided | xquery | Module syntax | ||
75 | o-1 | module-semantics | decided | xquery | Importing Modules | ||
76 | o-1 | module-semantics | resolved | xquery | What is a Query | ||
77 | o-1 | module-semantics | resolved | xquery | Namespace Prefix Redefine | ||
78 | o-1 | module-syntax | resolved | xquery | Semicolon as Query Module Separator | ||
79 | o-1 | module-syntax | decided | xquery | Encoding | ||
80 | o-1 | typed-value/data() | resolved | xpath | Accessing Element Data | ||
81 | T | 1 | typed-value/data() | resolved | datamodel | What should the typed value of a complex type be? | |
82 | o-2 | node-equality | resolved | xfo | What should the semantics be for == and !== in regards to nodesets and sequences? | ||
83 | o-1 | sequences | subsumed | xfo | Sequence comparisons need to be defined in the F&O spec. | ||
84 | o-1 | sequences | subsumed | xquery | Comparing Collections | ||
85 | o-1 | node-equality | resolved | xfo | Identity-based equality operator | ||
86 | o-2 | node-equality | resolved | xpath | Set operations based on value | ||
87 | o-2 | value-identity | resolved | xfo | What is the identity of a simple value? | ||
88 | o-1 | (in)equality-operators | resolved | xpath | 8. Implied existential quantifiers: | ||
89 | o-1 | (in)equality-operators | subsumed | xpath | Comparing Sequences | ||
90 | o-1 | (in)equality-operators | subsumed | xpath | Node-set comparisons | ||
91 | o-1 | (in)equality-operators | resolved | xpath | 9. String comparisons: | ||
92 | o-1 | (in)equality-operators | resolved | xpath | Deep equality | ||
93 | o-1 | (in)equality-operators | subsumed | xpath | 4. Element-equality: | ||
94 | o-1 | (in)equality-operators | subsumed | xpath | Node equality | ||
95 | o-1 | (in)equality-operators | resolved | xpath | Equality will not be compatible with some string conversions | ||
96 | o-1 | (in)equality-operators | decided | xpath | Normalized Equality | ||
97 | o-2 | error | resolved | xpath | How should the error object be supported? | ||
98 | o-2 | error | resolved | xpath | General discussion of errors | ||
99 | o-1 | error | resolved | xquery | TRY/CATCH and error() | Dana | |
100 | o-1 | datamodel | resolved | datamodel | Should an empty sequence and an empty node-set be distinguishable? | ||
101 | o-1 | datamodel | resolved | datamodel | Should sequences be allowed to have nodes? | ||
102 | o-1 | function-app | resolved | xpath | Functions on Empty Sequences | ||
103 | o-1 | function-app | resolved | xpath | Functions on Sequences | ||
104 | o-1 | function-app | subsumed | xquery | Sequences for single parameters | ||
105 | o-1 | function-app | resolved | xpath | Implicit current node for functions? | ||
106 | o-2 | function-app | subsumed | xpath | Problem with default context node for functions? | ||
107 | o-1 | function-app | resolved | xpath | Path iteration | ||
108 | o-1 | function-app | resolved | xpath | Aggregate functions on empty sequences. | ||
109 | o-3 | syntax | resolved | xpath | Need text to disambiguate Lexical Structure? | ||
110 | o-4 | syntax | resolved | xpath | Should we use is and isnot instead of == and !==. | ||
111 | o-3 | syntax | resolved | xpath | What is the best sequence concatenation operator? | ||
112 | o-1 | syntax | resolved | xpath | Leading Minus | ||
113 | o-1 | axes | resolved | xpath | What should the mechanism be for axis subsetting? | ||
114 | o-1 | axes | decided | xquery | XPath Axes | ||
115 | o-1 | path-semantics | resolved | xpath | General Expressions in Path Steps | ||
116 | o-1 | path-semantics | subsumed | algebra | Full Expression Syntax in Steps | ||
117 | o-4 | path-semantics | resolved | xpath | Disallow variables on right side of slash? | ||
118 | o-4 | path-semantics | resolved | xpath | Disallow obvious non-node sequences on left of slash? | ||
119 | o-4 | path-semantics | resolved | xpath | Should nonsense nodetests be disallowed? | ||
120 | o-1 | path-semantics | resolved | xpath | 7. Duplicates and ordering: | ||
121 | o-1 | path-semantics | subsumed | xquery | Path Expression Order | ||
122 | o-1 | path-semantics | subsumed | xpath | Duplicates and ordering | ||
123 | o-1 | serialization | resolved | xquery | Linearization/Serialization | ||
124 | o-1 | functions | decided | xquery | External Functions | ||
125 | o-4 | editorial | resolved | xpath | Should we say something about the abstractness of XPath? | ||
126 | o-4 | editorial | resolved | xpath | Should we re-explain path expressions? | ||
127 | o-1 | operators | resolved | xpath | Definitions of Operators | ||
128 | o-1 | operators | resolved | xfo | Operators and functions | ||
129 | o-2 | algebra | resolved | xquery | Alignment of Syntax | ||
130 | o-1 | xquery-alignment | resolved | algebra | Algebra Mapping | Jerome | |
131 | o-1 | xquery-alignment | resolved | algebra | Alignment of Precedence | ||
132 | o-1 | attribute accessors | resolved | xfo | Attribute Name, Attribute Content | ||
133 | o-1 | (de)reference-expr | resolved | xquery | Reference Constructor | ||
134 | o-1 | (de)reference-expr | resolved | xquery | Dereference Operator and Links | ||
135 | o-1 | constructor-syntax | resolved | algebra | Empty End Tags in Element Constructors | ||
136 | o-2 | constructor-syntax | resolved | xquery | Lists of Element Constructors | ||
137 | o-1 | constructor-syntax | resolved | xquery | Attribute Constructor Function | ||
138 | o-1 | constructor-syntax | resolved | xquery | Quotes for computed attribute values | ||
139 | o-1 | constructor-syntax | resolved | xquery | Computed element and attribute names | ||
140 | o-1 | constructor-syntax | subsumed | xquery | Alternative syntax for element construction | ||
141 | o-1 | constructor-syntax | resolved | xquery | Productions for Comments and Processing Instructions | ||
142 | o-1 | constructor-syntax | subsumed | xquery | Comments to end-of-line | ||
143 | o-1 | constructor-syntax | postponed | algebra | XML Constructor | ||
144 | o-1 | syntax | decided | xquery | Escaping Quotes and Apostrophes | ||
145 | o-1 | constructor-expr | subsumed | xquery | Copy and Reference Semantics | ||
146 | o-1 | constructor-expr | resolved | xquery | |||
147 | o-1 | constructor-expr | resolved | xquery | Empty Attributes | ||
148 | o-1 | constructor-expr | resolved | xquery | Namespace Attributes in Element Constructors | xquery | |
149 | o-1 | literal-XML | resolved | xquery | Embedding XML in XQuery | ||
150 | o-1 | literal-XML | subsumed | xquery | Embedding XQuery in XML | ||
151 | o-1 | literal-XML | resolved | xquery | Cutting and pasting XML into XQuery | ||
152 | o-1 | xqueryx | decided | xqueryx | XML-based Syntax | ||
153 | o-1 | xqueryx | postponed | xquery | Escape between syntaxes | ||
154 | o-1 | sort | resolved | xquery | Ordering of empty values. | ||
155 | o-1 | sort | decided | xquery | Sorting by Non-exposed Data | ||
156 | o-1 | BEFORE/AFTER-expr | resolved | xpath | Meaning of BEFORE and AFTER | ||
157 | o-1 | functions | decided | xquery | Function Libraries | ||
158 | o-1 | functions | resolved | xquery | Unqualified Function Names | ||
159 | o-1 | functions | resolved | algebra | Recursion | ||
160 | o-2 | execution-model | resolved | xquery | Naive Implementation Strategy | ||
161 | o-1 | fusion | abandoned | xquery | Fusion | ||
162 | o-1 | filter | resolved | algebra | Filter as a Function | ||
163 | o-1 | filter | resolved | algebra | Typing of Filter | Jerome Simeon | |
164 | o-1 | updates | resolved | xquery | Updates | Jonathan | |
165 | o-1 | views | resolved | algebra | View Definition | ||
166 | o-1 | miscellaneous | resolved | xquery | Excluding Undesired Elements | ||
167 | o-1 | miscellaneous | resolved | algebra | Eval | ||
168 | o-1 | groupby | resolved | xquery | GROUPBY | ||
169 | o-1 | conformance | resolved | xquery | Missing conformance section | ||
170 | D | 1 | documents | resolved | xquery | Document collections | |
171 | o-1 | path-semantics | resolved | xpath | Operands of "/" | ||
172 | T | 2 | typed-value/data() | resolved | xpath | Some functions taking node sequences and implicitly map? | |
173 | o-1 | type exception | resolved | xpath | Polymorphic operator; only one fallback? | ||
174 | T | 1 | type exception | resolved | xpath | Support for UnknownSimpleType | |
175 | o-2 | 3-value-logic | subsumed | xpath | What should "not3()" be called? | ||
176 | o-1 | choice-context | resolved | xpath | What is a node sequence? | ||
177 | TF | 2 | choice-context | abandoned | xpath | Consistency of functions that take boolean formal argument | |
178 | o-1 | type-conversions | resolved | xpath | Semantics of positional predicates in XPath | ||
179 | o-1 | type-conversion | resolved | xpath | Function call rules needed | ||
180 | o-1 | functions | resolved | xpath | Functions expecting complex-valued arguments | ||
181 | o-1 | type-system | resolved | xpath | Should literals include integers & integer be treated as primitive type? | ||
182 | o-1 | operators | resolved | xpath | Mapping XPath Operators to F&O Functions | ||
183 | T | 1 | text-nodes | resolved | xpath | Text nodes - lexical structure and typed form | |
184 | T | 3 | node-types | resolved | xpath | Need ability to test for Comments, PIs | xquery |
185 | o-2 | type exception | resolved | xpath | Always explicit cast? | ||
186 | o-1 | node order | resolved | xpath | Ordering of result of union, intersect, and except operators | ||
187 | o-1 | operators | subsumed | xfo | Operations supported on date/time types | ||
188 | o-1 | operators | resolved | xpath | Comparison operators - concrete syntax | ||
189 | o-1 | operators | resolved | xpath | Supported combinations of types for comparison operators | ||
190 | o-1 | operators | resolved | xpath | Operators for order comparisons | ||
191 | o-1 | whitespace | decided | xquery | Whitespace handling in element constructors | ||
192 | T | 2 | type constructed element | resolved | xquery | Type of a newly constructed element | |
193 | T | 2 | xml non representable | resolved | xquery | Construction of non representable XML | |
194 | o-1 | sort | resolved | xquery | Support for stable and unstable sort? | ||
195 | o-1 | sort | resolved | xquery | Semantics of sorting heterogeneous sequences | ||
196 | T | 2 | types | resolved | xpath | Concrete syntax for datatype declarations | xquery |
197 | T | 2 | types | resolved | xpath | Need "attribute of type"? | xquery |
198 | T | 3 | types | resolved | xpath | Syntax for named typing | xquery |
199 | T | 2 | types | resolved | xpath | Support for locally declared types? | xquery |
200 | T | 1 | types | postponed | xpath | Semantics of "only" | xquery |
201 | o-1 | namespaces | resolved | xquery | Scope of namespace declaration | ||
202 | o-1 | namespaces | resolved | xquery | In-scope namespaces and bindings | ||
203 | o-1 | namespaces | resolved | xquery | Non declared namespace prefix | ||
204 | o-1 | namespaces | resolved | xquery | How do default element namespaces affect attributes | ||
205 | TF | 1 | types | resolved | xquery | Default function parameter type | |
206 | T | 2 | types | decided | xpath | Typing support in XPath | |
207 | o-1 | variables | resolved | xpath | Variable names: QNames or NCnames? | ||
208 | o-1 | syntax curly brace | resolved | xquery | Multiple curly braces allowed? | xquery | |
209 | o-1 | syntax attribute values | resolved | xquery | Syntax for attribute values - more than one? | xquery | |
210 | o-1 | order sequences | postponed | xpath | Order of sequences | ||
211 | T | 1 | types | resolved | xpath | Treat and structural vs named typing | xquery |
212 | o-1 | syntax | resolved | xpath | Is "datatype" a suitable production name? | xquery | |
213 | o-1 | syntax quotes | resolved | xpath | How to get quotes etc in string literals? | ||
214 | o-1 | syntax strings in attributes | resolved | xquery | Strings in attributes | xquery | |
215 | o-1 | 3-value-logic | postponed | xpath | Should we have a 3-valued form of quantifiers? | ||
216 | o-1 | focus | abandoned | xpath | Description of focus is very procedural | ||
217 | o-1 | focus | resolved | xpath | Context document in focus | ||
218 | o-1 | wildcards | resolved | xpath | What wildcards; namespaceprefix? | xquery | |
219 | o-1 | namespaces | resolved | xquery | Context: namespaces | ||
220 | o-1 | sort | subsumed | xpath | Should there be a way to explicitly sort in document order? | ||
221 | o-1 | namespaces | resolved | xquery | Where should namespace prefixes apply? | ||
222 | o-1 | namespaces | resolved | xquery | Allow redefinition of namespace prefixes? | ||
223 | o-1 | functions external | decided | xquery | We need a way to declare external functions | ||
224 | T | 2 | types | decided | xquery | Why do we want to allow optional returns and DataType? | |
225 | o-1 | variables | resolved | xpath | Variable redefinition allowed? | ||
226 | o-1 | existential expressions | resolved | xpath | Existential Expressions | ||
227 | o-2 | syntax dereference | resolved | xpath | Syntax for dereference? | ||
228 | o-2 | namespace functions | decided | xpath | Should we keep the default function namespace, and the xf: namespace? | ||
229 | o-2 | syntax | resolved | xpath | Do we need both << and precedes? | ||
230 | D | 1 | context | resolved | xpath | Context document adequate for multiple docuemnts? | |
231 | o-1 | fallback | resolved | xpath | data(SimpleValue) is error or no-op? | ||
232 | o-1 | syntax operators date | resolved | xpath | Use "+" and "-" on dates and durations? | ||
233 | o-1 | syntax | resolved | xquery | Simpler FLWR syntax? | ||
234 | o-1 | order sequences | resolved | xpath | Who defines sorting order of ()? | ||
235 | o-1 | syntax | resolved | xpath | Need parenthesis in conditional expression? | ||
236 | o-1 | syntax | resolved | xpath | SimpleType preceded by a keyword? | xquery | |
237 | o-1 | syntax | resolved | xquery | Need parenthesis in type switch expression? | ||
238 | o-1 | consistency | resolved | xpath | Consistency: tradeoff between interoperability and efficiency | ||
239 | o-1 | consistency | resolved | xpath | Consistency: bracketing of nested expressions | ||
240 | o-1 | consistency | resolved | xpath | Consistency: parenthesizing test expressions | ||
241 | o-1 | consistency | resolved | xpath | Consistency: keywords | ||
242 | 3 | sort | resolved | xquery | Sortby on partially ordered values? | ||
243 | 3 | sort | decided | xpath | Provide an example of sorting "disappearing" | ||
244 | 2 | serialization | decided | xquery | CDATA sections and serialization | ||
245 | 2 | syntax curly brace | resolved | xquery | Are {} in text evaluated? | ||
246 | 2 | syntax | decided | xquery | Nested XQuery comments allowed? | ||
247 | 2 | namespaces | decided | xpath | What does default namespace(s) affect? | ||
248 | 4 | evaluate | postponed | xpath | Evaluate function | ||
249 | 4 | higher-order-functions | postponed | xpath | Higher-order functions | ||
250 | 2 | variables | decided | xquery | Declaring Variables in Prolog | ||
251 | 2 | sort | decided | xquery | Sorting "input to loop", not the result | ||
252 | 2 | consistency | resolved | xquery | "sort by" rather than "sortby" for consistency? | ||
253 | TF | 2 | type-semantics | resolved | xpath | CAST as simple type of a node type | |
254 | 2 | grammar | resolved | xpath | Should the lexical details be in document? | ||
255 | T | 1 | type-semantics | resolved | xpath | What are the operators on a derived type? | |
256 | D | 1 | collections | resolved | xpath | What is return type of colections? | |
257 | D | 1 | collections | decided | xpath | Does collection() always return same result? | |
258 | D | 2 | documents | decided | xpath | Identity of Document Nodes | |
259 | T | 1 | type-semantics | resolved | xpath | Arithmetic operation rules for unknown simpletype | |
260 | T | 2 | type-semantics | resolved | xpath | Implicit data() on instanceof? | |
261 | 2 | syntax quotes | resolved | xquery | Quoting rules in nested expressions in attribute value construction | ||
262 | T | 1 | type-semantics | resolved | xpath | Definition of data() on elements with known complex type | |
263 | T | 1 | type-semantics | resolved | xpath | Definition of data() on elements with unknown type, whose content may be simple or complex | |
264 | 1 | variables | resolved | xpath | Shadowing of Variables | ||
265 | 2 | FTTF-xml:lang | decided | xpath-fulltext | How do we determine the xml:lang for a node if it inherits xml:lang from a higher-level node? | ||
266 | 2 | FTTF-xml:lang | decided | xpath-fulltext | Do we support the sublanguage portion of xml:lang? | ||
267 | 1 | syntax | resolved | xpath | Syntax problems with "validate" | ||
268 | T | 1 | type-semantics | resolved | xpath | xsd:string and anySimpleType'd data behave the same? | |
269 | T | 1 | type-semantics | resolved | xpath | Can we get rid of the unknown keyword | |
270 | T | 1 | type-semantics | resolved | xpath | Typing, coercions, and conformance | |
271 | T | 1 | type-semantics | resolved | xpath | Type compatibility of heterogeneous union types | |
272 | 1 | external-functions | decided | xpath | External Functions | ||
273 | 1 | external-objects | decided | xpath | External Objects | ||
274 | T | 1 | type-semantics | resolved | xpath | Text-node-only implementation possible? | |
275 | T | 1 | type-semantics | resolved | xpath | Should validation also check identity constraints? | |
276 | T | 1 | type-semantics | resolved | xpath | Does validation introduce new xsi:type attributes? | |
277 | T | 1 | type-semantics | resolved | xpath | Should validate introduce xsi:type? | |
278 | T | 1 | type-semantics | resolved | xpath | Does //@xsi:type match an xsi:type attribute? | |
279 | T | 1 | type-semantics | decided | xpath | Should there be a lightweight cast? | |
280 | T | 1 | type-semantics | resolved | xpath | Do we need to distinguish atomic simple types and list simple types? | |
281 | T | 1 | type-semantics | resolved | xpath | Representing the type name of untyped character data | |
282 | T | 1 | type-semantics | resolved | xpath | xs:numeric type | |
283 | 1 | syntax-productions | resolved | xpath | Is the DocumentElement syntax production necessary? | ||
284 | T | 1 | type-semantics | resolved | xpath | Static Named Typing | |
285 | T | 1 | type-semantics | resolved | xpath | Is the QName denoting type information optional or required? | |
286 | 1 | constructor-expr | decided | xquery | Element Construction vs Streaming | ||
287 | 1 | syntax | resolved | xpath | Functional Status of Comma | ||
288 | 1 | constructor-expr | resolved | xquery | Element Constructor Attribute Order | ||
289 | T | 1 | constructor-expr | resolved | xquery | Attribute Value Construction from Elements | |
290 | 1 | constructor-expr | decided | xquery | Element Attribute Constructor Name Type | ||
291 | T | 1 | constructor-expr | resolved | xquery | Element Construction anySimpleType Sequence Content | |
292 | 1 | constructor-expr | resolved | xquery | Element Construction Sequence vs Multi-expr | ||
293 | 1 | decided | xquery | Cdata and CharRef Semantics | |||
294 | T | 1 | type-semantics | resolved | xquery | Should all elements and attributes have type annotations? | |
295 | 1 | lexical-representation | decided | xquery | Lexical Representation of Atomic Values | ||
296 | 1 | path-semantics | resolved | xpath | What is definition of leading "/"? | ||
297 | T | 1 | types | decided | xpath | Should XPath have "type binding" in variable? | |
298 | T | 1 | types | resolved | xpath | Add Schema type names for sequences of homogeneous types? | |
299 | 1 | whitespace | resolved | xquery | Does character reference to whitespace change whitespace handling? | ||
300 | 1 | sort | resolved | xquery | Should sorting of untyped data be prohibited? | ||
301 | T | 1 | types | resolved | xpath | Supporting SQL/XML mappings in Basic XQuery | |
302 | T | 1 | types | resolved | xpath | Support for arbitrary XML documents | |
303 | T | 1 | types | resolved | xpath | Define "scale-down" mappings? | |
304 | T | 1 | types | resolved | xpath | Declare required conformance features? | |
305 | T | 1 | types | resolved | xpath | Schema Import Feature prerequisite for Static Typing Feature? | |
306 | T | 1 | types | resolved | xpath | PSVI to Data Model mapping part of normative text? | |
307 | T | 1 | types | decided | xpath | Schema Types from input documents? | |
308 | T | 1 | types | decided | xpath | Type Soundness | |
309 | T | 1 | types | resolved | xpath | What should be the type of an error value? | |
310 | T | 1 | types | decided | xquery | Are the children of a newly constructed element typed? | |
311 | 1 | whitespace | decided | xquery | Whitespace and Attribute Constructors | ||
312 | T | 1 | types | resolved | xquery | What to do about list types? | |
313 | T | 1 | types | resolved | xquery | What to do about union types? | |
314 | T | 1 | types | subsumed | xquery | Partial support for SCHEMA IMPORT in Basic XQuery? | |
315 | 1 | syntax | resolved | xpath | Whitespace allowed in the name of a variable! | ||
316 | T | 1 | types | decided | xpath | Is anySimpleType = anySimpleType*? | |
317 | 1 | extensions | decided | xquery | XQuery Extension Mechanisms | ||
318 | 1 | sort | decided | xquery | Add 'order by' clause to FLWR? | ||
319 | 1 | namespaces | decided | xquery | Namespace definitions and in-scope namespaces | ||
320 | T | 1 | types | decided | xquery | Should different conformance levels give the same result for the same query and data? | |
321 | 1 | validate | decided | xquery | Is validate strict or lax? | ||
322 | 1 | validate | decided | xquery | "validate" strict/lax override? | ||
323 | 1 | resolved | xpath | Should "unordered" be included in XPath? | |||
324 | 1 | variables | resolved | xquery | How can variables be bound external to XQuery itself? | ||
325 | T | 1 | types | decided | xpath | Refering to element that is not in the in-scope schema def. | |
326 | T | 1 | types | subsumed | xpath | Semantics of element foo of type T | |
327 | 1 | functions | decided | xpath | Evaluate unused function parameters? | ||
328 | 1 | cdata section | decided | xquery | What does CDATA section constructor construct? | ||
329 | 1 | constructors | decided | xquery | Duplicate attribute constructors | ||
330 | T | 1 | types | resolved | xquery | Should "some" do type filtering? | |
331 | T | 1 | types | resolved | xpath | Static vs. dynamic dispatch for arithmetics | |
332 | 1 | types | resolved | xpath | Schema Import, Static Typing: what is interoperable? | ||
333 | 1 | conformance | subsumed | xpath | Optional Features vs. Conformance Levels | ||
334 | T | 1 | type-semantics | decided | xpath | How are documents for which validation has failed processed? | |
335 | 1 | formal-semantics | decided | xpath | XPath/XQuery's current semantics greatly interferes with optimization | ||
336 | 1 | editorial | postponed | all | Markup in documents for errors | ||
337 | 1 | editorial | postponed | all | Add markup in documents for errors | ||
338 | 1 | whitespace | decided | xquery | Handling of whitespace and character references | ||
339 | 2 | errors | decided | xquery | Error type for attributes constructed too late | ||
340 | 1 | errors | decided | xpath | How to identify errors? | ||
341 | 1 | syntax | decided | xpath | Problems with SequenceType | ||
342 | o-1 | grammar | resolved | xquery | Prolog syntax | ||
343 | 1 | namespaces | decided | xpath | Do functions in the null namespace clash with functions in the default namespace? | ||
344 | 1 | resolved | formal-semantics | Attributes | |||
345 | 1 | resolved | formal-semantics | Namespaces | |||
346 | 1 | resolved | formal-semantics | Document Order | |||
347 | 1 | resolved | formal-semantics | References vs containment | |||
348 | 1 | resolved | formal-semantics | Element identity | |||
349 | 1 | resolved | formal-semantics | Source and join syntax instead of "for" | |||
350 | 1 | resolved | formal-semantics | References: IDREFS, Keyrefs, Joins | |||
351 | 1 | resolved | formal-semantics | Fixed point operator or recursive functions | |||
352 | 1 | resolved | formal-semantics | Externally defined functions | |||
353 | 1 | resolved | formal-semantics | Construct values by copy | |||
354 | 1 | Static typing | resolved | formal-semantics | XPath tumbler syntax instead of index? | ||
355 | 1 | resolved | formal-semantics | GroupBy - needs second order functions? | |||
356 | 1 | resolved | formal-semantics | Collations | |||
357 | 1 | resolved | formal-semantics | Polymorphic types | |||
358 | 1 | resolved | formal-semantics | 3-valued logic to support NULLs | |||
359 | 1 | resolved | formal-semantics | Mixed content | |||
360 | 1 | resolved | formal-semantics | Unordered content | |||
361 | 1 | resolved | formal-semantics | Align algebra types with schema | |||
362 | 1 | resolved | formal-semantics | Support derived types | |||
363 | 1 | resolved | formal-semantics | Structural vs. name equivalence | |||
364 | 1 | resolved | formal-semantics | Syntax | |||
365 | 1 | resolved | formal-semantics | Indentation, Whitespaces | |||
366 | 1 | resolved | formal-semantics | Catch exceptions and process in algebra? | |||
367 | 1 | resolved | formal-semantics | Value for empty sequences | |||
368 | 1 | resolved | formal-semantics | Treatment of empty results at type level | |||
369 | 1 | resolved | formal-semantics | Project - one tag only | |||
370 | 1 | resolved | formal-semantics | Case syntax | |||
371 | 1 | resolved | formal-semantics | Fusion | |||
372 | 1 | resolved | formal-semantics | Views | |||
373 | 1 | resolved | formal-semantics | Automatic type coercion | |||
374 | 1 | resolved | formal-semantics | Recursive functions | |||
375 | 1 | resolved | formal-semantics | Full regular path expressions | |||
376 | 1 | resolved | formal-semantics | Metadata Queries | |||
377 | 1 | resolved | formal-semantics | Fusion | |||
378 | 1 | resolved | formal-semantics | Exception handling | |||
379 | 1 | resolved | formal-semantics | Global-order based operators | |||
380 | 1 | resolved | formal-semantics | Copy vs identity semantics | |||
381 | 1 | resolved | formal-semantics | Copy by reachability | |||
382 | 1 | resolved | formal-semantics | Dereferencing semantics | |||
383 | 1 | resolved | formal-semantics | Case Syntax | |||
384 | 1 | resolved | formal-semantics | Sorting | |||
385 | 1 | resolved | formal-semantics | GroupBy | |||
386 | 1 | resolved | formal-semantics | Recursive Descent for XPath | |||
387 | 1 | resolved | formal-semantics | Keys and IDREF | |||
388 | 1 | resolved | formal-semantics | Global Order | |||
389 | 1 | resolved | formal-semantics | FOR Syntax | |||
390 | 1 | resolved | formal-semantics | Attributes | |||
391 | 1 | resolved | formal-semantics | Explicit Type Declarations | |||
392 | 1 | resolved | formal-semantics | Unordered Collections | |||
393 | 1 | resolved | formal-semantics | Recursive Descent for XPath | |||
394 | 1 | resolved | formal-semantics | Project redundant? | |||
395 | 1 | resolved | formal-semantics | Axes of XPath | |||
396 | 1 | resolved | formal-semantics | Global vs. local elements | |||
397 | 1 | resolved | formal-semantics | Global vs. local complex types | |||
398 | 1 | resolved | formal-semantics | Types with non-wellformed instances | |||
399 | 1 | resolved | formal-semantics | Operators on Simple Types | |||
400 | 1 | resolved | formal-semantics | More precise type system; choice in path | |||
401 | 1 | resolved | formal-semantics | Downward Navigation only? | |||
402 | 1 | resolved | formal-semantics | Testing Subtyping | |||
403 | 1 | resolved | formal-semantics | Internationalization aspects for strings | |||
404 | 1 | resolved | formal-semantics | Model for References | |||
405 | 1 | resolved | formal-semantics | Open questions for constructing elements by reference | |||
406 | 1 | resolved | formal-semantics | Do we need (user defined) higher order functions? | |||
407 | 1 | resolved | formal-semantics | Error code handling in Query Algebra | |||
408 | 1 | resolved | formal-semantics | Built-In GroupBy? | |||
409 | 1 | resolved | formal-semantics | Shallow or Deep Equality? | |||
410 | 1 | resolved | formal-semantics | Runtime Casts | |||
411 | 1 | resolved | formal-semantics | Document Collections | |||
412 | 1 | resolved | formal-semantics | Organization of Document | |||
413 | 1 | resolved | formal-semantics | Stable vs. Unstable Sort/Distinct | |||
414 | 1 | resolved | formal-semantics | Alignment with the XML Query Datamodel | |||
415 | 1 | Language | resolved | formal-semantics | Facet value access in Query Algebra | ||
416 | 1 | Static typing | resolved | formal-semantics | Facets for simple types and their role for typechecking | ||
417 | 1 | resolved | formal-semantics | Operational semantics for expressions | |||
418 | 1 | resolved | formal-semantics | Overloading user defined functions | |||
419 | 1 | resolved | formal-semantics | Unordered types | |||
420 | 1 | resolved | formal-semantics | Interleaved repetition and closure | |||
421 | 1 | resolved | formal-semantics | Generation of ambiguous types | |||
422 | 1 | resolved | formal-semantics | Global order between nodes in different documents | |||
423 | 1 | Static typing | postponed | formal-semantics | Typing of parent | ||
424 | 1 | resolved | formal-semantics | Lexical representation of Schema simple types | |||
425 | 1 | resolved | formal-semantics | Type and expression operator precedence | |||
426 | 1 | resolved | formal-semantics | Expressive power and complexity of typeswitch expression | |||
427 | 1 | resolved | formal-semantics | Execution model | |||
428 | 1 | resolved | formal-semantics | Semantics of Wildcard type | |||
429 | 1 | resolved | formal-semantics | Syntactic rules | |||
430 | 1 | resolved | formal-semantics | More examples of Joins | |||
431 | 1 | resolved | formal-semantics | Align [XPath/XQuery] types with XML Schema : Formal Description. | |||
432 | 1 | subsumed | formal-semantics | Syntax for types in XQuery | |||
433 | 1 | resolved | formal-semantics | Static type-assertion expression | |||
434 | 1 | resolved | formal-semantics | Attribute expression | |||
435 | 1 | resolved | formal-semantics | Error expression | |||
436 | 1 | resolved | formal-semantics | Representation of Text Nodes in type system | |||
437 | 1 | Semantics | resolved | formal-semantics | Static type errors and warnings | ||
438 | 1 | resolved | formal-semantics | Importing Schemas and DTDs into query | |||
439 | 1 | resolved | formal-semantics | Support for schema-less and incompletely validated documents | |||
440 | 1 | resolved | formal-semantics | Static type-checking vs. Schema validation | |||
441 | 1 | Semantics | decided | formal-semantics | Implementation of and conformance levels for static type checking | ||
442 | 1 | resolved | formal-semantics | Incomplete/inconsistent mapping from [XPath/XQuery] to core | |||
443 | 1 | Semantics? | resolved | formal-semantics | Namespace resolution | ||
444 | 1 | resolved | formal-semantics | Support for mixed content in the type system | |||
445 | 1 | resolved | formal-semantics | Indentation, Whitespace | |||
446 | 1 | Typing | resolved | formal-semantics | Complexity of interleaving | ||
447 | 1 | resolved | formal-semantics | Support for named typing | |||
448 | 1 | resolved | formal-semantics | Types for nodes in the data model. | |||
449 | 1 | Typing | resolved | formal-semantics | Constraint on attribute and element content models | ||
450 | 1 | Semantics | decided | formal-semantics | Semantics of data() | ||
451 | 1 | resolved | formal-semantics | Principal node types in XPath | |||
452 | 1 | Semantics | decided | formal-semantics | Semantics of order by | ||
453 | 1 | Semantics | resolved | formal-semantics | Semantics of element and attribute constructors | ||
454 | 1 | resolved | formal-semantics | Semantics of instance of ... only | |||
455 | 1 | Static typing | resolved | formal-semantics | Typing for the typeswitch default clause | ||
456 | 1 | Semantics | resolved | formal-semantics | Incomplete specification of type conversions | ||
457 | 1 | Semantics | resolved | formal-semantics | Dynamic context for current date and time | ||
458 | 1 | Language | decided | formal-semantics | What is in the default context? | ||
459 | 1 | Language | resolved | formal-semantics | Serialization | ||
460 | 1 | Language | resolved | formal-semantics | Data model constructor for error values | ||
461 | 1 | Semantics | resolved | formal-semantics | Data model syntax and literal values | ||
462 | 1 | Semantics | resolved | formal-semantics | Semantics of op:to | ||
463 | 1 | Language | resolved | formal-semantics | Sequence operations: value vs. node identity | ||
464 | 1 | Semantics | resolved | formal-semantics | Casting functions | ||
465 | 1 | resolved | formal-semantics | Overloaded functions | |||
466 | 1 | Semantics | resolved | formal-semantics | Semantics of / | ||
467 | 1 | resolved | formal-semantics | Binding position in FLWR expressions | |||
468 | 1 | resolved | formal-semantics | Operations on node only in XPath | |||
469 | 1 | resolved | formal-semantics | Semantics of effective boolean value | |||
470 | 1 | Language | resolved | formal-semantics | SequenceType limitations | ||
471 | 1 | Semantics | resolved | formal-semantics | Casting based on the lexical form | ||
472 | 1 | Static typing | resolved | formal-semantics | Static typing of union | ||
473 | 1 | Semantics | resolved | formal-semantics | When to process the query prolog | ||
474 | 1 | resolved | formal-semantics | Boolean node test and sequences | |||
475 | 1 | Static typing | resolved | formal-semantics | Typing for descendant | ||
476 | 1 | Semantics | resolved | formal-semantics | Should to also be described in the formal semantics? | ||
477 | 1 | Semantics | resolved | formal-semantics | Should we define for with head and tail? | ||
478 | 1 | Semantics | resolved | formal-semantics | Semantics of special functions | ||
479 | 1 | Semantics | resolved | formal-semantics | Non-determinism in the semantics | ||
480 | 1 | Static typing | subsumed | formal-semantics | Typing of input functions | ||
481 | 1 | Semantics | decided | formal-semantics | Semantics of Schema Context | ||
482 | 1 | Semantics | resolved | formal-semantics | Type equivalence rules | ||
483 | 1 | resolved | formal-semantics | Dependency in normalization and function resolution | |||
484 | 1 | Semantics | resolved | formal-semantics | Treatment of nillability and xsi:nil | ||
485 | 1 | resolved | formal-semantics | Treatment of xsi:type in validation | |||
486 | 1 | Typing | resolved | formal-semantics | Support for PI, comment and namespace nodes | ||
487 | 1 | Semantics | resolved | formal-semantics | Representation of text nodes in formal values | ||
488 | 1 | Static typing | resolved | formal-semantics | Static typing of path expressions in the presence of derivation by extension | ||
489 | 1 | resolved | formal-semantics | Support for substitution groups | |||
490 | 1 | resolved | formal-semantics | What should be the type annotation in the data model for anonymous types? | |||
491 | 1 | Semantics | resolved | formal-semantics | Validation of an empty string against a string list | ||
492 | 1 | Language | decided | formal-semantics | Derivation by extension in XQuery | ||
493 | 1 | Language | resolved | formal-semantics | May the content of a text node be the empty string? | ||
494 | 1 | resolved | formal-semantics | Should type annotations be optional? | |||
495 | 1 | subsumed | formal-semantics | What is the type of the input functions? | |||
496 | 1 | Semantics | decided | formal-semantics | Support for lax and strict wildcards | ||
497 | 1 | resolved | formal-semantics | Semantics of => | |||
498 | 1 | resolved | formal-semantics | Common primes for incomparable types | |||
499 | 1 | Language | resolved | formal-semantics | Casting and validation | ||
500 | 1 | Semantics | resolved | formal-semantics | Support for wildcard namespaces | ||
501 | 1 | Typing | resolved | formal-semantics | Support for XML Schema groups | ||
502 | 1 | Language | resolved | formal-semantics | Element and attribute declarations in the static context | ||
503 | 1 | Semantics | resolved | formal-semantics | Collations in the static environment | ||
504 | 1 | resolved | formal-semantics | Type promotion in Atomization | |||
505 | 1 | resolved | formal-semantics | How to describe the semantics of built-in functions | |||
506 | 1 | resolved | formal-semantics | Normalization of XPath predicates | |||
507 | 1 | resolved | formal-semantics | Coalescing text nodes in element constructors | |||
508 | 1 | Semantics | resolved | formal-semantics | Namespaces in element constructors | ||
509 | 1 | Static typing | resolved | formal-semantics | Static typing for validate | ||
510 | 1 | Language | resolved | formal-semantics | Is validate working on sequences? | ||
511 | 1 | Language | resolved | formal-semantics | Sorting by document order | ||
512 | 1 | Semantics | resolved | formal-semantics | Conformance Levels | ||
513 | 1 | Static typing | resolved | formal-semantics | Imprecise static type of constructed elements | ||
514 | 1 | Semantics | resolved | formal-semantics | Raising errors | ||
515 | 1 | Language | resolved | formal-semantics | Element constructors aligned with XSLT | ||
516 | 1 | Typing | resolved | formal-semantics | Typeswitch and type substitutability | ||
517 | 1 | resolved | formal-semantics | Semantics of 'element foo of type T' | |||
518 | 1 | resolved | formal-semantics | Static typing for atomization, effective boolean values, and function arguments. | |||
519 | 1 | Typing | resolved | formal-semantics | Type of document node | ||
520 | 1 | Semantics | decided | formal-semantics | Coercion between untyped and atomic values | ||
521 | 1 | Semantics | resolved | formal-semantics | Semantics of XPath 1.0 compatibility | ||
522 | 1 | Semantics | resolved | formal-semantics | Primitive function applications | ||
523 | 1 | type-semantics | decided | xpath | input(), collection(), document(); validation semantics | ||
524 | 1 | type semantics | decided | xpath | Plural datatypes different from Singular *? | ||
525 | 1 | Semantics | resolved | formal-semantics | Static context accessible from the dynamic context | ||
526 | 1 | types | decided | xpath | Semantics for anySimpleType and untypedAtomic | ||
527 | 1 | types | resolved | formal-semantics | Static typing of XPath index expressions | ||
528 | 1 | semantics | decided | xpath | Semantics of text constructor on empty sequence | ||
529 | 1 | constructor-expr | decided | xquery | Node identity in the formal semantics | ||
530 | 1 | validation | decided | xquery | Default default validation mode | ||
531 | 1 | type-semantics | decided | xquery | Should discard the type of copied subelement | ||
532 | 1 | syntax | decided | xpath | Alignment between path expressions and sequence types | ||
533 | 1 | type-semantics | resolved | formal-semantics | Strict static typing for automatic coercion of untyped atomic to atomic values | ||
534 | 1 | type-semantics | decided | formal-semantics | Semantics of function calls and notion of "expected type" | ||
535 | 1 | syntax | decided | xpath | Lexical state tables | ||
536 | 1 | types | resolved | xpath | Data model to infoset mapping and type information | ||
537 | 1 | modules | decided | xquery | What happens to imported schemas that are used in function signatures? | ||
538 | 1 | extensions | decided | xquery | Can (and should) keyword extensions be allowed in XQuery by equipping them with a namespace prefix? | ||
539 | 1 | types | decided | formal-semantics | Semantics of fs:cast-untypedAtomic in backward compatibility mode | ||
540 | 1 | types | decided | formal-semantics | How does the static semantics works in the case where the input types are unions? | ||
541 | 1 | type-semantics | decided | formal-semantics | Should it be a static error if an expression other than () has type empty? | ||
542 | 1 | type-semantics | resolved | formal-semantics | What should be the type of an attribute or element that is well-formed but not validated, or is validated in skip mode? | ||
543 | 1 | type-semantics | decided | xpath | How can a path expression match elements in the substitution group of a given element? | ||
544 | 1 | type-semantics | decided | xpath | How can a path expression match nodes of a given type? | ||
545 | 1 | types | resolved | xpath | Are XS element/attribute declarations implicitly added to the schema context? | ||
546 | 1 | conformance-levels | postponed | xpath | Are there more processing model options that could make sense as consistent features and thus as conformance levels? | ||
547 | 1 | syntax | decided | xquery | Use "declare" for declarations | ||
548 | 1 | syntax | decided | xpath | Lexical Rules: states normative? | ||
549 | 1 | namespaces | decided | xquery | Computed namespace-constructor | ||
550 | 1 | syntax | decided | xquery | Location of Comments | ||
551 | 1 | types | decided | xpath | Constructor functions for unprefixed user defined types | ||
552 | 1 | syntax | decided | xpath | Should the quotes in processing-instruction("...") be optional? | ||
553 | 1 | errors | decided | xpath | Rules for reporting dynamic errors statically | ||
554 | 1 | editorial | decided | xpath | What is the really normative text? | ||
555 | 1 | formal semantics | active | formal-semantics | Formal Semantics of Module Import | ||
556 | 1 | formal semantics | decided | formal-semantics | Formal Semantics of Variable Definitions | ||
557 | 1 | formal semantics | decided | formal-semantics | Formal semantics of Validation Declaration | ||
558 | 1 | formal semantics | decided | formal-semantics | The content of element types should always allow PI's and comment node types | ||
559 | 1 | formal semantics | active | formal-semantics | New Sequence Type needs to be fully implemented in Formal Semantics | ||
560 | 1 | formal semantics | resolved | formal-semantics | Exactness of Type Inference | ||
561 | 1 | conformance | decided | xpath | Normativity of External Mappings | ||
562 | 1 | static typing | decided | formal-semantics | What static typing for fn:root? | ||
563 | 1 | errors | decided | xquery | Is dynamic evaluation performed if error in static analysis? | ||
564 | 1 | schema-import | decided | xquery | Loading same schema-component twice | ||
565 | 1 | context | resolved | xquery | XQuery context: default attribute declarations? | ||
566 | 1 | types | decided | xpath | "treat" should work up and down type hierarchy |
XPath can't be treated as a terminal symbol in our grammar. We intend XQuery to be a superset of the abbreviated syntax of XPath. We do not use the grammar of XPath directly because it needs to be integrated into our other productions. For example, operators like the union operator, which occur in path expressions, also occur in other contexts in XQuery, and it makes little sense to define two different operators. This raises issues of coordination with XPath.
This is the charter of the XPath task force.
The XQuery editorial team is working through a number of cases to determine the best precedence of operators. Our current precedence rules are shown in Appendix B.
Operator precedenced subsumed by XPath 2.0 WD.
What should be the precedence of a RangeExpr? The XQuery grammar has it in a bit different place than is listed here.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Current grammar ok.
Jerome and Mary have suggested that we abandon the separate abstract syntax for XQuery, in favor of a higher-level BNF.
This is the BNF that now appears in Appendix B.
This is the BNF that now appears in Appendix B.
XPath 1.0 has no reserved words. The current XQuery spec attempts to avoid reserved words but the result is that the XQuery grammar relies heavily on lexing tricks that make it difficult to document and difficult to extend. There is currently a substantial feeling in the XQuery group that the language should have some reserved words, which would be an incompatible change from XPath 1.0.
XSL WG Position: Exceptionally strong feeling that requiring element names that match a reserved word to be escaped is utterly unacceptable. If reserved words are required they must start with an escape character so they cannot conflict with element names. Attempt to maintain grammar and revisit this issue as necessary. We recognize that there is a problem but solutions are all distasteful.
Subsumes: #xquery-xpath-issue-reserved-words.
Subsumes: #xquery-reserved-keywords.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Closed with no change to document.
XPath 1.0 has no reserved words. It might be desirable to relax this restriction in XPath 2.0. When it is necessary to use an identifier that string-matches a reserved word, the identifier could be prefixed by a colon to distinguish it from a reserved word, as in /investment[:return > 0.1]. Reason: most query and progamming languages have reserved words. The only way to avoid them is to introduce lexing "tricks" that make the grammar difficult to document and difficult to extend. This approach greatly increases the difficulty of implementing an XQuery parser. It also contradicts the generally accepted practice of cleanly separating the parser from the lexer and keeping the lexer as simple as possible. It may also interfere with the parser's ability to report on and recover from errors.
Status: Open and under discussion. No consensus at this time.
Subsumed by :xpath-issue-reserved-words.
Where should keywords be reserved in XQuery? Currently, they are not reserved in the XML portion of our grammar, but are reserved in the expression syntax. XPath also reserves keywords, but only in certain positions in expressions.
Subsumed by :xpath-issue-reserved-words.
Should keywords in XQuery be case-sensitive?
Decision by: xsl on 2001-12-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0047.html)(joint meeting)
Decision by: xquery on 2001-12-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0047.html)(joint meeting)
Keywords are case-sensitive and it was also decided to use only lower-case keywords in the current XQuery / XPath WD. Thtopchange the text, the grammar, and the examples.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft: section 2.1.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
There has been deep discussion about the issue of implicit conversions, the effect of which is pervasive in XPath. The advocates for implicit conversion cite XPath 1.0 compatibility, ease of use for very common operations, and issues associated with types specified by the source tree when a schema is present, and the fact that these types may not be known at compile time. The detractors cite hidden 'gotchas' with the implicit conversion, and some difficulty in regards to optimization rewrites. The current document defines normative implicit conversions, but places the responsibility on whether or not these conversions will be done, or an error thrown, on the XPath context.
Addressed by XPath 2.0 basic and standard-fallback conversions. Whether or not implicit conversion is done when a type error occurs is up to the host language to define.
Consider the expression price * 2. If price evaluates to a node-set containing more than one node, XPath 1.0 extracts the numeric value of the first node and multiplies it by two, but XQuery will probably raise an error in this case. Tentative proposal: if we can get XQuery to accept the default XPath 1.0 conversion, but require explicit conversion for XQuery, it should solve this problem.
Addressed by XPath 2.0 basic and standard-fallback conversions. This is no longer an issue since both operands must be singletons.
XPath has a number of implicit type coercions, and also has implied existential quantification in some places. In XML 1.0, which had a small and loose type system, this was less problematic than it is with XML Schema, which introduces many types and relationships among types. If XQuery is to be compatible with XPath, we need to study these rules carefully, and adapt them to be rational and intuitive when used with the XML Schema type system.
Also, there are interactions between quantification and type coercion in XPath, sometimes causing non-intuitive results.
Addressed by XPath 2.0 basic and standard-fallback conversions.
XQuery-Null-Issue-3: Question: What should happen if an operand of an arithmetic operator is a sequence of length greater than 1?
Addressed by XPath 2.0 basic and standard-fallback conversions. It's an error.
Text is in Working Draft 2001-11-28 sec 2.5.
If two sequences are combined with an arithmetic operator, what are the semantics? Should a Cartesian product be used? Should the operator be applied to pairs? Should an error be raised?
Text is in Working Draft 2001-11-28 sec 2.5.
Addressed by XPath 2.0 basic and standard-fallback conversions. It's an error. See also: #xquery-xpath-arith-on-sets
Some feel that something as fundamental as type error checking should not be part of the context. This will prevent expressions from being moved between XSLT and XQuery without changing their results.
We recognize that XQuery may have a different conversion strategy but feel this proposal gives them that flexibility. For Xpath implicit conversions are considered to be exceptions which allow a host language to specify that the processor either halt or continue with the conversion as the recovery action. If this exception could occur at runtime the processor is allowed to notify the user earlier. (Allows static type checking).
In XPath 1.0, a node-set can be used in a Boolean context, and it is considered to have the value True if it is non-empty. But XQuery believes that a node-set containing one element with value False should not be implicitly converted to True. For example, if married is a Boolean-valued subelement of person, XQuery does not believe that //person[married="True"] should return persons whose married subelement has value False.
The section on comparisons performs exceptional treatment for node-set to Boolean conversions. Jonathan Marsh does not support such an exception. Either we should remove the exception and take the backward compatibility hit, or we should define a different mechanism to access the typed-value so that the compatibility question is avoided.
Input from Michael Rys:
The following proposal tries to provide a solution to the following issues: XPath2-Issue-14 (node-set-conversion): Implicit conversion of node-sets to boolean for comparisons. Priority: 1 Originator: XQuery, jmarsh@microsoft.com Locus: Syntax XQuery-XPath2-Issue-2 Converting node-sets to Boolean. XQuery-Issue-64 Converting general expressions to boolean and is related to the following issues: F&O Issue 85 : The semantics of xf:boolean(node) is underspecified (operator-boolean-node-unspecified) We would appreciate if this could be scheduled quickly and accepted. Assumptions ----------- I use the function typed-value(node) from the data model as a synonym for the actual language accessor /data(). Problem description ------------------- XPath 1.0 defines an implicit conversion of node-sets N to boolean in a way that any such conversion is defined as not(empty(N)). This is a useful definition for being able to define node tests of the forms (A) a[@b] (B) a[b or b/c = 4] but unfortunately conflicts with the general rules of typed-value access as requested by XQuery for expressions such as (C) a[@b=$val] In such expressions, if $val is bound to an integer value expression then the expected rules are: let $val := 5 return a[@b=$val] becomes (after expression rewrite and implicit typed-value access): a[typed-value(@b) = 5] If $val binds to a boolean value, the same expression unfortunately is in contradiction with the XPath 1.0 semantics: let $val := xf:false() return a[@b=$val] becomes (after expression rewrite and implicit typed-value access): a[typed-value(@b) = xf:false()] XPath 1.0 semantics would be: a[not(empty(@b)) = xf:false()] Summary of the proposal ----------------------- The following proposal tries to preserve the XPath 1.0 semantics for cases (A) and (B) while preserving the typed-value access for case (C). Impact: It will preserve XPath 1.0 backwards-compatibility for the 80% use case but break it in the 20% use case. Details ------- 1. Generally, if a node or node sequence is passed as a parameter to a function or operator where a boolean value is expected, an attempt is made to extract the typed-value of the node(s) subject to the conversion rules of the nodes type to boolean. Comment: This will cover (C) to be always a[typed-value(@b) = $val] regardless of the type of $val. 2. The following exceptions hold: 2 (a) If the operation is a predicate (either the [] shortform or the where clause in FLWR), then a node or node sequence will be translated into a node test instead of accessing the typed value. 2 (b) If the operation is the not() function or the and or or operators, an argument expression that results in a node or node sequence will be translated into a node test instead of accessing the typed value. Comment: This will preserve the useful XPath 1.0 compability for cases (A) and (B). Note that we have special cased these operations already, so the special casing is less of a problem than it may seem. Open Issues ----------- The XPath 1.0 semantics uses xf:boolean(node) to define the node test semantics. XQuery's cast currently does not clarify if it performs implicit typed-value access on CAST as xsd:boolean (node) or if it is an error (to allow casting to user defined complex types in the future). In either case it does not perform a node test. The question is whether xf:boolean in XPath 2.0 should be the node test or CAST as xsd:boolean(typed-value(node)). I prefer the later, but am open to strong pushback. |
Cf. Consistency of functions that take boolean formal argument
Decision by: xpath-tf on 2001-11-06 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0013.html)
Agreed that choice context is not necessary for XPath predicates. Standard fallback conversions will handle case when required value is optional boolean but actual value is not.
Decision by: xpath-tf on 2001-11-13 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0065.html)
Adoption of Michael R's proposal in Proposal to close issue expr[nodes].
Decision by: xpath-tf on 2001-11-20 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0114.html)
There have been some problems called to attention on the editor's list about the decision made at the telcon concerning dealing with nodes in predicates and the like.
The issue will be discussed at the F2F meeting.
Text is in Working Draft 2001-11-28 sec 2.3.
Text is in Working Draft 2001-11-28 sec 2.7.
Text is in Working Draft 2001-11-28 sec 2.11.
Text is in Working Draft 2001-11-28 sec 2.12.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Decision by: xpath-tf on 2002-07-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jul/0455.html)
Decision by: xsl on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0692.html)(joint meeting)
Decision by: xquery on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0692.html)(joint meeting)
The EBV of a sequence containing both nodes and atomic values is True.
In XPath 1.0, a node set can be used in a Boolean context, and it is considered to have the value True if it is non-empty. This feature is sometimes used in predicates; for example, //person[kid] returns persons who have a kid. In the XPath-2 data model, it is possible to have a sequence of Booleans, or a sequence of elements whose values are Booleans. It is very strange for a sequence containing the single value False to be interpreted as True, or for a sequence containing one node whose value is False to be interpreted as True. For example, consider the query //person[married=True]. It seems unfortunate for this query to return a person containing a single "married" element whose value is False.
This is a difficult problem. Here are some possible approaches, all of which have disadvantages: a. Retain the current XPath 1.0 semantics. Problem: then //person[married=True] returns persons whose "married" subelement has value False. b. If the sequence contains exactly one element whose content is Boolean, extract the value; otherwise raise an error. Problem: incompatible with existing usage such as //person[kid]. c. Use rule (a) above when a node-sequence is used directly in a predicate such as //person[married], but use (b) above when a node-sequence is used with any Boolean operator, as in //person[married=True]. Problem: inconsistent rules. d. Change XPath so that values are not extracted from nodes except by an explicit data() function. Then, for example, a person containing a married subelement with value False would be returned by the query //person[married] but not by the query //person[married/data()=True]. The query //person[married=True] would be a type error. Problems: this approach is incompatible with XPath 1.0, and it annoys users by requiring them to type salary/data() + bonus/data() rather than salary+bonus.
Status: Open. For discussions of this issue, see http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Sep/0137.html and http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Sep/0160.html.
Subsumed by :xpath-issue-node-set-conversion.
Conditionals in XQuery allow any expression in the grammar. Which kinds of expressions are actually converted to Boolean values, and how is this done? Which kinds of expressions raise errors?
Subsumed by #xpath-issue-node-set-conversion.
XPath 1.0 implicitly converts a node set to a number by using the value of the first node. XQuery suggests that, in XPath 2.0, conversion of a node set to a number should raise an error if the node set contains more than one node. Reason: the current XPath 1.0 rule leads to lots of strange behavior. For some examples, consider the following queries, against a document containing persons who have unique names but possibly multiple donations: //person[name="Hillary"]/donation returns all the donations of Hillary. //person[name="Hillary"]/donation+0 returns only the first donation of Hillary. //person[donation] returns all persons who have a donation. //person[donation+0] returns only those persons whose position in the list of persons is equal to the value of their first donation. Editorial note: Some people have observed that example (c) above illustrates conversion of a node set to Boolean rather than arithmetic on node sets. I have retained these examples here because the difference between examples (c) and (d) illustrates an interesting property of arithmetic on node sets in XPath 1.0.
Subsumed by #xpath-issue-node-set-conversion. Status: The Query WG approved this request on 9/19/01.
Sequences are defined to not be able to contain sequences. Yet, it is probably that we need to be able to represent null in sequences in order to maintain cardinality for table processing and the like.
Proposal: Nulls are a special value or an empty sequence: It is a special value when it is a member of a sequence. It is an empty sequence for type checking and iteration. This may require tagging empty sequences that were returned as null with a flag. The XSL WG has not reached resolution on this proposal.
Conflicts with : null-missing-data.
Decision by: xpath-tf on 2001-12-18 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Dec/0128.html)
Decision by: xquery on 2001-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0150.html) confiriming that no action is required by the XQuery WG
XSLT WG agrees that empty sequence should be used to represent missing data (this is the status quo).
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
How should missing or unknown data be represented?
Subsumed by: #xpath-issue-null-value. Resolution: by an empty sequence.
Should elements with xsi:nil="True" receive any special treatment on input?
Resolution: In the case of an empty element whose content-type is string, the attribute xsi:nil will be used to distinguish the zero-length string from the empty sequence. For example, <a /> indicates an element whose content is the zero-length string, while <a xsi:nil="True" /> indicates an element whose content is the empty sequence.
In XPath 1.0, boolean operations such as AND and OR are defined using two-valued logic. In order to effectively deal with absent or unknown data, XQuery will probably introduce three-valued logic as used in SQL, using an empty sequence to represent the unknown truth value. This would result in incompatible changes to Boolean operators such as AND and OR.
The XSL WG resolved that three-valued logic should be used.
What logic should be used by the AND and OR operators?
Subsumed by: #xpath-issue-3valued-logic. Resolution: Three-valued logic using SQL truth tables.
In XPath 1.0, operators such as AND and OR are based on two-valued logic and an empty sequence is considered to have the truth value False. XQuery suggests that, in XPath 2.0, the Boolean operators use three-valued logic with the empty sequence representing the unknown truth value. Reason: This change will allow XQuery to deal effectively with missing and unknown information. This is a long-standing requirement that is handled by null values in relational systems. It is convenient to represent missing information by an empty sequence in the XQuery data model rather than by introducing a separate null value. However, this approach leads to some differences from XPath 1.0 usage, including the following, where () represents the empty sequence: True AND () has the value (), whereas in XPath 1.0 it is False. False OR () has the value (), whereas in XPath 1.0 it is False. not( () ) has the value (), whereas in XPath 1.0 it is True. () = () has the value (), whereas in XPath 1.0 it is False. Status: The Query WG approved this request on 9/19/01.
Personal observation (by Don): XPath 1.0 has a not() function but it does not have a NOT operator. It would be possible to retain the not() function with two-valued logic and introduce a new NOT operator with three-valued logic.
Subsumed by: #xpath-issue-3valued-logic.
Does XQuery need three-valued logic? How should XQuery deal with missing or absent values? What are the semantics of XML Schema's xsi:nil?
Subsumed by: #xpath-issue-3valued-logic.
then
to return an empty
sequence?The section on Conditional Expressions provides for
if/then/else but not a simple if/then. Should we default
then
to return an empty sequence?
See also: null-if-where.
Decision by: xpath-tf on 2002-01-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0312.html)
Decision by: xquery on 2002-02-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Feb/0090.html)
Decision by: xsl on 2002-02-07 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Feb/0034.html)
No change to if-then-else.
What is the behavior of IF and WHERE if the value of the branch-expression is the empty sequence?
Subsumed by: #xpath-issue-if-not-else. Resolution: IF takes the ELSE branch. WHERE does not execute the RETURN clause.
Should the 3-valued logic functions be part of the XPath function library? Note that they can be implemented as user functions (not as efficient as a "native" implementation). We may want to include the user definition as an example.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Not for XPath 2.0/XQuery 1.0.
What value is returned by not() when called on an empty sequence?
Notes: In XPath 1.0, not() is a function that uses two-valued logic, where not() applied to an empty sequence returns True. This feature of XPath 1.0 is sometimes used to test for the absence of a node. The XSLT group has suggested that we retain the semantics of not(), and introduce a new function named not3() based on three-valued logic. XPath 1.0 has no NOT operator in its syntax. Therefore XQuery could add a NOT operator that uses three-valued logic without introducing an incompatibility with XPath 1.0. Option 9A: not() should implement 3-valued logic, an incompatible change to XPath 1.0. Option 9B: not() should implement 2-valued logic and a new function not3() should implement 3-valued logic. Option 9C: Same as 9B, and in addition XQuery should introduce a NOT operator into the syntax, using 3-valued logic with the SQL truth table. History: The XQuery group voted for (9A) at the Redmond F2F, but subsequent inputs from the XSLT group merit reopening this issue.
Subsumed by: #xpath-issue-not-logic.
For functions, the null (empty sequence) is passed to the function, the precedent set by SQL. Should comparison operations act the same, or should they be defined to always return an empty sequence in this case?
Text is in Working Draft 2001-11-28 sec 2.6.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
In XPath 1.0, two empty sequences are considered to be equal. However, since XQuery plans to give the empty sequence a special meaning similar to the null value in SQL, XQuery considers comparison of two empty sequences to return the unknown truth value.
Resolved as per three-valued logic. The XSL WG does not believe there are backwards compatibility issues here, since in XPath 1.0, $x=$x is false if $x is an empty node-set. This is a consequence of implicit existential quantification.
for
at the XPath expression
level?Is for
really a proper construct for a
simple expression language? Will the definition of
for
in XPath cause problems for XQuery?
Input from Michael Kay:
Decision by: xpath-tf on 2001-11-27 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0167.html)
Decision by: xsl on 2001-11-29 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Nov/xxxx.html)
Adoption of FOR expression in XPath 2.0.
Scott Boag will provide 'tips & traps' text on potential semantic problems of mixing FOR, '/' and SORT.
Text is in Working Draft 2001-11-28 sec 2.9, paragraph 2.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
for
?The simple form of the for expression (for(
sequence ) return expression
) introduces a lot of
complexity: the "context item" is required for this, and
there is an issue with the parens being required for the
simple varient, and not being required for the more
complex one. Do we need this?
Subsumed by: #xpath-issue-is-for-required.
The syntax for the "for" expression currently does not
define a range variable. An alternative syntax might be
"for ($item) in expr return
$item/@price*$item/quantity
".
XSL WG: We suspect we will need both, since we feel that range variables will be needed to do joins, but requiring range variables causes a great deal of verbosity.
Subsumed by: #xpath-issue-is-for-required.
A FOR clause can stand alone: FOR $var IN expr1 RETURN expr2. A LET clause can stand alone: LET $var := expr1 EVAL expr2. It has been suggested that a WHERE clause should also be able to stand alone: WHERE expr1 RETURN expr2.
Note: in the current BNF, at least one FOR or LET clause must occur, but it is not necessary to have a FOR.
Observation: This functionality is already provided by the conditional expression, IF expr1 THEN expr2 ELSE [ ]. There does not seem to be a compelling reason to provide a second way to write this expression. However, making the ELSE clause optional might be a slight improvement.
The following content model should be adopted for FLWR expressions:
FlwrExpr ::= (ForClause | LetClause)+ [WhereClause] ReturnClause |
This allows us also to remove the separate LET/EVAL expression, which can now be expressed using LET/RETURN.
The following content model should be adopted for FLWR expressions:
FlwrExpr ::= (ForClause | LetClause)+ [WhereClause] ReturnClause |
This allows us also to remove the separate LET/EVAL expression, which can now be expressed using LET/RETURN.
We have considered forms of quantified expressions that bind several variables at once, as in SOME $x IN expr1, $y IN expr2. Are such quantifiers desireable? If so, what are their semantics, and what use cases support them? Note that there is no additional expressive power over the current single-variable syntax, this is purely a question of convenience.
Decision by: xpath-tf on 2001-12-18 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Dec/0128.html)
Allow them; especially in view of consistency with eg "for" that already allows them. The semantics should be the same.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
XPath 1.0 has only four datatypes (booleans, floating-point numbers, strings, and unordered node-sets). XQuery suggests that XPath 2.0 should have a richer set of datatypes based on the built-in types of XML Schema and the notion of an ordered sequence, which can contain zero or more simple or complex values. Literal values should have well-defined datatypes that are determined by their appearance. This will require some changes in the interpretation of literals. For example, 47 will be a literal integer rather than a float. Some types will have constructor functions rather than literals; for example, date("1999-12-25") is distinguished from the arithmetic expression 1999-12-25 which has value 1962. Reason: these changes are needed in order to process documents based on XML Schema.
Status: The Query WG approved this request on 9/19/01.
XPath 2.0 to support all XML Schema primitive datatypes.
Text is in Working Draft 2001-11-28 sec 2.2.1.
The set of constructor functions for XML Schema simple datatypes has not yet been established. A joint task force with XML Schema has been chartered to determine the operators on datatypes, and we expect them to also determine the set of constructors for datatypes.
Resolved in F&O document.
A fixed "promotion hierarchy" must be defined among the primitive and derived types of XML Schema. A function whose declared parameter type is in this hierarchy can be invoked with an argument whose type is lower in the hierarchy. For example, a function with a declared parameter-type of Float can be invoked with an integer argument. In such a case, the argument is converted to the declared type of the parameter.
The promotion hierarchy will be defined by the Operators and Functions Task Force.
Resolved in F&O document.
Section 2.9, on functions, portrays XQuery as a statically typed language, but the mechanisms by which static typing is established are still being developed by the XML Query Algebra editorial team. A complete accounting for type requires that the XML Query Algebra conform completely to the XML Schema type system, and that many open issues be resolved.
The semantics of XQuery are defined in terms of the operators of the XML Query Algebra. The mapping of XQuery operators into Algebra operators is still being designed, and may result in some changes to XQuery and/or the Algebra. The type system of XQuery is the type system of XML Schema. Work is in progress to ensure that the type systems of XQuery, the XML Query Algebra, and XML Schema are completely aligned. The details of the operators supported on simple XML Schema datatypes will be defined by a joint XSLT/Schema/Query task force.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
We have made significant progress. There is still some mismatch (eg. occurrence indicators and facets), but these are also unlikely to change.
Decided: close this issue, raise more specific issues as needed.
Static type checking and schema validation are not equivalent, but we might want to do both in a query. For example, we might want to assert statically that an expression has a particular type and also validate dynamically the value of an expression w.r.t a particular schema.
The differences between static type checking and schema validation must be enumerated clearly (the XSFD people should help us with this).
This item is a duplicate of the Formal Semantics issue http://www.w3.org/XML/Group/2001/06/WD-query-semantics-20010607.html#Issue-00970097.
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Addressed by the "Named Typing" proposal.
Accepting text in 2002-04-30 public draft.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Static type checking may be difficult and/or expensive to implement. Some discussion of algorithmic issues of type checking are needed. In addition, we may want to define "conformance levels" for XQuery, in which some processors (or some processing modes) are more permissive about types. This would allow XQuery implementations that do not understand all of Schema, and it would allow customers some control over the cost/benefit tradeoff of type checking.
This item is a duplicate of the Formal Semantics issue http://www.w3.org/XML/Group/2001/06/WD-query-semantics-20010607.html#Issue-00980098.
Jonathan and Don to present a potential consensus proposal at the f2f (This should be a very short proposal). Note: Perhaps we should seriously consider writing the conformance section for the next set of publications.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decided: Adopt the text in the conformance section of the latest document.
We should specify the behavior of XQuery for well formed XML, XML validated by a schema, and XML validated by a DTD.
The mapping of a DTD validated or well formed document still needs to be defined in the Data Model.
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Closing of the directly related issues: #xquery-abstract-syntax and #xpath-issue-complex-type-value is sufficient to close this issue.
Decision by: xpath-tf on 2003-03-04 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Mar/0060.html)
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
On recommendation of the Processing Model Taskforce the disposition is reaffirmed.
This is related to #xquery-schema-importxquery-schema-import. We do not specify what is the effect of type checking a query that is applied to a document without a DTD or Schema. In general, a schema-less document has type xs:AnyType and type checking can proceed under that assumption. A related issue is what is the effect of type checking a query that is applied to an incompletely validated document. As above, we can make *no* assumptions about the static type of an incompletely validated document and must assume its static type is xs:AnyType.
This item is a duplicate of the Formal Semantics issue http://www.w3.org/XML/Group/2001/06/WD-query-semantics-20010607.html#Issue-00960096.
Some aspects addressed by the "Named Typing" proposal.
The Data Model work still needs to be done.
Open questions: What is the result of a failed validation? Can you inspect the result?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
a. The Data Model mapping is the crucial issue - and that is duplicated in 43 (xquery-define-schema-variants), so we need not continue to maintain it here.
b. The second issue asks how we process documents on which validation has failed. Open a separate issue (xquery-failed-validation) on this question.
Does the definition of a type include both element-names and element-contents (as in the Formal Semantics document), or only element-contents (as in XML Schema)?
Addressed by the "Named Typing" proposal.
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Accepting text in 2002-04-30 public draft.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Do we need a function that returns the type name of its operand? If so, what should it return if the operand is an element with a given xsi:type - the element name? the name of the type denoted by xsi:type? Specification of this function requires more work on types in XQuery.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Not for XQuery 1.0.
Should XQuery 1.0 support subtype substitutability for function parameters?
If subtype substitutability is not supported in XQuery Version 1, the motivation for TYPESWITCH is weakened and the decision to support TYPESWITCH should be revisited.
Input from Michael Rys:
I think this is still an open issue given some semantic issues that we found between named subtype substitutability and derivation by extension. I will send mail on this issue this week, |
Addressed by the "Named Typing" proposal.
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Accepting text in 2002-04-30 public draft.
If the types in the CASE branches are not subtypes of the TYPESWITCH, is this an error, or are these branches simply never executed? If the latter, should we require a warning?
Decision by: xquery on 2003-02-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0242.html)
Issue 48 closed without changes to the document (no static errors will be raised, implementations can but are not required to raise warnings).
Decision by: fs-editors on 2003-02-13 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Feb/0075.html)
Decision by: xquery on 2003-02-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0404.html)
Decision by: xsl on 2003-02-27 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Feb/0143.html)
Accepting proposal in FS-Issue-0173 closes this issue in a consistent way.
How should XQuery handle XML Schema substitution groups with respect to name tests in paths? With respect to parameter types and return types in functions?
Text is in Working Draft 2001-11-28 sec 2.13.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
We need more thought about what constitutes a valid parameter-type for a function. Attribute-types as well as element-types? Type-names vs. element-names? Should all the MSL symbol spaces be represented? Wildcards? Sequences?
It is probably important to have NODE as a type, to allow functions to take any XML node as a parameter, or to return any XML node as a result.
Using univeral names similar to those found in the MSL document, but with a different syntax, would allow us to reference any schema type in XQuery function definitions.
Text is in Working Draft 2001-11-28 sec 3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
More detailed rules need to be developed for function resolution. What kinds of function overloading are allowed? A promotion hierarchy of basic types needs to be specified. The issue of polymorphic functions with dynamic dispatch needs to be studied. Can overloaded functions be defined such that the parameter-type of one function is a subtype of the parameter-type of another function? If so, what are the constraints on the return-types of these functions? Is function selection based on the static type of the argument or on the dynamic type of the argument (dynamic dispatch, performed at execution time)? If XQuery supports dynamic dispatch, is it based on all the arguments of a function or on only one distinguished argument?
Observation: This is a very complex area of language design. If it proves too difficult to solve in the available time, it may be wise to take a simple approach such as avoiding dynamic dispatch in Version 1 of XML Query.
The XML Query Formal Semantics does not support overloading or dynamic dispatch. We will attempt to simplify XML Query Level 1 by omitting these, unless it becomes clear that they are needed. We realize that this might happen.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0204.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Mike: We dealt with by saying that there is only one function and the use typeswitch semantics.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
XQuery currently considers book and list(book) to be different types. List is an abbreviation of the facets minoccurs=0, maxoccurs = unbounded. We need to confirm that this accurately reflects the type system of XML Schema.
Data model and type system both have sequences. This seems a moot issue.
NOTE: the original formulation of the question is in vocabulary that makes no sense in terms of the actual resolution. Thus the formulation of the issue is confusing, and it is only the resolution that matters.
Does XQuery need features to add support for unordered collections? If so, what features are required? In the current draft, "unordered" is a property of a list. The user can create an ordered list from an unordered list by using SORTBY. The distinct() function not only removes duplicates from a list, it also renders the list unordered.
Do we need a function that merely removes the ordered property of a list?
How does the ordered/unordered property of a list affect the semantics of operators applied to it?
XQuery editors considered and rejected addition of an unordered collection and type. The data model and type system support ordered sequences only.
Is it an error for a query to specify content that may not appear, according to the schema definition? Consider the following query:
invoice//nose |
If the schema does not allow a nose to appear on an invoice, is this query an error, or will it simply return an empty list?
Addressed by the "Named Typing" proposal, but needs more work.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Adopt status quo.
As part of the general description of errors, which is largely still to be done, we must carefully distinguish static from dynamic errors. In general, we should probably attempt to catch errors as early as possible. The following examples have been suggested by the Algebra team:
"If the content of its argument node cannot be expressed as a value of a simple type, the data function raises an error." This could be a static error, since the data function makes most sense for schema valid documents or nodes that have type assigned via xsi:type.
"For each member of the sequence, the ordering expression must return a single value of some type for which the ">" operator is defined (for example, a number or a string); otherwise an error results." This could also be a static error.
"When one or more operands is a node, the content of the node is extracted by an implicit call to the data function and converted to a number before the operation is performed; if this conversion is not possible, an error results." This could be a static or a dynamic error.
"TO is a binary operator that converts both of its operands to integers. It then generates a sequence containing all the integers from the left-hand operand to the right-hand operand, inclusive. If either of the operands cannot be converted to an integer, an error results." In the presence of type info, this could be a static error. In a well-formed document, in which arbitrary strings may be converted to integers, it could be dynamic.
Text is in Working Draft 2001-11-28 sec 3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
The Algebra has a syntax for declaring types. Up to now, XQuery uses XML Schema for declaring types. Is this sufficient? Some important questions:
Decision by: xquery on 2003-01-15 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0215.html)Joint F2F
Decided:
Are type names sufficient - YES
Would NUNS be sufficient for type name - not needed
How will type names be bound to definitions - with imported schemas and namespaces
Do we need to allow inline XML schema declarations in the prolog of a query? The following example shows one potential syntax for this. It extends the namespace declaration to allow literal XML Schema text to occur instead of a URI in a namespace declaration. The implementation would then assign an internal URI to the namespace.
NAMESPACE fid = "http://www.example.com/fiddlefaddle.xsd" NAMESPACE loc = [[ <xsd:schema xmlns:xsd = "http://www.w3.org/2000/10/XMLSchema"> <xsd:simpleType name="myInteger"> <xsd:restriction base="xsd:integer"> <xsd:minInclusive value="10000"/> <xsd:maxInclusive value="99999"/> </xsd:restriction> </xsd:simpleType> </xsd:schema> ]] FUNCTION string-to-myInteger ($s STRING) RETURNS loc:myInteger { If the facets of loc:myInteger are not satisfied, this function raises an error. LET $t := round(number($s)) RETURN TREAT AS loc:myInteger($t) } string-to-myInteger("1023") |
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Not for XQuery 1.0.
We do not specify how a Schema or DTD is 'imported' into a query so that its information is available during type checking. Schema and DTDs can either be named explicitly (e.g., by an 'IMPORT SCHEMA' clause in a query) or implicitly, by accessing documents that refer to a Schema or DTD. The mechanism for statically accessing a Schema or DTD is unspecified.
This item is a duplicate of the Formal Semantics issue http://www.w3.org/XML/Group/2001/06/WD-query-semantics-20010607.html#Issue-00950095.
Text is in Working Draft 2001-11-28 sec 3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
The semantics of the instanceof operator are not defined over all operands, e.g. sets of several nodes, sequences of several values, etc. What should the symantics be for these types? Should these semantics be defined in the F&O document?
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Decision by: xquery on 2002-07-17 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0329.html)
The issue is "dead", in the sense that the April draft contains text that everyone is happy with.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Does XQuery need a CAST expression for casting an instance of one type into another type?
A "CAST AS" operator has been added to this current Working Draft.
It's not clear to me that we need "cast" syntax, this can be done using the functions whose names match the primitive data types.
We decided that the constructor pseudo-functions should only take literal arguments, therefore CAST is needed for run-time conversions (the original issue was saying that we didn't need both)
The algebra does not have coercion functions between values. The mapping requires this for CAST AS.
The XQuery algebra is a proper subset of XQuery, in particular, XQuery Core, therefore includes CAST AS.
Does XQuery require a syntax for type guards?
We have added the "TREAT AS" operator to this current Working Draft. This is especially helpful for function arguments, since we do not have function polymorphism in the current specification.
The functionality of TREAT can also be expressed using TYPESWITCH. A proposal to remove the TREAT expression is under consideration.
The XQuery algebra is a proper subset of XQuery, in particular, XQuery Core. 'TREAT AS' is expressed in XQuery core as a TYPESWITCH.
Various approaches to the syntax of CAST AS and TREAT AS have been proposed. Java and SQL have both been sources used to discuss these approaches. We are still exploring other syntactic approaches.
CAST/TREAT syntax has been pretty stable for a while. Can we just resolve this issue?
Do we need an expression similar to the MATCH expression in the algebra? One proposed syntax looks like this:
TYPESWITCH expr CASE typename1: expr1 CASE typename2: expr2 |
Since this syntax corresponds more closely to the syntax of the algebra, it can be mapped more easily. Alternatively, the match expression in the algebra could be made to resemble the INSTANCEOF expression of XQuery.
The XQuery algebra is a proper subset of XQuery, in particular, XQuery Core. TYPESWITCH is supported in both.
In the XQuery Formalism document, there is a static type-assertion expression:
Expr : Type |
This is often useful in an expression like:
LET bib0 : Bib := <bib>...some literal data...</bib> |
which asserts statically that the type of bib0 is Bib, i.e., that the literal data is a value contained in the Bib type. If this is not true, a static, compile-time error is raised.
This semantics is not the same as :
LET bib0 := TREAT AS Bib (<bib>...</bib>) |
which will raise a run-time error if the literal data is not a value in Bib.
Current proposal is for ASSERT AS Datatype (Expr)
Text is in Working Draft 2001-11-28 sec 2.13.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Do we need a Context Item to track the "current item"
in a for
itteration, and, if so, how should
it work? How should "." work in relation to it?
Decision by: xpath-tf on 2001-11-06 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0013.html)
Decision by: xsl on 2001-11-29 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Nov/xxxx.html)
Decision by: xquery on 2001-12-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0127.html)
Addressed by Mike K's text in http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/att-0000/01-context.html (The XPath Expression Context)
Text is in Working Draft 2001-11-28 sec 2.1.1.2, paragraph 4.
Do we need a way to specify the nodes in the input context? Many queries do not specifically state the input to which they will be applied. This allows the same query, for instance, to be applied to a number of databases. It may be helpful for the mapping to introduce a global variable, eg $input, to represent the input nodes for a query. This variable might even be useful in the syntax of XQuery itself.
Decision by: xquery on 2002-05-08 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0104.html)
The imput() function provides this functionality.
It seems like the context should include a default namespace declaration for use for the QNames within node tests within the XPath. I'm worried about complexities with other qnames besides the one in node tests, like function qnames.
Decision by: xpath-tf on 2001-11-06 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0013.html)
Decision by: xsl on 2001-11-29 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Nov/xxxx.html)
Decision by: xquery on 2001-12-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0127.html)
Addressed by Mike K's text in http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/att-0000/01-context.html (The XPath Expression Context)
Text is in Working Draft 2001-11-28 sec 2.1.1.1, paragraph 5.
Do we need a datatype names binding in the context?
Decision by: xpath-tf on 2001-11-06 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0013.html)
Decision by: xsl on 2001-11-29 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Nov/xxxx.html)
Decision by: xquery on 2001-12-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0127.html)
Addressed by Mike K's text in http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/att-0000/01-context.html (The XPath Expression Context)
Text is in Working Draft 2001-11-28 sec 2.1.1.1, paragraph 8.
The Functions and Operators doc specifies named collations. These probably need to be part of the context. 1) Should we treat collations as distinct from functions? 2) If yes, how do we handle the binding of the collation name to the collation.
Decision by: xpath-tf on 2001-11-06 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0013.html)
Decision by: xsl on 2001-11-29 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Nov/xxxx.html)
Decision by: xquery on 2001-12-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0127.html)
Addressed by Mike K's text in http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/att-0000/01-context.html (The XPath Expression Context)
Text is in Working Draft 2001-11-28 sec 2.1.1.1, paragraph 11.
How are collation sequences created to define inequality and sort orders?
Subsumed by: #xpath-issue-collation-bindings.
The definition and syntax of a query module are still under discussion in the working group. The specifications in this section are pending approval by the working group.
Future versions of the language may support other forms of query modules, such as update statements and view definitions.
Paulist Modules Proposal
This proposal adds modules, external variables, external functions, and global variables to XQuery. It addresses the following open issues: 74 Module syntax 75 Importing Modules 124 External Functions 157 Function Libraries 223 We need a way to declare external functions 250 Declaring Variables in Prolog This proposal is called the Paulist Modules Proposal, because it is based on a simplification Paul Cotton made to earlier module proposals, which can be found here: Subject: Paul's Proposal (was: Unified proposal on modules, global and external variables, and external functions) From: Jonathan Robie (jonathan.robie@datadirect-technologies.com) Date: Thu, Dec 19 2002 http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0391.html Many other people have contributed to this proposal in various iterations, including Mary Fernandez, Jerome Simeon, Don Chamberlin, Michael Rys, Phil Wadler, and Michael Kay. 1. Modules and Module Declarations An XQuery module is a resource that contains a Query. A module may declare a target namespace using a ModuleDecl. The syntax of Query and ModuleDecl is as follows: Query ::= ModuleDecl? QueryProlog ExprSequence? ModuleDecl ::= "module" ModuleURI If a module contains a ModuleDecl, its functions may be imported by other modules. A module that does not have a ModuleDecl can not be imported. A ModuleURI may be relative - if so, it is combined with the Base URI to create an absolute URI. In a module that is imported by another module, the optional ExprSequence must be absent, or a static error is raised. 2. Module Imports A query may import modules in the QueryProlog using ModuleImports. The syntax of QueryProlog and ModuleImport is as follows: QueryProlog ::= (NamespaceDecl | DefaultNamespaceDecl | SchemaImport | ModuleImport | VarDn)* FunctionDn* ModuleImport ::= "import" "module" ModuleURI ("at" ImplURI)? Functions and global variables defined in a module may be used in any module that imports the defining module. Importing a module does not provide access to the imported schemas or namespaces of that module. Importing a module does not provide access to the functions imported by that module. An implementation may locate a module in any convenient manner, provided the ModuleURI of the module it locates matches the ModuleURI of the ModuleImport. The optional ImplURI specifies the resource containing the implemenation of the module. It is treated like a schema location hint in XML Schema - an implementation may ignore it completely. Two modules may import each other. For instance, if module A imports module B, then module B may import module A. 3. Variable declarations and definitions A variable may be declared or defined using a VarDn in the QueryProlog. The syntax of VarDn is as follows: VarDn ::= "define" "global"? "external"? "variable" "$" VarName ("as" SequenceType)? (":=" Expr)? A variable may have no forward references to functions or variables. Functions and variables imported into a module are considered prior to a global variable if they are imported before the global variable is defined. A variable may not be used before it is defined. If the "global" keyword is present, then the variable will be imported whenever the module that contains it is imported. If the "external" keyword is present, the variable is [external]; if it is absent, the variable is [internal]. An [external] variable definition must include only the variable's name and optional sequence type, or a static error is raised. During dynamic evaluation, an [external] variable must be bound to a value in the dynamic context, or an error is raised. An [internal] variable definition must include the variable's name, optional sequence type, and a required expression, or a static error is raised. It is a type error, if the value of a variable does not match the declared sequence type of the variable. 4. External functions An external function definition allows XQuery to call functions written in other languages. The syntax of a FunctionDefn is as follows: FunctionDefn ::= <"define" "function"> "external"? <QName "("> ParamList? (")" | (<")" "as"> SequenceType)) EnclosedExpr If the "external" keyword is present, the function is [external]; if it is absent, the function is [internal]. If a function is [internal], its implementation is given as an XQuery expression in the module's implementation. If a function is [external], its implementation is given by the query environment. XQuery does not specify how external functions are implemented or accessed, how actual arguments are passed to external functions, or how return values are passed to the query environment - all that is implementation defined. |
Questions in proposal that need resolution:
In today's telcon, we identified three central questions that need to be resolved for the modules proposal. Once we resolve these questions, it will be easy to rewrite the Paulist module accordingly. Question 1: What is the relationship between the ModuleURI and the namespace of the functions it contains? Possible answers: 1.A. There is no relationship. A module is identified by a URI, and may contain functions in any namespace. 1.B. The module URI is the namespace of functions and global variables defined in that module. It serves as a default namespace for both functions and global variables, but the prolog can change these defaults. 1.C. The module URI is the namespace of functions and global variables exported by the module. A module may contain functions and global variables defined in other namespaces or in no namespace, but they are not exported when the module is imported into another module. 2. Should there an optional LocationURI? 2.A. A module has an optional LocationURI, which provides the location of a resource. This allows the name of a resource to be decoupled from its location, while allowing relative or absolute locations to be specified explicitly. 2.B. A module is identified only by the ModuleURI, which may be relative or absolute. Catalogs or other similar devices are used to map the ModuleURI onto a location. There are two variations on 2.B: 2.B.i: The ModuleURI may be relative. 2.B.ii: The ModuleURI must be absolute. Relative ModuleURIs are not useful if we choose 2.A. Jonathan Note: Michael Kay suggested Option A and Option B. They are defined as: Option A: (C3, L1) Option B: (C1, L2) |
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Decided to adopt 1B and 2A.
The means by which a query module gains access to the functions defined an an external function library remains to be defined.
Should xmlns only be respected for construction, Xquery expressions but not functions, or also functions?
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Decided to adopt 1B and 2A in proposal for issue #xquery-module-syntax.
What is a query?
According the the algebra: any number of type declarations, function definitions, variable definitions and expressions.
According to XQuery: any number of namespace declarations, function definitions and a unique expression.
These definitions should be coordinated.
The XQuery algebra is a proper subset of XQuery, in particular, the XQuery Core, so however a query is defined in XQuery is the same in the algebra.
Can a namespace prefix be redefined, as in XML?
Text is in Working Draft 2001-11-28 sec 3.
Text is in Working Draft 2001-11-28 sec 3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
The syntax currently uses a semicolon as a query module separator. What are the semantics of the query module separator? Is the semicolon the best character for this?
Resolved by XQuery WG to eliminate ';' separator
Does XQuery need a way to specify the encoding of a query? For instance, should the prolog allow statements like the following?
ENCODING utf-16 |
Decision by: xquery on 2003-01-29 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0502.html)
The text of a query is in Unicode. Serialization is done in Unicode, but APIs can set other encodings for serialization.
There is no operator to access the typed constant content of an element. In the Algebra, the data() operator does this. Should XQuery do the same?
Decision by: xpath-tf on 2001-10-23 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Oct/0286.html)
Decision by: xquery on 2001-10-31 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Oct/0441.html)
Decision by: xsl on 2001-12-13 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Dec/xxxx.html) It was noted that there are other issues on data() that may lead to further discussions.
Consensus is to define data() on only singleton node and empty sequence. This decision will be reflected in next WD.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Section 1 - 4th paragraph says the typed-value of an element with complex type is the same as its string-value. This is not currently consistent with the data model. The data model doc says, in section 4.2, "If the element has a complex type, the typed-value is the empty sequence. For an element in a well-formed document with no associated schema, the element's typed-value is the empty sequence."
Ed. Note: Question: I had a note from this, "insert from minutes", but I only see "Need to track "what does data()" return as an issue. Typed value? Something else?" as a response to this issue, and the formulation of issue text for the Data Model. Should this issue be removed from this document? -sb
Element & attribute nodes ~~~~~~~~~~~~~~~~~~~~~~~~~~ Given $e is a single element or attribute node: 1. If $e is of unknown type and has simple content (i.e., $e does not contain complex content and $e does not have a known type), then data($e) evaluates to the simple content of the node and has UnknownSimpleType. Example: let $e := <fact about="what i saw"> I saw 8 cats.</ fact> return data($e) ==> "I saw 8 cats" : UnknownSimpletype data($e/@about) ==> "what i saw" : UnknownSimpleType 2. Else if $e is of a known simple type or has a simple content type, then data($e) evalutes to the simple value of the node and has the node's known simple type. Example: let $e := <weight units="{ 'lbs.' }">{ 42 }</weight> return data($e) ==> 42 : xs:integer data($e/@units) ==> "lbs." : xs:string 3. Else if $e is of an unknown (complex) type, then data($e) evaluates to string($e) (text node aggregation) and has UnknownSimpleType. let $e := <fact>The cat weighs <weight>12</weight> pounds</fact> return data($e) ==> "The cat weighs 12 pounds" : UnknownSimpleType 4. Else if $e is of a known complex type with complex or mixed content, then there are two options: 4a. data($e) evaluates to an error 4b. data($e) is defined as in (3) above. Example: Assume we have schema type: <element name="fact" mixed="true"> <element name="weight" type="xs:integer"/> </element> and $e is validated w.r.t. the above type: let $e := validate as element fact (<fact>The cat weighs <weight>12</weight> pounds</fact>) return data($e) 4a. raises error 4b. "The cat weighs 12 pounds" : UnknownSimpleType Text nodes ~~~~~~~~~~~ 5. Given $t is a single text node, then data($t) evaluates to string($t) (content of text node) and has UnknownSimpleType. Example: let $e := <fact>The cat weighs 12 pounds</fact>, $t := $e/text() return data($t) ==> "The cat weighs 12 pounds" : UnknownSimpleType NB: Open issue as to whether data() should be defined on node sequences. NB: Current definition of data() applied to a text node is the empty sequence. Comment, PI, Namespace nodes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6. Given $c is a comment, processing instruction, or namespace node, then data($c) evaluates to the empty sequence. Example: let $c := <!-- a comment --> return data($c) ==> () : empty |
Decision by: xpath-tf on 2002-03-19 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Mar/0174.html)
Decision by: xquery on 2002-03-20 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0405.html)
Decision by: xsl on 2002-03-28 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Mar/0084.html)
Mary's proposal was adopted.
In particular, we chose option (4a) instead of (4b), because the current semantics applies data() implicitly in the basic conversion rules (e.g., when implementing equality and inequality operators), and therefore (4a) will raise an error if a user attempts to extract the atomic data from an element that has *known* complex type.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft: section 2.1.2.2 of XQuery, 2.1.2.2 of XPath.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
What should the semantics be for == and !== in regards to nodesets and sequences?
This is a Functions & Operators document issue.
It seems like Sequence comparisons should be defined in the Functions & Operators document.
Except for empty sequence comparisons, this is no longer an issue since both operands must be singletons. The empty sequence comparisons are resolved by passing the buck to the specific operator, or returning an empty sequence if both operands are empty sequences.
Subsumed by: #xpath-issue-is-isnot-semantics.
How are collections compared? Note that we need to be able to compare unordered collections as well as ordered collections.
Subsumed by: #xpath-issue-is-isnot-semantics.
Do we need an identity-based equality operator? Please justify your answer with sample queries. Note that XPath gets along without it.
The '==' operator is already defined in the F&O document and used in XQuery use cases.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0204.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
The '==' is in the document and usecases.
Note that it has been decided to change "==" to "is".
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
The definitions of UNION, INTERSECT, and EXCEPT for simple values are still under discussion. It is not clear that these operators should apply to simple values, because simple values do not have a concept of node identity. If these operators are defined for simple values, perhaps they should have a lower precedence than arithmetic operators.
Text is in Working Draft 2001-11-28 sec 2.4.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
The XSL WG felt that these operators should operate on nodes only and not be overloaded to work on "values" as well. Functions should be used for the "analogous" functionality on values. Action to Ashok to write a proposal. It was noted that one might well want to to a "value" union operating on nodes (where the typed value of each is extracted).
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-02-28 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0015.html)Xquery acceptance of XSL proposal
These operators operate on nodes only and are not overloaded to work on "values" as well. Functions are to be used for the "analogous" functionality on values.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
What should the identity of a simple value be? The value or a unique id?
Simple values have no identity.
In XPath 1.0, comparisons whose operands are sets are considered to have implicit existential quantifiers. For example, the expression a = b effectively means "any member of set a equals any member of set b". The XQuery team observes that this makes the "=" operator non-transitive, so it cannot be used for grouping or for optimizing transforms. XQuery might deal with this by mapping the user-level "=" operator to a lower-level "core" syntax in which quantifiers are explicit and the equality operator (possibly spelled "eq") is transitive.
Status: Open and under discussion. No consensus at this time.
Resolved at Reston F2F by addition of value=, value<, etc. and node=, node<, etc.
Text is in Working Draft 2001-11-28 sec 2.6.1.
What should happen when one or more of the operands of a comparison operator is a sequence of length greater than one?
Subsumed by : #xquery-xpath-existential.
Resolution: An existential quantifier will be implied for any operand that is a sequence of multiple values. Advantages: Compatible with XPath 1.0. Allows queries such as //book[title="Tom Sawyer"] to be executed in the absence of a schema that proves that books have at most one title. Can be translated into an explicit existential quantifier used with a lower-level "eq" operator that is transitive.
Consider the expression a = b. In XPath 1.0, if either operand evaluates to a node-set, an implicit existential quantifier is inserted. Thus the expression effectively means "any member of set a equals any member of set b". The XQuery team observes that this makes the "=" operator non-transitive, so it cannot be used for grouping or for optimizing transforms.
Subsumed by: #xquery-xpath-existential.
In XPath 1.0, string1 = string2 is evaluated by string comparison, but string1 > string2 is evaluated by attempting to convert both strings to floating-point numbers and comparing the numbers. This seems inconsistent. Both of these comparions should be carried out as string comparisons using the default collation.
In XPath 1.0, comparison of a string with a number is carried out by attempting to convert the string to a number. For example, 47 = "47" is True. This seems to conflict with strong typing. One might expect 47 = "47" to be a type error. Status: Open, pending discussion.
Addressed by XPath 2.0 basic and standard-fallback conversions.
Decision by: xquery on 2002-03-27 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0478.html) XML Query WG has adopted a solution to Issues 259 and 91 as per Proposal 1 in Michael Rys' proposal. See #unknown-simple-type-arithmetic
Decision by: xsl on 2002-03-28 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Mar/0084.html)
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
In XPath, <book><title> Mark Twain </title></book> and <book><author> Mark Twain </author></book> are treated as equal in comparisons. Is this acceptable for us? Do we need another notion of deep equality? If so, what are the compatibility issues with XPath?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Michael confirms his retraction. Decided: close the issue.
XPath 1.0 defines the "=" operator between two elements to test for string-equality, ignoring nested markup. For example, the "=" operator of XPath 1.0 returns True when comparing a book that has author "Mark Twain" and title "Tom Sawyer" with another book that has title "Mark Twain" and author "Tom Sawyer". XQuery suggests that there are several ways of comparing two elements for equality, and that in XPath 2.0 these various types of element-comparisons should be invoked by function calls rather than by the "=" operator. The comparison functions might have names such as "deep-equal" and "string-equal". Reason: invoking different kinds of element comparisons by their names rather than by the "=" operator will help to avoid surprising results like the one in the above example.
Status: On 9/19/01, the XQuery group approved the following resolution: XQuery requests that the = and != operators, applied to elements, should raise an error if either element does not have a simple content. No change to other comparison operators such as > is requested. Various kinds of equality functions can be defined for elements with complex values, to be invoked using functional notation.
Subsumed by: #xquery-deep-equality.
XPath 1.0 defines the "=" operator between two elements to test for string-equality, ignoring nested markup. For example, the "=" operator of XPath 1.0 returns True when comparing a book that has author "Mark Twain" and title "Tom Sawyer" with another book that has title "Mark Twain" and author "Tom Sawyer". The XQuery group believes that there are several ways of comparing two elements for equality, and that these different forms of comparison should be invoked by functions rather than by the "=" operator.
No resolution yet in XSL WG: Karim, Norm, Jonathan, Perin to discuss deep-equals comparisions of nodes and what to do for the '=' operator. Jonathan will take action on Monday/Tuesday to write a proposal for "deep-equals" function and for '=' operator and sent it to XSL list to get the discussion going.
Subsumed by: #xquery-deep-equality.
The note "NOTE: The string operators will be backwards > compatible with XPath 1.0 ...." is true only in the case of the <, >, <=, > and >= operators. It's not true for "=" and "!=". In fact, if this collating > sequence is used, then < will be compatible ("1" <= "1.0" is true) but "=" > will not be compatible ("1" = "1.0" is now true, previously false).
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
When elements are compared, are comments and PIs considered in the comparison? How is whitespace handled? Do we need to allow more than one way to handle these in comparisons?
Decision by: xquery on 2002-09-04 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0078.html)
Decision by: xsl on 2002-10-03 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0025.html)The XSL WG is not agreeable to blessing this.
"When elements are compared, are comments and PIs considered in the comparison?": NO
"How is whitespace handled?": This depends on the whitespace in the instance as per the data model.
"Do we need to allow more than one way to handle these in comparisons?": NO, not in XPath 2.0/XQuery 1.0.
How should the error object be supported? How does the error object relate to exceptions?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
There is no error object in the current design.
This document does not have a general discussion of errors, when they are raised, and how they are processed. This is needed.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
There is no support for "try" & "catch" in version 1. The current document describes the "halt and catch fire" behaviour of errors.
We believe the following approach to error handling would be very useful - (1) introduce TRY <expression> CATCH <expression>, similar to try/catch in OO languages. Instead of having "throw" to throw objects, use error(<expression>), bind the result of the expression to the variable $err, and allow $err to be used in the CATCH clause.
Dana Florescu has been assigned the task of writing a proposal for this.
Decision by: xquery on 2002-12-04 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0167.html)
The issue of try/catch has been debated extensively in recent months and the decision has been made not to add such a capability.
Are an empty sequence and an empty node-set distinguishable?
The data model does not distinguish between sequences and between 'node sets', i.e., sequences in document order with no duplicates, therefore there is only one empty sequence.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
Should sequences be allowed to have nodes? I think you
need them to support sequences of nodes constructed by
for
loops.
Status quo: sequences may contain nodes and/or simple values.
XQuery-Null-Issue-7: Question: What should happen if a function expecting one element is invoked on an empty sequence?
It's an error.
Text is in Working Draft 2001-11-28 sec 2.1.2, paragraph 6, item 1.3.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
What should happen if a function expecting one element is invoked on a sequence of more than one element?
It's an error.
Text is in Working Draft 2001-11-28 sec 2.1.2, paragraph 6, item 1.1.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
If a sequence is passed as a function parameter where a singleton was declared as the parameter type, should the function call operate on tuples of the Cartesian cross product, as in the current draft, raise an error, or do something else?
Subsumed by: #nulls-functions-on-sequences.
Many XPath functions and node-tests implicitly operate on the current node if no argument is specified. Should this apply to all functions? All unary functions? Only certain functions?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Issue closed. We have decided that some functions have this behavior, but that it is not a property of functions in general.
This is really a placeholder. Ashok mentioned that there may be a problem with using '.' as a default argument for functions, because XQuery does not define a current context node??? Is this a bigger issue, or a non-issue?
Subsumed by: #xquery-implicit-current-node.
How should the current node be passed to a function in a path-step?
Using dot notation (".").
Text is in Working Draft 2001-11-28 sec 2.1.1.2, paragraph 4.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
What should the the result of various aggregate functions when applied to the empty sequence?
null-aggregates-on-empty: Aggregate functions on empty sequences http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0185.html Status: The XPath TF recommends that we reopen this issue. We will do a straw poll with the WG on this recommendation. The Chair views the public pushback we have received on this topic as sufficient reason for re-opening this issue: http://lists.w3.org/Archives/Public/www-xpath-comments/2002JanMar/0013.htmlhttp://lists.w3.org/Archives/Public/www-xpath-comments/2001OctDec/0010.html (point 8)
Paul Cotton - Do we re-open this issue? Straw poll taken - Yes: 10 No: 0 Abstain: 8
The XPath TF should take this matter back under review.
Action A-87-06 - Paul Cotton to convey to XPath TF that issue is re-opened and the WG would like to receive some proposed changes.
As in SQL, count(()) returns 0, and all other aggregate functions return the empty sequence. This rule is familiar to SQL users and minimizes the complexity of SQL-based XQuery implementations.
Decision by: xpath-tf on 2002-01-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0312.html)
Decision by: xquery on 2002-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0057.html)
Decision by: xsl on 2002-04-04 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Apr/0012.html)
Change semantics of sum() on () to 0.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
There seems to be a lot of material missing here, for example the rules for disambiguating operator names from NCNames, the two uses of "*", etc. The statement "the longest possible token" means the longest sequence that would form a token in the token-space of the grammar, not the longest that would be valid in the current syntactic context.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
These problems were solved in the 2002-08 draft.
is
and isnot
instead
of ==
and !==
.Should we use is
and isnot
instead of ==
and !==
. Using
keywords would be clearer, and less prone to error. On
the other hand, introduction of more keywords could cause
more controversy.
At Reston F2F, we agreed to infix operators 'value=', 'value<', 'node=', 'node<'. Next WD should reflect this decision.
Text is in Working Draft 2001-11-28 sec 2.6.2.
Decision by: xsl on 2002-02-28 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0005.html)(joint meeting)
Decision by: xquery on 2002-02-28 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0005.html)(joint meeting)
Decided to change to "is" and "isnot"
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
I think this issue should be closed. The (x,y) form seems to do fine after all.
Use ',' as in XQuery.
Should leading minus/plus be treated as unary operators or as part of a numeric literal? Or should both be supported?
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Decision by: xquery on 2002-07-17 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0329.html)
The issue is "dead", in the sense that the April draft contains text that everyone is happy with.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Why is axis availability part of the run-time context? Myaxis::foo should be a syntax error. This seems like a really clunky mechanism for subsetting. The alternative, as Mike Kay presented, is to provide a set of booleans telling if the given axis is available.
Proposed resolution: Axis subsetting should be done at the grammar level, similar to how XSLT pattern matching is specified.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0204.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Done at grammar level.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
XPath supports 13 axes. The current Working Draft says that XQuery will support a subset of these axes, including at least those axes required by the abbreviated syntax. The definitive set of axes to be supported by XQuery has not yet been determined. In the current Working Draft, the examples use abbreviated syntax, but the grammar supports unabbreviated syntax.
For the axes required by the abbreviated syntax, should XQuery allow both the unabbreviated and abbreviated syntax? If we decide not to support additional axes, no new functionality would be added by supporting the unabbreviated syntax. Opinions vary as to whether the unabbreviated syntax is clearer.
Text is in Working Draft 2001-11-28 sec 2.3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Decision by: xquery on 2002-07-17 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0329.html) Decided: additional axes will not be included in XQuery Version 1.
The XML Query WG has decided not to support the full set of XPath axes in Version 1. We are trying to keep XQuery small, and that means we want to avoid providing the same functionality in multiple ways unless there is a compelling reason to do so. We also felt that we could easily add the full set of axes in future versions if users clearly demand it.
Experienced XPath users leverage the full set of axes to express complex queries. In examining many XPath expressions, we have found that they can be expressed in XQuery using other features, often using FLWR expressions. The two different approaches use different idioms, and are based on different programming models. We decided not to try to support both models, because it increases the learning required to master the entire language, and increases the probability that distinct user communities will evolve, and they will have difficulty reading each other's queries.
Another reason for not supporting the axes in Version 1 is that they have a lot of semantics, and these can be a burden for an optimizer. An implementation may well be able to do precedes or follows efficiently without an efficient way to perform all the enumerations required by the axes. For instance, an implementation may be able to efficiently determine whether one node is before another node (which means it supports 'precedes' efficiently), yet still have no efficient way of listing all nodes that precede a given node in reverse order (which is required to support the 'preceding' axis). And these axes come in pairs, so an implementation must be able to enumerate the nodes in either document order or reverse document order. Interactions between forward and reverse axes can also be tricky for query optimizers.
We also note that it is easy to write a function library that mimics the axes.
Decision by: xquery on 2003-06-25 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jul/0031.html)
Consensus of the XQuery group to make all of the axes (minus namespace) optional as a set (all or nothing).
The XPath task force has recommended that we allow any expression in a path step. Proponents note that this adds to the symmetry of the language. Opponents note that this allows queries to be written that are very difficult to read, and may raise some issues for optimization. This needs further study.
Text is in Working Draft 2001-11-28 sec 2.3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
The use of full expression syntax in a step of a path expression has been recommended by the joint Query/XSLT Task Force but has not yet been approved by the respective Working Groups. In the examples and use cases we have, this is currently used mainly to allow union at any level in a path expression. The use of full expression syntax in this document is subject to Working Group approval.
Subsumed by: #xquery-step-expressions.
While $x[2] and $x[2]/baz are perfectly fine, should we disallow baz/$x[2]?
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Yes, variables should be disallowed on right side of slash.
Text is in Working Draft 2001-11-28 sec 2.3.
While 'abc'[2] is OK, what about 'abc'/baz?
Text is in Working Draft 2001-11-28 sec 2.3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Should nonsensical expressions like attribute::comment() outlawed?
Decision by: xpath-tf on 2002-01-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0312.html)
Decision by: xquery on 2002-02-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Feb/0090.html)
Decision by: xsl on 2002-02-07 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Feb/0034.html)
No explicit syntax restrictions on invalid step expressions.
XPath 1.0 effectively requires that each step in a path expression eliminate duplicate node-ids and sort the results in document order. (There is some controversy about terminology here: some people claim that the result of a step is somehow "unordered" even though it is subject to positional predicates such as [5] which means "the fifth element".) XQuery has a need for an iteration mechanism that preserves order and duplicates. XQuery can accomplish this goal by using a syntax such as FLWR that is separate from XPath.
Status: On 9/19/01 the Query WG agreed that no change to XPath 1.0 is needed in this area.
Does a path expression preserves the order of its input or document order? When do these differ? We need to make our discussion of this more precise.
Subsumed by: #xquery-xpath-slash.
XPath 1.0 effectively requires that each step in a path expression eliminate duplicate node-ids and sort the results in document order. (There is some controversy about terminology here: some people claim that the result of a step is somehow "unordered" even though it is subject to positional predicates such as [5] which means "the fifth element".) The XQuery group has talked about path expressions in which the steps do not eliminate duplicates or sort the result in document order.
Subsumed by: #xquery-xpath-slash.
When an empty element is linearized, should it get xsi:nil="True"? Option 8A: Yes. Option 8B: No. Option 8C: Only if it is declared to have required content and to be "nilable".
Decision by: xquery on 2003-01-08 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0146.html)
We just agreed that elements which are nilled will keep the xsi:nil attribute. As a consequence I think we can close the issue by serializing the xsi:nil attribute like any other attributes, and not have any special rules for empty elements.
An extensibility mechanism needs to be defined that permits XQuery to access a library of functions written in some other programming language such as Java.
Some sources of information: the definition of external functions in SQL, the implementation of external functions in Kweelt.
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Decided to adopt 1B and 2A in proposal for issue #xquery-module-syntax.
Should we say something about the fact that XPath is meant to be a abstract specification? I am concerned about people getting the impression that XPath can be used by itself. Maybe it can be, and maybe this is OK.
Input from Paul Cotton:
Input from Michael Rys:
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Action to Michael Rys to propose alternative text to resolve issue.
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
XQuery WG approves wording in: http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0312.html with a change so that "cannot" is changed to "should not" and Paul Cotton to convey changes to the XPath TF and XSL WG. Note: This text should be added to a new Conformance section in the XPath 2.0 specification.
Thus the proposed text is:
XPath is intended primarily as a component that can be used by other specifications. Therefore, XPath relies on specifications that use XPath (such as [XPointer] and [XSLT]) to specify criteria for conformance of implementations of XPath and does not define any conformance criteria for independent implementations of XPath. Specifications that set conformance criteria for their use of XPath should not change the syntactic or semantic definitions of XPath as given in this specification. |
Decision by: xpath-tf on 2002-03-05 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Mar/0011.html)
There is great concern in the XSL WG about the proposed last sentence. An alternative one was accepted by the XPath TF for approval by the WGs:
Specifications that set conformance criteria for their use of XPath must not change the syntactic or semantic definitions of XPath as given in this specification; except by subsetting and/or extensions in compatible ways.
Decision by: xquery on 2002-03-13 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0292.html)Accepting the XPath TF proposal
Decision by: xsl on 2002-04-04 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Apr/0012.html)
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
The division of path expressions into relative and absolute isn't reflected in the syntax. I think it's best to define the semantics as follows: / is an abbreviation for root(), /expr is an abbreviation for root()/expr, and // is an abbreviation for "/descendant-or-self::node()/". If the first step is an AxisStepExpr, add "./" in front of the expression. All unabbreviated paths now take the form OtherStepExpr ( '/' StepExpr )* and we only need to define the semantics of this kind of path expression.
Decision by: xquery on 2002-02-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Feb/0090.html)
The current WD text reflects suggestions.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
XPath defines some operators on lists in ways that differ from most commonly used languages. For example, if $X is a list, $X+1 is defined as the result of adding 1 to the first element in $X (ignoring the other elements.) XQuery takes a more regular approach to operations on lists, as described in the section on functions. For example, if the function increment(integer) is defined to add 1 to its argument, then the function call increment($X) where $X is a list of integers will return a list in which every member has been incremented by 1.
This issue needs more study, which should probably occur on the joint task force between XML Query and XSL. Operations on lists may be one area in which work is needed to evolve the XPath specification toward Version 2.0.
It is very desirable that operators such as "+" occur only once in the grammar, not separately in the "XPath" and "non-XPath" parts of the language. This probably means that path expressions should be integrated into the XQuery grammar and not treated as a "terminal symbol." This is the approach that has been taken in the current CUP and JavaCC grammars.
Expressions involving operators must also be carefully defined. We expect this to be handled by the task force on operators and the XPath 2.0 task force.
This is the charter of the XPath and F&O task force.
A complete list of XQuery operators and core functions is needed, with their signatures (datatypes of operands and results).
Sources of information: XPath specification, operator lists presented at recent F2F meetings by Frank Olken and others.
Note: The Query Working Group and the Schema Working Group have agreed to spawn a joint task force to investigate this issue. The XQuery language will integrate the results of that work.
This is the charter of the XPath and F&O task force.
Should the syntaxes of XQuery and the XML Query Formal Semantics be more closely aligned?
At the time this issue was originally proposed, XQuery and the Formal Semantics used distinctly different languages. We are now in the process of aligning these languages. The current Working Draft shows significant progress in this direction. However, more work is to be done with respect to type declarations and the use of type in the language.
The XQuery algebra is a proper subset of XQuery, in particular, the XQuery Core.
The algebra mapping is incomplete and out of date.
Jerome has created a new version of the mapping, with help from Mary, Dana and Mugur.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Can we please close this issue as a duplicate given that we have now added all the FS issues to the main issues list?
/paulc
The precedence rules of XQuery and the algebra are not completely aligned. This needs to be fixed by the time both specifications are finished.
The XQuery algebra is a proper subset of XQuery, in particular, the XQuery Core, so the algebra has the same set of precedence rules as XQuery.
We need functions to return the name of an attribute and the content of an attribute.
My proposal is to create a separate section in the F&O document listing the accessors in the data model that are supported. The semantics would still be specified in the data model document. Similarly, we would add a section that listed the functions in the evaluation context that are supported. The semantics for these functions would be in the XPath document as decided this morning.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0204.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Section "Accessors" has been added to F&O.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Queries should be able to return references; for instance, a query that generates a table of contents should also be able to create references to the items in the content itself. How can we extend the syntax to support this?
XPath TF and XQuery WG resolved to remove references from the data model. Query must use some explicit reference mechanism (e.g., ID or key) to reference a particular node in a document
Does the dereference operator work on links, such as XLink or HTML href? Should we also support KEY/KEYREF? In general, our handling of references needs a lot of work.
In general, how are the semantics of the dereference operator defined?
Text is in Working Draft 2001-11-28 sec 2.3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-02-28 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0015.html)
Acceptance of text in December 2001 published Working Draft, that it does only id/idref.
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html) Verifying that the text that the text is in the draft. Note: there is also a proposal on the table to remove => entirely.
Decision by: xquery on 2002-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/att-0110/01-minutes_020516pm.txt)
We will keep the dereference operator.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
The XML Query WG revisited issue 134 and decided to close the issue by removing => completely. This was not unanimous decision.
Decision by: xsl on 2002-05-23 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002May/0123.html)The XSL WG agrees with the change to remove =>.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Our current syntax uses an empty end tag ("</>") as the end tag for element constructors that use computed element names. Should we allow this for element constructors with literal element names?
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
If a list of expressions contains adjacent element constructors, should a comma appear between these element constructors?
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
We need a function for constructing attributes.
The attribute function takes two parameters. The first is the name of the attribute to be constructed. The second is the value of the attribute to be constructed. If an attribute function occurs within an element constructor, the attribute is added to the set of attributes for that element.
<foo> IF $f/temp > 200 THEN make_attribute("warning", "about to explode!!") ELSE [] </foo></foo> |
Note Dana and Phil's exchange re: typing when attribute names are not statically known.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
XQuery currently allows computed attribute values without quotes, which is not well-formed XML:
<foo bar={//baz} /> |
In XSLT, the equivalent syntax uses quotes:
<foo bar="{//baz}" /> |
Should XQuery adopt the XSLT convention? This would make it easier for XQuery to reside in well formed XML documents.
Text is in Working Draft 2001-11-28 sec 2.8.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
The current syntax for computed elements and attributes uses a syntax that looks like XML but is not well-formed XML.
<{name($e)}> # replicates the name of $e {$e/@*} # replicates the attributes of $e {2 * number($e)} # doubles the content of $e </> |
This makes it hard to embed queries that use this syntax in well-formed XML documents. Also, the Formal Description uses a syntax for element and attribute construction that is more suitable for use with inference notation. Should an alternative construction syntax be used that eliminates both problems?
Text is in Working Draft 2001-11-28 sec 2.8.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
(From Algebra team): We think it would be helpful to
have two syntaxes for construction, algebra a[. .
.]
as used in the Algebra and <a> . .
. </a>
as used in XQuery. Not least, the
a[. . .]
syntax matches the syntax used in
the Algebra for types.
Subsumed by: #xquery-computed-element-names.
We do not believe it is helpful to have two syntaxes for the same thing, and we do not feel that this suggestion would make XQuery easier to read or use. In any case, square brackets are used in XQuery to enclose predicates and are not available for the suggested purpose.
The current EBNF lacks productions for comments and processing instructions.
Text is in Working Draft 2001-11-28 sec 2.8.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Since an XQuery may physically reside in an XML document, comments that rely on the concept of end-of-line can result in anomalies due to XML whitespace normalization. We should probably use bounded comments.
One possible syntax for comments:
{- - This is reminiscent of XML, but without angle brackets. - -} |
Subsumed by: #xquery-comment-pi-productions.
Is there a need for a constructor that creates an instance of the XML Query Data Model from a string that contains XML text?
Close the issue, pending convincing use cases. When do we need to be able to create a string of XML text, then convert it into an instance of the XML data model? Can't there always be an intervening parser or other tool to create the XML data model instance?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Not for XQuery 1.0.
In attribute constructors and string constructors, XQuery uses quotes or apostrophes as delimiters. How are these characters escaped when they occur within strings that are created by one of these constructors?
Input from Michael Rys:
I asked a member of my team to check for a resolution that he can live with. He said he has not found it and currently works on constructing examples that shows the open issue. |
I propose that we use double-delimiters within a string literal, e.g. 'I don''t', and unlike most of my syntactic ideas, this proposal seemed to recieve general support.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0204.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Syntax in current draft has this, but explanatory text need to be added.
Copy and reference semantics must be defined properly for updates to work. This must be coordinated with the algebra team.
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
Subsumed by #node-identity-modeling
Can a query construct an entire XML document? What restrictions are there, eg on the internal subset, processing instructions or comments on the root level?
The constructor we propose does nothing except create a document node, and is very simple. The documents constructed in this way can be validated, fed to functions that save them or send them as messages, or used in any other way that document nodes may be used in XQuery. Currently, we can construct any node in our data model except for the document node. For instance, we have the following constructors for element and attribute nodes: [66] ComputedElementConstructor ::= "element" (QName | EnclosedExpr) "{" ExprSequence? "}" [67] ComputedAttributeConstructor ::= "attribute" (QName | EnclosedExpr) "{" ExprSequence? "}" We propose an analogous syntax for document nodes, except that there is no need to create the QName for a document node, which does not have one: DocumentNode ::= 'document' '{' ExprSequence '}' A document node constructor creates a document node. It does nothing else. It does not associate the document node with a schema or DTD, specify a file name for it, validate the instance, assign file permissions, or shine shoes. Appendix: Interesting things that are not part of document node construction Here are many things people want to do with documents. None of these are part of document node construction, but all of these things benefit from document nodes. 1. Validating a node Once created, a document may be validated, eg: let $d := document { <?xml version="1.0"?> <greeting>Hello, world!</greeting> } return validate($d) 2. Saving a node to the file system This is best done using a function that specifies the URI, and any other parameters that the system may need. The signature for such a function may look like this: save-document( document $docnode, anyURI $name, element file-params? $p) The file-params element could be used to store information on file permissions, etc. Appendix: Issues Issue: How should schemas be imported for validating a document using the document node? Consider the following example: <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform http://www.w3.org/1999/XSL/Transform.xsd http://www.w3.org/1999/xhtml http://www.w3.org/1999/xhtml.xsd"> I think this is no different from validating an element node. A root element may identify namespace prefixes. Names must be defined in the in-scope schema definitions before they can be used for validation. With or without the document node, a schema location may be specified on an element. Implementations should be free to use this location to locate a schema or to ignore it, as in XML Schema. Issue: Should we allow a DOCTYPE in a document constructor? Consider the following example: let $d := document { <?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd"> <greeting>Hello, world!</greeting> } return validate($d) If a DOCTYPE is specified, should it be used, as it would be by most XML processors? |
Decision by: xquery on 2002-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/att-0110/01-minutes_020516pm.txt)
Cotton: Any objections to adopting this proposal as written by Jonathan? One objection by Michael Rys. Proposal is adopted with one objection.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
What does <a b={expr}> mean if expr returns an empty sequence? Option 10A: Attribute is not created. Option 10B: Run-time error. Option 10C: The attribute is created, and its value is the empty sequence. Option 10D: The attribute is created and its value is the empty sequence if this is allowed by the attribute type; otherwise it's a run-time error. Option 10E: The attribute is created and its value is the empty sequence. However, an error may occur when the attribute is serialized. Option 10F: If the attribute-type is a list of scalar types that allows the empty list, an attribute is created with an empty sequence as its value; if the attribute is optional and scalar, then the attribute is not created. If the type system does not allow the attribute to be an empty list or absent, a type error is raised.
Decision by: xquery on 2001-12-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0047.html)
Adopt 10C.
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html) Verifying that the text that the text is in the draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
If an element constructor contains a namespace declaration in XML syntax, is the namespace declared in the query?
<foo:bar xmlns:foo="//www.foo.com/foo.xsd"> <foo:baz> Is this baz in the 'www.foo.com' namespace? </foo:baz> </foo> |
Text is in Working Draft 2001-11-28 sec 2.8.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Do we need a way to embed literal XML content in a query? For instance, should there be a way to construct an XML element using the native syntax of XML?
Current XQuery syntax supports literal XML constructors
Do we need a way to escape from XML to XQuery syntax? This could be used to provide functionality similar to that of ASP or JSP.
Subsumed by: #xquery-embedding-xml.
A variety of XML constructs can not be cut and paste into XQuery, including the internal subset, entities, notations, etc. Should we attempt to ameliorate this?
Decision by: x-editors on 2003-02-05 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Feb/0010.html)
Decision by: xquery on 2003-02-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0242.html)
Close the issue with no change to the documents.
XQuery needs an XML representation that reflects the structure of an XQuery query. Drafts of such a representation have been prepared, but it is not yet ready for publication.
Decision by: xquery on 2003-10-29 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Nov/0002.html)
An XQueryX Working Draft will be produced that:
a) includes a trivial embedding (single XML start and end tag which can be used with the readable syntax)
b) a detailed embedding based on a parse tree of the Last Call XQuery grammar with no redundant BNF productions and which expands all XPath steps.
c) defines a MIME type for XQuery.
Is there a need to be able to escape to ABQL in XQueryX?
The text is confused. ABQL was the old name of XQueryX. The real issue is should be whether XQueryX and XQuery can escape to each other.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Not for XQuery 1.0.
The ORDERBY operator of XQuery can be used to order a sequence of elements by some computed expression which may return an empty value. What is the resulting order? For example, in the query //emp SORTBY bonus, what is the position of employees who have no bonus? Option 15A: Implementation-defined, but a given implementation must sort all the values with an empty sort-key consistently either first or last (as in SQL). Option 15B: Empty sort-keys always sort first. Option 15C: Empty sort-keys always sort last. Option 15D: Invent some syntax to specify how empty sort-keys should be handled.
Text is in Working Draft 2001-11-28 sec 2.10.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Should we make it easier to sort by data that is not exposed in the result? Although the current language allows this, it is difficult to define complex sort orders in which some items are not exposed in the result and others are computed in the expression that is sorted. Is there a more convenient syntax for this that would be useful in XQuery?
Here is an example: FOR $e IN //employee WHERE ... RETURN <newe>$e/name</newe> SORTBY -- Now I would like to sort by salary but cannot. Instead, the query would have to be written as FOR $e IN (FOR $x IN //employee RETURN $x SORTBY employee/salary/data()) WHERE ... RETURN <newe>$e/name</newe> Which seems awkward. The question is of course how we can integrate the SORTBY in an other way. For example, could we say FOR $e IN //employee WHERE ... SORTBY $e/salary/data() RETURN <newe>$e/name</newe> ? Best regards Michael |
Decision by: xquery on 2002-09-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0236.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)Confirming that there are no concerns for the resolution of this XQuery only issue.
Resolved by the adoption of the proposal to add "orderby" to the FLWR expression and to drop the previous "sortby" syntax/
Which of the following meanings is preferred for X BEFORE Y? (In each case, X AFTER Y would have the symmetric meaning.)
(1) X and Y are node sequences. Return the nodes in X that occur before some node in Y. This is the current definition.
(2) X and Y are node sequences. Return the nodes in X that occur before all nodes in Y. This is similar to the current definition and may be a better match for our use cases.
(3) X is a node sequence and Y is an individual node. Return the nodes in X that occur before Y. If YS is a node sequence, the meanings in (1) and (2) can be expressed as "X BEFORE YS[last()]" and "X BEFORE YS[1]".
(4) X and Y are both individual nodes. Return True if X occurs before Y in document order, otherwise False. If XS and YS are node sequences, the meaning in (1) can be expressed as "FOR $x IN XS [SOME $y IN YS SATISFIES $x BEFORE $y] RETURN $x". The meaning in (2) can be expressed similarly, substituting "EVERY" for "SOME".
Decision by: xsl on 2001-12-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0047.html)(joint meeting)
Decision by: xquery on 2001-12-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0047.html)(joint meeting)
Reflected in Working Draft 2001-11-28 sec 2.4.
XQuery needs a mechanism to allow function definitions to be shared by multiple queries. The XQuery grammar allows function definitions to occur without a query expression.
We must provide a way for queries to access functions in libraries. For instance, we might add an IMPORT statement to XQuery, with the URI of the functions to be imported. It must be possible to specify either that (1) local definitions replace the imported definitions, or (2) imported definitions replace the local ones.
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Decided to adopt 1B and 2A in proposal for issue #xquery-module-syntax.
If a function name is not qualified by a namespace prefix, what namespace is the function in? Some options that have been suggested: the function might be considered to be in no namespace, in a default namespace, or in the namespace of XQuery's built-in functions.
Text is in Working Draft 2001-11-28 sec 3.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Should XQuery support general recursion, or should it be limited in some way? Status quo: XQuery currently supports general recursion.
Reference: XML Query Algebra Issues
[Issue-0008] Fixed point operator or recursive functions]
[Issue-0032] Full regular path expressions]
Status quo: XQuery currently supports general recursion.
Marton Nagy has suggested that it would be helpful to describe a naive implementation strategy for XQuery.
A naive XQuery implementation might parse the query, map it to Algebra syntax, and pass it to an Algebra implementation to request type checking from the algebra, returning an error if there were static type errors. A naive implementation might then request query execution from the algebra, get the results from the algebra and return it to the user.
Alternatively, the implementation might have its own algebra for execution, or it might generate statements in a specific implementation language such as XPath or SQL.We expect a wide variety of implementation approaches to be used in practice.
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
People propose to close it. Approved. We don't have cycles, and the FS can be used as the basis for a naive implementation.
Consider adding a fusion operator to XQuery. Michael has supplied us with a few queries in which fusion would be helpful, and fusion seems promising as a feature, but we have not yet done adequate study of this issue. We would like to explore a wider set of use cases to make sure that we take a general approach to the problems related to fusion.
This requires further study. Use cases will need to be developed to determine precisely what forms of a fusion operator are actually helpful for data integration. An extensive and informative thread on this topic can be found in the W3C archives, starting at http://lists.w3.org/Archives/Member/w3c-archive/2000Dec/0132.htmllists.w3.org/Archives/Member/w3c-archive/2000Dec/0132.html.
Fusion is still not well motivated by use cases, despite fairly extensive discussion. External functions may be important, but we do not think it is worth doing right now. There is also an argument for omitting them because they limit the optimizations that can be done in the rest of the language.
Withdrawn 2001-12-07.
Dana has observed that Filter can be a function rather than an operator, if nodes have identity.
Filter is now a function, where the first parameter is the expression to be filtered, and the second parameter is the filter expression. We find this more elegant.
The above is obsolete (2001-12-07); filter is now a single-parameter function.
The current mapping of filter to the algebra does not preserve much useful type information. Can the mapping be improved? Is there another approach to filter that would yield better type information?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Filter no longer exists.
We believe that a syntax for update would be extremely useful, allowing inserts, updates, and deletion. This might best be added as a non-normative appendix to the syntax proposal, since the algebra is not designed for defining this portion of the language.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
We have agreed to publish a note on updates.
Do we need a way to define views?
While a mechanism for view definition is desirable, we do not currently intend to provide one in Level 1.
How do we exclude undesired elements from the results of joins?
This need came out of a thread exploring data integration scenarios, starting with http://lists.w3.org/Archives/Member/w3c-archive/2000Dec/0132.html.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
This can be done using "except".
Is there a need to be able to execute a string that contains the text of an XQuery query? (This is similar to the eval function in Lisp.)
No in Version 1.0
Does XQuery need an explicit GROUPBY expression? This would not add expressive power, but would be convenient, and may be easier to optimize.
Decision by: xquery on 2003-03-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0344.html)
Decided to close with no action.
The final XQuery recommendation must have a conformance section. The XML Query Working Group has not yet decided what should go into this section.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
This section is now included.
How are collections of documents named and addressed in queries? How are they associated with files in directory structures, or resources in various systems? How does one address documents within collections?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
This is addressed by xf:collection().
Should the operands be restricted?
Suggestions floated:
Decision by: xpath-tf on 2001-10-23 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Oct/0286.html)
Decision by: xquery on 2001-10-31 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Oct/0441.html)
Consensus to restrict operands of "/" to node sets, i.e., every step expression must yield a node set otherwise an error is raised.
This decision will be reflected in next WD.
Decision by: xsl on 2001-10-25 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Oct/0122.html)
operands to / - discussed but we wish to await the resolution on how /data() is handled.
Decision by: xsl on 2001-12-13 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Dec/xxxx.html)
Agreed to limit operands no nodesets.
Text to that effect is in Working Draft 2001-11-28 sec 2.3.
Should small set of functions on nodes, i.e., data(), name, uri-namespace(), be defined on node sequences and have an implicit mapping semantics?, e.g., data(a/b)
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Adopt status quo.
If we have polymorphism in the operator, should we have only one fallback?
Matching Operands with Polymorphic Operators Consider the operator +. Assume, purely for illustration, that + is defined on numerics, strings and a date and a duration. When the interpreter sees "op1 + op2" how does it decide what function to call. Here are the rules by example for +: - If op1 and op2 are numerics it accepts the operands and calls the appropriate function based on the numeric promotion rules described below. - If op1 and op2 are strings it accepts the operands, converts both operands to string and calls the string-concat function. - It then checks if the first operand is a date and the second operand is a duration. If so, it calls the add-duration-to-date function. - If none of the above rules works a type exception is declared. Depending on the host language and the environment (as indicated by a global variable) one of two actions occurs: o A fallback conversion is attempted. Fallback conversions are described in detail in the XPath straw document o A type error is declared. When an error is declared the process aborts. This means that functions never have to deal with error inputs. This is a logical specification of how the process works. Implementations are free to create implementations that differ from the above as long as they obey the semantics defined in the F&O document. For example, 10 div 3 should return 3. Numeric Type Promotions For simplicity, each operator is defined to operate on operands of the same type and to return the same type. If the two operands are not of the same type, one operand is promoted to be the type of the other operand. Numeric types have the following hierarchy : integer->decimal->float->double Note that we need to take user-defined types into account. For example, a user may define height as a derived type of integer with a minimum value of 20 and a maximum value of 100. He may then derive oddHeight using a pattern to restrict the value to odd integers. If op1 is of type oddHeight. We first promote it to its base type, integer. If op1 and op2 are now both integers we call addInteger or whatever the appropriate function is. If not, we see which of the operators is higher in the above hierarchy and promote the other until we get two integers or two decimals or two floats or two doubles. This is guaranteed to occur. Then we call the appropriate functions for the operands. The F&O document contains details of numeric type promotions. |
Text is in Working Draft 2001-11-28 sec 2.5.
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)
Acceptance of text in December 2001 published Working Draft.
Do we still need fallbacks if we have a marker for untyped data (="PCDATA")?
Input from Mary F. Fernandez:
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html) Acceptance of text in December 2001 published Working Draft.
Text is in Working Draft 2001-11-28 sec 2.5.
I discussed this issue with Mary on the phone today, and we have developed the following modified version of her original proposal. The key difference is this: 1. In the data model, the type name 'anySimpleType' is used everywhere that 'unknownSimpleType' was used in her original proposal. This avoids the problems discussed in: http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0173.html 2. In the SequenceType production, the keyword 'unknown' matches values whose most specific type is 'anySimpleType'. Jonathan and Mary ================= This message proposes, in summary, that XQuery/XPath must have a type for Text Nodes, denoted by the reserved word 'text', and a type for Atomic Values with unknown simple type, denoted by the type name 'anySimpleType' in the Data Model. In the SequenceType production, the keyword 'unknown' matches values whose most specific type is 'anySimpleType'. Rationale: XQuery/XPath supports expressions that yield two *distinct* types of values: 1. Text nodes, which have identity and contain character data Example: let $e := <fact>I saw 8 cats</fact> return $e/text() This expression yields a Text Node (that has identity!) with type 'text'. 2. Atomic values with unknown simple type, which no not have identity and contain character data Example 1: let $e := <fact about="what I saw">I saw 8 cats</fact> return data($e) This expression yields an Atomic Value (that does not have identity!) with type 'anySimpleType' Example 2: data($e/@about) This expression also yields an Atomic Value with anySimpleType. In a typed language, every value must have an associated type. Neither value above currently has a type in XQuery/XPath. In addition, Text Nodes and Atomic Values with unknown simple type do not denote the same set of values, therefore, they must have distinct types. Both these types may occur wherever a type expression is permitted, e.g., in the SequenceType production. However, note that the type name 'anySimpleType' matches all simple types, since they are all derived from 'anySimpleType', whereas the keyword 'unknown' matches only values whose most specific type is 'anySimpleType'. The formal semantics already constructs core expressions that require both 'text' and 'unknown'. for example, here's the rule that converts a node to an optional atomic value of type xsd:integer: typeswitch (Expr) as $v case xs:integer? return $v case unknown return cast as xs:integer ($v) case node return typeswitch (data($v)) as $w ... We use the type 'anySimpleType' for simple types because this type explicity captures the notion that it is a simple type for which there is no more specific known type. To simplify processing, we map all PSVI representations of character data with unknown type onto this one type. Since our language needs a way to match only values whose most specific type is 'anySimpleType', we add a keyword to the language, rather than invent a new type for XML Schema. The functionality we need is part of our language, not part of the XML Schema type system that underlies our type system. The necessity of associating a type to text nodes was first discussed in Aug 2001: http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Aug/0209.html |
Decision by: xquery on 2002-03-27 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0478.html) XML Query WG has resolved issue 174 and Strawman Issue 17 by adopting Proposal #1 Jonathan Robie's proposal above.
Decision by: xsl on 2002-03-28 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Mar/0084.html)
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
The XML Query WG participants would like the XPath task force to propose a final name for the "not3" function.
Subsumed by :xpath-issue-not-logic.
A sequence that contains at least one node? A sequence that contains all nodes?
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
The proposal by Michael Rys in Proposal to close issue expr[nodes] treats not()/not3() differently from all other functions that take a boolean formal argument.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
The wording indicates that this is an issue on a proposal. There is no such thing as an issue on a proposal.
If there is an issue on the document, we need text identifying specifically what this issue is.
What shold the semantics be?
Decision by: xpath-tf on 2001-11-13 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0069.html)
Decision by: xquery on 2001-11-14 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Nov/0306.html)
Decision by: xsl on 2001-11-29 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Nov/xxxx.html)
In XPath predicates only, if expression evaluates to a singleton number, then the predicate is true if the context position equals the singleton number, otherwise it is false.
There is no support for range expressions in XPath predicates.
Text is in Working Draft 2001-11-28 sec 2.3.3.1, paragraph 2, item 2.
Query fans: Which of the following is true?
(1) The substring function takes a string as its first parameter. $emp/address is a node. Therefore substring($emp/address, 1, 25) is a type error. To fix it the user must write substring(data($emp/address), 1, 25). Even then, if $emp does not happen to have an address, the function call is a type error and aborts the query.
(2) The first-parameter-type of substring should be "zero or one nodes or strings". The substring function (and virtually all of the other core library functions) does not have the correct signature in the F&O document. All these functions should be defined to accept nodes and extract their values, and to return the empty sequence if called with the empty sequence.
(3) There is a general convention that, when a function expects a simple value and it is called with a node argument, the typed value is implicitly extracted from the node and converted (if possible) to the appropriate type. Therefore the first-parameter-type of substring (and many other functions) in the F&O document should be "zero or one strings".
Curiously, --Don
Input from Michael Rys:
Input from mhkay@iclway.co.uk:
Input from Mary F. Fernandez:
Input from Jonathan Robie:
Input from Andrew Eisenberg:
Input from Michael Rys:
Input from Michael Rys:
Input from Jim Melton:
Decision by: xpath-tf on 2001-11-27 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Nov/0167.html)
Decision by: xquery on 2001-11-28 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Nov/0397.html)
Decision by: xsl on 2001-11-29 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2001Nov/xxxx.html)
Adopting basic conversion rules for applications of functions that expect simple-valued arguments.
Michael R will provide 'tips & traps' text indentifying potential backward compatibility issue if/when overloaded functions are added to XQuery/XPath.
Text is in Working Draft 2001-11-28 sec 2.1.2, paragraph 6.
Semantics of function application for functions that expect complex-valued arguments is not documented in current WDs.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
The asssertion is no longer true; issue closed.
Should literals include integers & integer be treated as primitive type?
Input from Mary F. Fernandez:
Input from Kay, Michael:
Decision by: xpath-tf on 2001-12-18 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Dec/0128.html)
Decision by: xquery on 2001-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0150.html)
This issue is moot: integer literals are included in grammar and are modeled as simple-typed values.
The mapping from operators (such as "+", "*") to the operator functions needs to be defined. A second question is if the text should be in the F&O or XPath/XQuery document.
This belongs in the XPath document. Ashok will send a draft to Don, who will incorporate this in XPath post December 2001 publication.
Decision by: xpath-tf on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Feb/0108.html)Accepting Don's Proposal
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0066.html)(whole group at XPath TF telcon)
Decision by: xquery on 2002-01-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0345.html)Accepting Don's Proposal
Decision by: xquery on 2002-02-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Feb/0090.html)
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html)Verifying that the table is in the current drafts and the issue is thus resolved.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Lexical structure and typed form of text nodes discussed in datamodel. No analogous discussion in the XPath document on that there are two ways to access information, as typed content or as nodes. This also needs to be discussed in conjunction with construction.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
The datamodel now makes a clear distinction.
Need to extend languages to test for instance-of comments, pis, etc.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Decision by: xquery on 2002-07-17 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0329.html)
The issue is "dead", in the sense that the April draft contains text that everyone is happy with.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Should we do explicit casts rather than type conversion, like for example Python? This would result in e.g. forceing the user to tag a string everytime...
Addressed by the "Named Typing" proposal.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
What should be the ordering of the results of the union, intersect, and except operators?
Issue is for material in sec 2.4. in Working Draft 2001-11-28.
Union, intersect, and except on node sequences are defined to return their results in document order.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Decision by: xquery on 2002-07-17 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0329.html)
The issue is "dead", in the sense that the April draft contains text that everyone is happy with.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
What arithmetic operations should be supported on date/time types?
Issue is for material in sec 2.5. in Working Draft 2001-11-28.
Decision by: xquery on 2002-02-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Feb/0090.html)
Locus should be Functiond and Operators
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
This issue is closed (duplicate to an F&O issue).
What is the concrete syntax of the comparison operators?
Issue is for material in sec 2.6. in Working Draft 2001-11-28.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
Make sure that the XPath/XQuery document is consistent with the F&O document with respect to the supported combinations of types for comparison operators.
Issue is for material in sec 2.6. in Working Draft 2001-11-28.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
The table has been moved to the XPath/XQuery document, thus ensuring that it is consistent with XPath/XQuery.
What operators are supported for comparing various objects based on their order?
Issue is for material in sec 2.6. in Working Draft 2001-11-28.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
How is whitespace handled in element constructors?
Issue is for material in sec 2.8. in Working Draft 2001-11-28.
Input from Michael Kay:
The XQuery WG requested information from XSL WG as to how we currently deal with whitespace, in the hope that we can provide an off-the-shelf solution to the problem. In response to the action, here's a description of what XSLT does. The stylesheet is an XML document. In constructing its infoset, all processing instructions, comments, and whitespace-only text nodes are discarded. (To be absolutely precise, PIs and comments are discarded; then adjacent text nodes are merged; then whitespace-only text nodes are removed from the tree). Whitespace text nodes are retained however, in two circumstances: (a) if the whitespace text node is a child of an <xsl:text> element, and (b) if an ancestor element specifies xml:space="preserve". Certain elements in the stylesheet (for example, xsl:element) contain a "content constructor". A content constructor is a sequence of XSLT instructions, literal result elements, and literal text nodes. In evaluating a content constructor, XSLT instructions do whatever the semantics of the particular instruction say, while literal result elements and literal text nodes are copied to the result tree. The effect of this is that a whitespace-only text node in the stylesheet is copied to the result tree only if either (a) it appears immediately inside <xsl:text>, or (b) it is within the scope of an xml:space="preserve" attribute. Whitespace that is adjacent to non-white text in a literal text node is copied to the result tree. The effect of these rules is as follows: ======================================= <a> </a> generates an empty element: <a/> ======================================= <a xml-space="preserve"> </a> generates: <a xml-space="preserve"> </a> ======================================= <a><xsl:text> </xsl:text></a> generates: <a> </a> ======================================= <a> <b/> <a> generates: <a><b/></a> ======================================= <a>Some text <b/> </a> generates: <a>Some text <b/></a> ======================================= There are other complications with whitespace. Whitespace in the result tree can come from the source document as well as from the stylesheet; XSLT provides control over whether whitespace-only text nodes in the source document are significant or not. Whitespace can also be generated in the output during serialization, if the xsl:output option indent="yes" is specified. Also of course the XSLT rules apply in addition to the XML rules. XML for example normalizes line endings and normalizes whitespace (but not character references) in attribute values. This happens outside XSLT's control. Whitespace character references such as are treated differently from literal whitespace by the XML processor, but are treated identically to literal whitespace by the XSLT processor. It's fair to say that these rules create a fair bit of confusion. It usually doesn't matter for generating HTML, because whitespace in HTML is rarely significant. For generating text files, it can be quite tricky. However, the rules are well-defined and a user who understands the rules can always get the required output. What should XQuery do? I'd suggest mimicking these rules as closely as possible, if only because users then only have to learn one set of confusing rules rather than two. I can't think of any obvious improvements that would make the system less confusing. Where the user wants to explicitly output whitespace, of course, <a>{' '}</a> provides a suitable alternative to XSLT's <xsl:text> instruction. This analogy would suggest that <a> {'x'} </a> should output <a>x</a>, while <a>z {'x'} y</a> should output <a>z x y</a>: that is, the characters between <a> and "{" are ignored if they consist entirely of whitespace, but are all significant if any of them is non-whitespace. <a> </a> should output <a/>, as should <a> </a>. This is only a suggestion, of course, the decision is entirely for XQuery to make. Mike Kay |
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decided: Resolve this by adopting the whitespace proposal.
What is the type of a newly constructed element?
Issue is for material in sec 2.8. in Working Draft 2001-11-28.
Cf. Is the QName denoting type information optional or required?
Cf. Should all elements and attributes have type annotations?
Addressed by the "Named Typing" proposal.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
An element constructor may contain adjacent simple values as the content of the element. This cannot be represented in XML. What should we do about this?
Issue is for material in sec 2.8. in Working Draft 2001-11-28.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
This issue is solved as part of the adoption of "Alternative 1".
Should the language support both stable and unstable sort? Using what syntax?
Issue is for material in sec 2.10. in Working Draft 2001-11-28.
Decision by: xquery on 2002-05-08 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0104.html)
Resolved by the following production in the document: [5] SortExpr ::= Expr "stable"? "sortby" "(" SortSpecList ")"
Is it possible to sort a heterogeneous sequence? What syntax and semantics are used?
Issue is for material in sec 2.10. in Working Draft 2001-11-28.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Adoption of status quo.
What should be the concrete syntax for datatypes in function signatures and expressions? Should this syntax support node-or-value? Processing-instructions? Comments? Note that some functions in the F&O document (such as "exists") require "node-or-value" parameters.
Issue is for material in sec 2.13. in Working Draft 2001-11-28.
Addressed by the "Named Typing" proposal in SequenceType production.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
The current Datatype production supports declarations of the form "element of type <var>". Do we also need declarations of the form "attribute of type <var>" or "node of type <var>"?
Issue is for material in sec 2.13. in Working Draft 2001-11-28.
Addressed by the "Named Typing" proposal in SequenceType production.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Does the Datatype declaration need a way to specify both the QName of an element or attribute and its type, eg element person of type plumber?
Issue is for material in sec 2.13. in Working Draft 2001-11-28.
Addressed by the "Named Typing" proposal in SequenceType production.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Should XQuery support the import of locally declared types from schemas?
Issue is for material in sec 2.13. in Working Draft 2001-11-28.
Addressed by the "Named Typing" proposal in SequenceType production.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
The keyword "only" remains in the syntax of "instance of", but the meaning of this keyword is not clear. Do we need this? If so, what are its semantics?
Issue is for material in sec 2.13. in Working Draft 2001-11-28.
Further input from Phil Wadler: Suggest we remove "only" from the text, and turn it into an issue. (As noted in the text, "only" makes sense only if we have named types, which is another issue.) If we do have "only", it should be used consistently in both "instance of" and in the "case" of a type switch. [!]
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Not for XQuery 1.0.
What is the scope of a namespace declaration in the query prolog?
Issue is for material in sec 3. in Working Draft 2001-11-28.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
How do namespace declarations in the prolog and in namespace declaration attributes affect the in-scope namespaces of the context?
Issue is for material in sec 3. in Working Draft 2001-11-28.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
[Decided modulo suggested changes to text by Mike K] Action Item on Jonathan to incorporate these changes.
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html) Verifying that the text that the text is in the draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Is it legal to use names that lexically match a QName if the prefix has not been bound in a namespace declaration?
Issue is for material in sec 3. in Working Draft 2001-11-28.
Statement that using a namespace prefix that has not been declared is an error.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
What is the name of an unprefixed attribute? Is this affected by default namespaces? Is this affected by the namespace of the containing element?
Issue is for material in sec 3. in Working Draft 2001-11-28.
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
If a function parameter does not specify a type, can both nodes and values be passed as arguments? If a function return does not specify a type, can both nodes and values be returned?
Issue is for material in sec 3. in Working Draft 2001-11-28.
The default type of a function parameter when no type is specified in the function signature is changed from "any node" to "any type". The default return type of a function when no return type is specified is changed from "any sequence of nodes" to "any type".
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
[Decided modulo suggested changes to text ] Action Item on Jonathan to incorporate these changes. "any sequence" or "any type"
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html) Verifying that the text that the text is in the draft: The default return type is item*, the default parameter type is item*.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Which of these type productions (CAST, TREAT, ASSERT, TYPESWITCH...) belong in XPath? (ie common to XQuery and XPath)
The list is now (2002-10): CAST, TREAT, VALIDATE, INSTANCE OF, types on variable bindings, TYPESWITCH.
Decision by: xsl on 2003-04-07 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Apr/0034.html)
Decision by: xquery on 2003-04-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Apr/0175.html)
Decided to remove "validate" from XPath. ("typeswitch" was removed already)
Should variable names be QNames or NCNames? Note that XPath 1.0 uses QNames, and it may be helpful to disambiguate variable names from different modules.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Decision by: xquery on 2002-07-17 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0329.html)
The issue is "dead", in the sense that the April draft contains text that everyone is happy with.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Can you have multiple matching curly braces inside an attribute value? How is it evaluated? What is the associated typing? Note that the BNF permits this.
Decision by: xsl on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
Decision by: xquery on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
Can you have multiple matching curly braces inside an attribute value?
Braces for text must be escaped. <e a="{{{{}}"/>
Nesting is no problem:
<e a="{{{{{text{true()}}}}"/>
How is it evaluated?
With a parser.
What is the associated typing?
Not a syntax issue.
Do we want to continue to support both of the following forms for computed attribute values? If not, is it possible to decide which to remove?
<pic size={}> { } </pic> |
<pic size="{}"> { } </pic> |
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Jonathan: Computed attribute values - two ways to do this. Propose to elimiate no quoted representation. Michael: a = {3} - it is clear that the type is integer... PaulC: Is there anyone who thinks the semantics are different. Michael is not sure. PaulC: Anyone think we should retain non quoted syntax: no objections, resolved. |
Decision by: xpath-tf on 2002-05-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002May/0037.html) Verifying that the text that the text is in the draft:
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
2.10, * Points 1 and 2 (Draft 2001-11-28). We could specify that lexical order is used when the ordering expression yields a sequence of values. This could be quite useful, e.g., if we represent Section 1.2.3 by (1,2,3) and Section 1.4 by (1,4), then lexical ordering does the right thing. This also implies that () should sort before everything else, as that is what happens with lexical order.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Not for XPath 2.0/XQuery 1.0.
2.13.2 (Draft 2001-11-28) The behaviour of treat is profoundly affected by the choice between structural and named typing. If we use structural typing, then treat changes the type but not the value; if we use named typing, then treat must return a new value containing the appropriate type names. (Similarly for type switch.) The current wording is vague on this point. Should we be less vague and more clear about what the two different choices involve?
Addressed by the "Named Typing" proposal in SequenceType production.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Is Datatype the right name for production [54] (Draft 2001-11-28)? It may be confused with XML Schema Type 2.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
Decision by: xquery on 2002-07-17 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0329.html)
The issue is "dead", in the sense that the April draft contains text that everyone is happy with.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
How do you get strings such as single and double quote to be allowed in character strings?
<name>Ben & Jerry's</name> |
eg should doubling a quote escape it?
It would seem that we need to allow these CharRef's in string literals as well.
Input from Andrew Eisenberg:
XPath TF Meeting #91 suggested closing issue 213. Issue 213 has the title "syntax-special-characters: How to get quotes etc in string literals?" Perhaps we have focused on the quotes, and not the "etc." I might want to construct an element as follows (where ™ represents the trademark symbol "?"): <company name='Ben & Jerry's ™'> ... </company> To write this as a ComputedElementConstructor, I would have to write to following: element company { attribute name { 'Ben & Jerry''s ', xf:codepoints-to-string(8482) } ... } To pass this string as an argument to a function I'd have to write the following: f (xf:concat ('Ben & Jerry''s ', xf:codepoints-to-string(8482))) It's rather jarring to allow CharRef in ElementContent and AttributeValueContent, but not in string literals. I suggest that we add CharRef to the content of a string literal. -- Andrew |
Input from Andrew Eisenberg:
I suggested in [1] that issue 213 should not be closed until StringLiteral supported CharRef. The discussion that followed showed me that this was not as simple as I had thought it to be. XPath that is used within an XSLT stylesheet already has CharRef's processed by an XML parser. Having XPath process them a second time (which would happen if the XPath included " &") would be both backwards incompatible and painful for users. Michael Kay brought a great deal of clarity to the discussion in [2], suggesting: > For XPath, the right solution is doubling for string quotes, and > host-language escaping rules for anything else. > > For XQuery, the two questions are > > (a) in what syntactic contexts should the XML built-in entities (e.g. <) > be allowed? > This can't be everywhere; the whole point of these is to distinguish "<" as > markup from "<" as data. Possible solutions are: > a1: everywhere that XML would allow them > a2: only in places that XQuery considers to be "character data", ie. > outside the curly braces in attribute content and element content, and in > string literals > > (b) how and where numeric Unicode escapes should be allowed. Possible > solutions are > b1: use XML-style numeric character references as in a1 above > b2: use XML-style numeric character references as in a2 above > b3: allow XML-style numeric character reference anywhere > b4: allow a different form of numeric character reference anywhere > b5: don't allow numeric character references anywhere; leave it to the > host environment > > The simplest solution is probably a2+b2, which is the status quo with the > addition of allowing CharRef in an XQuery (but not XPath) string literal. I agree with the a2+b2 solution that he proposes. This would leave the definition of String Literal as it is for XPath: [4] StringLiteral ::= ('"' (('"' '"') | [^"])* '"') | ("'" (("'" "'") | [^'])* "'") For XQuery (section 3.1.1, Literals), the definition would be changed to allow CharRef and PredefinedEntityRef: [4] StringLiteral ::= ('"' (('"' '"') | CharRef | PredefinedEntityRef | [^"])* '"') | ("'" (("'" "'") | CharRef | PredefinedEntityRef | [^'])* "'") [5] URLLiteral ::= ('"' (('"' '"') | CharRef | PredefinedEntityRef | [^"])* '"') | ("'" (("'" "'") | CharRef | PredefinedEntityRef | [^'])* "'") The editors may wish to add the following example: "€50 " denotes the string containing the characters 'Ç', '5', and '0'. This would allow an element with attribute value "Ben & Jerry's?" to be created as follows: <company name='Ben & Jerry's ™'> ... </company> Expressed as computed constructor, this element could be written as: element company { attribute name {'Ben & Jerry's ™'} } In XSLT, a user could write the following: <company name="{'Ben & Jerry''s ™'}"/> The use of "'" would have caused an error, because XML processing would have left XPath to interpret 'Ben & Jerry's?'. Michael Rys suggested in [3] that: > I think there is a b6: > B1+allow a different form of numeric character reference (\unnnnnn) in > XQuery string literals. This could not be done for XPath without introducing a backward incompatibility. This could be done for XQuery only, but it would introduce a syntax different from what we have for element constructor and computed element constructor. The example above would now be written as: element company { attribute name {'Ben \u000026 Jerry\u000027s \u008482'} } Michael's suggestion would, admittedly, simplify the process of embedding an XQuery within an XML document. -- Andrew [1] http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0400.html [2] http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0454.html [3] http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0456.html -------------------- Andrew Eisenberg IBM 5 Technology Park Drive Westford, MA 01886 andrew.eisenberg@us.ibm.com Phone: 978-399-5158 Fax: 978-399-5117 |
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
The XPath TF believes that it is fixed as far as XPath is concerned. Doubled quotes are allowed. CharRef is a query-specific problem, and is subsumed by other issues.
Decision by: xquery on 2002-11-27 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0007.html) Issue will be closed with no change to Xpath and Xquery will adopt solutions A2 and B2.
Behavior of strings between quotes in attributes is different from that in string literals - should they be unified?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decided: no. "{" and "}" are good examples of characters that should be treated differently. We've discussed this extensively, with no enthusiasm for unification.
Should we have a 3-valued form of quantifiers?
QuantifiedExpr is defined as being two-valued, while SQL's is 3-valued. SQL would evaluate 5 >ALL (6, null, 7) as UNKNOWN. XQuery would return FALSE where SQL returns UNKNOWN.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Not for XPath 2.0/XQuery 1.0.
The description of the focus is very procedural. Given that we define a declarative language this worries me quite a bit. Can this be written in a more declarative manner?
Decision by: xpath-tf on 2002-07-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jul/0455.html)
Decision by: xquery on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
Decision by: xsl on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
The current definition of context documents may be difficult to implement in an efficient manner. Should this definition be simplified? Is this definition needed at all?
Decision by: xpath-tf on 2002-07-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jul/0455.html)
Decision by: xquery on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
Decision by: xsl on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
The definition of context document has been removed.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Do we need wildcards for only elements and attributes whose namespace URI is null? Are there other wildcards that should be supported?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
We don't think any requirement has been demonstrated for such functionality. It can all be achieved reasonably easily with predicates, for example
select="*[namespace-uri(.)=''] |
We also don't think that at this stage we should be leaving open issues that merely conjecture a possible requirement. We finished the requirements stage a long time ago. If someone has a specific use case that is currently problematic, they can bring it forward. In the absence of a specific proposal, this issue is closed with no change to the document.
XQuery must specify how namespaces are handled in the context.
Note that:
1. An unprefixed element name used as a nametest in a query has the namespaceURI associated with the default element namespace from the context.
Note: we may decide that this is the same as the default namespace of the in-scope namespaces, but this is not certain.
2. An unprefixed attribute has a null namespaceURI
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. Unprefixed element names are considered to be in the default element namespace. Unprefixed attribute names are considered to be in no namespace. These rules are documented in XQuery Section 4.1. It is noted that attribute names may occur in the following places, and are handled uniformly: (1) Name test in path expression on attribute axis, (2) Attribute constructor; (3)Attribute within an element constructor.
Should there be a way to explicitly sort in document order?
Subsumed by F&O issue 66.
Should namespace prefixes apply equally to nametests, element and attribute construction, variables, and functions? Consider the following example:
<foo xmlns:bar="http://www.foo.com"> { bar:sort(1,2,3) } </foo> |
Is bar:sort() in the namespace defined by the xmlns attribute?
Decision by: xpath-tf on 2002-01-15 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jan/0164.html)
Decision by: xquery on 2002-01-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jan/0304.html)
Decision by: xsl on 2002-01-22 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Jan/0067.html)
Acceptance of text in December 2001 published Working Draft.
Should we allow redefinition of namespace prefixes using NAMESPACE declarations in order to allow query system defaults that can be overridden by user? What are the interoperability issues of this?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decided to accept status quo: Namespace declaration attributes may redefine a namespace prefix within a given scope.
Should we allow external functions to be defined using a syntax like this?
[71a] ExternalFnDef ::= {"define" S "external" S "function"} QName "(" ParamList? ")" ("returns" Datatype)? |
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Decided to adopt 1B and 2A in proposal for issue #xquery-module-syntax.
Would we prefer a syntax that requires explicit declaration of a general type when a function is to be loosely typed, rather than use the current syntax in which the type is omitted when the function is untyped.
Decision by: xquery on 2003-02-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0242.html)
Decided that the default is item*.
The binding of a variable in an expression always overrides any in-scope binding of a variable with the same name". In XSLT, it is an error to declare a (local) variable if another local variable with the same name is already in scope. This rule has proved useful in catching many user errors, particularly where users misunderstand the nature of XPath variables and think that a second declaration behaves like an assignment statement. I would prefer it to be an error to declare a variable if a variable of that name is already in scope. Also, the scope of variables has not been defined with very great precision, it's not explicitly clear what
for $i ........return for $i in // X, $j in $i/z return .... |
means: which $i does this refer to?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html) It has since been found that the XQuery minutes are in error and that the resolution was NOT approved.
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html) Finding that the XQuery minutes were in error the XSL WG decided in the 2002-10-16 meeting to withdraw approval of the resolution to issue 225.
Decided to accept status quo - permitting this.
Decision by: xsl on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
Decision by: xquery on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
Decision to accept status quo; permit redefinition.
Do we want to require implementations to test all pairs in order to determine if there is an incomparable value? Note that there are three choices: return true if any pair that satisfies the condition is encountered, return error on incomparable, or permit implementations to define what to do if both a true comparison and an incomparable pair are encountered. Should static and dynamic semantics handle this differently?
Decision by: xquery on 2002-09-04 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0078.html)
Decision by: xsl on 2002-10-03 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0025.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo - allowing short-circuiting.
What syntax should be used for dereference? In addition to the => syntax described in the document, here are two alternative approaches: (a) Treat dereferencing as an axis; (b) Simply use id(.) in a general step, with no special syntax.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Issue closed, with no change to the specification.
We no longer have a "=>" operator, and we do not have a semantic function that is in need of new syntax. We decided not to include this in XPath 2.0 or XQuery 1.0.
The ability to use id(.) in a step is there, it needs no changes to the document.
The question was raised of whether the Query WG and F&O TF have 1) a good rationale for putting built-in functions in a namespace, and 2) a consistent story about how this will relate to default namespace declarations and user-defined functions.
It would seem odd to have to have all user defined functions put in the FandO namespace if a namespace is not declared for it. If you do not do that, then user defined functions that don't require a prefix will not match the QName.
And, if there is not a good rational that provides user benifits, then it seems like we are going through a lot of additional complexity for little or no benefit.
Cf. Do functions in the null namespace clash with functions in the default namespace?
Input from Kristoffer Rose:
Decision by: xquery on 2003-01-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0435.html)Unqualified, user-defined functions are placed in the default namespace for the scope of the query *only*.
Decision by: xsl on 2003-01-16 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Jan/0046.html)
This issue is identical to XSLT issue 155. Decision:
- no controls on default function namespace
- XSLT functions are in F&O namespace
- User defined function must be in a namespace
Decision by: xpath-tf on 2003-05-14 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003May/0037.html)
1. Propose to require (in XQuery) that all user-defined functions be defined in a namespace.
2. Provide built-in namespace prefix (local, xql, ...) so that user is not required to define function namespace in every query.
E.g., define function local:test () { }
Benefits
* Simplifies rules for resolving unprefixed function and type names ALOT!
* Aligns with XSLT, which requires all functions be defined in some namespace.
Decision by: xsl on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F, accepting XPath TF proposal
Decision by: xquery on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F, accepting XPath TF proposal
Summary of things needed:
No necessary change to the grammar.
But other change is that if somebody chooses the fn namespace as default, other implementation-defined functions have to be prefixed.
We have to add the constraints on where you can put your functions (which URIs you can add them to).
We have to define "local" (have a mapping in the language document between chosen prefix and corresponding URI)
And, we have to change the Use Cases accordingly.
Do we need both << and precedes?
Decision by: xpath-tf on 2002-07-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jul/0455.html)
Decision by: xsl on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0692.html)(joint meeting)
Decision by: xquery on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Jul/0692.html)(joint meeting)
"precedes" and "follows" operators deleted.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Is "/" and the context document adequate for multiple documents?
Decision by: xpath-tf on 2002-07-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jul/0455.html)
Decision by: xquery on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
Decision by: xsl on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
Access is provided to multiple documents using a different mechanism, specifically the input() and collection() functions.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
What is the result of applying the data() function on a SimpleValue? Is it an error, is it a no-op, or is it a type exception with a fallback?
Decision by: xpath-tf on 2001-12-18 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2001Dec/0128.html)
Decision by: xquery on 2001-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2001Dec/0150.html)
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Reaffirming the XPath TF telcon 2002-04-30 view.
Decision by: xsl on 2002-06-27 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Jun/0037.html)
data() applied to simple value is identity function (no-op). Rationale: does not require special 'fallback' behavior and if we resolve Issue 0172 so that data is defined on node sequences, then for consistency, it should be defined on heterogeneous sequences. Still waiting on general proposal for Issue 172.
At the XPath TF telcon 2002-04-30 it was noted that the current documents do not reflect the resolution, as recorded in our issues list. The documents need to be modified accordingly.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Should we use the operators + - on dates and durations, when addition of dates is not associative or commutative?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Agreed to close this issue with no change to documents.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Closed with no change to document.
Now that we have keywords, should we return to the simpler syntax?
FLWRExpr ::= (ForClause | LetClause | WhereClause)* "return" Expr |
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Decided NOT to adopt a simpler syntax.
2.10, + Point 5 (Draft 2001-11-28). If we don't adopt Plil W's proposal in Point 1, then there should be an Issue as to whether the behaviour should be specified by the user, or the vendor. One option is to let the user specify that () sorts high, low, or either, in the latter case the vendor decides.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo.
Now that we have keywords, do we need parentheses in the conditional expression?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Recommendation to drop the "then".
Subsequently some problems and differing views were expressed. The discussions will continue.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Closed with no change to document.
Issue as to whether SimpleType (was BuiltInType) might be preceded by a keyword. Now that we have "element of type" it seems natural to use "type" to preced SimpleType, possible generalizing to also allow a complex type.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
This particular issue with SequenceType has been solved, issue closed with no modification to the document.
Now that we have keywords, do we need parentheses in the type switch expression?
Decision by: xquery on 2003-01-15 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0215.html)Joint F2F
Closed with no action because we need parenthesis because of no reserved word.
Consistent tradeoff between interoperability and efficiency. There are a number of places where XQuery must choose between pinning down precise behaviour or offering flexibility to the implementor. These include whether order in "for" expressions is significant, whether sorting is stable, whether order is significant for duplicate elimination, whether order is significant when finding the union, merge, except of sequences of values, and the like. We should have a consistent policy for making these choices.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Closed with no change to document.
Consistent bracketing of nested expressions. Some nested expressions are surrounded by parentheses (treat, cast, assert), some nested expressions are surrounded by braces (element construction, function body), and some nested expressions are not bracketed (for expression, conditional expression). We should have a consistent policy for bracketing of nested expressions.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Closed with no change to document.
Consistent parenthesizing of test expressions. Some test expressions are surrounded by parentheses (conditional, type switch) and some are not (where). We should have a consistent policy for parenthesizing of test expressions.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Closed with no change to document.
Consistent keywords. Some keywords concatenate two words "sortby", "typeswitch", while others are multiple words "element" "of" "type", "cast" "as", "instance" "of". We should have a consistent policy for keywords.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
We have decided to go with multi-word keywords. Close the issue as "done". Typeswitch is an exception.
I was unable to find the semantics of what happens of sortby tries to order based on a base type that only has partial order (e.g., Duration). Can we explicitly disallow this?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. Issue covered by the following rule in the XQuery document section 3.8.3 Order By and Return Clauses:
- Each orderspec must return values of the same type for all tuples in the tuple stream, and this type must be a (possibly optional) atomic type for which the gt operator is defined--otherwise, a dynamic error is raised.
Provide an example of
(employee sortby data(salary))/name |
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to leave this to editorial discretion.
What are the semantics of CDATA sections in XQuery? Are they preserved in the data model for serialization?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Decided to close, with document changes as described by Mike Kay in http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0095.html, including editorial comments.
In attribute definitions, "{a}" will be interpreted as expression a returning the value for the attribute. Is this also the case for texts in general (inside an element construction)?
Decision by: xsl on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
Decision by: xquery on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
Yes it will be evaluated, for example in:
<a>this is {@color} text</a>
Nested XQuery comments allowed?
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Permit nested comments. Use "(:" and ":)" syntax.
What is effect of default namespace declarations on unprefixed QNames that may occur in element constructors, attribute constructors, and name tests (or anywhere else).
In XPath 1.0, in-scope namespace decls effect prefixed QNames, but default namespace decl does not effect unprefixed names in a name test. In XSLT 2.0, we introduced multiple default namespace decls :one for constructed elements, one for names in xpath expressions.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decided to accept status quo:
- default element namespace defines a namespace URI that is associated with unprefixed names of elements and types.
- default function namespace defines a namespace URI that is associated with unprefixed names of functions.
> The question, for me, is whether it belongs to the minimum required to > declare victory. I suspect that it does not. It (evaluate) is one of the most requested (and widely implemented) extensions in current xpath 1.0 implementations. If Xpath2 adds useful new functionality in the area of type checking and schema support but doesn't address many of the main issues raised by existing xpath1 users (evaluate, higher order functions, regexps, ...) then I don't think that victory can be declared. I think it's reasonable that the current set of drafts have concentrated on the newer features and the merge with Xquery but that's the first draft it isn't enough to "declare victory". David [Carlisle] |
XSLT decided not to support eval() in Version 2.0.
Should these be included in XPath 2.0?
Input from Dimitre Novatchev:
Input from Phil Wadler:
Date: Tue, 29 Jan 2002 11:29:46 -0500 From: Philip Wadler <wadler@research.avayalabs.com> Subject: Higher-order functions I love higher-order functions. But here are some reasons why we should postpone including them in XPath 2.0 and XQuery 1.0. -- P 1. Typing. Higher-order functions require an extension to the type system. Schema has no support for higher-order functions, so this would be at odds with our desire to make our type system as close to Schema as possible. 2. Data model. Do we allow functions to be stored in data values? This greatly extends the value of higher-order functions. It is what is usually done in functional languages. Support of this would require significant change in our data model. 3. Optimization. Optimizing a higher-order function usually requires some form of inlining. The functional programming community has a lot of experience in decing when to inline and when not to inline, it is something of a fine art. It is not particularly hard to do such optimizations, but this is probably not where we want early implementors to put their effort. |
Functions in a function library often need to access the same variables. For instance, a function library that manipulates a grammar may need to use the following variables in many functions:
$grammar := document("xpath-grammar.xml")/g:grammar $target := "xquery" |
One possible syntax for this is:
'define' ''variable' varname ':=' expr |
The above production would occur only in the prolog.
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Decided to adopt 1B and 2A in proposal for issue #xquery-module-syntax.
Consider this query:
for $x in /books/book, $y in /reviews/review where $x/isbn = $y/isbn return <newbook>{ $x/title, $x/author, $y/reviewer }</newbook> sortby isbn |
This is an error, since isbn doesn't appear in newbook. (The static type system would catch this error.) What you have to write is
for $z in for $x in book, $y in review where $x/isbn = $y/isbn return <dummy>{ $x/title, $x/author, $y/reviewer, $x/isbn }</dummy> sortby isbn return <newbook>{ $z/title, $z/author, $z/reviewer }</newbook> |
This is painful.
I think that XQuery should support this syntax, or something similar:
for $x in book, $y in review where $x/isbn = $y/isbn sortby $x/isbn return <newbook>{ $x/title, $x/author, $y/reviewer }</newbook> |
Our plate is full with more important matters just now, but I hope we could fix this before we finalize XQuery.
Decision by: xquery on 2002-09-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0236.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)Confirming that there are no concerns for the resolution of this XQuery only issue.
Resolved by the adoption of the proposal to add "orderby" to the FLWR expression and to drop the previous "sortby" syntax.
By the way, why is it "sortby"? Since we changed "instanceof" to "instance of", shouldn't we change "sortby" to "sort by"?
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
No change to document. THis is already decided (we have "order by").
Given the expression:
cast as xsd:decimal(//element_string [3]) div cast as xsd:decimal("+1.25000000") |
and a type of ELEMENT element_decimal [xsd:string] for the element_string nodes, our current cast rules disallow the cast of the element node to a value, since the above expression would be translated into:
data(cast as xsd:decimal(//element_string [3])) div cast as xsd:decimal("+1.25000000") |
instead of (the user expected):
cast as xsd:decimal(data(//element_string [3])) div cast as xsd:decimal("+1.25000000") |
Could we change the casting rules to allow the above?
We could either add a rule that pushes data() into cast expressions or have a special rule for casting to simple value types that implies applying data() in the casted expression (similar to arithmetic expressions).
Addressed by the "Named Typing" proposal: XQuery Section 2.13 cast does data extraction.
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
Current grammar documents lexical states and maps directly to tool we use. An alternative is to use an alternative grammar and document lexical states with the tool separately.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept the current approach in the XPath/XQuery documents.
User defines a derived type, what operators are inherited by that type. SQL has a concept of distinct type. A distinct type does not inherit the operastors on the base type. XQuery in F&O does the opposite. All operations on the base type are inherited.
Input from Don Chamberlin:
Input from Don Chamberlin:
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
This has been discussed and the decision taken to be different from SQL. Issue closed with no document change.
MR: Why does collection() return item*. I want document*.
JR: You can specify what you want. You have to accept a URI and what you return is implementation dependent.
SCA: Strawpoll. 5 item*, 3 document*. No one cannot live with item*
Can an implementation provide a more specific return type than item* and still be a conforming implementation?
Some discussion. No consensus.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: xf:collection(string $srcval) => node*
Does collection() always return same result for the same URI? The same within the scope of a query/transformation? Are the nodes in the sequence identical?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
It should return the same answer every time. Applies also to input(). We should use the same language as we use for document() and for current-dateTime().
Consider the following query:
if (document("foo.com") == document("foo.com")) then <yep/> else <nope/> |
I would like the following output:
<yep/> |
I think we can achieve this if we say that the URI of a resource is used as its identity. However, one resource can be identified by more than one URI. Suppose that "foo.com/here/there/hi.xml" and "file://c:/temp/limerick-tei.xml" refer to the same resource. What does the following return?
if (document("foo.com/here/there/hi.xml") == document("file://c:/temp/limerick-tei.xml")) then <yep/> else <nope/> |
Should we simply use the URI of the parameter to establish identity and say that the two do not match? Should we make the result implementation-dependent?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
This is already covered by the existing spec, but we may want to review the language as part of the actions for issue 257.
Currently, the arithmetic operation rules in [1] say:
The operands of an arithmetic expression do not have required types. An arithmetic expression is evaluated by applying the following rules, in order, until an error is raised or a value is computed:
1. If any operand is a sequence of length greater than one, a type exception is raised.
2. If any operand is an empty sequence, the result is an empty sequence.
3. If any operand is a node, its typed-value accessor is applied. If the node has no typed-value accessor, or if the typed-value accessor returns a sequence of more than one value, an error is raised. If the typed-value accessor returns the empty sequence, the result of the expression is the empty sequence.
4. If any operand is an untyped simple value (such as character data in a schemaless document), it is cast to the type suggested by its lexical form. For example, the untyped value 12 is cast to the type xs:integer.
5. If the arithmetic expression has two numeric operands of different types, one of the operands is promoted to the type of the other operand, following the promotion rules in [XQuery 1.0 and XPath 2.0 Functions and Operators]. For example, a value of type xs:integer can be promoted to xs:decimal, and a value of type xs:decimal can be promoted to xs:double.
6. If the operand type(s) are valid for the given operator, the operator is applied to the operand(s), resulting in either a simple value or an error (for example, an error might result from dividing by zero.) The combinations of simple types that are accepted by the various arithmetic operators, and their respective result types, are listed in [XQuery 1.0 and XPath 2.0 Functions and Operators]. If the operand type(s) are not valid for the given operator, a type exception is raised.
Rule 4 cannot be efficiently implemented and basically would defer any algebrization of the operation to the runtime when the value is actually available to make this decision. Not even XPath 1.0 had such an impossible rule. (see also Mary's reply in [2])
Instead, I would like to align this with the rules of comparison operators in the following way:
The untyped simple value is cast to the type of the other operand.
If both operands are untyped, they are cast to double (in analogy to the XPath 1.0 number conversion).
E.g.,
unknownSimpleType + xsd:decimal will become cast as xsd:decimal (unknownSimpleType) + xsd:decimal. unknownSimpleType + unknownSimpleType will be cast as xsd:double (unknownSimpleType) + cast as xsd:double (unknownSimpleType). |
Another proposal was provided by Michael Kay in [3] that however relays on the not yet introduced type numeric [4], thus I think we should follow the rule above (which is basically the same as we do for comparisons).
[1] http://www.w3.org/TR/xquery/#id-arithmetic
[2] http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Feb/0029.html
[3] http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Feb/0021.html
[4] http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Feb/0067.html
I have been tasked with rewording the sections 2.5 and 2.6.1 in [1] with two proposed solutions for implicit treatment of unknown simple types (UST) with arithmetic and comparison operators based on my earlier proposal in [2] and a subsequent simplification discussed at today's XPath TF call. The rewording should also refer to the basic conversion rules that are defined in [1] Section 2.1 as: The basic conversion rules are as follows: If the required type is a simple type or an optional occurrence of a simple type: If the given value is a sequence of more than one item, a type exception is invoked. If the given value is a single node, its typed value is extracted by calling its typed value accessor. If the node has no typed value accessor or if its typed value is a sequence containing more than one item, a type exception is invoked. If the (given or extracted) value has an unknown simple type (as in the case of character data in a schemaless document), an attempt is made to cast it to the required simple type. If the cast fails, a type exception is invoked. If the (given or extracted) value does not conform to the required type, a type exception is raised. This includes the case in which the (given or extracted) value is an empty sequence and the required type is not an optional occurrence. If the required type is a sequence of a simple type: If the given value is a sequence containing one or more nodes, each such node is replaced by its typed value, resulting in a sequence of simple values. Each of these simple values then is converted to the required type by applying the rules described above for converting values to a required simple type. If the required type is a sequence of nodes: If the given value contains any item that is not a node, a type exception is invoked. In addition, I assume that numeric and numeric types are well-defined terms referring to the set of types double, float, decimal and all their subtypes (derived by restriction). ******************************************** Proposal I: Rewrite to treat UST as double if operating with numeric types ******************************************** 2.5 Arithmetic Expressions <leave as is until "For example, a-b will be interpreted as a single token."/> An arithmetic expression is evaluated by applying the following rules that are based on the basic conversion rules, in order, until an error is raised or a value is computed: The required types of the operands of an arithmetic expression do not have required types. 1. If any operand is a sequence of length greater than one, a type exception is raised (applying the basic conversion rule to each argument). 2. If any operand is an empty sequence, the result is an empty sequence(applying the basic conversion rule to each argument). 3. If any operand is a node, its typed-value accessor is applied. If the node has no typed-value accessor, or if the typed-value accessor returns a sequence of more than one value, an error is raised. If the typed-value accessor returns the empty sequence, the result of the expression is the empty sequence. (applying the basic conversion rule to each argument). 4. If any or both operands are an untyped simple value (such as character data in a schemaless document), the basic conversion rule is applied and the required type is xs:double. Thus an untyped simple value is cast to type xs:double. 5. If the arithmetic expression has two numeric operands of different types, one of the operands is promoted to the type of the other operand, following the promotion rules in [XQuery 1.0 and XPath 2.0 Functions and Operators]. For example, a value of type xs:integer can be promoted to xs:decimal, and a value of type xs:decimal can be promoted to xs:double. This is an extension to the basic conversion rule. 6. If the operand type(s) are valid for the given operator, the operator is applied to the operand(s), resulting in either a simple value or an error (for example, an error might result from dividing by zero.) The combinations of simple types that are accepted by the various arithmetic operators, and their respective result types, are listed in [XQuery 1.0 and XPath 2.0 Functions and Operators]. If the operand type(s) are not valid for the given operator, a type exception is raised. Ed. Note: A future version of this document will provide a mapping from the arithmetic operators to the functions that implement these operators for various datatypes. See issue 182. Here are some examples of arithmetic expressions: In general, arithmetic operations on numeric values result in numeric values: <rest stays the same/> 2.6.1 Value Comparisons Value comparisons are intended for comparing single values. The result of a value comparison is defined by applying the following rules, based on the basic conversion rules, in order: 1. If either operand is an empty sequence, the result is an empty sequence. 2. If either operand is a sequence containing more than one item, an error is raised. 3. If either operand is a node, its typed value is extracted. If the typed value is an empty sequence, the result of the comparison is an empty sequence. If the typed value is a sequence containing more than one item, an error is raised. 4. If one of the operands is an untyped simple value (such as character data in a schemaless document) and the other operand is a typed simple value, the required type for casting the untyped simple value is determined by the type of the other operands as follows: - if the type is of the other operand is numeric the required type becomes xs:double. - if the type of the other operand is unknown, then the required type for both becomes xs:string. - otherwise the type of the other operand becomes the required type. 5. The result of the comparison is true if the value of the first operand is (equal, not equal, less than, less than or equal, greater than, greater than or equal) to the value of the second operand; otherwise the result of the comparison is false. [XQuery 1.0 and XPath 2.0 Functions and Operators] describes which combinations of simple types are comparable, and how comparisons are performed on values of various types. If the value of the first operand is not comparable with the value of the second operand, a type exception is invoked. Ed. Note: A future version of this document will provide a mapping from the comparison operators to the functions that implement these operators for various datatypes. See issue 182. Here is an example of a value comparison: The following comparison is true only if $book1 has a single author subelement and its value is "Kennedy": $book1/author eq "Kennedy" ******************************************** Proposal II: Rewrite to treat UST as the other numeric type ******************************************** 2.5 Arithmetic Expressions Change Proposal I Rule 4 to: 4. If of the operands is an untyped simple value (such as character data in a schemaless document), the basic conversion rule is applied and the required type is set based on the type of the other operand: - the required type for both operands becomes xs:double if the type of the other operand is unknown - otherwise the required type becomes the type of the other operand. Thus an untyped simple value added to a float is cast to type xs:float. 2.6.1 Value Comparisons Change Proposal I Rule 4 to: 4. If one of the operands is an untyped simple value (such as character data in a schemaless document) and the other operand is a typed simple value, the required type for casting the untyped simple value is determined by the type of the other operands as follows: - if the type of the other operand is unknown, then the required type for both becomes xs:string. - otherwise the type of the other operand becomes the required type. ******** Analysis ******** The advantage of proposal I is that it is closer to the known XPath behaviour (although as Peter pointed out not the same), it is simpler to explain and implement and allows expressions where the UST value is a double and an operation combines it with a type based on decimal that would lead to runtime errors in case II. Based on extensive discussions with my constituency, users and implementers alike, this seemed to be the preferred solution. The disadvantage is a slight loss of type precision on the result that can be regained by explicitly casting the result or operands to the desired type. Best regards Michael [1] http://www.w3.org/TR/xquery/ [2] http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0037.html |
Decision by: xquery on 2002-03-27 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Mar/0478.html) XML Query WG has adopted a solution to Issues 259 and 91 as per Proposal 1 in Michael Rys' proposal.
Decision by: xsl on 2002-03-28 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Mar/0084.html)
Decision by: xpath-tf on 2002-04-30 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0201.html) Verifying that text is in current draft.
Decision by: xquery on 2002-05-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002May/0241.html)Independent verification.
Does expr instance of type define an expected type with type so that data() is implied explicitly on:
let $e := <e xsi:type=?xsd:integer?/> return $e instanceof xsd:integer |
is that
let $e := <e xsi:type=?xsd:integer?/> return data($e) instanceof xsd:integer |
and thus true or false?
This issue is somewhat related to CAST (Issue 253), but since we perform a type test here, I would argue that we should not.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo, which is also the recommendation made in the issue.
We currently say that in a constant string in XQuery, I can do any of the following three to escape quotes (please correct if I am wrong):
A. XQuery rule (works both in XQuery only and XQuery in XML embedding): quotes and double quotes are doubled if they are enclosed inside their own kind.
E.g.,
Lexical Value in datamodel '"' " '''' ' """" " '""' "" |
B. XML rules (work only in XQuery in XML embedding since XML parser will work:
B1. Use ' when string delimiter is " and viceversa. This of course does not preserve data fidelity, so if the difference between them is important, you will need to use B2.
B2. Entitize
I assume that I cannot do just B, but that I have to use B to get A. E.g., <a foo="""/> in an XML document is not a valid XQuery and I have to write <a foo=""""/>
The problem that I have is that I do not know what the rules are for nesting quotes inside XQuery expressions:
What are the rules for:
<foo bar="{fnc1(<baz goo="{fnc2("string arg")}"/>)}"/> |
Do I have to double and then triple? Does {} mean that the outside "" become inconsequential?
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Closed with no action. Double quotes are only meaningful inside string literals. A clarifying example to be added to the text.
An alternative definition of data() on elements with known complex type:
If $e is an element of an known (complex) type, then data($e) evaluates to the concatenation of $e's text nodes and has UnknownSimpleType.
This definition is appropriate when explicit casts are necessary to convert UnknownSimpleType to other atomic types, i.e., when the basic conversion rules *DO NOT* implicitly convert UnknownSimpleType to other atomic types.
The benefit of this alternative is that a user can always safely apply data() to any node and is guaranteed never to get an error.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo, which is to raise an error.
The the data() function is only defined on element and attributes with a simple type. The definition of data() on other kinds of nodes or on element and attributes with unknown type is still an open issue.
The corresponding issue in the Formal Semantics document is Issue-108.
Decision by: xpath-tf on 2002-04-11 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Apr/0087.html)
xf:data(): decided that it should return the error object when applied to document, PI, comment and namespace nodes.
This change should be reflected in the F&O, XPath and Data Model document.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
XSLT does not allow a local variable to be declared if there is already a local variable in scope with the same name. For example, the following is disallowed:
<xsl:variable name="i" select="0"/> <xsl:for-each select="item"> <xsl:variable name="i" select="$i + 1"/> <a><xsl:value-of select="$i"/></a> </xsl:for-each> |
This restriction has proved with experience to be a good thing, because users writing a construct such as the one above have almost invariably misunderstood the way variables work in a declarative language; if the construct were allowed, it would not give them the results they expect.
The equivalent XQuery expression is currently allowed:
let $i := 0 for $x in item let $i := $i + 1 return <a>{$i}</a> |
XPath 2.0 has no "let" expression, but it can include variable declarations, and these are allowed to shadow each other.
For XSLT users, it seems inconsistent that there should be different rules in XSLT and in XPath. The XSLT 1.0 rule, which makes variable shadowing an error, has proved useful in practice and we recommend that it should be adopted also for XPath 2.0 and XQuery 1.0.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Closed with no change to document.
How do we determine the xml:lang for a node if it inherits xml:lang from a higher-level node?
Decision by: xquery on 2003-02-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0242.html)
Decided to close issue with no change to documents, since user-written expressions or functions can determine the value of xml:lang that a node inherits.
Do we support the sublanguage portion of xml:lang? If so, how?
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
A user-written expression of function has to determine the value of xml:lang and then do the appropriate analysis of the value. No change to document.
If "validate" is in XPath the "{}" in the syntax conflicts with the current use in XPath. It needs to change to use "()" instead.
Decision by: x-editors on 2002-10-02 (http://lists.w3.org/Archives/Member/w3c-query-editors/2002Oct/0007.html)
Scott: We can close this because {} does not create a problem.
Decision by: xsl on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
Decision by: xquery on 2002-10-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0379.html)Joint f2f
It has been confirmed that there are no problems, example:
<e a="{(validate {bookdoc})/title}"/>
Should we simplify the relationship between xsd:string and the anySimpleType'd data to have them both behave the same operationally by providing implicit coercions and being type compatible?
Alternate, in some peoples view mutually exclusive, issue:
Should we simplify the relationship between xsd:string and the anySimpleType'd data to have them both behave the same operationally by disallowing implicit coercions on anySimpleType and being type compatible?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Only in backwards compatibility mode do they behave in the same way. Otherwise they are and will be different. Issue closed with no change to document.
Can we get rid of the unknown keyword?
Input from Michael Rys:
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept the current language: 'untyped' is used to refer to items whose most specific type is xs:anySimpleType or xs:anyType. Note that when the required type is xs:anySimpleType or xs:anyType, SequenceType matching will match any instance derived from these types; for 'unknown', it will not.
One difficulty in designing XQuery is that it must meet the needs of two quite different constituencies:
Convenient: Quickly write queries to explore a large body of data. Works best with implicit coercions and dynamic typing.
Reliable: Solidly engineer queries for web services. Works best with explicit coercions and static typing.
We've already agreed to have two conformance levels, one with dynamic typing and one with static typing. Perhaps the dynamic typing level should have implicit coercions and the explicit typing level should have explicit coercions.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept the current XQuery section on conformance.
Currently the formal semantics maps arithmetic and comparison operations that have union types as (at least of one of) their argument types to a runtime type switch. This has serious unwanted consequences for "algebraization" of queries and optimization and leads to some surprising static typing results.
Should we make non-promotable union types on such operations a type error instead?
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Closed with no change to document; the issue is now moot.
The ability to call external functions is an established feature of XSLT 1.0, and is retained in XSLT 2.0. The facility is widely used, and some significant libraries of external functions have been developed by third parties. We made an attempt to standardize language bindings for external functions in the XSLT 1.1 working draft, but this proved highly controversial and has been dropped. The facility remains, however, even though the binding mechanisms remain implementation-defined.
The XPath 2.0 specification continues to tolerate external functions, though it doesn't really acknowledge their existence properly. All we say is that the repertoire of functions that can be called is part of the context.
The issue is: should the function function-available() function be transferred from XSLT to XPath?
This function tests whether a named function is available, and returns true if it is, and false if it isn't. A typical call is:
if (function-available('my:debug')) then my:debug('Hi!') else () |
This has two implications:
(a) a call on my:debug must not be a static error if the function is not available
(b) the names of functions (and the in-scope namespaces needed to resolve their QNames) must be available at run-time.
Logically the function-available() function has no dependencies on XSLT so it should be transferred to XPath.
Decision by: xpath-tf on 2002-12-10 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0164.html)
Proposed to resolve by stating that the XPath specification to state that at the discretion of the host language, a call to a function that is not in the static context may generate a dynamic error rather than a static error.
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
This issue is also impacted by the following decision:
Decided to adopt 1B and 2A in proposal for issue #xquery-module-syntax.
Part of the strength of external functions is that they can return objects that are outside the scope of the XPath type system. For example, a function library for performing SQL database access may have a function sql:connect() that returns an object representing a database connection. This object may be passed as an argument to calls on other functions in the SQL function library.
The way this is handled in XPath 1.0 is that the XPath specification defines four data-types, and explicitly leaves the host language free to define additional data types. We could probably live with a similar solution for XPath 2.0, but it's a fudge, and I think we ought to try and do better.
Note that the only things you can do with an external object (under the XSLT 1.0 rules) are to assign it to a variable, or pass it as the argument to another function. In practice I think implementations also allow external objects to have additional behavior, for example they might allow conversion to a string when used in a context where a string is required. I think we should leave such behavior implementation-defined rather than saying that it is always an error.
The question arises as to where external objects should fit into the type hierarchy. Should they be a top-level thing at the same level as "sequence", or should they be one level down, along with "node" and "atomic value"? I think it makes most sense to preserve the principle "everything is a sequence", which means that there are now three kinds of item: nodes, atomic values, and external objects.
Handling this rigorously sounds like quite a pervasive change to the spec, but I don't think it's as bad as it seems. I don't think we should add any language features to support external objects, with the possible exception of a keyword "external" in the type syntax so that one can test for it using "instance of". Functions and operators that work on any sequence (for example, count) should treat an external object like any other item in the sequence. Operations that expect nodes will fail if presented with an external object; operations that expect atomic values will also fail, except that implementations may define fallback conversions from external objects to atomic values.
Cf. Can (and should) keyword extensions be allowed in XQuery by equipping them with a namespace prefix?
Technically, I believe we could close the issue with no change to the documents, on the basis that the definition for the static context (in both XPath and XQuery) states: "Additional type definitions may be added to the in-scope type definitions by the language environment." I think an implementation could take this as sufficient authority to extend the type hierarchy with additional types, including types needed to represent objects returned by extension functions (such as "an SQL database connection").
Editorially, I think it would be a good idea if we state this explicitly in a Note, as follows:
NOTE: an implementation may allow function calls in a Query/Expression to bind to functions written in languages that use a different type system (these are known as "extension functions" in XSLT, "external functions" in XQuery). In this case, the way in which the arguments and results of such functions are mapped between the two type systems is implementation-defined. An implementation may define new types anywhere within the type hierarchy of the [Data Model] that are designed to facilitate interworking with other languages, for example a type that encapsulates an object returned by an external function; or it may provide mechanisms for the user to define such types.
Decision by: xpath-tf on 2003-03-11 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Mar/0206.html)
Decision by: xquery on 2003-03-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0344.html)
Proposal accepted.
The current proposed text for XQuery element constructors precludes a "text node only" implementation. Since XSL should have semantics aligned with XQuery a decision needs to be made by the XSL WG as to if this restriction is acceptable to construction in XSLT.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
It is poosible under "Alternative 1".
Should validation also check identity constraints? Note that valid identity constraints of partial documents does not imply validity of the document as a whole. The current document says that identity constraints are not checked.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept statys quo - which says it should not.
Does validation introduce new xsi:type attributes, or should xsi:type attributes introduced for validation be removed?
Note: The XPath telcon suggested that we eliminate this issue and simply say that any attributes introduced for the purpose of validation are removed as part of the validate semantics.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept statys quo - which says it does not.
Should validate introduce xsi:type to reflect type annotations that are not explicitly stated using an xsi:type in the source document?
The current draft introduces xsi:type to reflect inferred or dynamically computed types.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept statys quo - which says it does not.
Does //@xsi:type match an xsi:type attribute? Compare to xml:lang, xml:space, xmlns, which are not represented as attributes in the XML Information Set. Note, however, that xsi:type is represented as an attribute in the Infoset. Should we treat it like other special XML attributes in the Data Model?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
xsi:type (as well as xml:lang, and xml:space) are ordinary attributes and you can match on them.
Should there be any provision for a lightweight cast that does not observe facets? Phil Wadler has suggested that 'validate' be used whenever full schema validation is desired, and 'cast' be used as a lightweight validation, which can be used for either simple or complex types, but which does not supply defaults, enforce facets, or check integrity constraints. It may be easier to optimize through cast than through validate, but supporting both constructs may confuse users due to their similarity. He suggests the following syntax for these expressions:
('cast'|'validate') as SequenceType () ('cast'|'validate') 'in' ContextExpr { Expr } |
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to reject this proposal. Cast checks all facets.
XML Schema supports both atomic simple types and list simple types. Do we need to distinguish them in our grammar?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to close. We use sequences where XML Schema uses list types.
We need a way to represent the type name of untyped character data. In XML Schema, there is no one type that corresponds to this - in strict mode, elements whose content is untyped character data will have the type 'anyType' and attributes whose content is untyped character data will have the type 'anySimpleType', but this interacts in somewhat complex ways with lax and skip validation.
For now, we assume that character data may be associated with a SimpleType whose name is 'xs:unknownSimpleType'. This type does not currently exist in XML Schema, so we must coordinate with them on this issue.
If Schema does not provide a single type to represent untyped character data, we will provide a keyword for it in the ItemType production.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: For elements, this type is 'xs:anyType'; for attributes, it is 'xs:anySimpleType'.
For our Formal Semantics, it would be very helpful to have a simple type to represent all numerics. For now, we are using the SimpleType name "xs:numeric". In XML Schema terms, this would be a union type. We must coordinate with XML Schema to see if they can support this. If not, we will provide a keyword for numerics in the ItemType production.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
It would be useful if Schema had such a type, but in the meantime we can get by.
Decided to close the issue with no change to document.
Is DocumentElement necessary?
No.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: no such production.
The typing must be covered by a static interpretation. If the Formal Semantics encounters difficulties in producing the static semantics, we may need to change the dynamic semantics.
Decision by: xpath-tf on 2002-11-12 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Nov/0187.html)
Decision by: xsl on 2002-11-14 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0044.html)
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
Decision by: xsl on 2003-01-09 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Jan/0011.html)
Closed based on the adoption of the pure named typing proposal in all the books.
Is the QName that denotes type information in an element or attribute optional or required?
Cf. Type of a newly constructed element
Cf. Should all elements and attributes have type annotations?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: it is optional.
The element construction rules in 2.8 make efficient streaming of element construction difficult/impossible. For example, we execute the following expression on a stream and serialize the result in a streaming processing (such as XSLT like applications):
<foo>{"foo", "bar", if (expr) then "baz" else <baz/>}</foo>
If expr is true, then this is serialized:
<foo>foo bar baz</foo>
If expr is false, then this is serialized: <foo>foobar<baz/></foo>
The implementation must cache up the "foo" and "bar" strings, just in case a sub-element node is constructed. If not, then I must insert a space between "foo" and "bar". This seems to contradict one of our explicit use scenarios in the XML Query Requirements (section 2.5).
Decision by: xquery on 2002-09-04 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0078.html)
This issue has been addressed by the recent changes to the element constructor.
Is , a dyadic operator or (, , ,) a polyargument operator? The element construction rules seem to indicate the later, but the document is not clear. If , is a dyadic node-concatenation operation, then it would be more streamable than as an argument separator for the element constructor.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Issue closed, with no change to current document. It clearly states that it is a dyadic operator.
Unlike XSLT, attributes seem to be allowed anywhere which makes streaming implementations impossible. XSLT has the following rule:
"The following are all errors:
* Adding an attribute to an element after children have been added to it; implementations may either signal the error or ignore the attribute."
Example:
let $e := expr return <a>{<b/>, ($e/@* | $e/*)</a> |
XSLT would consider this an error. XQuery does not. This makes streaming impossible (see #element-construction-vs-streaming). Note that while the above query can easily be rewritten, there are cases (e.g. function calls) where the rewrite is not possible.
XQuery should allow implementations to disallow attribute nodes that are specified after the first child node in the sequence. It should not allow disregarding them.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. The issue is resolved by the current text in section 3.7.4.1
If the content sequence contains an attribute node following a node that is not an attribute node, an error is raised. Attribute nodes occurring at the beginning of the content sequence become attributes of the new element node.
What does XQuery do if assigning a list of element nodes to an attribute if the type of the attribute is not a list type?
Example:
<book isbn="{$i/booknum}" />: |
This query implicitly gets rewritten to: <book isbn="{data($i/booknum)}" />
What happens if there are more than one booknum elements and ISBN is untyped or not a list type?
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Atomization is applied to generate the value assigned to the attribute and subsequent validation may detect errors. A static type error may be raised by this just as it may be raised by other uses of atomization.
Close issue no change to the documents.
Does the name expression on dynamically computed names in element/attribute constructors be of type QName without implicit cast from string, QName with implicit cast from string, or string?
If the name is constructed by an expression, the expected type is xs:QName. Xs:string is in general implicitly cast to xs:QName (and xs:anyURI).
(1) In Section 3.7.1 ("Direct Element Constructors"), modify the paragraph below the first example as follows:
"Unqualified element names used in a direct element constructor are implicitly qualified by the default namespace for element names. In a direct element constructor, the name used in the end tag must exactly match the name used in the corresponding start tag (including its prefix or absence of a prefix)."
(2) In Section 3.7.2.1 ("Computed Element Constructors"), add a new first paragraph as follows:
"The name expression of a computed element constructor is processed as follows:
1. If the name expression returns a QName, that QName is used as the name of the constructed element. If the QName returned by the name expression is unqualified, the name of the constructed element is in default namespace for element names.
2. If the name expression returns a string, that string is implicitly cast to a QName by using the fn:QName-in-context function with its $use-default parameter set to True. The resulting QName is used as the name of the constructed element.
3. If the name expression does not return a QName or a string, a dynamic error is raised."
(3) In Section 3.7.2.2 ("Computed Attribute Constructors"), add a new first paragraph as follows:
"The name expression of a computed attribute constructor is processed as follows:
1. If the name expression returns a QName, that QName is used as the name of the constructed attribute. If the QName returned by the name expression is unqualified, the name of the constructed attribute is in no namespace.
2. If the name expression returns a string, that string is implicitly cast to a QName by using the fn:QName-in-context function with its $use-default parameter set to True. The resulting QName is used as the name of the constructed attribute.
3. If the name expression does not return a QName or a string, a dynamic error is raised."
Decision by: x-editors on 2003-02-05 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Feb/0010.html)
Decision by: xquery on 2003-02-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0242.html)
Recommend Don's proposal as the closure of this issue.
The current element construction treats sequences of anySimpleType values different from other simple typed values. This seems inconsistent. The document should make it clear why there is a difference. If there is a reason, is the reason good enough?
Decision by: xquery on 2003-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)
The problem identified no longer exists in our documents. Michael Rys confirms this.
Which element construction rules cover
<e>{1, 2}</e> vs <e>{1}{2}</e> |
Decision by: xquery on 2003-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)
The problem identified no longer exists in our documents. Michael Rys confirms this.
The data model cannot represent CDATA or CharRef, since the Information Set looses this information.
The XQuery document should make it clear that:
1. CDATA sections and CharRefs inside XQueries that are not embedded inside XML (which is what the XQuery document only talks about), are syntactic helps to write queries that otherwise would need entitization (in the case if CDATA sections) or a unicode input device (CharRefs).
2. Implementations can chose to use this information as serialization hints to preserve the CDATA and entitization.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Decided to close, with document changes as described by Mike Kay in http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0095.html, including editorial comments.
Should all elements and attributes have type annotations? In particular, should a newly-constructed element or attribute have a generic type annotation such as "anyType", rather than the current proposal in which it has no type annotation at all? (This is largely a cosmetic issue, about whether "anyType" should be denoted by an explicit annotation or by the absence of an annotation.)
Cf. Type of a newly constructed element
Cf. Is the QName denoting type information optional or required?
Cf. Should all elements and attributes have type annotations?
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
This has been resolved by adoption of "pure named typing". All elements and attributes now have a type annotation. So, issue closed.
The wording in section 2.8.3 needs to be aligned with Data model and F&O; 'lexical representation' needs to be defined differently and be consistent in XQuery, Datamodel, F&O. It probably needs to be string value (canonical value of integer in W3C Schema has a "." so not appropriate [or we need to have our own definition of the canonical value...]).
Decision by: xsl on 2003-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
3.7.2.4 "text node constructors", that's the one that should be aligned to "string-value".
The current Working Drafts are inconsistent in their definition of a leading slash in a path expresion. A consistent definition needs to be developed.
Decision by: xpath-tf on 2002-07-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jul/0455.html)
Decision by: xquery on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
Decision by: xsl on 2002-07-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Aug/0101.html)joint f2f, decision missing from minutes confirmed
Leading "/" on a path expression means "root(self::node())": the root node of the tree containing the context item. Note that self::node() (and therefore leading "/") raises a dynamic error if the context item is not a node.
Decision by: xquery on 2002-10-09 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0303.html) XQuery WG approves of the text in the published draft resolving the issue.
The 2002-06-24 grammar introduces the "binding" production. "assert" is removed from both XQuery and XPath. "binding" currently requires reserved words. Should "binding" be in XPath?
Several reasons NOT to include it in XPath:
- grammar
- semantics don't match function call semantics
- rarely useful
- reads oddly for range variables if (some integer $x in (1,2,"fred") satisfies $x=1)
- biggest of all, users are asking us to simplify. We will get a very adverse reaction if we make "for" expressions more complicated.
But it is worrying to have such a big split between XPath and XQuery.
Decision by: xpath-tf on 2002-11-12 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Nov/0187.html)
Decision by: xsl on 2002-11-14 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0044.html)
Decision by: xsl on 2003-01-09 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Jan/0011.html)
Closed based on the XSLT recommendation to not include type declarations in XPath.
Should we (or ask schema to) add Schema type names for sequences of homogeneous types?
If we add them now and Schema decide to add them later these would be different as the namespace for the type would be different...
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
This is no longer needed following the adoption of "Alternative 1". Issue closed with no change to document.
In the whitespce proposal the treatment of whitespace character reference is different than treatment of literal whitespace (for "compatibility with XSLT/XPath 1.0") and this does not seem to align with XML parsing.
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Closed with no further changes to the documents.
Michael Kay states:
My belief is that the specs now state clearly what happens, and that the text describing what happens was properly reviewed and agreed, and that we should therefore close the issue.
It's true that the effect is still subtly different from the effect that you would get if you first put the query through an XML parser and then through an XQuery parser. But we've now made it very close, and unless we change our parsing model to do XML parsing first (before XQuery parsing), we will never achieve 100% alignment.
Should sorting of untyped data be prohibited? This would catch some user errors.
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
This issue is closed, as the definition of order-by clause converts untyped data to string.
Must Basic XQuery support the SQL/XML mappings? One of the original purposes for Basic XQuery was support for mapping relational data, but the SQL/XML mappings would not be allowed as data in the current definition of Basic XQuery, because they contain (a) user-derived simple types, and (b) named complex types, which would result in type annotations in our data model. Since SQL/XML is the only proposed standard for relational mappings, do we need to ensure that we support it in Basic XQuery?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: it does.
Must it be possible to query arbitrary XML documents with Basic XQuery?
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: yes.
The Data Model document defines mappings from the PSV Infoset. If we decide it is essential to query arbitrary XML documents with Basic XQuery, should we define interoperable mappings that would create a representation that has no named types other than built-in XML Schema types? For instance, we might state Basic XQuery implementations map user-derived types to the nearest built-in type, do not create type annotations for named complex types.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: it should.
Should there be a way to declare in the Query Prolog which conformance features are required for processing a given query?
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Decided to close the issue with no change: no facility required.
Should the Schema Import Feature be a prerequisite for the Static Typing Feature? Mike Kay has observed that this is not technically necessary.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Decided that these are independent. Issue closed with no change to document.
Should the mapping from PSVI to Query Data Model be part of the normative language specification? (The mapping is affected by the presence or absence of the Schema Import Feature).
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Close issue: mapping already exists and is Normative).
Decision by: xquery on 2003-10-01 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Oct/0005.html)Joint telcon
Decision by: xsl on 2003-10-01 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Oct/0005.html)Joint telcon
The normativity of the mapping (and noting that it is only ONE of the ways in which a datamodel can be constructed) is reaffirmed and some adjustments to the text in the Datamodel approved.
During the analysis phase, in-scope schema definitions are derived from schemas named in Schema Import clauses.
Should there be additional in-scope schema definitions that are part of the static context? Should there be another set of in-scope schema definitions that are part of the dynamic context? What would that do to static typing? Would this interfere with interoperability?
In particular:
1. Should an environment be allowed to statically predefine schema definitions for a query? This would allow queries on fixed collections or known message types to provide strong type information without forcing users to explicitly import the corresponding schemas.
2. How does type information found dynamically in queried documents affect the query environment?
Does data() dynamically use the type information found in the instances that are queried, even when the types have not been declared in imported schemas? Note that Basic XQuery does not work properly if this is not true, since it must be able to discover the types of elements without importing their definition.
May an instance contain types that have not been imported into the static environment? If we say it may not, then schema imports are needed to query any document that contains types that are not predefined in XQuery.
May documents that are queried have different definitions for the same names? Note that solutions that dynamically load type information from a document into the in-scope schema definitions may try to introduce all such definitions into the static environment, which should cause an error according to our current rules.
If we want Basic XQuery to be able to query documents that have types that are not predefined, then data() must be able to use type information from instances. But if we want to be able to query validated documents that have different schemas this information must not be added to the static environment (or else we must find a way to add more than one schema definition for a given name to the static environment, or say that the static environment is dynamic, or....).
My tentative conclusions:
1. The in-scope schema definitions should be determined statically.
2. data() and many operators must be able to utilize the type information found in a document.
3. As a matter of convenience, it should be possible to import the schemas associated with a single document or with all documents in a collection. For instance, a syntax like the following may be useful:
import schema from collection "jdbc:datadirect:sqlserver://localhost:1433;database='airports'" |
or
import schema from document "file:///C:/projects/query/requirements/xml-spec.xsd" |
4. Implementations should be allowed to implicitly import schemas into the environment before executing a query, using any of the approved ways above.
Proposal (3): Types in Queries, Types in Documents
This proposal distinguishes the relationship between types known statically in the query and types that are discovered dynamically in documents during query processing. This version of the proposal follows the results of a telcon on the subject, as recorded in:
Re: Issue 307 Telcon: Friday, 15 Nov, 12:00 EST From: Jonathan Robie (jonathan.robie@datadirect-technologies.com) Date: Fri, Nov 15 2002 http://lists.w3.org/Archives/Member/w3c-query-editors/2002Nov/0148.html
This proposal addresses the following issue:
Issue 307 schema-types-from-input-documents: Schema Types from input documents?
And here is the proposal itself:
1. Static Types in Queries
Implementations are allowed to implicitly import schemas into the environment before executing a query. The in-scope schema definitions are determined statically, containing the built-in type definitions, any schemas imported explicitly into the query, and any schemas imported implicitly from the query environment.
In a query, it is a static error to use a name in a SequenceType production if the name is not found in the in-scope schema definitions.
2. Types in Input Documents
An input document may be accessed via an input function or via an externally defined variable that is bound to the input document by the query environment. An input document may refer to type names that have not been imported into the in-scope schema definitions, but it must not contain types that have the same names as types in the static environment, but conflicting definitions. Input functions and the query environment must promote unknown type names to the nearest type name in the in-scope schema definitions that is known to be substitutable for the unknown type name. If the unknown type name is derived from a known type by extension, list, or union, then the type name is changed to xs:anySimpleType if it is a simple type, or to xs:anyType if it is a complex type. This loses type information, but ensures that all type names in input documents are also in the in-scope schema definitions.
Note: This approach guarantees that the built-in types and the static in-scope-schema definitions are the only types found in an input document. As a result, there is no need to extend the known types when a new document is read.
Note: One ramification of this approach is that types derived by extension are not substitutable for their base types unless the schemas defining these types are imported into the query. We consider this a fair tradeoff for type safety. If people want to exploit the full type hierarchy, they need to import the schema that defines it.
Note: Mapping all the types when an input function is called is obviously an inefficient implementation strategy. Many implementations will take a different approach, but this is a simple way to specify the desired behavior.
Decision by: xquery on 2002-12-04 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0167.html) Proposal (3) accepted.
Decision by: xpath-tf on 2003-03-25 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Mar/0326.html) Revoke resolution of Issue 307. Type annotations are not "dumbed down".
Decision by: xsl on 2003-09-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Sep/0039.html)Joint telcon
Decision by: xquery on 2003-09-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Sep/0039.html)Joint telcon
Modified "Winged Horse" proposal accepted.
Decision by: xquery on 2003-09-15 (http://www.w3.org/XML/Group/2003/09/toronto-minutes.txt)Joint face to face
Decision by: xsl on 2003-09-15 (http://www.w3.org/XML/Group/2003/09/toronto-minutes.txt)Joint face to face
Reaffirming decision and amending the text slightly as recorded in RE: Revised Issue 307 Usage Scenarios for Today's Call and adding a one sentence clarification as per RE: Revised Issue 307 Usage Scenarios for Today's Call.
The Static Typing Feature is claimed to have a property called "type soundness." However, Dana says she has counterexamples to the claim of type soundness as described in this section (Section 2.4.2.3). (At least sequence type matching breaks TYPE SOUNDNESS so what else breaks it?) We need to examine the claim and make sure it is stated correctly.
Decision by: xpath-tf on 2002-11-12 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Nov/0187.html)
Decision by: xsl on 2002-11-14 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0044.html)
Decision by: xsl on 2003-01-09 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Jan/0011.html)
Closed due to the definition of type errors in language and FS books.
What should be the type of an error value? Section 2.4.3 says that it can be one item. Some people think it should be more flexible (any sequence of items), and other people think it should be less flexible (an item of a particular type). Some people think it should be an element with a well-defined structure.
Decision by: xquery on 2002-09-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Sep/0180.html)
Decision by: xsl on 2002-10-10 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Oct/0121.html)
Decided to accept status quo: Since an error item may be any item, that's the type.
What happens with the type annotation of the children of a newly constructed element? Type annotation kept or given xs:anyType.
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
Decision to accept the propsal of Phil Wadler in http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0378.html.
Decision by: xquery on 2003-01-29 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0502.html)
Decided to reopen the issue.
Decision by: xquery on 2003-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)
Decided NOT to reopen the issue.
Whitespace in an XSLT attribute value template is significant insofar as it survives the XML rules for normalization of attributes. This means that CRLF combinations and tabs are normalized to x20 spaces, unless they are written as XML character references. I think it's an open question whether XQuery wants to emulate the XML attribute normalization rules.
In XSLT,
<foo bar=" {'x'} "/> |
will produce the result <foo bar=" x "/>
while <foo bar=" "/> produces an element containing an attribute whose value is a single CR character.
If XQuery wants to reproduce this behavior exactly, then it's going to have to reproduce the XML treatment of whitespace as well as the XSLT treatment.
But whether it does so or not, I think Mary is right that
<foo bar=" {'x'} "/> |
should produce lt;foo bar=" x "/> and not <foo bar="x"/>. There is a difference between element and attribute constructors: attributes have quotes around them, and this sets a different expectation.
Decision by: xquery on 2002-12-04 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0167.html)
Confirmed that Mary's proposal for whitespace, that was accepted 2002-11-27, closes this issue.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Resolved by the recent adoption of the revised text on attribute constructors.
Merged section on errors and conformance: What to do about list types?
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Close issue no change to the documents.
Merged section on errors and conformance: What to do about union types?
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Close issue no change to the documents.
Merged section on errors and conformance: Partial support for SCHEMA IMPORT in Basic XQuery?
Clarification of issue: Basic XQuery implementations might want to add its own predefined types to the static context, but cannot do so given the current definition.
Subsumed by :conformance-levels.
The current Xquery/Xpath grammar allows a whitespace in between the '$' sign and the rest of the name of the variable. This should be forbidden.
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
Decision by: xquery on 2002-10-23 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0467.html)
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)
Decided to continue permitting space. Issue close with no change to document.
Given the following function:
define function foo(xs:anySimpleType $x) returns xs:anySimpleType {$x} |
and the untyped data
<a a="1"/><a a="2"/><a a="3"/> |
should the following be a (static or dyamic) type error or should it work?
foo(/a/@a) |
If it should work, what should the following query return?
count(data(<e>1 2</e>)) count(data(<a b="1 2"/>/@b)) |
Should it be 1 or 2?
anySimpleType is the base type of all the *primitive* XML Schema datatypes.
List and union types are *generated* (my word, Schema uses the word *derived*) from primitive types and thus, not included in anySimpleType. See the extract from the XML Schema datatypes spec below.
"[Definition:] There exists a conceptual datatype, whose name is anySimpleType, that is the simple version of the ur-type definition from [XML Schema Part 1: Structures]. anySimpleType can be considered as the *base type* of all *primitive* types. The *value space* of anySimpleType can be considered to be the *union* of the *value space*s of all *primitive* datatypes."
Thus, the function call above should result in a (static or dynamic, depending on typing conformance) type error.
The count expressions would always return 1.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decided that anySimpleType is a list one. This needs to be carried out clearly in the documents.
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
To solve issues 316 and 524 we need to do eliminate three constructor functions from F&O, and integrating with the changes described in the message: http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0021.html.
This was agreed.
Issue: XQuery has not determined what extension mechanisms might be supported. XQuery may support the following:
Cf. We need a way to declare external functions
Cf. External Objects
Cf. Can (and should) keyword extensions be allowed in XQuery by equipping them with a namespace prefix?
This proposal adds the following to the XQuery language document (in section 2.5 Errors and Conformance): 2.5.5 Extensions Conforming XQuery implementations are permitted to make two different kinds of extensions to the specifications: grammar extensions and semantic extensions. There are two types of grammar extensions: pragmas and must-understand extensions. While an XQuery implementation may support some or all of these types of extensions, this does not negate the requirement to support the XQuery functionality defined in this specification. 2.5.5.1 Pragmas A pragma may be used to provide additional information to an XQuery implementation. [x1] Pragma ::= "(::" "pragma" PragmaQName PragmaContents "::)" [x2] PragmaQName ::= ExplicitQName [x3] ExplicitQName ::= QName [x4] PragmaContents ::= .* An ExplicitQName requires that QName contain a Prefix. Pragmas may be used anywhere that ignorable whitespace is allowed, and within element content. See A.1 Lexical structure for the exact lexical states where pragmas are recognized. A pragma is identified by its PragmaQName. If an implementation does not support a pragma, then that pragma shall be ignored. If an implementation does support a pragma and the implementation determines that the PragmaContents are invalid, then a static error is raised. Otherwise, the effect of the pragma on the result of the Query is implementation-defined. The following example shows how a pragma might be used: declare namespace exq = "http://example.org/XQueryImplementation" (:: pragma exq:timeout 1000 ::) count(input()//author) An implementation that supports the exq:timeout pragma might raise a dynamic error if it is unable to count the authors within 1000 seconds. An implementation that did not support this pragma would execute as long as necessary to count the authors. 2.5.5.2 Must-Understand Extensions An implementation may extend the XQuery grammar by supporting must-understand extensions. [y1] MustUnderstandExtension ::= "(::" "extension" ExtensionQName ExtensionContents "::)" [y2] ExtensionQName ::= ExplicitQName [y3] ExtensionContents ::= .* A MustUnderstandExtension may be used anywhere that ignorable whitespace is allowed, and within element content. See A.1 Lexical structure for the exact lexical states where pragmas are recognized. A must-understand extension is identified by its ExtensionQName. If an implementation does not support a must-understand extension, then a static error is raised. If an implementation does support an must-understand extension and the implementation determines that the ExtensionContents are invalid, then a static error is raised. Otherwise, the effect of the must-understand extension on the result of the Query being executed is implementation-defined. The following example shows how a must-understand extension might be used: declare namespace exq = "http://example.org/XQueryImplementation" for $e in doc("employees.xml")//employee order by $e/lastname (:: extension exq:RightToLeft ::) return $e An implementation that supports the exq:RightToLeft must-understand extension might order the last names by examining characters from right to left instead of left to right. An implementation that did not support this must-understand extension would raise a static error. 2.5.5.3 Semantic Extensions An implementation may extend XQuery by supporting semantic extensions. A semantic extension allows a conforming Query to be processed in a non-conforming way. The way in which such semantic extensions are enabled is implementation-defined. The effect of a semantic extension on the result of a Query is implementation-defined. The following example shows how a command line might be used to enable a semantic extension: xquery q12.xquery 98 xquery q12.xquery -EmptyIdentity=on 100 The execution of the query contained in q12.xquery might treat an empty sequence as 0 when it is being used in addition and subtraction and treat it as 1 when it is being used in multiplication and division. 2.5.5.4 XQuery Flagger An XQuery Flagger is a facility that is provided by an implementation that is able to identify queries that contain extensions other than pragmas. If an implementation supports extensions other than pragmas, then an XQuery Flagger must be provided. The XQuery Flagger is disabled by default; the mechanism by which the XQuery Flagger is enabled is implementation-defined. When enabled, the XQuery Flagger will raise a static error for an otherwise valid Query that contains either must-understand extensions or semantic extensions. An XQuery Flagger is provided to assist programmers in producing queries that are portable among multiple conforming XQuery implementations. The following examples show how an XQuery Flagger might be used: xquery q10.xquery <employee> ... </employee> xquery q10.xquery -Flagger=on [static error] A must-understand extension is being used: exq:RightToLeft xquery q12.xquery -EmptyIdentity=on 100 xquery q12.xquery -EmptyIdentity=on -Flagger=on [static error] A semantic extension is being used: EmptyIdentity |
Updates to proposal:
- Usage of (:: ::) syntax.
- must-understand extension.
Decision by: xquery on 2003-03-12 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0232.html)
#1 PRAGMAS: Adopted Unanimously.
#2 MUST-UNDERSTAND EXTENSIONS: Adopted.
#3 SEMANTIC EXTENSIONS: Rejected.
#4 FLAGGER: Adopted.
Four issues were raised in a proposal to restructure sorting in XQuery [1]:
1. Should we add an 'order by' clause to FLWR?
The following syntax has been proposed:
FLWRExpr ::= (ForClause | LetClause)+ SortClause? WhereClause? "return" Expr OrderClause ::= "order by" stable? SortSpecList SortSpecList ::= Expr SortModifier ("," SortSpecList)? SortModifier ::= ("ascending" | "descending")? ("empty" "greatest" | "empty" "least")? |
The OrderClause sorts the tuple stream based on the conditions specified in the SortSpecList.
In the status quo, 'sortby' is a standalone postfix expression. FLWR is used to iterate, and 'sortby' is used to sort. This causes certain difficulties, because iteration and sorting are not distinct, unrelated operations - in general, the order in which the output sequence is ordered determines the best order to choose when iterating over the input.
When sorting data created with element constructors, it can sometimes be quite tricky to determine the original source of data in a constructed element. The more complex the expressions that construct the element, the more tricky this becomes. It is also tricky to iterate in an order determined by data that is not returned in a generated sequence.
If we add this clause, should a FLWOR expression that contains an OrderClause but no ForClause result in a semantic error, since there is no tuple stream to sort?
2. If we add an 'order by' clause, should we keep the sortby() expression, or remove it from our language?
Keeping it is convenient for some expressions. Removing it leaves us with a simpler language, and does not require us to explain to our users why we have two ways of doing the same thing.
3. How should we formalize 'order by' - or should we formalize it in Version 1.0?
The most straightforward way to formalize 'order by' is to use tuples, which do not exist in our Data Model, and these would cause significant change to our Formal Semantics. However, the semantics of 'order by' are straightforward.
Our options seem to be:
3.a. Ensure that we know how it would be formalized using tuples, but postpone including this in the Formal Semantics until after Version 1.
3.b. Refuse to add the feature unless it can be formalized with our current Data Model.
3.c. Restrict the feature to functionality easily formalized with our current Data Model.
I believe there was significant enthusiasm for 3.a. in today's telcon.
4. Is the 'order by' clause part of the XPath spec, or is it only in XQuery?
Jonathan
[1] http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Jul/0177.html
Decision by: xpath-tf on 2002-10-16 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0278.html)
'order by' has been added.
Addition of namespaces in the query prolog to the in-scope namespaces; how is this information carried through to provide input to validation?
Additional aspecs are:
(a) the whole question of how the namesapce context is affected by namespace declarations in element constructors
(b) the general notion (in XQuery, specifically), that the static context can vary for different parts of a query
(c) what information gets through to act as input to validation
Decision by: xsl on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F
Decision by: xquery on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F
Decided to accept the "Processing Model" Proposal which addresses this issue.
Are different conformance levels going to give the same results? Is it possible to get different results for the same query? The principle should be that you either get the same result or a failure. Currently this isn't the case.
Input from Anders Berglund:
Input from Kristoffer Rose:
Decision by: proc-mod-tf on 2003-02-11 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Feb/0110.html)
Decision by: xquery on 2003-02-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0404.html)
Given that types add semantics, there is no way to achieve the proposed principle between basic XQuery and schema import without adding additional specification in the query.
It is decided not to add any such functionality and close this issue without action.
Does "validate" do strict or lax validation?
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
Decision to accept the propsal of Phil Wadler in http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0378.html.
Should the user should be able to override which type (strict/lax) of validation "validate" does?
Decision by: xquery on 2002-12-18 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)
Decision to accept the propsal of Phil Wadler in http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0378.html.
Should "unordered" keyword be included in XPath? It does cause problems with the grammar (keyword issue).
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
It is a function and already included in F&O.
How can variables be bound external to XQuery itself (e.g. like parameters to the query)?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Resolved by action at Chapel Hill and reflected in current document.
In recent discussions on the type system and when reviewing the documents I noticed that many people interpret
element foo |
differently than the spec indicates it needs to be interpreted. This seems to indicate that we have a problem.
The semantics that people expect seems to be:
element foo is the same as element foo of type xs:anyType and matches all elements with the given name (regardless where or whether the element was declared in the schema).
attribute foo is the same as attribute foo of type xs:anySimpleType and matches all attributes with the given name regardless where or whether it was declared in the schema).
However our spec [1] says:
Another form of ElemOrAttrType is simply a QName, which is interpreted as the required name of the element or attribute. The QName must be an element or attribute name that is found in the in-scope schema definitions. The match is successful only if the given element or attribute has the required name and also conforms to the schema definition for the required name. This can be verified in either of the following ways:
If the schema definition for the required name has a named type, the given element or attribute must have a type annotation that is the same as that named type or is known (in the in-scope schema definitions) to be derived from that named type. For example, suppose that a schema declares the element named location to have the type State. Then the SequenceType element location will match a given element only if its name is location and its type annotation is State or some named type that is derived from State.
If the schema definition for the required name has an anonymous (unnamed) type definition, the actual content of the given element or attribute must structurally comply with this type definition. For example, suppose that a schema declares the element named shippingAddress to have an anonymous complex type consisting of a street element followed by a city element. Then the SequenceType element shippingAddress will match a given element only if its name is shippingAddress and its content is a street element followed by a city element.
The constraint that an element must have a required name is considered to be satisfied if the element has been validated and found to be a member of a substitution group whose head element has the required name. Substitution groups are described in [XML Schema].
which seems to indicate that this is not the case.
I would like to open an issue on this. I think even if people do not want to use schema types, they may still want to restrict the argument type of a function to an element with a given name.
In addition, many people are surprised to see the SchemaContext in the SequenceType production for other usages than for validate in ...
While there is a use case, I wonder whether this needs to be a required feature for XQuery V1 given the leap in complexity. Maybe it would be useful to solve the above problem by saying that you have to use
element foo in / |
to force the name to be in the in-scope schema definition? This would mean that / becomes allowed in the SchemaGlobalContext production.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
In sequence type it is an error, it is valid in a path expression.
When using the form 'element foo of type T', should 'foo' be a globally declared element in the in-scope schema or not? Should there be constraints on which type T is allowed? The language document assumes foo is globally declared and T is a restriction of the type of foo. The formal semantics does not make that assumption.
Decision by: xsl on 2003-01-09 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Jan/0011.html)
Subsumed by element-def-not-in-in-scope.
Is an implementation obligated to evaluate all its parameters (and raise any errors doing so) even when they're not needed in the function body?
Decision by: xpath-tf on 2002-10-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0449.html)as part of Agendum 1.
There is no need to evaluate "non needed" expressions.
Decision by: xquery on 2002-10-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0511.html)accepting text for next publication, but keep issue active.
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)accepting text for next publication, but keep issue active.
Decision by: xpath-tf on 2003-03-18 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Mar/0232.html)
No adverse public comments received. Close issue with no change.
Section 3.7.5 describes CDATA section constructor, but these cannot be represented in the data model.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Decided to close, with document changes as described by Mike Kay in http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0095.html, including editorial comments.
If there are multiple constructors for the same attribute on an element; which one is taken or is it an error?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Decided to make it an error for an element constructor to specify two attributes with the same name. Error to be documented in XQuery Section 3.7.4.1.
Currently "some" doesn't do any filtering, which seems unnatural. We could change the some behaviour to actually do the type filtering.
It is easy to imagine that "some hatsize $h in $seq satisfies $h=3" ignores items in $seq that are not hatsizes. Currently, of course, it causes an error if the sequence might contains things other than hatsizes.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Decided to close with no change to documents.
The current XPath/XQuery specification, as well as the Formal semantics document, mandate that the specific arithmetic operation to be executed depends on the runtime type of the arguments. For example, the addition of two variables $x and $y will be executed as an integer addition if the dynamic types of the two values are both subtypes of integer, and does not depend on the static type of the variables $x and $y (which may be decimal).
Implementing this semantics requires a runtime dispatch plus an runtime interaction with the type system for subtype testing. This can be very costly. Moreover, this semantics can prohibit other useful compile time optimizations like index utilization.
We may allow implementations to use either a static or dynamic dispatch for arithmetic operations in order to improve performance.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0259.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
The cost is not currently believed to be real. Decided to close with no action (ie keeping dynamic dispatch).
What interoperability is expected for queries that are executed with and without Schema Import? Does the current text reflect the desired goals?
What interoperability is expected for queries that are executed with and without Static Typing? Does the current text reflect the desired goals?
Input from Phil Wadler:
Cf. Should different conformance levels give the same result for the same query and data?
Decision by: proc-mod-tf on 2003-02-11 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Feb/0110.html)
Decision by: xquery on 2003-02-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0404.html)
Decision by: xsl on 2003-02-27 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Feb/0143.html)Second question.
First question is related to 320. See 320 for resolution.
Second question boils down to the question whether static typing allows to change the result or only can raise a static error. We already follow the principle to not change results except by raising a static error.
Decided to point to this principle as the resolution and close the issue without changes to the documents.
Should "Schema Import" and "Static Typing" be independent, optional features or should there be a layer of conformance levels? For XQuery the latter might be "Basic XQuery", "Basic XQuery" + "Schema Import", and "Basic XQuery" + "Schema Import" + "Static Typing".
Subsumed by :conformance-levels.
What is the result of a failed validation? Can you inspect the result to detect this? Do you just get anySimpleType and anyType?
Decision by: xpath-tf on 2003-03-04 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Mar/0060.html)
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Access to documents that fail validation is not supported.
Current semantics basically defines the semantics by mapping FLWRs and path expression to go top-down. Errors are normative. Problem is that we can not apply many optimizations. Simple query rewrites such as pushing or pulling filters, etc. Like to be able to push predicates down and evaluate them. Potentially the predicate might raise an error you would not have gotten if you processed top down. Want to allow implementations to do bottom up evaluations.
Suggested resolution:
The formal semantics defines dynamic evaluation in terms of a naive, top-down reduction of a core expression to a data-model value. Implementations may choose alternative evaluation strategies, which, for example, may reduce a core expression bottom-up. If an evaluation of a core expression yields a value (i.e., it does not raise an error), the value must be the same value as would be produced by the dynamic semantics defined in this document. The evaluation of a core expression may raise an error that may not be raised by the dynamic semantics as defined in this document.
Decision by: xpath-tf on 2002-10-29 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Oct/0449.html)as part of Agendum 1.
Expressions, with the exception of "if", may be reordered and thus some errors may be raised that using another evaluation strategy may not have occurred.
Decision by: xquery on 2002-10-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Oct/0511.html)accepting text for next publication, but keep issue active.
Decision by: xsl on 2002-10-31 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2002Nov/0004.html)accepting text for next publication, but keep issue active.
Decision by: xpath-tf on 2003-03-18 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Mar/0232.html)
No adverse public comments received. Close issue with no change.
The editors need to agree on the markup to be used for errors in the documents. Some markup is currently used in the XSLT spec.
The markup for errors to be added to the documents.
The effect of CharRef in Element or Attribute content is underspecified. For example, if the value of the CharRef is whitespace, does it behave like whitespace in Element or Attribute content, or does it behave like ordinary characters? Either way, it is hard to make it behave exactly like the XML construct that it mimics: in XML, a character reference such as suppresses certain effects such as whitespace normalization. It is not clear whether such normalization happens in XQuery.
Decision by: xquery on 2002-12-04 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0167.html)
Confirmed that Mary's proposal for whitespace, that was accepted 2002-11-27, closes this issue.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Resolved by the recent adoption of the revised text on attribute constructors.
What kind of error should be raised by an element constructor in which an attribute is encountered after other element content?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
This a type error. Type error to be documented in XQuery Section 3.7.2.
How should we allocate codes or identifiers to errors defined in the spec? We should not use "explanatory sentences" as these are not appropriate for I18N reasons.
Decision by: xpath-tf on 2002-12-17 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Dec/0252.html)
Decision by: xquery on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
Decision by: xsl on 2002-12-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0167.html)Joint F2F
(not really an issue); Ashok and Norm will investigate whether we can editorially markup errors consistently.
Decision by: xpath-tf on 2003-01-07 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Jan/0101.html)
Issue should remain open pending proposal on: ACTION XPATH-091-11 Mary adds herself to XPATH-091-11.
Decision by: xpath-tf on 2003-04-08 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Apr/0075.html)
1. All occurrences of static and dynamic errors should be identified in the F&O, DM, language, and FS specs using distinguished error markup.
2. Error markup should include unique alpha-numeric identifier for each error which permits the source to refer to unique error definitions and to include reverse indices on errors.
3. In first cut, alpha-numeric error codes will not be revealed in printed documents, but we can reveal them at a later time if we decide to make error codes part of conformance requirements.
4. Until we consider an API for conveying errors to the evaluation environment, we recommend *not* requiring implementations to return specific error codes (and possibly additional context info such as location of error in query body or name of built-in function, etc.)
Decision by: xquery on 2003-04-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Apr/0247.html) with amendment: instead of tying the codes to conformance, we are suggesting to publish these in a non-normative appendix so implementers can use them if see fit
Decision by: xquery on 2003-04-30 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0007.html)
The XML Query WG has agreed that errors be identified with a code and and some English text as recommended by the I18N folks. The XSL WG has not discussed this yet.
The markup suggested for errors:
<error id="code> English text </error> |
seems fine, but we need to decide how to assign the codes.
Jim Melton suggessted 5 or 6 digit fixed length codes partitioned in some manner to indicate the type of error: http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Apr/0259.html
Liam Quin suggested words separated by hyphens: http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Apr/0267.html
Mike Kay would like them to be QNames: unprefixed in the case of codes defined by W3C, namespace-prefixed in the case of implementation-defined or user-defined codes. See http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Apr/0284.html
SUGGESTION ON HOW TO MOVE FORWARD Since the error codes will encompass the language documents, the F&O and possibly the formal semantics we need folks representing all these constituencies to decide on the structure of the error codes and how to partition them. I suggest a small task force to address this. This taskforce would also address the issue of the non-normative appendix and where it should reside.
Using the "instance of SequenceType" construct within a predicate of a path expression, or in an XSLT match pattern, is very unwieldy: the verbose English-like syntax of a SequenceType does not go well with the terse syntax of path expressions, leading to inelegant constructs like
select="//*[.instance of element of type address]" |
Input from Michael Kay:
1. Motivation Many people have asked for the ability to test for elements of a given type in path expressions, and to be able to write path expressions that would retrieve nodes with types that match the declared types of function parameters. For instance, consider the following query in the syntax of our current Working Draft: define function name($e as element person) returns element name { $e/name } for $p in input()//person return name($p) This query can fail at runtime, because the path expression matches any element named person, and the function parameter requires a valid element conforming to a globally declared element named person. This proposal adds ElementType and AttributeType nodetests to path expressions, and aligns the syntax of SequenceType with the syntax of type tests done in path expressions. For instance, in the following syntax, the KindTest "element(person)" matches only person elements that are valid instances of the globally declared person element, and the same test is used for the function's parameter type: define function name($e as element(person)) returns element name { $e/name } for $p in input()//element(person) return name($p) Using the same syntax and semantics for these tests in both path expressions and SequenceType ensures that they are well aligned, and reduces the number of expressions users of the language must learn. In addition, it allows us to fix some problems with SequenceType that have made the grammar complex to maintain. ElementType and AttributeType nodetests also allow the names of types to be used to select nodes, eg: define function name($e as element(person, surgeon)) returns element name { $e/name } for $p in input()//element(person, surgeon) return name($p) Or: for $date in input()//element(*, xs:date) return <date>{ $date }</date> Note that the above queries provide enough type information to be statically valid without 'treat as'. If a NameTest were used instead of the ElementType nodetest, the above query would not be statically valid, and the query writer would need to use treat as to make it so. Using this proposal, the most convenient way to match locally declared types in a path expression is to use the globally declared types in which they are contained to establish a type context; eg, the following query from use case STRONG is statically valid as modified below: define function names-match( $s as element(ipo:purchaseOrder/ipo:shipTo), $b as element(ipo:purchaseOrder/ipo:billTo) as xs:boolean { $s/ipo:name = $b/ipo:name } for $p in document("ipo.xml")//element(ipo:purchaseOrder) where not( names-match( $p/ipo:shipTo, $p/ipo:billTo ) ) return $p ElementType and AttributeType nodetests can also be used in match patterns on XSLT stylesheets, eg: <xsl:template match="element(person)"> <xsl:template match="attribute(*,xs:date)"> For more examples of ElementType and AttributeType nodetests in match patterns, see [1]. This proposal steals liberally from proposals by Phil Wadler, Jeni Tennison, Michael Rys, and Mike Kay. Don Chamberlin gave detailed review and pointed out important problems and their solutions. Scott Boag tested the grammar. ======================================================================== 2. Examples of ElementTypeTest and AttributeTypeTest Informally, the principles for matching an ElementTypeTest or AttributeTypeTest are as follows: - element() matches elements, attribute() matches attributes. - names in ElementTypeTest and AttributeTypeTest test the name of a node. If the name of an element identifies a Corresponding Element Declaration which is the head of a substitution group, the name of an ElementTypeTest also matches other names in the substitution group. - types in ElementTypeTest and AttributeTypeTest match type annotations. If no type is supplied, there must be a Corresponding Element Declaration or a Corresponding Attribute Declaration, which is used to nominate a type. The following examples illustrate these semantics by stating what nodes an ElementTypeTest would match. element() element(*) element(*,*) Matches any element. These three forms are equivalent. element( person ) Matches any element named 'person' with the type corresponding to the globally declared 'person' element; if this element is nillable, also matches any empty element named person containing an xsi:nil attribute with the value 'true'. If the globally declared 'person' element is the head of a substitution group, also matches element names from the substitution group. If there is no globally declared 'person' element, a type error is raised. element( person, * ) Matches any element named person or any element whose name is in the substitution group of the globally declared element person, if one exists. This is equivalent to the earlier ~person syntax, which we feel is no longer needed. element( person, personType nillable ) Matches any element named 'person' with the type 'personType', including any empty element named person containing an xsi:nil attribute with the value 'true'. If the globally declared 'person' element is the head of a substitution group, also matches element names from the substitution group. element( *, xs:integer nillable ) Matches any element of type xs:integer, including any such element with xs:nil="true" and no content. element( foo/bar/person ) Matches any element named 'person' with the type of the corresponding element declaration. element( foo/bar/person, personType ) Syntax Error. attribute() Matches any attribute. attribute( foo/bar/person/@id ) Matches any attribute named 'id' with the type of the corresponding attribute declaration. element( @*, xs:integer ) Matches any attribute of type xs:integer. attribute( @price, xs:integer ) Matches any attribute named price of type xs:integer. ======================================================================== 3. Syntax Tokens Scott currently has the following as tokens, and is working on making them productions: [22] SchemaGlobalContext ::= QName | ("type" "(" QName ")") [23] SchemaContextStep ::= QName Productions [112] SequenceType ::= (SequenceSingleType OccurrenceIndicator?) | <"empty" "(" ")"> [113] SequenceSingleType ::= AtomicType | ItemType [114] AtomicType ::= QName [115] ItemType ::= KindTest | <"item" "(" ")"> [116] KindTest ::= DocumentTest | ElementTypeTest | AttributeTypeTest | ProcessingInstructionTest | CommentTest | TextTest | AnyKindTest [117] DocumentTest ::= <"document" "(" ")"> [118] ElementTypeTest ::= <"element" "("> ((SchemaContextPath LocalName) | (NodeName ("," TypeName "nillable"?)?))? ")" [119] AttributeTypeTest ::= <"attribute" "("> ((SchemaContextPath "@" LocalName) | ("@" NodeName ("," TypeName)?))? ")" [120] SchemaContextPath ::= <SchemaGlobalContext "/"> <SchemaContextStep "/">* [122] LocalName ::= QName [123] NodeName ::= QName | "*" [124] TypeName ::= QName | "*" [125] OccurrenceIndicator ::= "*" | "+" | "?" ======================================================================== 4. Semantics A ContextName identifies a valid path from a globally declared element declaration or type definition in the in-scope schema definitions. For instance, the following indicates a shipTo element on a purchaseOrder: purchaseOrder/shipTo If a ContextName begins with type(t), then the path starts with a global named type in the in-scope schema definitions. For instance, the following indicates a shipTo element in a complex type called purchaseOrderType: type(purchaseOrderType)/shipTo The rules for matching an ElementTypeTest depend on the Corresponding Element Declaration, which is determined as follows: An ElementName is the first argument of an ElementTypeTest. If the ElementName has the form NodeName, and it matches the name of a globally declared element declaration in the in-scope schema definitions, it is the "Corresponding Element Declaration". If the ElementName has the form SchemaContextPath LocalName, then the element declaration which would correspond to an element named LocalName in the given context is the "Corresponding Element Declaration". The rules for matching an AttributeTypeTest depend on the Corresponding Attribute Declaration, An AttributeName is the first argument of an AttributeTypeTest. If the AttributeName has the form NodeName, and it matches the name of a globally declared element declaration in the in-scope schema definitions, it is the "Corresponding Element Declaration". If the AttributeName has the form SchemaContextPath LocalName, then the element declaration which would correspond to an element named LocalName in the given context is the "Corresponding Attribute Declaration". An ElementTypeTest matches a node if the node is an element, the element's name matches the ElementName of the ElementTypeTest, and the element's type matches the type and nillability of the ElementTypeTest. An ElementName is matched as follows: If the ElementName is absent or "*", it matches an element of any name. If the ElementName has the form NodeName, it matches an element if the expanded-QNames of the element and the ElementName match. If the ElementName has the form SchemaContextPath LocalName, it matches an element if the expanded-QNames of the element and the LocalName match. If the Corresponding Element Declaration is the head of a substitution group, then the ElementName also matches an element if the expanded-QNames of the element and any element in the substitution group match. Otherwise, the ElementName does not match the element's name. An element's TypeName is matched as follows: If the TypeName is "*", it matches an element of any type. If the TypeName is absent, then the default TypeName is selected, which is the type of the Corresponding Element Declaration. The default nillability is also selected, which is the nillability of the Corresponding Element Declaration. If the expanded-QName of the TypeName matches the element's type or any of its subtypes, then the TypeName matches the element's type if the type nillability is also satisfied. If the element's type name is an anonymous local type, the TypeName must be a default type chosen from the Corresponding Element Declaration, and they match if the element's type is the same as or derived by restriction or extension from the type of the TypeName, provided the type nillability is also satisfied. An element's type nillability is not satisified when the type is not nillable, and the element's dm:nil property is 'true'; otherwise, it is satisfied. The semantics of AttributeTypeTest are parallel, substituting the word 'attribute' for 'element' in the above description and eliminating substitution groups and nillable, which do not apply to attributes. An AttributeTypeTest matches a node if the node is an attribute, the attribute's name matches the AttributeName of the AttributeTypeTest, and the attribute's type matches the type and nillability of the AttributeTypeTest. An AttributeName is matched as follows: If the AttributeName is absent or "*", it matches any attribute. If the AttributeName has the form NodeName, it matches an element if the expanded-QNames of the element and the AttributeName match. If the AttributeName has the form SchemaContextPath LocalName, it matches an element if the expanded-QNames of the element and the LocalName match. Otherwise, the AttributeName does not match the attribute's name. An attribute's TypeName is matched as follows: If the TypeName is "*", it matches an attribute of any type. If the TypeName is absent, then the default TypeName is selected, which is the type of the corresponding attribute declaration. If the expanded-QName of the TypeName matches the attribute's type or any of its subtypes, then the TypeName matches the attribute. If the attribute's type name is an anonymous local type, the TypeName must be a default type chosen from the Corresponding Attribute Declaration, and they match if the attribute's type is the same as or derived by restriction or extension from the type of the TypeName. ======================================================================== 6. attribute() and default axes To allow attribute() to be used in path expressions, abbreviated steps need to be modified as follows: Current text: > The most important abbreviation is that child:: can be omitted > from a step. In effect, child is the default axis. For example, > a path expression section/para is short for > child::section/child::para. Proposed text: > The most important abbreviation is that child:: can be omitted > from a step, or attribute:: can be omitted from a step that > contains an AttributeTypeTest. In most cases, child is the > default axis. For example, a path expression section/para is > short for child::section/child::para. However, if the step > contains an AttributeType, the default axis is attribute::. For > example, child::section/attribute( id ) is short for > child::section/attribute::attribute( id ). ======================================================================== 7. Static Semantics To be supplied. ======================================================================== 8. Issues Issue: Should a WildCard be allowed for the names of attributes and elements? For instance, one might imagine wanting to select only HTML elements of type xs:string: element(html:*, xs:string) |
Decision by: xpath-tf on 2003-03-04 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Mar/0060.html)
Decision by: xsl on 2003-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-06 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Proposal accepted resolving issue.
The prolog productions require special handling, but there is no special prolog state. Right now prolog productions must be distinguished by compound keywords such as <"declare" "namespace">. We either need to make sure we're happy with this, or make some sort of prolog container.
Decision by: xquery on 2003-01-15 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0215.html)Joint F2F
Closed with no action because existing solutions are good enough.
If you define the DFN (default function namespace) to be the null namespace, which you must do if you are going to call functions in this namespace, can you still use unprefixed names to refer to functions in the built-in namespace?
Decision by: xquery on 2003-01-22 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0435.html)A static error is raised when there is a clash between a user-defined function in the default namespace and any other function of the same name in the default namespace.
Decision by: xpath-tf on 2003-05-14 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003May/0037.html)
Decision by: xsl on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F
Decision by: xquery on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F
Given the decision on issue #default-namespace-functions it is a (statically detectable) error to define functions in the null namespace.
One example of the need for support of #FS-Issue-0049, but also: Attributes need to be constrained to contain white space separated lists of simple types only.
Decision by: fs-editors on 2000-10-16
Attributes are represented by attribute attribute-name { content }.
Namespaces
Decision by: fs-editors on 2000-10-16
Namespaces are represented by {uri-of-namespace}localname.
The data model and algebra do not define a global order on documents. Querying global order is often required in document-oriented queries.
Decision by: fs-editors on 2000-12-16
Resolved by adding < operator defined on nodes in same document. See #FS-Issue-0079 for order between nodes in different documents.
The query-algebra datamodel currently does not explicitly model children-elements by references (other than the XML-Query Datamodel. This facilitates presentation, but may be an oversimplification with regard to #FS-Issue-0005.
Decision by: fs-editors on 2000-10-16
This issue is resolved by subsumption as follows: (1) All child-elements are (implicit) references to nodes. (2) Thus, having resolved #FS-Issue-0005 this issue is resolved too.
Do expressions preserve element identity or don't they? And does "=" and distinct use comparison by reference or comparison by value?
Decision by: fs-editors on 2000-10-16
The first part of the question has been resolved by resolution of #FS-Issue-0010. The second part raises a more specific issue #FS-Issue-0066.
Another term for "source and join syntax" is "comprehension".
Decision by: fs-editors on 2000-10-16
This issue is resolved by subsumption under #FS-Issue-0021. List comprehension is a syntactic alternative to "for v in e1 do e2", which has been favored by the WG in the resolution of #FS-Issue-0021.
Currently, the Algebra does not support reference
values, such as IDREF, or Keyref (not to be mixed up with
"node-references" - see #FS-Issue-0005, which are defined in
the XML Query Data Model. The Algebra's type system
should be extended to support reference types and the
data model operators ref
, and
deref
should be supported (similar to id()
in XPath).
Decision by: fs-editors on 2001-04-02
Delegated to XPath 2.0. Algebra should adopt solutions (e.g., id()/keyref() functions) provided in XPath 2.0. There may be an interaction between IDREFs and RefNodes, but we're not going to cover that now.
It may be useful to add a fixed-point operator, which can be used in lieu of recursive functions to compute, for example, the transitive closure of a collection.
Currently, the Algebra does not guarantee termination of recursive expressions. In order to ensure termination, we might require that a recursive function take one argument that is a singleton element, and any recursive invocation should be on a descendant of that element; since any element has a finite number of descendants, this avoids infinite regress. (Ideally, we should have a simple syntactic rule that enforces this restriction, but we have not yet devised such a rule.)
Impacts optimization; hard to do static type inference; current algebra is first-order
Decision by: fs-editors on 2002-05-30
The functionality described is appropriately covered by the use of recursive functions. XQuery is a functional language and does not provide a fixed-point operator in its current version.
There is no explicit support for externally defined functions.
The set of built-in functions may be extended to support other important operators.
Decision by: fs-editors on 2001-04-02
Algebra editors endorse a solution that uses XP for specifying signatures of external functions. Algebra will adopt solution provided by [XPath/XQuery].
Need to be able to construct new types from bits of old types by reference and by copy. Related to #FS-Issue-0005.
Decision by: fs-editors on 2000-09-21
The WG wishes to support both: construction of values by copy, as well as references to original nodes. This needs some further investigation to sort out all technical difficulties (see #FS-Issue-0062) so the change has not yet been reflected in the Algebra document.
XPath provides as a shorthand syntax [integer] to select child-elements by their position on the sibling axes, whereas the xml-query algebra uses a combination of a built-in function index() and iteration.
Addendum by JS (submitted by MF) Dec 19/2000: The
typing of index is lossy : it produces a factored type.
Jerome suggests the more precise range
operator:
e : q min m max n n' - (m'-1) = r m' >= m n' <= n ----------------------------------------------- range(e;m';n') : q min r max r nth(e;n) == range(e;n;n) |
The range
operator takes a repetition of
prime types and those values in the range m'
to n'
; if the repetition does not include
that range, a run-time error is raised. The
range
and nth
operators could
also be defined in terms of head
and
tail
and polymorphic recursive functions. In
the absence of parameteric polymorphism, it is not
possible to define range
and
nth
with precise types.
Here are Peter's rules:
e : p min m max n n!=* ------------------------------------------------- range(e;m';n') : p{n'-max(m,m')+1,min(n',n)-m'+1} For example: let v1 = a[] min 2 max 4 range(v1;3;3): a[] min 1 max 1 range(v1;1;3): a[] min 2 max 3 range(v1;3;5): a[] min 1 max 2 range(v1;1;5): a[] min 2 max 4 e : p min m max * ----------------------------- range(e;m';n') : p min 0 max n'-m'+1 let v2 = a[] min 0 max * range(v2;1;3): a[] min 0 max 2 this follows the typical semantics for head() and tail(): head(()) = tail(()) = () and the semantics behind range(e;m',n') = tail o ...(m' times) ... o tail o head, tail o ...(m'+1 times) ... o tail o head, ... tail o ...(n' times) ... o tail o head |
I would have no troubles in restricting ourselves to nth() instead of range() in the algebra (range can always be enumerated by nth()). Furthermore, we should consider whether m',n' can be computed numbers.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
Issue outdated and moot.
The type system is currently first order: it does not support function types nor higher-order functions. Higher-order functions are useful for specifying, for example, sorting and grouping operators, which take other functions as arguments.
Decision by: fs-editors on 2000-09-21
The WG has decided to express groupBy by a combination
of for
and distinct
. Thus
w.r.t. to GroupBy this Issue is resolved. Because GroupBy
is not the only use case for higher order functions, a
new issue #FS-Issue-0063 is
raised.
Collations identify the ordering to be applied for sorting strings. Currently, it is considered to have an (optional parameter) collation "name" as follows: "SORT variable IN exp BY +(expression {ASCENDING|DESCENDING} {COLLATION name}). An alternative would be to model a collation as a simple type derived from string, and use type-level casting, i.e. expression :collationtype (which is already supported in the XML Query Algebra), for specifying the collation. That would make: "SORT variable IN exp BY +(expression:collationname {ASCENDING|DESCENDING}). But that requires some support from XML-Schema.
More generally, collations are important for any operator in the Algebra that involves string comparison, among them: sort, distinct, "=" and "<".
Decision by: fs-editors on 2001-04-02
Formal semantics will adopt solution provided by Operators.
The type system is currently monomorphic: it does not permit the definition of a function over generalized types. Polymorphic functions are useful for factoring equivalent functions, each of which operate on a fixed type.
The current type system has already a built-in polymorphic type (lists) and is likely to have more (unordered collections). The question is, whether to allow for user-defined polymorphic types and user defined polymorphic functions.
Decision by: fs-editors on 2002-05-30
It has been decided this feature was not required for XQuery 1.0.
3-valued logic to support NULLs
Decision by: fs-editors on 2002-03-11
The Formal Semantics supports the current semantics of NULL values, as described in the XQuery December working draft. The Formal Semantics will reflect further resolution of open issues on NULLs and 3 valued logic as decided by XQuery.
The XML-Query Algebra allows to generate elements with an arbitrary mixture of data (of simple type) and elements. XML-Schema only allows for a combination of strings interspersed with elements (aka mixed content). We need to figure out whether and how to constrain the XML-Query Algebra accordingly (e.g. by typing rules?)
Decision by: fs-editors on 2000-12-09
The type system has been extended to support the
interleaving operator &
- see #FS-sec_typesystem. Mixed
content is defined in terms of &
.
All-groups in XML-Schema, not to be mixed up with #FS-Issue-0049
Decision by: fs-editors on 2000-10-16
The type system has been extended with the support of all-groups - see #FS-sec_typesystem.
The Algebra's internal type system is the type system of XDuce. A potentially significant problem is that the Algebra's types may lose information when converted into XML Schema types, for example, when a result is serialized into an XML document and XML Schema.
James Clark points out : "The definition of AnyComplexType doesn't match the concrete syntax for types since it applies unbounded repetition to AnyTree and one alternative for AnyTree is AnyAttribute." This is another example of an alignment issue.
This issue comprises also issues #FS-Issue-0016, #FS-Issue-0017, #FS-Issue-0053, #FS-Issue-0054, #FS-Issue-0019, substitution groups.
Decision by: fs-editors on 2002-05-30
Closed by the semantics of named typing. See Sections 3 and 7 of the Formal Semantics document.
The current type system does not support user defined type hierarchies (by extension or by restriction).
Decision by: fs-editors on 2002-05-30
Closed by the semantics of named typing. Derived types are now supported in the type system. See Sections 3 and 7 of the Formal Semantics document.
The subtyping rules in #FS-sec_subtype_of only define structural subtyping. We need to extend this with support for subtyping via user defined type hierarchies - this is related to #FS-Issue-0019.
Decision by: fs-editors on 2002-05-30
Closed by the semantics of named typing. The Formal Semantics now support both named and structural typing. See Sections 3 and 7 of the Formal Semantics document.
(e.g. for.<-.in vs for.in.do)
Decision by: fs-editors on 2000-09-21
The WG has voted for several syntax changes , "for v in e do e", "let v = e do", "sort v in e by e ...", "distinct", "match case v:t e ... else e".
Is indentation significant?
Decision by: fs-editors on 2000-07-25
The WG has consensus that indentation is not significant , i.e., all documents are white space normalized.
Does the Algebra give explicit support for catching exceptions and processing them?
Decision by: fs-editors on 2000-10-16
Subsumed by new issue #FS-Issue-0064.
What does "value" do with empty sequences?
Decision by: fs-editors on 2000-10-25
The definition of value(e) has changed to:
value(e) = typeswitch children(e) case v: AnyScalar do v else() |
Furthermore, the typing rules for "for v in e1 do e2" have been changed such that the variable v is typed-checked seperately for each unit-type occuring in expression e1.
Consequently the following example would be typed as follows:
query for b in b0/book do value(b/year): xs:integer min 0 max * |
rather than leading to an error.
This is related to #FS-Issue-0024.
Decision by: fs-editors on 2000-10-25
Resolved by resolution of #FS-Issue-0025.
Project is only parameterized by one tag. How can we translate a0/(b | c)?
Decision by: fs-editors on 2000-10-16
With the new syntax (and type system) a0/(b | c) can be translated to "for v in a0 do typeswitch case v1:b[AnyType] do v1 case v2:c[AnyType] do c else ()".
N-ary case can be realized by nested binary cases.
Decision by: fs-editors on 2000-10-16
New (n-ary) case syntax is introduced.
Does the Algebra support fusion as introduced by query languages such as LOREL? This is related to #FS-Issue-0005, because fusion only makes sense with support of element identity.
Decision by: fs-editors on 2001-04-02
Fusion is equivalent to 'natural full-outer join'. [XPath/XQuery] can reraise issue if desired. If added, the Algebra editors should review any solution w.r.t typing.
One of the problems in views: Can we undeclare/hide things in environment? For example, if we support element-identity, can we explicitly discard a parent, and/or children from an element in the result-set? Related to #FS-Issue-0005.
Decision by: fs-editors on 2001-04-02
[XPath/XQuery] can reraise issue if desired. If added, the Algebra editors should review any solution w.r.t typing.
What do we do if a value does not have a type or a different type from what is required?
We believe that the XML Query Language should specify default type coercions for mixed mode arithmetic should be performed according to a fixed precedence hierarchy of types, specifically integer to fixed decimal, fixed decimal to float, float to double. This policy has the advantage of simplicity, tradition, and static type inference. Programmers could explicitly specify alternative type coercions when desirable.
Decision by: fs-editors on 2001-04-02
Delegation to XPath 2.0, [XPath/XQuery], and/or Operators.
Recursive functions
Decision by: fs-editors on 2000-08-05
subsumed by #FS-Issue-0008
Full regular path expressions allow to constrain recursive navigation along paths by means of regular expressions, e.g. a/b*/c denotes all paths starting with an a, proceeding with arbitrarily many b's and ending in a c. Currently the XML-Query Algebra can express this by means of (structurally) recursive functions. An alternative may be the introduction of a fixpoint operator #FS-Issue-0008.
Decision by: fs-editors on 2001-04-02
XPath 2.0 can raise issue if desired. The Algebra editors should review any solution w.r.t typing.
Metadata queries are queries that require runtime access to type information.
Decision by: fs-editors on 2002-05-30
Metadata queries are believed to be appropriately covered by XQuery 1.0 (e.g., using typeswitch).
Fusion
Decision by: fs-editors on 2000-08-05
Identical with #FS-Issue-0028
Exception handling
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0023 and #FS-Issue-0064.
Global-order based operators
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0003
Copy vs identity semantics
Decision by: fs-editors on 2000-08-05
subsumed by #FS-Issue-0005
Is it possible to copy children as well as IDREFs, Links, etc.? Related to #FS-Issue-0005 and #FS-Issue-0008
Decision by: fs-editors on 2001-01-17
Resolved by addition of "deep" copy operator in XQuery 1.0 and XPath 2.0 Data Model.
Dereferencing semantics
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0005
We suggest that the syntax for "case" be made more regular. At present, it takes only two branches, the first labelled with a tag-name and the second labelled with a variable. A more traditional syntax for "case" would have multiple branches and label them in a uniform way. If the algebra is intended only for semantic specification, "case" may not even be necessary.
Decision by: fs-editors on 2000-08-05
subsumed by #FS-Issue-0027
We are not happy about the three-step sorting process in the Algebra. We would prefer a one-step sorting operator such as the one illustrated below, which handles multiple sort keys and mixed sorting directions: SORT emp <- employees BY emp/deptno ASCENDING emp/salary DESCENDING
Decision by: fs-editors on 2000-09-21
The WG has decided to go for the above syntax, with an (optional) indication of COLLATION.
We do not think the algebra needs an explicit grouping operator. Quilt and other high-level languages perform grouping by nested iteration. The algebra can do the same.
related to #FS-Issue-0012
Decision by: fs-editors on 2000-09-21
The WG has decided to skip groupBy for the time being.
The very important XPath operator "//" is supported in the Algebra only by writing a recursive function. This is adequate for a semantic specification, but if the Algebra is intended as an optimizable target language it will need better support for "//" (possibly in the form of a fix-point operator.)
Decision by: fs-editors on 2000-09-21
Resolved by subsumption under #FS-Issue-0043
We think the algebra needs some facility for dereferencing keys and IDREFs (exploiting information in the schema.)
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0007
We are concerned about absence of support for operators based on global document ordering such as BEFORE and AFTER.
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0003
We agree with comments made in the face-to-face meeting about the aesthetics of the Algebra's syntax for iteration. For example, the following syntax is relatively easy to understand: FOR x IN some_expr EVAL f(x) whereas we find the current algebra equivalent to be confusing and misleading: FOR x <- some_expr IN f(x) This syntax appears to assign the result of some_expr to variable x, and uses the word IN in a non-intuitive way.
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0021
See #FS-Issue-0001.
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0001
Type Declaration for the results of a query: The issue is whether to auto construct the result type from a query or to pre-declare the type of the result from a query and check for correct type on the return value. Suggestion: Support for pre-declared result data type and as well as to coerce the output to a new type is desirable. Runtime or compile time type checking is to be resolved? Once you attach a name to a type, it is preserved during the query processing.
Decision by: fs-editors on 2000-10-16
W.r.t. compile time type casts this is already possible with e:t. For run-time casts an issue has been raised in #FS-Issue-0062.
Currently, all sequences in the data model are
ordered. It may be useful to have unordered forests. The
distinct-node
function, for example,
produces an inherently unordered forest. Unordered
forests can benefit from many optimizations for the
relational algebra, such as commutable joins.
Handling of collection of attributes is easy but the collection of elements is complex due to complex type support for the elements. It makes sense to allow casting from unordered to ordered collection and vice versa. It is not clear whether the new ordered or unordered collection is a new type or not. It affects function resolution, optimization.
Our request to Schema to represent insignificance of ordering at schema level has not been fulfilled. Thus we need to be aware that this information may get lost, when mapping to schema.
Decision by: fs-editors on 2000-12-11
Unordered collections are described by {t} see #FS-sec_typesystem, some operators (sort, distinct-node, for, and sequence) are overloaded, and some operators (difference, intersection) are added). A new issue #FS-Issue-0076 is raised.
Suggestion: The group likes to add a support for fixed-point operator in the query language that will allow us to express the semantics of the // operator in an xpath expression. A path expression of the form a//b may be represented by a fixed-point operator fp(a, "/.")/b.
Decision by: fs-editors on 2000-08-05
Subsumed by #FS-Issue-0043
It appears that project a e could be reduced to sth. like
for v <- e in case v of a[v1] => a[v1] | v2 => () |
... or would that generate a less precise type?
Decision by: fs-editors on 2000-10-16
With the new type system and handling of the for operator, project is indeed redundant.
The current algebra makes navigation to parents difficult to impossible. With support of Element Identity #FS-Issue-0005 and recursive functions #FS-Issue-0008 one can express parent() by a recursive function via the document root. More direct support needs to be investigated w.r.t its effect on the type system.
The WG wishes to support a built-in operator parent().
Decision by: fs-editors on 2001-04-02
XPath 2.0 and [XPath/XQuery] can reraise issue if desired. Algebra should review any solution w.r.t typing. Question: whether namespace axis (i.e., access namespace nodes) will be included in [XPath/XQuery]. Algebra currently has issues related to typing of parent() and descendant(). If sibling axes are included in [XPath/XQuery], then Algebra should review w.r.t. typing.
The current type system cannot represent global element-declarations of XML-Schema. All element declarations are local.
Decision by: fs-editors on 2002-03-11
The type system now supports both local and global elements and attributes.
The current type system does not distinguish between global and local types as XML-Schema does. All types appear to be fully nested (i.e. local types)
Decision by: fs-editors on 2002-03-11
The type system now supports both local and global types.
The type system and algebra allows for sequences of simple types, which can usually be not represented as a well-formed document. How shall we constrain this? Related to #FS-Issue-0016.
Decision by: fs-editors on 2002-05-30
XQuery 1.0 supports non-well-formed heterogeneous sequences for intermediate results. The XQuery type system supports a way to type such intermediate results.
We intentionally did not define equality or relational operators on element and simple type. These operators should be defined by consensus.
Decision by: fs-editors on 2001-04-02
[XPath/XQuery] formal semantics adopts solution provided by Operators task force.
(This subsumes #FS-Issue-0051). If the type system were more precise, then (project a e) could be replaced by:
for v <- e in case v of a[v1] => a[v1] | v2 => () |
One could also represent (e/(a|b)) directly in a similar style.
for v <- e in case v of a[v1] => a[v1] | v2 => case v2 of b[v3] => b[v3] | v4 => () |
Currently, there is no way to represent (e/(a|b)) without loss of precision, so if we do not change the type system, we may need to have some way to represent (e/(a|b)) and similar terms without losing precision. (The LA team has a design for this more precise type system, but it is too large to fit in the margin of this web page!)
Decision by: fs-editors on 2000-10-16
See resolution of #FS-Issue-0051
Related to #FS-Issue-0052. The current type system (and the more precise system alluded to in #FS-Issue-0057) seems well suited for handling XPath children and descendant axes, but not parent, ancestor, sibling, preceding, or following axes. Is this limitation one we can live with?
Decision by: fs-editors on 2000-10-16
Subsumed by #FS-Issue-0052
One operation required in the Algebra is to test whether XML type t1 is a subtype of XML type t2, indicated by writing t1 <: t2. There is a well-known algorithm for this, based on tree automata, which is a straightforward variant of the well-known algorithm for testing whether the language generated by one regular-expression is a subset of the language generated by another. (The algorithm involves generating deterministic automata for both regular expressions or types.)
However, the naive implementation of the algorithm for comparing XML types can be slow in practice, whereas the naive algorithm for regular expressions is tolerably fast. The only acceptably fast implementation of a comparison for XML types that the LA team knows of has been implemented by Haruo Hasoya, Jerome Voullion, and Benjamin Pierce at the University of Pennsylvania, for their implementation of Xduce. (Our implementation of the Algebra re-uses their code, with permission.)
So, should we adopt a simpler definition of subtyping which is easier to test? One possibility is to adopt the sibling restriction from Schema, which requires that any two elements which appear a siblings in the same content model must themselves have contents of the same type. Jerome Simeon and Philip Wadler discovered that adopting the sibling restriction reduces the problem of checking subtyping of XML types to that of checking regular languages for inclusion, so it may be worth adopting the restriction for that reason.
Decision by: fs-editors on 2002-10-30
With pure named typing, subtyping can be checked using standard finite state automatas.
These issues are taken from the comments on the Requirements Document by I18N
Further information can be found at http://www.w3.org/TR/WD-charreqhttp://www.w3.org/TR/WD-charreq.
It is a goal of i18n that queries involving string matching ("select x where x='some_constant'") treat canonically equivalent strings (in the Unicode sense) as matching. If the query and the target are both XML, early normalization (as per the Character Model) is assumed and binary comparison ensures that the equivalence requirement is satisfied. However, if the target is originally a legacy database which logically has a layer that exports the data as XML, that XML must be exported in normalized form. The XML Query spec must impose the normalization requirement upon such layers.
Similarly, the query may come from a user-interface layer that creates the XML query. The XML Query spec must impose the normalization requirement upon such layers.
Provided that the query and the target are in normalized form C, the output of the query must itself be in normalized form C.
Queries involving string matching should support various kinds of loose matching (such as case-insensitivity, katakana-hiragana equivalence, accent-accentless equivalence, etc.)
If such features as case-insensitivity are present in queries involving string matching, these features must be properly internationalized (e.g. case folding works for accented letters) and language-dependence must be taken into account (e.g. Turkish dotless-i).
Queries involving character counting and indexing must take into account the Character Model. Specifically, they should follow Layer 3 (locale-independent graphemes). Additional details can be found in The Unicode Standard 3.0 and UTR#18. Queries involving word counting and indexing should similarly follow the recommendations in these references.
Decision by: fs-editors on 2001-04-02
[XPath/XQuery] formal semantics adopts solution provided by Operators task force.
Related to a number of issues around #FS-Issue-0005.
Decision by: fs-editors on 2001-04-02
Handled in current data model and algebra.
(1) What is the value of parent() when constructing new elements with children refering to original nodes?
(2) Is an approach to either make copies for all children or provide references to all children, or should we allow for a more flexible combination of copies and references?
Decision by: fs-editors on 2001-01-17
Operational semantics specifies that element node constructor creates copies of all its children. Addition of RefNode in XQuery 1.0 and XPath 2.0 Data Model supports explicit reference value.
The current XML-Query-Algebra does not allow functions to be parameters of another function - so called higher order functions. However, most of the Algebra operators are (built-in) higher functions, taking expressions as an argument ("sort", "for", "case" to name a few). Even a fixpoint operator, "fun f(x)=e, fix f(x) in e" (see also #FS-Issue-0008), would be a built-in higher order function.
Decision by: fs-editors on 2000-10-18
The XML Query Algebra will not support user defined higher order functions. It does support a number of built-in higher order functions.
How do we return an error code from a function defined in current Query algebra. Do we need to create an array (or a structure) to merge the return value and error code to do this. If that is true, it may be inefficient to implement. In order for cleaner and efficient implementation, it may be necessary to allow a function declaration to take a parameter of type "output" and allow it to return an error code as part of the function definition.
Decision by: fs-editors on 2000-10-25
One does not need to create a structure to combine return values with error codes, provided each operator or function /either/ returns a value /or/ raises an error. The XML-Query Algebra supports means to raise errors, but does not define standard means to catch errors. Raising errors is accomplished by the expression "error" of type ^ (empty choice). Because ^ | t = t, such runtype errors do not influence static typing. The surface syntax and/or detailed specification of operators on simple types (see #FS-Issue-0056) may choose to differentiate errors into several error-codes.
We may revisit the resolution of #FS-Issue-0042 and reintroduce GroupBy along the lines of sort: "group v in e1 by [e2 {collation}]". One reason for this may be that this allows to use collation for deciding about the equality of strings.
Decision by: fs-editors on 2000-10-18
The WG has decided to close this issue, and for the time being not consider GroupBy as a built-in operator. Furthermore, #FS-Issue-0013 is ammended to deal with collations for all operators involving a comparison of strings.
What is the meaning of "=" and "distinct"? Equality of references to nodes or deep equality of data?
Decision by: fs-editors on 2001-01-17
XQuery 1.0 and XPath 2.0 Data Model defines "=" (value equality) and "==" (identity equality) operators. Description of distinct states that it uses "==".
In some contexts it may be desirable to cast values at runtime. Such runtime casts lead to an error if a value cannot be cast to a given type.
Decision by: fs-editors on 2000-10-25
cast
e:
t
has been introduced as a reducible operator expressed in
terms of typeswitch
.
Per our requirements document we are chartered to support document collections. The current XML-Query Algebra deals with single documents only. There are a number of subissues:
(a) Do we need a more elaborate notion of node-references? E.g. pair of (URI of root-node, local node-ref)
(b) Does the namespace mechanism suffice to type collections of nodes from different documents? Probably yes.
(c) Provided (a) and (b) can be settled, will the approach taken for #FS-Issue-0049 do the rest?
Decision by: fs-editors on 2002-05-30
Document collections are now supported in XQuery 1.0. Input functions have been added, the SequenceType production supports types for document nodes. The XQuery Type system has been extended to support document nodes.
The current document belongs more to the genre (scientific) paper than to the genre specification. One may consider the following modifications: (a) reorganize intro to give a short overview and then state the purpose (strongly typed, neutral syntax with formal semantics as a basis for possibly multiple syntaxes, etc.) (compared to version Aug-23, this version has already gone a good deal in this direction). (b) Equip various definitions and type rules with id's. (c) Elaborate appendices on mapping XML-Query-Algebra Model vs. XML-Query-Datamodel, XML-Query-Type System vs. XML-Schema-Type System. (d) Maybe add an appendix on use-case-solutions. The problem is of course: Part of this is a lot of work, and we may not achieve all for the first release.
Decision by: fs-editors on 2000-10-18
The WG decided to dispose of this issue. The current overall organization of the document is quite adequate, but of course editorial decisions will have to made all the time.
Should sort (and distinct) be stable on ordered collections, i.e. lists, and unstable on unordered collections (see #FS-Issue-0049)?
Decision by: fs-editors on 2000-12-11
sort and distinct are stable on ordered collections, and unstable on unordered collections.
Currently, the XML Query Algebra Datamodel does not model PI's and comments.
Decision by: fs-editors on 2001-01-17
Addition of operational semantics defines relationship of Algebra to Data Model.
Each of the date-time data types have facet values as defined by the schema data types draft spec. This problem is general enough to be applied to other simple data types.
The question is : Should we provide access to these facet values on an instance of a particular data types? If so, what type of access? My take is the facets are to be treated like read-only attributes of a data instance and one should have a read access to them.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. Semantics of named typing specifies that all simple types are represented by their name and their primitive base type. Facets are not represented explicitly in type system and can only be checked by validation.
XML-Schema introduces a number of constraining facets http://www.w3.org/TR/xmlschema-2/http://www.w3.org/TR/xmlschema-2/ for simple types (among them: length, pattern, enumeration, ...). We need to figure out whether and how to use these constraining facets for type-checking.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. Semantics of named typing specifies that all simple types are represented by their name and their primitive base type. Facets are not represented explicitly in type system and can only be checked by validation.
It is necessary to add an operational semantics that formally defines each operator in the Algebra.
Decision by: fs-editors on 2001-03-30
The new document contains a full specification of the dynamic semantics.
User defined functions can not be overloaded in the XML Query Algebra, i.e., a function is exclusively identified by its name, and not by its signature. Should this restriction be relaxed and if so - to which extent?
Decision by: fs-editors on 2001-04-02
No overloading in Query 1.0
Currently unorderedness is represented at type level by {t}, and some (built-in) operators are overloaded such they have different semantics (and potentially different return type) depending on their input type. An alternative is to not represent unorderedness at type level, but rather support unordered for, unordered (unstable) sort, unordered (unstable) distinct.
Decision by: fs-editors on 2001-04-30
Removed unordered types from type system. Added support for unordered operator.
Regular Languages are closed w.r.t. to the interleaved product. However, they are not closed w.r.t. to interleaved repetition, which can (e.g) generate the 1 degree Dyck language D[1] = () | a D[1] b | D[1] D[1] = (a,b)^{0,*}, and more generally, any language that coordinates cardinalities of individual members from an alphabeth: E.g. (a ^ b)^ min 0 max * = all strings with equally many a's and b's. These are beyond regular languages. Should we thus try to do without interleaved repetition?
Decision by: fs-editors on 2001-04-02
if we use interleaved repetition (which we will because it is in MSL), they will be restricted to prime types.
Unambiguous content-models in XML 1.0 and XML Schema are not closed w.r.t. union. It appears that the XML Query-Algebra can generate result types which can not be transformed to an unambiguous content-model.
Decision by: fs-editors on 2002-05-30
The XQuery type system supports ambiguous types only for intermediate types generated during type inference.
The global order operator < is defined on nodes in the same document, but not between nodes in different documents.
Decision by: fs-editors on 2002-03-11
Resolution follows from the [XPath/XQuery] Data Model. Order between documents is implementation defined but stable.
parent
Currently, the parent
operator yields an
imprecise type : AnyElement min 0 max 1
. It
might be possible to type parent
more
precisely, for example, by using the normalized names in
MSL, which encode containment of types.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. Issue closed for version 1.0. Can be reopened for version 2.0.
Schema simple types must be defined for the Algebra and [XPath/XQuery].
Decision by: fs-editors on 2001-04-02
Algebra will adopt lexical reps supported by [XPath/XQuery].
The precedence of the type expressions is not defined.
Decision by: fs-editors on 2002-10-30
Precedence is the same as in XQuery.
When processing an XML document without schema information, i.e., the type of the document is AnyComplexType, then match expressions may be very expensive to evaluate:
typeswitch x case t1 : AnyTree do 1 case t2 : AnyTree min 0 max 2 do 2 case t3 : *[*[*[*[* ... [AnyAttribute] ]]]] do 3 else ERROR |
typeswitch itself is not the issue. The real problem is having very liberal type patterns. We could restrict the kinds of type patterns that we permit.
Decision by: fs-editors on 2002-03-11
Typeswitch types are now restricted to sequence types. Named typing will further help in reducing the complexity by allowing type annotation contained in the data model as a means for optimization.
Need prose describing execution model scenarios : interpretor vs. compile/runtime vs. translation into another query language. Explain relationship between static and dynamic semantics.
Decision by: fs-editors on 2002-03-11
Section #FS-sec_procmodel defines a procesing model which serves as a framework for the Formal Semantics specification.
Cite: wildcard types cannot be implemented. If x!y means any name in x except names in y, what does x!y!z mean? In general, how do ! and | operate (precedence, associativity)? Parentheses are required to force the desired grouping of these two operators. Also, what does x!* mean? (There's an infinite family of such examples.)
Decision by: fs-editors on 2002-03-11
The [XPath/XQuery] type systyem now uses only simple wildcard names based on XPath's NameTest production.
Need rules for specifying syntactic correctness of query: symbol spaces; variable def'ns precede uses; list of keywords, etc.
Decision by: fs-editors on 2001-04-02
Syntactic rules should be dealt with in [XPath/XQuery] document
Cite: no join operator; wants example of many-to-many joins, inner join, left and full outer joins.
Decision by: fs-editors on 2002-03-11
The XQuery document gives a number of such examples.
Sources of misalignment: [XPath/XQuery] types include comment and processing instruction; XML Schema: Formal Description does not. [XPath/XQuery] uses () for empty sequence; MSL uses the epsilon character. [XPath/XQuery] permits the names of attribute and element components to be wildcard expressions. MSL only permits literal names for attributes and elements, but permits stand-alone wildcard expressions. [XPath/XQuery] types call '&' interleaved repetition, but MSL says it means 'all g1 and g2 in either order'. Does MSL mean interleaved repetition?
Decision by: fs-editors on 2002-05-30
Closed by the semantics of named typing. The XQuery Type System aligns directly with XML Schema. See Sections 3 and 7 of the Formal Semantics document.
Formalism document gives a particular syntax for type expressions that is not supported in the [XPath/XQuery] surface syntax.
Decision by: fs-editors on 2002-28-11
Subsumed by #xquery-type-syntax
Formalism document uses a static type-assertion expression that is not supported in the [XPath/XQuery] surface syntax.
Decision by: fs-editors on 2002-03-11
Static type assertion is supported in XQuery with the new “assert as” expression.
[XPath/XQuery] formal semantics has stand-alone
attribute constructor/expression ATTRIBUTE QName
(Exp)
that is not supported in [XPath/XQuery]
surface syntax.
Decision by: fs-editors on 2002-03-11
Stand-alone attribute construction is supported in XQuery with the new syntax for element and attribute constructors.
[XPath/XQuery] formal semantics has an error
expression Error
that is not supported in
[XPath/XQuery] surface syntax.
Decision by: fs-editors on 2002-03-11
Errors are raised by a function "dm:erorr()" instead of a separate expression.
The data model distinguished between text nodes and strings, which are atomic values. Text nodes have identity, parents, and siblings. Strings do not. Text nodes are accessed by the children() accessor; strings and other atomic values are accessed by the typed-value() accessor. The distinction between text nodes and atomic values should exist in type system as well.
Decision by: fs-editors on 2002-03-11
Subsumed by new issue #FS-Issue-0105.
Static type errors and warnings are not specified. We need to enumerate in both the [XPath/XQuery] and formal semantics documents what kinds of static type errors and warnings are produced by the type system. See also #FS-Issue-0090.
Decision by: fs-editors on 2003-01-12 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Jan/0097.html)
Dec. FS working draft describes the semantics of errors.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
Decision by: xquery on 2003-09-03 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Sep/0013.html)
Resolution endorsed.
Decision by: xsl on 2003-09-11 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Sep/0042.html)
Resolution endorsed.
We do not specify how a Schema or DTD is 'imported' into a query so that its information is available during type checking. Schema and DTDs can either be named explicitly (e.g., by an 'IMPORT SCHEMA' clause in a query) or implicitly, by accessing documents that refer to a Schema or DTD. The mechanism for statically accessing a Schema or DTD is unspecified.
Decision by: fs-editors on 2002-05-30
Closed by the semantics of named typing. The new Formal Semantics document contains a complete mapping from XML Schema to the XQuery type system. See Section 7 of the Formal Semantics. Import of DTDs is supported, but should not be described in the Formal Semantics document.
This is related to #FS-Issue-0095. We do not specify what is the effect of type checking a query that is applied to a document without a DTD or Schema. In general, a schema-less document has type xs:AnyType and type checking can proceed under that assumption. A related issue is what is the effect of type checking a query that is applied to an incompletely validated document. As above, we can make *no* assumptions about the static type of an incompletely validated document and must assume its static type is xs:AnyType.
Decision by: fs-editors on 2002-05-30
XQuery supports schema-less document, and valid documents. It does not support invalid document, I.e., document with a schema for which validation fails. It can support those documents in a well-formed manner.
Static type checking and schema validation are not equivalent, but we might want to do both in a query. For example, we might want to assert statically that an expression has a particular type and also validate dynamically the value of an expression w.r.t a particular schema.
The differences between static type checking and schema validation must be enumerated clearly (the XSFD people should help us with this).
Decision by: fs-editors on 2002-05-30
Closed by the semantics of named typing. XQuery and the XQuery Formals Semantics support both a validate operation and static typing.
This issue is related to #FS-Issue-0059 Static type checking may be difficult and/or expensive to implement. Some discussion of algorithmic issues of type checking are needed. In addition, we may want to define "conformance levels" for [XPath/XQuery], in which some processors (or some processing modes) are more permissive about types. This would allow [XPath/XQuery] implementations that do not understand all of Schema, and it would allow customers some control over the cost/benefit tradeoff of type checking.
Decision by: xquery on 2003-02-26 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0459.html)
Close issue 441 with no further work.
This mapping is still preliminary and contains inconsistencies. These inconsistencies will be addressed in detail in the next draft of the document.
Decision by: fs-editors on 2002-03-11
The Formal Semantics now provides a complete mapping from [XPath/XQuery] to the Core [XPath/XQuery]. Remaining issues with respect to that mapping are indicated separately.
The way (when? where?) namespace prefixes are resolved is still an open issue.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
Decision by: xquery on 2003-09-03 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Sep/0013.html)
Resolution endorsed.
Decision by: xsl on 2003-09-11 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Sep/0042.html)
Resolution endorsed.
Support for mixed content in the type system is an open issue. This reopens issue #FS-Issue-0016. Dealing with mixed content with interleaving raises complexity issue. See also #FS-Issue-0103.
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
The formal semantics is a specification of the behavior of an XQuery processor, not a recipe for implementation. The uses of interleaving in the specification are sufficiently restricted that a practical implementation can be written.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
Whitespace normalization in [XPath/XQuery] is still an open issue. This reopens issue #FS-Issue-0022.
Decision by: fs-editors on 2002-07-26
New version now describes the semantics of element constructors and whitespace handling.
The current type system allows interleaving is allowed on arbitrary types. Interleaving is an expensive operation and it is not clear how to define subtyping for it. Should we restrict use of interleaving on (optional) atomic types ? Should this restriction reflects the one in XML schema ? Related to #FS-Issue-0077.
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
The formal semantics is a specification of the behavior of an XQuery processor, not a recipe for implementation. The uses of interleaving in the specification are sufficiently restricted that a practical implementation can be written.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
XML Schema is based on named typing, while the [XPath/XQuery] type system is based on strucural typing. Directly related issues are #FS-Issue-0019 and #FS-Issue-0018. Other impacted issues are #FS-Issue-0020, #FS-Issue-0072, #FS-Issue-0073, #FS-Issue-0088, #FS-Issue-0095, #FS-Issue-0097, #FS-Issue-0098, #FS-Issue-0111.
Decision by: fs-editors on 2002-05-30
Closed by the semantics of named typing. The Formal Semantics now support both named and structural typing. See Sections 3 and 7 of the Formal Semantics document.
The [XPath/XQuery] type system only supports element and attribute nodes. It needs to support other kinds of nodes from the [XPath/XQuery] datamodel, notably: text nodes and document nodes. Should it also include support for PI nodes, comment nodes and namespace nodes?
The data model distinguishes between text nodes and strings, which are atomic values. Text nodes have identity, parents, and siblings. Strings do not. Text nodes are accessed by the children() accessor; strings and other atomic values are accessed by the typed-value() accessor. The distinction between text nodes and atomic values should exist in type system as well.
Decision by: fs-editors on 2002-05-30
The new type system supports document and text nodes. Support for other kinds of nodes is discussed in #FS-Issue-0143
The [XPath/XQuery] type system allows more content model than what XML Schema allows. For instance, the current type grammar allows the following types:
element d { (attribute a | element b, attribute c)* } attribute a { element b } |
Section #FS-sec_typesystem indicates corresponding constraints on the [XPath/XQuery] type system to avoid that problem. The status of these constraints is unclear. When are they enforced and checked?
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Closed following the semantics of element constructors agreed at the December f2f meeting.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
What is the semantics of data() applied to anything else than an element or attribute node ?
XQuery 1.0 and XPath 2.0 Data Model W3C Working Draft 17 January 2003 http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Jan/0251.html 4.1.5 string-value Accessor ---------------------------- 1. REPLACE entire section WITH: Every node has a string value; the way in which the string value is computed is different for each kind of node and is specified in the sections on nodes below. 4.1.6 typed-value Accessor -------------------------- 1. REPLACE: Otherwise, xs:anyType for elements or xs:anySimpleType for attributes. WITH: Otherwise, xs:anyType for elements or xdt:untypedAtomic for attributes. 2. REPLACE : * If the item is an element node with type xs:anyType, then its typed value is equal to its string value, as an instance of xdt:untypedAtomic. WITH: * If the node is an element node with type xs:anyType, then its typed value is equal to its string value, as an instance of xdt:untypedAtomic. 3. REPLACE : * The typed value of an element node with a simple type is derived from its string value and type in a way that is consistent with XML Schema validation. WITH: * If the node is an element node with a simple type or with a complex type of simple content, then its typed value is derived from its string value and type in a way that is consistent with XML Schema validation. 4. ADD: * If the item is an element node with complex type of empty content, then its typed value is the empty sequence. * If the node is an element node with a complex type of mixed content, then its typed value is its string value as an instance of xdt:untypedAtomic. 5. REPLACE: * If the item is an element node with complex content, dm:typed-value returns the empty sequence. WITH: * If the item is an element node with complex type of complex content, then its typed value is the empty sequence. ************************************************* XQuery 1.0 and XPath 2.0 Functions and Operators W3C Working Draft 10 December 2002 http://lists.w3.org/Archives/Member/w3c-archive/2002Dec/att-0035/02-xquery-operators.html 2.4 fn:data ----------- 1. REWRITE entire section as described in: http://lists.w3.org/Archives/Member/w3c-xsl-query/2002Nov/0391.html This text incorporates changes for nodes with complex type of mixed content: fn:data($srcval as item*) as atomic value* The fn:data function takes a sequence of items and returns a sequence of atomic values. The result of fn:data is the sequence of atomic values produced by applying the following rules to each item in $srcval: If the item is an atomic value, it is returned. If the item is a node, fn:data returns the typed value of the node, as defined by the accessor function dm:typed-value defined for that kind of node in [XQuery 1.0 and XPath 2.0 Data Model]. If the item is a comment, document, namespace, processing-instruction, or text node, then its typed value is equal to its string value, as an instance of xdt:untypedAtomic. If the item is an attribute node with type annotation xs:anySimpleType, then its typed value is equal to its string value, as an instance of xdt:untypedAtomic. The typed value of any other attribute node is derived from its string value and type annotation in a way that is consistent with XML Schema validation, as described in [XQuery 1.0 and XPath 2.0 Data Model]. If the item is an element node whose type annotation denotes a complex type of empty content, then its typed value is equal to the empty sequence. If the item is an element node whose type annotation is xs:anyType or denotes a complex type of mixed content, then its typed value is equal to its string value, as an instance of xs:untypedAtomic. If the item is an element node whose type annotation denotes a simple type or a complex type of simple content, then its typed value is derived from its string value and type in a way that is consistent with XML Schema validation, as described in [XQuery 1.0 and XPath 2.0 Data Model]. If the item is an element node whose type annotation denotes a complex type with complex content (i.e., a type that permits subelements), fn:data raises a type error. [ Ed note: The typed-value accessor returns an empty sequence when applied to an element node with complex type of comple content, whereas fn:data() raises a type error, because type errors are a characteristic of the language, not the data model. ] ************************************************************************ XQuery 1.0: An XML Query Language W3C Working Draft 15 November 2002 http://www.w3.org/TR/xquery/ and XPath 2.0 W3C Working Draft 15 November 2002 http://www.w3.org/TR/xpath20/ 2.3.2 Typed Value and String Value ---------------------------------- 1. ADD definition of fn:data() as given above following: The typed value and string value for each kind of node are defined by the dm:typed-value and dm:string-value accessors in [XQuery 1.0 and XPath 2.0 Data Model]. The normative definitions are in the [XQuery 1.0 and XPath 2.0 Data Model] and is repeated here for convenience: ***************************************************************************** XQuery 1.0 and XPath 2.0 Formal Semantics W3C Working Draft 15 December 2002 http://lists.w3.org/Archives/Member/w3c-archive/2003Jan/0033.html 7.2.5 The fn:data function -------------------------- 1. This section is entirely rewritten to align with new semantics. Introduction The fn:data function converts a sequence of items to a sequence of atomic values. Notation Infering the type for the fn:data function is done by applying the fn:data function as a Filter, using the same approach as for the XPath steps. statEnv |- fn:data on Type1 : Type2 Static Type Analysis -------------------- The general rule for the function fn:data is to apply the filter [fn:data on] to the prime type of its argument type, then apply the quantifier to the result: statEnv |- Expr : Type statEnv |- [fn:data on] prime(Type) : Type1 ---------------------------------------------------- statEnv |- fn:data(Expr) : Type1 o quantifier(Type) The rules for the [fn:data on] filter always take a prime type (i.e., a union of item types) as an argument. When applied to none, [fn:data on] yields none. --------------------------------- statEnv |- [fn:data on] none : none When applied to the union of two types, [fn:data on] is applied to each of the two types. The resulting types are combined into a factored type. This rule is necessary because [fn:data on] may return a sequence of atomic types. statEnv |- [fn:data on] Type1 : Type3 statEnv |- [fn:data on] Type2 : Type4 ------------------------------------------------ statEnv |- [fn:data on] Type1 | Type2 : prime(Type3 | Type4) o quantifier(Type3 | Type4) When applied to an atomic type, the [fn:data on] filter simply returns the atomic type: Type <: xdt:anyAtomicType --------------------------------- statEnv |- [fn:data on] Type : Type When applied to comment, processing instruction, text, and document node types, the [fn:data on] filter returns xdt:untypedAtomic. Type <: comment | processing-instruction | text | document ----------------------------------------------------------- statEnv |- [fn:data on] Type : xdt:untypedAtomic When applied to attribute node types with type annotation xs:anySimpleType or element node types with type annotation xs:anyType, the [fn:data on] filter returns xdt:untypedAtomic. statEnv |- AttributeType static lookup (of type xs:anySimpleType) ----------------------------------------------------------------- statEnv |- [fn:data on] AttributeType : xdt:untypedAtomic statEnv |- ElementType static lookup (of type xs:anyType) ----------------------------------------------------------------- statEnv |- [fn:data on] AttributeType : xdt:untypedAtomic When applied to an attribute type with any type annotation other than xs:anySimpleType, the [fn:data on] filter returns the attribute's simple type. statEnv |- AttributeType static lookup (of type TypeName) not(TypeName = xs:anySimpleType) statEnv |- (of type TypeName) expands to Type ---------------------------------------------------------- statEnv |- [fn:data on] AttributeType : Type When applied to an element type whose type annotation denotes a simple type or a complex type of simple content or a complex type of empty content, the [fn:data on] filter returns the element's simple type. statEnv |- ElementType static lookup TypeReference statEnv |- TypeReference expands to Type Type <: (Type1, Type2) Type1 <: AttributeType* Type2 <: xs:anySimpleType ---------------------------------------------------------- statEnv |- [fn:data on] ElementType : Type2 When applied to an element type whose type annotation denotes a complex type of mixed content, the [fn:data on] filter returns xdt:untypedAtomic. statEnv |- ElementType static lookup (of type TypeName) statEnv.typeDefn(TypeName) => define type TypeName Derivation? Mixed { Type1? } ------------------------------------------------------------------------------- statEnv |- [fn:data on] ElementType : xdt:untypedAtomic The [fn:data on] filter is not defined on any element type whose type annotation denotes a complex type of complex content and therefore raises a static error. Dynamic Evaluation ------------------ The dynamic semantics of fn:data() are specified in [2.4 fn:data] of [XQuery 1.0 and XPath 2.0 Functions and Operators]. |
Decision by: xpath-tf on 2003-02-11 (http://lists.w3.org/Archives/Member/w3c-xsl-query/2003Feb/0121.html)
Decision by: xquery on 2003-02-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0404.html)
Decision by: xsl on 2003-02-27 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Feb/0143.html)
Proposal accepted.
There is a known bug in the formal semantics which does not deal properly with principal node types. This bug should be resolved based on some semantics previously proposed by Phil Wadler.
Decision by: fs-editors on 2002-05-30
The bug in the semantics of XPath has been fixed in the current version of the document. See #FS-sec_steps.
The precise semantics of order by is still open issue.
1) The dynamic semantics of order by will not be formally specified. Instead the following text will be added to the appropriate FS section:
The dynamic semantics of order by is not formally specified. Formally specifying order by may be done with the addition of tuples in the data model and of operations on tuples. We believe this addition would add much complexity to little benefit. The XQuery 1.0 document contains enough information about the semantics of order by that can be used for implementation purposes. |
2) The satic semantics of order by will be specified. Here is how:
* Normalization:
The order by is normalized as an order by close in the single inner-most for or let clause. For instance:
for $x in //a, $y in //b order by $x+$y return $x |
is normalized to
for $x in //a return for $y in //b order by $x+$y return $x |
* Static typing:
The order by clause in a single for loop is statically typed as follows:
statEnv |- Expr1 : Type1 statEnv.varType($x : Type1) |- Expr2 : Type2 Type2 <: anySimpleType statEnv.varType($x : Type1) |- Expr3 : Type3 -------------------------------------------- for $x in Expr1 order by Expr2 return Expr3 |
Decision by: xquery on 2003-05-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0024.html)
Proposal accepted.
Decision by: xsl on 2003-09-11 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Sep/0042.html)
Resolution endorsed.
The precise semantics of element constructors is still an open issue.
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Closed following the semantics of element constructors agreed at the December f2f meeting.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
The "instance of" expression allows an optional "only" modifier. The use case for such a modifier is based on named typing, while the XQuery semantics is currently based on structural typing. It is not clear what the semantics of the "only" modifier under structural typing should be and how it can be supported.
Decision by: fs-editors on 2002-05-30
XQuery does not support only anymore.
There is an asymetry in the typing for the default clause in typeswitch vs. the other case clauses. This results in a less precise type when the default clause can be applied.
It would be nicer to be able to have the type be more precise, like for the other case clauses.
The technical problem is the need for some form of negation. I think one could define a "non-common-primes" function that would do the trick, but I leave that as open for now until further review of the new typeswitch section is made.
Decision by: fs-editors on 2003-02-13 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Feb/0075.html)
Decision by: xquery on 2003-02-19 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0404.html)
Decision by: xsl on 2003-02-27 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Feb/0143.html)
Accepting proposal in FS-Issue-0173 resolves this issue.
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Reaffirming decision.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
Not all the fallback conversion rules are specified yet in section #FS-sec_type_conversions. All the remaining rules in the fallback conversions table must be specified.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. There is no more XPath type conversions, and this is in fact subsumed by [FS-Issue-0178: Semantics of XPath 1.0 compatibility].
The following components dynamic contexts have no formal representation yet: current date and time.
Related question: where are these context components used?
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Add current date and time in the Dynamic Environment.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
What do the default namespace and type environments contain? I believe at least the default namespace environment should contain the “xs”, “fn” and “op” prefixes, as well as the default namespaces bound to the empty namespace. Should the default type environment contain wildcard types?
Decision by: xsl on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F
Decision by: xquery on 2003-05-16 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003May/0176.html)Joint F2F
Decided to accept the "Processing Model" Proposal which addresses this issue.
The "spreadsheet" contains a list of the items.
Serialization of data model instances, and XQuery results is still an open issue.
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Serialization is implemented in the data model.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
The [XPath/XQuery] data model supports an error value, but there is no constructor for it. Currently the formal semantics is using the notation dm:error() to create an error value. Should there be some function(s) in the XQuery 1.0 and XPath 2.0 Functions and Operators document to create error values?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. There is no error value in the data model. There is now an F&O function fn:error().
Phil suggests the data model should support primitive literals in their lexical form, in which case no explicit dynamic semantic rule would be necessary.
More generally, should the data model support a constructor syntax?
Decision by: xsl on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
Decision by: xquery on 2003-03-07 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Mar/0269.html)Joint meeting
The corresponding syntax is going to be implemented in the formal semantics.
Decision by: fs-editors on 2003-08-11 (http://lists.w3.org/Archives/Member/w3c-query-editors/2003Aug/0043.html)
Text is in working draft; approved by XQuery WG at 2003-08-06 telcon.
op:to
The binary operator “to” is not defined on empty sequences. The XQuery 1.0 and XPath 2.0 Functions and Operators document says operands are decimals, while the XQuery document says they are integers. What happens when Expr1 > Expr2?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. Resolved by the current definition of F&O op:to().
The XQuery 1.0 and XPath 2.0 Functions and Operators document provides only one function for union (intersect, etc.) of sequences of nodes and values. The semantics is very different for node only and value only sequences. The semantics is undefined for heterogeneous sequences. Should we have two union (intersect, etc.) functions, one for nodes, and one for values?
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
No change to document. Value based sequence operations are in appendix of F&O as user-defined functions.
The XQuery 1.0 and XPath 2.0 Functions and Operators document does not provide any function for casting, just a table and casting rules. Wouldn't it be preferable to either have an explicit function to normalize to? This relates to Issue 17 in the XQuery 1.0 and XPath 2.0 Functions and Operators document.
Decision by: xquery on 2002-12-11 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2002Dec/0317.html)
F&O now has casting functions.
Some XQuery 1.0 and XPath 2.0 Functions and Operators functions are overloaded. How to deal with overloaded built-in functions in the Formal Semantics is still an open issue.
Decision by: fs-editors on 2002-10-30
overloaded (built-in) functions have distinct entries in the static and dynamic function environment.
/
Some of the semantics of the root expression
/
is still an open issue. For instance, what
should be the semantics of '/'
in case of a
document fragment (I.e., created using XQuery element
constructor).
Decision by: xquery on 2003-02-05 (http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2003Feb/0161.html)
Decision by: xsl on 2003-02-20 (http://lists.w3.org/Archives/Member/w3c-xsl-wg/2003Feb/0091.html)
Recommendation to close: the semantics of '/' is defined properly in the FS document submitted before the last f2f meeting and aligned with the other documents.
Close issue with no change to documents.
The only way to bind position() is through implicit operations. It would be useful and cleaner to also have a way to bind position in a sequence explicitely. The FS editors proposed several syntax for such an operation, one of these syntaxes look like “for $