Extension steps and declarations

Consider the following pipeline:

<p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
     xmlns:cx="http://xmlcalabash.com/ns/extensions">
  <cx:message message="I just did the identity step!"/>
</p:pipeline>

Can *any* conformant processor run that pipeline?

One position says, that's a Calabash extension step, Calabash knows
how to run it, so the answer is clearly "Yes".

Another position says, what about:

   Extension steps [...] and there must be a visible step declaration
   at the point of use (see Section 3.2, “Scoping of Names”).

There's no visible declaration, so the answer is clearly "No".

Except we're talking about an *extension* step, right? So there's no
interoperability virtue in making the declaration visible. The
declaration won't help another implementation run it.

Well, ok, continuing down this slippery slope. Suppose I have this
perfectly ordinary pipeline library on my system:

<p:library xmlns:p="http://www.w3.org/ns/xproc">
  <p:pipeline xmlns:ex="http://example.com/steps/foo"
              type="ex:foo">
    <p:identity/>
  </p:pipeline>
</p:library>

Can *any* conformant processor run this pipeline?

<p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
     xmlns:ex="http://example.com/steps/foo"
  <ex:foo/>
</p:pipeline>

Now you might be tempted to say, "No, of course not" because that
step isn't an extension step, so how could you know what it is?

But, suppose my implementation has a configuration file or a command
line option that lists libraries that should be loaded by default. So
what if the perfectly ordinary library you identified has already been
loaded by my implementation, can I run it then?

I think:

1. If we agree that Calabash should be able to run the first example,
   then the consistent position is to say that it should also be able
   to run the second example if it's imported the library through some
   out-of-band mechanism.

2. If we agree that processors can load arbitrary libraries through
   out of band mechanisms and that those mechanisms are sufficient to
   satisfy the "visible step declaration" clause, then we've blown
   interoperability out of the water.

So I propose that *both* pipelines are invalid. If I want to run a
Calabash extension, I should have to explicitly declare or import the
declaration in the pipeline:

<p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
     xmlns:cx="http://xmlcalabash.com/ns/extensions">
  <p:import href="http://xmlcalabash.com/extensions/builtin"/>
  <cx:message message="I just did the identity step!"/>
</p:pipeline>

We've already established that a processor is allowed to recognize an
import URI and "know" what it means, so adding the import statement
doesn't require that Calabash retrieve the library over the web.

Yes, this opens up the possibility that I'll have a magic URI that you
can't GET, but that's just a violation of Web Architecture principles,
so I'm already at fault if I do that, so I don't think we need to fret
about it (beyond, perhaps, reminding extension authors that they
SHOULD make such representations available).

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Whatever you may be sure of, be sure of
http://nwalsh.com/            | this: that you are dreadfully like
                              | other people.--James Russell Lowell

Received on Friday, 21 November 2008 12:41:05 UTC