XPath 2.0 introduced many new features XQuery-cośtam:
- Added support for all XML simple types
- - Many new functions (trippled instruction count)
+ - Many new functions (tripled instruction count)
- All expressions evaluate to sequence
- Introduces conditional expressions and for-loops
- Inline functions
- - Namespace literals - Namespace may be embeded into function name
+ - Namespace literals - Namespace may be embedded into function name
- Support for union types - collections containing elements of different types
- Mapping operator - '!' performs evaluation for each element in sequence and concatenates results
- Introduced maps
XPath 3.1
- - New operator for function chaing '=>'
+ - New operator for function chaining '=>'
- Introduced maps that store data in pair 'key:value' - 'map{ key : value, key : value
}'
- Introduced arrays - they differ from sequences in that they can be nested 'array{1, 5, 7,
@@ -106,7 +108,9 @@
fn:for-each(sequence*, function)
+
-
-
W3C Documentation reference: #func-for-each
- fn:for-each(sequence*, function)
+ +
+
W3C Documentation reference: #func-for-each
+ fn:for-each-pair(sequence*, sequence*, function)
- -
-
W3C Documentation reference: #func-for-each-pair
- fn:for-each-pair(sequence*, sequence*, function)
+ +
+
W3C Documentation reference: #func-for-each-pair
+ fn:fold-left(sequence*, baseValue, function)
- -
-
W3C Documentation reference: #func-fold-left
- fn:fold-left(sequence*, baseValue, function)
+ +
+
W3C Documentation reference: #func-fold-left
+ fn:fold-right()
- -
-
W3C Documentation reference: #func-fold-right
- fn:fold-right()
+ +
+
W3C Documentation reference: #func-fold-right
+ fn:filter(sequence*, function)
- -
-
W3C Documentation reference: #func-filter
- fn:filter(sequence*, function)
+ +
+
W3C Documentation reference: #func-filter
+