- From: Ingo Macherius <macherius@darmstadt.gmd.de>
- Date: Fri, 2 Mar 2001 17:35:37 +0100
- To: <www-ql@w3.org>
Jonathan, > > Thus semantic > > identity MUST be always given when transforming FLWR-XQuery to XML Query > > Algebra expressions and from there to another syntax. There can > > not be more power in XQuery or any other syntax then there is in the > > Algebra. I hope I got this right ? > I am not sure I understand what you mean by FLWR-XQuery. Do you mean > XQuery? There is only one language named XQuery, and FLWR is just one of > the ten or so expression types in XQuery. I can not agree there is just one language named XQuery, formerly known as "W3C XML Query". However, there is just one proposed syntax for it, yet, which I refer to as FLWR-XQuery. The other syntax will be at least XML-XQuery, while others like XSLT-XQuery or XPath-Xquery are worth while thinking of. Thus I do not agree we can limit the term XQuery to a specific syntax suggestion. > I am also not sure that you and I mean the same thing by the phrases > "semantic sugar" and "semantic identity". If I convert an XQuery > expression > into the algebra, I may not be able to convert back from the > algebra to the > original XQuery expression. If I convert an XQuery expression This raises orthogonality questions. If certain constructs derived by building an algebra tree parsing FLWR-XQuery have an ambigous mapping back into FLWR-XQuery, the question is whether FLWR-XQuery is orthogonal enough. E.g. currently a fair amount of what can be done in WHERE can also be epxressed as an XPath' filters(or whatever you call the path expression in FLWR-XQuery). Another issue is AND, OR etc. which directly (even syntactically) collide with existing XPath keywords. I understand there currently can not be a literal roundtrip FLWR->Algebra->FLWR. But unless this becomes feasible, FLWR-XQuery must not be considered orthogonal enough. This may require some heuristics to disambiguate the rewrite to FLWR syntax. > into the XML > representation of the parse tree, the information content in the two > syntaxes is identical. As explained above, a true XML syntax will hopefully dissolve XPath-Expressions, FLWR-expression and and XSLT-ish RETURN sections into something which closely resembles Algebra expressions. I have to second Michael Rys here (even if I'm not so sure if he wasn't joking when writing his mail regarding this issue). For me this is what I expect from the XML syntax. Thus a roundtrip through the parse tree, or the XML syntax, should loose any syntactic dependencies from FLWR-Xquery. Just as relational algebra is independed of SQL syntax. Second, I think it's a bit vague to talk of "information content of syntaxes". We can only compare equality of query expressions on the operational semantic level, not in terms of parse trees similarities. This is what query optimization by equality and query rewrite for physical models is all about. Regards, Ingo Macherius
Received on Friday, 2 March 2001 11:33:54 UTC