Re: XProc testing; mock steps and

On Tue, Mar 19, 2013 at 5:23 PM, Jostein Austvik Jacobsen
<> wrote:
> So I've been fiddling with testing some XProc steps lately, and realized
> that there's no way (afaik) to create a "mock step" without editing either
> the step you want to test or the XML catalog. So it's not possible to do
> unit testing in XProc; only integration testing.

I agree, and I am implementing a resource manager approach within my
exp xproc processor ... I agree that mock testing is difficult today
in XProc.

> I think it would be useful to be able to override a URI that is already
> defined in a XML catalog. Say I want to test the following step:
> <p:declare-step type="x:mystep" xml:base="file:/tmp/mystep.xpl" ...>
>     <p:import href=""/>
>     ...
> </p:declare-step>

its unclear at what level in the syntax this could be exposed ... will
add to our 'bucket' list for vnext discussions.

> But I don't want x:mystep to invoke
> as it might produce non-deterministic side-effects. What if I could do
> something like this to override the XML catalog:
> <x:mystep>
>     <p:resource name=""
> uri="mockdependency.xpl"/>
> </x:mystep>
> The Resource Manager page on the wiki[1] isn't very detailed yet but
> maybe it will be possible to do something like this with the planned
> resource manager?
> [1]
> (another thing that would make XProc testing easier would be dynamic
> pipeline execution; p:evaluate/cx:eval)

as an aside, if you would be willing to make a more formal submission
for the shape of an p:eval we could consider it for publication as a
Note, though no promises ... eval historically in any computing
context brings the worst out of people ;)

Jim Fuller

> Jostein

Received on Monday, 3 June 2013 06:18:16 UTC