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

Re: What the semantics of a construct should look like

From: Richard Tobin <richard@inf.ed.ac.uk>
Date: Tue, 3 Oct 2006 11:50:15 +0100 (BST)
To: public-xml-processing-model-wg@w3.org
Message-Id: <20061003105015.53DCB740CF3@macintosh.inf.ed.ac.uk>

Here is a sample of what the component description might look like.
Lots of details are probably wrong; the idea is just to suggest a
way we might describe things.

-- Richard

There is a class hierarchy with component at the root.  A pipeline
program contains instances of these classes.  When a pipeline is run,
component instances are activated - the running instances are called
activations.  During the running of a pipeline program a component
instance may be activated once, more than once (e.g. in a for-each),
or never (e.g. in a not-taken choose branch)

A component instance has a static environment containing (among
other things) a set of visible external ports.


Component
=========

Parts:

 zero or more input ports
 zero or more output ports
 zero or more parameters
 a static environment

Semantics:

The semantics of components are described in the various subclasses.

Atomic component
===============

Subclass of component.

Parts:

 as for component

Constraints:

An atomic component does not contain components whose input ports are
connected to the visible external ports in its environment.  [I.e.
no lines cross the boundary of the box.]
 

XSLT 1 Component
================

Subclass of atomic component.

Parts:

 source input
 stylesheet input
 result output
 zero or more parameters

Semantics:

When activated, an XSLT 1 component instance reads a stylesheet from
its stylesheet port and a document from its source port.  These are
used as described in the XSLT spec and the result is written to the
result port.  The parameters are interpreted as XSLT parameters.


Flow
====

Subclass of component.

Parts:

 zero or more input
 zero or more output ports
 zero or more parameters
 zero or more child components
 zero or more pipes each

Constraints:

 Each pipe connects 
   (an input port of the flow or an output port of a child component
    or a visible external port in the flow's environment) to
   (an input ports of a child component or an output port of the flow).

 If the child components are considered as nodes and the pipes between
 them as arcs, they form a DAG.

Semantics:

 The visible external ports for a child component are the input ports
 of the flow, the output ports of the [other] child components, and
 the visible external ports of the flow itself.
 When the flow is instantiated, each of its child components is instantiated.
 The document or sequence available on an input port of a
 child component is the document or sequence available on
 the port it is connected to. [Note: this is the semantics of a pipe!]


Choose
======

Subclass of component.

Parts:

 a sequence of pairs (condition, flow) where each condition is ...
 ...

Constraints:

 ...

Semantics:

 The visible external ports for a child flow are the input ports of
 the choose and the visible external ports of the choose.
 The conditions are evaluated until one is true, then the
 corresponding flow is activated.
 The document or sequence available on an input port of the
 activated child flow is the document or sequence available on
 the port it is connected to.
 ...


For-each
========

Subclass of component.

Parts:

 source input
 an XPath
 a child flow
 ...

Constraints:

 ...

Semantics:

 The visible external ports for the child flow are the input ports of
 the for-each, the visible external ports of the for-each, and an
 additional port called the iteration port.
 The child flow is activated once for each element [?] in the document
 or sequence on the source input that matches the XPath.
 The document or sequence available on the source input of the child flow is a
 document containing a single child which is [a copy of?] the matching
 node.
 The document or sequence available on each other input port of the
 child flow is the document or sequence available on
 the port it is connected to.
 ...


Pipeline
========

Subclass of flow.

Parts:

 ...

Constraints:

 A pipeline has no visible external ports in its environment.  [It's
 a top-level flow.]
Received on Tuesday, 3 October 2006 10:49:49 GMT

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