W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2006

Re: Side effects and interoperability

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Wed, 19 Apr 2006 11:12:37 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87hd4peh0a.fsf@nwalsh.com>
/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| I therefore think it's vital that if the pipeline language doesn't
| constrain a pipeline engine to run two steps in a particular order
| then the order in which the two steps are run doesn't have an effect:
| the steps have no side effects.

I agree.

Clearly, in this pipeline:

  A => B

the output from A flows to B so A has to run before or at the same
time as B.

In this pipeline:

  C => D => +---+
            | G |
  E => F => +---+

there's no constraint on the order in which C and E are run so it
shouldn't matter.

I think we've identified one class of side-effects that we have to
consider: auxilliary outputs. Suppose C produces module.xsl which
E consumes (in an xsl:include).

We could model this as an output from C flowing into E. But that might
not be convenient. For one thing, the xsl:include statement is
probably going to be processed by the XSLT module which will attempt
to grab it by URI. In this case, if we know there's a resource manager
involved, we can be sure that it returns the right thing.

If there isn't a resource manager involved, then as long as we make
sure that C runs to completion before E starts, we can assume that
module.xsl will have been written and the right thing will happen.

I think we can model this with "auxiliary" inputs and outputs.

  C => D => +---+
  |         |   |
  |         | G |
  v         |   |
  E => F => +---+

As far as I can see, this gives the graph enough information to
determine the order in which steps must be evaluated. In this case,
there's still no dependency between D and F so it shouldn't matter
what order they're processed in.

In short:

1. I propose that we adopt some mechanism for identifying auxiliary
   inputs and outputs

2. With that addition to the flow graph in place, I propose that we
   assert that processors are side-effect free.

                                        Be seeing you,

Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Wednesday, 19 April 2006 16:52:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:39 UTC