Heya,
We've got a series of XML documents that have validation operations performed on them via XQuery to locate whether nodes exist in the document and if they hold the right values.
We would like to introduce some unit testing for all these XQuery statements, similar to the unit testing introduced for XSLTs however we've hit a slight roadblock with XSpec.
The problem is that when you are using a function, it expects parameters whereas when we are actually running them (in Java via Saxon) then it is just a statement executed on the document.
We can't see a way to just tell XSpec to execute 'x' but not as a function or to combine <xspec:context /
> with <xspec:call /
>
Does anyone know of a way using XSpec or a similar testing framework to set up a context, execute a piece of XQuery on the context and then validate the result?
Thanks.