- From: Jostein Austvik Jacobsen <josteinaj@gmail.com>
- Date: Tue, 19 Mar 2013 17:23:41 +0100
- To: XProc Dev <xproc-dev@w3.org>
- Message-ID: <CAOCxfQfWDhnW+PH7xhUeYWY9XARCBx9E2rpTcq+818KC2BvC1Q@mail.gmail.com>
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 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="http://www.example.com/mydependency.xpl"/>
...
</p:declare-step>
But I don't want x:mystep to invoke
http://www.example.com/mydependency.xplas 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="http://www.example.com/mydependency.xpl"
uri="mockdependency.xpl"/>
</x:mystep>
The Resource Manager page on the v.next wiki[1] isn't very detailed yet but
maybe it will be possible to do something like this with the planned
resource manager?
[1] http://www.w3.org/wiki/XProc_Resource_Manager
(another thing that would make XProc testing easier would be dynamic
pipeline execution; p:evaluate/cx:eval)
Jostein
Received on Tuesday, 19 March 2013 16:24:30 UTC