CSC 4710 Lecture Notes - Lecture 23: Xquery, Xpath, Railways Act 1921
Document Summary
So far the discussion was informal: xquery semantics defines what the expected result of a query is, defined analogously to the semantics of sql, xquery semantics (cont"d) Step 1: produce a list of bindings for variables. The for clause binds each variable to a list of nodes specified by an xquery expression. The expression can be: an xpath expression, an xquery query, a function that returns a list of nodes. End result of a for clause: ordered list of tuples of document nodes. Each tuple is a binding for the variables in the for clause: xquery semantics (cont"d) Bind to document nodes {v,w}; to {x,y,z} Then for clause produces the following list of bindings for and : /v, /x, /v, /y, /v, /z, /w, /x, /w, /y, /w, /z, xquery semantics (cont"d) Step 2: filter the bindings via the where clause.