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

Re: Straight-through or Other Processing?

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Mon, 16 Jan 2006 12:44:54 +0100
Message-ID: <43CB8736.2070808@orbeon.com>
To: public-xml-processing-model-wg@w3.org

Alex Milowski wrote:
 >
 > As I see it, we have three kinds of processing models we can
 > consider:
 >
 > 1. Straight-through: a pipeline is a sequence of steps where each step's
 >    output is chained to the next.
 >
 > 2. A dependancy-based model where steps have input dependancies.  A
 >    target is choosen and the sequence of steps is determined by chasing
 >    these inputs down.
 >
 > 3. A parallel model where any step can ask for an additional model and
 >    that causes another pipeline "chain" to execute--possibly in
 >    parallel.

You are introducing the question of imperative vs. functional
programming, which is an important topic as the XML processing model
we will define will probably have to work in one of those two ways.

XPL follows a functional approach, where pipelines and pipeline steps
can be seen as functions with a number of inputs and number of
outputs. Like in functional programming, the processing model follows
the idea of lazy evaluation, i.e. you evaluate only what you need to
produce the requested result(s) (well, your implementation may be free
to evaluate more, but then it will perform useless tasks).

For example, if your pipeline has two outputs, o1, and o2, and an
external consumer requires the XML infoset provided by o1, the
dependencies of o1 will be looked at. If o1 is produced for example by
an XSLT transformation, then that tranformation must run. In turn,
that transformation probably requires inputs, in which case those a
evaluated as needed. Etc. However if o2 is not requested, then its
dependencies do not need to be even looked at.

 From an implementation point of view, the approach is simple to
implement, and it makes sense from a user's point of view too, that is
if you are familiar with functional programming. Of course you are
already familiar with this kind of approach if you know XSLT and
XPath.

The functional approach is firmly rooted in theory but also in
practice. Declarative and functional approaches have been a
"tradition" at W3C, from XSLT, XPath and XQuery as languages to
XForms' calculation model, for example. For these reasons, we at
Orbeon probably have a slight bias toward functional solutions.

-Erik
Received on Monday, 16 January 2006 11:51:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:46 GMT