Re: XProc Agenda 15 June 2006

I see I have any action to write a syntax proposal:

>            2. ACTION A-23-02: Richard to write a syntax proposal

... but I haven't done anything about it yet.  So here is an example
of the syntax I'm currently using for straight-through pipelines.
It's quite trivial but I thought I'd post it anyway.

This is a pipeline that passes a document through XSLT and then XInclude:

<pipeline xmlns="http://ltg.ed.ac.uk/pipeline">

  <input name="source"/>
  <output name="result" from="inc.result"/>

  <step name="ss" type="xslt">
    <with-input name="stylesheet" uri="http://example.org/foo.xsl"/>
    <with-input name="source" from="source"/>
    <with-param name="xslt-params" value="p='xyz'"/>
  </step>

  <step name="inc" type="xinclude">
    <with-input name="source" from="ss.result"/>
  </step>

</pipeline>

As you can see, I'm using compound names of the form step.port to
identify ports.  I find this less tedious than making up names for
each instance of a port.  <with-input> must have either a "from"
attribute or a "uri" attribute (the latter should probably be called
"href").

The components are defined by a file such
as the following:

<components xmlns="http://ltg.ed.ac.uk/pipeline">

  <component type="xslt">
    <input name="source"/>
    <input name="stylesheet"/>
    <output name="result"/>
    <param name="xslt-params"/>
  </component>

  <component type="xinclude">
    <input name="source"/>
    <output name="result"/>
  </component>

</components>

So that the compiler can identify missing inputs and so on.

-- Richard

Received on Thursday, 15 June 2006 12:48:49 UTC