RE: Does XProc support event-driven processing?

Seems naive, but could you just *always* sum the quantity * cost =
total-cost as a step near the end of your pipeline (after all possibility of
updating merch)?

-Mike

> -----Original Message-----
> From: xproc-dev-request@w3.org 
> [mailto:xproc-dev-request@w3.org] On Behalf Of Costello, Roger L.
> Sent: Sunday, June 14, 2009 4:32 PM
> To: xproc-dev@w3.org
> Subject: RE: Does XProc support event-driven processing?
> 
> 
>  
> > Can you elaborate on what you mean by "changes" ?
> 
> Suppose this XML document is flowing through an XProc pipeline:
> 
> <purchases date="2009-05">
>     <merchandise>
>         <name>Sony HT-IS100 BRAVIA Home Theater Micro System</name>
>         <cost currency="USD">299.00</cost>
>         <quantity>1</quantity>
>     </merchandise>
>     <merchandise>
>         <name>ASUS Eee PC 1000HE Netbook Computer</name>
>         <cost currency="USD">379.00</cost>
>         <quantity>1</quantity>
>     </merchandise>
>     <merchandise>
>         <name>Sony ICD-PX720 Digital Voice Recorder</name>
>         <cost currency="USD">49.00</cost>
>         <quantity>1</quantity>
>     </merchandise>
>     <total-cost currency="USD">727.00</total-cost>
> </purchases>
> 
> I think it would be powerful to be able to attach this rule 
> to the pipeline:
> 
>    If any of the steps change the value of  
>    a <quantity> element, fire a step 
>    to update <total_cost>.
> 
> Is there a way to express this?
> 
> /Roger
> 
> > -----Original Message-----
> > From: mozer [mailto:xmlizer@gmail.com]
> > Sent: Sunday, June 14, 2009 2:26 PM
> > To: Costello, Roger L.
> > Cc: xproc-dev@w3.org
> > Subject: Re: Does XProc support event-driven processing?
> > 
> > Can you elaborate on what you mean by "changes" ? Where ? In a 
> > Database ? In a file ? Which one ?
> > 
> > Regards,
> > 
> > Xmlizer
> > 
> > On Sun, Jun 14, 2009 at 4:49 PM, Costello, Roger
> > L.<costello@mitre.org> wrote:
> > >
> > > Hi Folks,
> > >
> > > Does XProc support event-driven processing?
> > >
> > > Here's an example to illustrate what I mean:
> > >
> > >   Hey, any time during the pipeline processing,
> > >   if the value of <Purchase_Quantity> changes,
> > >   fire a step to update <Total_Cost>.
> > >
> > > Can you think of a way to express this in XProc?
> > >
> > > /Roger
> > >
> > 
> 

Received on Sunday, 14 June 2009 20:49:00 UTC