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

RE: Does XProc support event-driven processing?

From: Costello, Roger L. <costello@mitre.org>
Date: Sun, 14 Jun 2009 17:45:34 -0400
To: "xproc-dev@w3.org" <xproc-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003FE91A5D7@IMCMBX3.MITRE.ORG>
 
> could you just *always* sum the quantity * cost =
> total-cost as a step near the end of your pipeline

Let's look beyond the particular example and generalize:

   Databases have triggers; that is, the 
   ability to associate rules with cells, 
   e.g. on update, insert or delete of cell A, 
   execute rule ABC.

   I think it would be powerful to have an
   analogous capability in XProc: if any step
   in the pipeline updates, inserts, or deletes
   element X, execute rule XYZ.

Then, an XProc library could be used as a "rules library." The rules are triggered when certain user-defined events occur in the pipeline.

What do you think?

/Roger 

> -----Original Message-----
> From: Mike Sokolov [mailto:sokolov@ifactory.com] 
> Sent: Sunday, June 14, 2009 4:49 PM
> To: Costello, Roger L.; xproc-dev@w3.org
> Subject: 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 21:46:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 14 June 2009 21:46:10 GMT