Hi,
AFAIK, the implementation of XML Events and Actions in OrbeonForms is tightly coupled to XForms, but I'd better ask the question anyway ;) ... What I'd like to do is trigger pipelines (or processors) based on the modifications done on XML documents posted through OrbeonForms. One of the idea would be to do that through a pipeline that would use an "XML Events and Actions" processor. The processor would take as inputs: the XML Events definitions, the document before update and the document after update and apply the processing defined in the XML Events definitions based on the differences applied to the document. Would that make sense? Are there better ways to do this kind of things? Would there be anything to reuse in the implementation that you've done for XForms or (like I would tend to think) is it too tightly coupled with XForms? Thanks, Eric -- GPG-PGP: 2A528005 If you have a XML document, you have its schema. http://examplotron.org ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
Eric,
I think that you guessed right ;-) Currently events and actions are fairly tied to XForms. Currently, event dispatching is done in XFormsContainingDocument.java. That, and generic event- and action-related interfaces and classes could probably be refactored out. I am not 100% I understand the idea though. Are you saying you would like the processor to diff the two documents, and then dispatch DOM mutation events? Then another processor input would specify event handlers and actions? -Erik > Hi, > > AFAIK, the implementation of XML Events and Actions in OrbeonForms is > tightly coupled to XForms, but I'd better ask the question > anyway ;) ... > > What I'd like to do is trigger pipelines (or processors) based on the > modifications done on XML documents posted through OrbeonForms. > > One of the idea would be to do that through a pipeline that would > use an > "XML Events and Actions" processor. The processor would take as > inputs: > the XML Events definitions, the document before update and the > document > after update and apply the processing defined in the XML Events > definitions based on the differences applied to the document. > > Would that make sense? Are there better ways to do this kind of > things? > > Would there be anything to reuse in the implementation that you've > done > for XForms or (like I would tend to think) is it too tightly coupled > with XForms? > > Thanks, > > Eric > -- > GPG-PGP: 2A528005 > If you have a XML document, you have its schema. > http:// > examplotron.org > ------------------------------------------------------------------------ > Eric van der Vlist http://xmlfr.org http://dyomedea.com > (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax > (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema > ------------------------------------------------------------------------ Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Le mardi 25 mars 2008 à 11:48 -0700, Erik Bruchez a écrit : > Eric, > > I think that you guessed right ;-) Currently events and actions are > fairly tied to XForms. > > Currently, event dispatching is done in XFormsContainingDocument.java. > That, and generic event- and action-related interfaces and classes > could probably be refactored out. I'll have a look, thanks! > I am not 100% I understand the idea though. Are you saying you would > like the processor to diff the two documents, and then dispatch DOM > mutation events? Yes, something like that. It might be more efficient to compare only the XPath expressions specifying the event targets than doing a full diff, but that would be logically equivalent. > Then another processor input would specify event > handlers and actions? Actually, the actions themselves could trigger processors or pipelines (or to say it differently, they could be expressed as processors or pipelines). That could lead to a kind of workflow system where you could for instance send a mail when certain nodes are updated, do cascade updates, ... Eric -- GPG-PGP: 2A528005 Carnet web : http://eric.van-der-vlist.com/blog?t=category&a=Fran%C3%A7ais ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
>> I am not 100% I understand the idea though. Are you saying you would
>> like the processor to diff the two documents, and then dispatch DOM >> mutation events? > > Yes, something like that. > > It might be more efficient to compare only the XPath expressions > specifying the event targets than doing a full diff, but that would be > logically equivalent. Could you produce a simple example showing how that would look like? -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Le mardi 25 mars 2008 à 23:38 -0700, Erik Bruchez a écrit : > >> I am not 100% I understand the idea though. Are you saying you would > >> like the processor to diff the two documents, and then dispatch DOM > >> mutation events? > > > > Yes, something like that. > > > > It might be more efficient to compare only the XPath expressions > > specifying the event targets than doing a full diff, but that would be > > logically equivalent. > > Could you produce a simple example showing how that would look like? declarations such as: <listener observer="status" event="DOMCharacterDataModified" if="event('newValue') = 'approved' " handler="oxf:sendNotificationMail.xpl"/> Together with two other inputs (one for the previous version and one for the new version of the document). In that case, to check if the handler needs to be called, it could just evaluate if the node with ID "status" has been changed rather than do a full difference between the two versions. The effect of this declaration would be to call oxf:sendNotificationMail.xpl if the node with an id "status" has seen its text node updated and if the new value is equal to "approved" and I think that this would be fairly conform to the rec. Of course, that's just the basic idea! We would have to wok on details such as how we can specify the inputs and outputs of oxf:sendNotificationMail.xpl. Also, the fact that the observer and targetid attributes accept only id references instead of XPath expressions and that the spec assumes that the event definitions are embedded in the document itself isn't really convenient for what we want to do, however I think that we could derive something interesting if we keep a liberal interpretation of the spec... Eric > > -Erik -- GPG-PGP: 2A528005 Curious about Relax NG? Read my book online. http://books.xmlschemata.org/relaxng/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
Eric,
Thanks for the example, I understand much better now. Are you thinking about implementing something like this? -Erik On Mar 26, 2008, at 1:17 AM, Eric van der Vlist wrote: > > Le mardi 25 mars 2008 à 23:38 -0700, Erik Bruchez a écrit : >>>> I am not 100% I understand the idea though. Are you saying you >>>> would >>>> like the processor to diff the two documents, and then dispatch DOM >>>> mutation events? >>> >>> Yes, something like that. >>> >>> It might be more efficient to compare only the XPath expressions >>> specifying the event targets than doing a full diff, but that >>> would be >>> logically equivalent. >> >> Could you produce a simple example showing how that would look like? > > An "XmlEventsAndActions" processor could have a config entry with > declarations such as: > > <listener > observer="status" > event="DOMCharacterDataModified" > if="event('newValue') = 'approved' " > handler="oxf:sendNotificationMail.xpl"/> > > Together with two other inputs (one for the previous version and one > for > the new version of the document). > > In that case, to check if the handler needs to be called, it could > just > evaluate if the node with ID "status" has been changed rather than > do a > full difference between the two versions. > > The effect of this declaration would be to call > oxf:sendNotificationMail.xpl if the node with an id "status" has seen > its text node updated and if the new value is equal to "approved" > and I > think that this would be fairly conform to the rec. > > Of course, that's just the basic idea! We would have to wok on details > such as how we can specify the inputs and outputs of > oxf:sendNotificationMail.xpl. > > Also, the fact that the observer and targetid attributes accept only > id > references instead of XPath expressions and that the spec assumes that > the event definitions are embedded in the document itself isn't really > convenient for what we want to do, however I think that we could > derive > something interesting if we keep a liberal interpretation of the > spec... > > Eric > >> >> -Erik > > -- > GPG-PGP: 2A528005 > Curious about Relax NG? Read my book online. > http://books.xmlschemata.org/ > relaxng/ > ------------------------------------------------------------------------ > Eric van der Vlist http://xmlfr.org http://dyomedea.com > (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax > (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema > ------------------------------------------------------------------------ Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik,
Le mercredi 26 mars 2008 à 19:13 -0700, Erik Bruchez a écrit : > Eric, > > Thanks for the example, I understand much better now. > > Are you thinking about implementing something like this? I am not 100% sure, but it's something I am seriously considering, yes. Before that, I wonder if I couldn't prototype the feature (at least for simple cases) in XSLT: it should be possible and even quite simple to generate a pipeline based on listener declarations and the before and after images of a document. I'll keep this mailing list informed. Thanks, Eric > -Erik > -- GPG-PGP: 2A528005 Weblog: http://eric.van-der-vlist.com/blog?t=category&a=English ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
On Mar 27, 2008, at 12:09 AM, Eric van der Vlist wrote: > Hi Erik, > > Le mercredi 26 mars 2008 à 19:13 -0700, Erik Bruchez a écrit : >> Eric, >> >> Thanks for the example, I understand much better now. >> >> Are you thinking about implementing something like this? > > I am not 100% sure, but it's something I am seriously considering, > yes. > > Before that, I wonder if I couldn't prototype the feature (at least > for > simple cases) in XSLT: it should be possible and even quite simple to > generate a pipeline based on listener declarations and the before and > after images of a document. > > I'll keep this mailing list informed. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |