Associating timesheets with XML documents

Petri,

> Could you show an example of case, where the timesheet element cannot
be used to reference the Timesheet in XML language.

I have been thinking how one could use Timesheets to provide pipeline
step orchestration for the XML Pipeline Language (XProc). In the case of
an XProc pipeline document, the smil:timesheet element would be
processed as a step which would cause an error if no such step had
already been declared.

Included below is an example, abridged so that you can just concentrate
upon the timing and synchronization parts, that instructs a compliant
XProc processor to execute the three terms:get steps in parallel but
only once the 'aggregate-terms' step has begun. Also note that the three
steps have a duration of 11 seconds so that there is, in effect, a
time-out on the requests. There are other possibilities too for using
time offsets and delays as well as repeats so that pipelines can run
steps periodically and trigger other steps upon completion either
straight away or some time later. You could even programmatically
dispatch events from outside the pipeline that would trigger the active
phases of steps.

I don't think it is as far-fetched as it looks but I'm sure there are
subtleties underneath that are just waiting to rise-up and bite!

Regards

Philip Fennell



<!-- aggregate-terms.smil -->
<?xml version="1.0" encoding="UTF-8"?>
<smil:timesheet>
  <smil:par>
    <smil:item select="#service1" begin="aggregate-terms.begin"
dur="11s"/>
    <smil:item select="#service2" begin="aggregate-terms.begin"
dur="11s"/>
    <smil:item select="#service3" begin="aggregate-terms.begin"
dur="11s"/>
  </smil:par>
</smil:timesheet>



<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step
               xmlns:p="http://www.w3.org/ns/xproc"
               xmlns:smil="http://www.w3.org/ns/SMIL30"
               xmlns:terms="http://example.org/service/terms/"
               xmlns:xs="http://www.w3.org/2001/XMLSchema"
               name="TermAggregation">

       <?xml-timesheet href="aggregate-terms.smil"?>

       <p:input port="source"/>
       <p:output port="result" sequence="true"/>

       <p:declare-step type="terms:get">
               <p:input port="source"/>
               <p:output port="result" sequence="true"/>

               <p:option name="href"/>

               <!-- Omitted for brevity's sake, but it would use
p:http-request
                        to submit the text that you want terms to be
extract from. -->
       </p:declare-step>

       <terms:get xml:id="service1" name="OpenCalais"
href="http://opencalais.com/..."/>
       <terms:get xml:id="service2" name="MetaCarta"
href="http://www.metacarta.com/..."/>
       <terms:get xml:id="service3" name="Yahoo"
href="http://search.yahooapis.com/..."/>

       <p:identity name="result-wrapper">
               <p:input port="source">
                       <p:inline>
                               <terms:group/>
                       </p:inline>
               </p:input>
       </p:identity>

       <p:insert xml:id="aggregate-terms" match="/terms:group"
position="last-child">
               <p:input port="source"/>

               <p:input port="insertion">
                       <p:pipe step="OpenCalais" port="result"/>
                       <p:pipe step="MetaCarta" port="result"/>
                       <p:pipe step="Yahoo" port="result"/>
               </p:input>
       </p:insert>

</p:declare-step>




-----Original Message-----
From: Petri Vuorimaa [mailto:petri.vuorimaa@tkk.fi]
Sent: 24 April 2009 15:18
To: Philip Fennell
Cc: www-smil@w3.org
Subject: Re: Associating timesheets with XML documents

Hello,

I suppose that it would be possible to define a xml-stylesheet kind of
referencing using, e.g., xml-timesheet reference. However, the Timesheet
language already has the timesheet element and its src attribute to do
this. The link element example is given in the specification to show how
timesheet can be referenced in non-XML languages. Could you show an
example of case, where the timesheet element cannot be used to reference
the Timesheet in XML language. If there is a clear need to provide other
ways to reference external Timesheets documents in XML languages, we
could document it in the future versions of Timesheets language.

Yours,

Petri Vuorimaa
Helsinki University of Technology

On 23.4.2009, at 14:45, Philip Fennell wrote:

>> From the SMIL Timesheets spec. the examples show either embedding the
> timesheet in a document head or using existing link elements:
>
> <link href="timesheet.smil" rel="timesheet"
> type="application/smil+xml">
>
> For those XML document types that don't have link elements for this 
> purpose, is there a case for creating a processing instruction like 
> the one already used by stylesheets:
>
> <?xml-stylesheet href="mystyle.css" type="text/css"?>
>
> that would take the following form:
>
> <?xml-timesheet href="timesheet.smil" type="application/smil+xml"?>
>
> Having searched the spec and the www-smil mail archives I see no 
> examples of this already suggested.
>
>
>
> 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.
> 					
>


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 Friday, 24 April 2009 14:45:40 UTC