W3C home > Mailing lists > Public > xproc-dev@w3.org > March 2009

Something missing from the XProc spec...

From: Philip Fennell <Philip.Fennell@bbc.co.uk>
Date: Wed, 11 Mar 2009 08:30:41 -0000
Message-ID: <F3685F4A877F284F8054E328390447D14C6E2F@bbcxues17.national.core.bbc.co.uk>
To: <xproc-dev@w3.org>
I'm currently looking at the XProc test suite, and it occurred to me
that there is one particular 'step' missing from XProc. Here is a simple
test from the Test Suite:

<t:test xmlns:t="http://xproc.org/ns/testsuite"
        xmlns:p="http://www.w3.org/ns/xproc"
        xmlns:c="http://www.w3.org/ns/xproc-step"
        xmlns:err="http://www.w3.org/ns/xproc-error">

  <t:title>Test p:add-attribute #001</t:title>

  <t:input port='source'>
    <document>
      <title>Some Title</title>
      <para>Some paragraph.</para>

    </document>
  </t:input>

  <t:pipeline>
    <p:pipeline name="pipeline">
      <p:add-attribute match="title" attribute-name="foo"
attribute-value="bar"/>
    </p:pipeline>
  </t:pipeline>

  <t:output port="result">

    <document>
      <title foo="bar">Some Title</title>
      <para>Some paragraph.</para>
    </document>
  </t:output>

</t:test>

I'd like to create an XProc pipeline to process this test document but
in order to do so I'd need a p:eval-pipeline step that had the ability
to take the pipeline declared in t:pipeline, and apply it to the t:input
document. It could have the following signature:

<p:declare-step type="p:eval-pipeline">		
     <p:input port="source"/>
     <p:input port="pipeline"/>
     <p:input port="parameters" kind="parameter"/>
     <p:output port="result"/>
</p:declare-step>

All that I'd then need to do is use the p:compare step to check that the
t:input document fragment matched the result from the p:eval-pipeline
step.

I imagine that this feature would be a cinch for an EXProc extension
and, in the fullness of time, I'll be implementing it in my own XProc
processor 'Half-pipe'.



Regards

Philip Fennell

>XML Developer (The Forge)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T:	0208 0085318

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					
Received on Wednesday, 11 March 2009 08:31:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 11 March 2009 08:31:17 GMT