| (: insert-start :) | |
| declare variable $input-context1 external; | |
| declare variable $input-context2 external; | |
| (: insert-end :) | |
| <books-with-prices> | |
| { | |
| for $b in $input-context1//book, | |
| $a in $input-context2//entry | |
| where $b/title = $a/title | |
| return | |
| <book-with-prices> | |
| { $b/title } | |
| <price-bstore2>{ $a/price/text() }</price-bstore2> | |
| <price-bstore1>{ $b/price/text() }</price-bstore1> | |
| </book-with-prices> | |
| } | |
| </books-with-prices> |