-
-
Save AdamSteffanick/94d92ad956f2e03c555bf2f9ec94d535 to your computer and use it in GitHub Desktop.
Combining Node Sequences
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| let $old-words := | |
| <stopwords> | |
| <word>the</word> | |
| <word>a</word> | |
| <word>in</word> | |
| <word>of</word> | |
| <word>as</word> | |
| </stopwords> | |
| let $new-words := | |
| element stopwords { | |
| $old-words/word except $old-words/word[4] | |
| } | |
| return $new-words |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| (: union, intersect, except :) | |
| let $seq := (<name>Arnold</name>, <name>Betty</name>, <name>Claire</name>) | |
| let $seq1 := ($seq[1], $seq[2]) | |
| let $seq2 := ($seq[1], $seq[2]) | |
| let $seq3 := ($seq[2], $seq[3]) | |
| return $seq1 except $seq3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment