previous
01: XQ2XML: Transformations on XQueries
02: XQ2XML: Transformations on XQueries
03: XQuery
04: XML syntax
05: Parsing XQuery
06: Parsing XQuery (XML)
07: Parsing XQuery syntax errors (XML)
08: XQueryX
09: XQ2XQX Stylesheet
10: xq2xsl: translator or implementation?
11: 1+2 as XSLT
12: Generated XSLT Functions
13: Direct element constructor
14: typeswitch
15: Quantified Expressions
16: FLWOR
17: FLWOR (simple cases)
18: FLWOR (less simple cases)
19: FLWOR (tuples)
20: FLWOR (general case)
21: Schema features
22: Built in types
23: xq2xsl: Why you might be interested.
24: xq2xsl: Why you might not use it
25: xq2xsl: Why you might use it
26: Queries and transformations on XQuery
27: Full Axis Feature
28: Full Axis Stylesheet
29: Querying External Parameters
30: XQuery and XSLT: Similarities
31: XQuery and XSLT: Differences
32: Conclusions
33: Links next
Full Axis Feature
XQuery makes some of the XPath axes optional, they will not work in some XQuery systems.
$y/preceding::* [2 ]/string(@i) xq2xml provides an XQuery-to-XQuery transformation that replaces all references to optional axes by equivalent portable (but
probably less efficient) expressions.
$y/
(let $here := . return
reverse(root()/descendant::* [. << $here]
[not(descendant::node()[. is $here])]))
[2 ]/string(@i)