I currently have some mega complicated procedure for parsing the entire response and validating it against our ICD (interface control document)
Lovely - works like a dream.
Until someone suggests something to improve it, or we change the interface etc.
Then I have to change all the test cases by copying and pasting the XQuery assertion code across all tests.... not great
So I'm thinking, roll my own function rb:validateThis(./)
And call it from every assertion - this requires me just to import the definition of rb:validateThis() into each assertion - this wont change. And then hey presto any change is carried across all assertions when I change the (single) definition of rb:validateThis().
tl;dr - Easy way to maintain a single version of an XQuery across multiple assertions?