On Mon, Mar 23, 2009 at 09:08, Asankha C. Perera <[email protected]> wrote: > >> I suggest we use the property mediator itself for [1] and [2] as follows; >> >> <property name="string" [action=set|remove] (value="literal" | >> expression="xpath") (node="clone" | "detach") >> [scope=transport|axis2|axis2-client]/> >> >> where, the introduced attribute node declares that it is a node operation >> and this option is valid only when the action is "set" and the expression >> attribute is present. So the clone attribute value clones the node and >> attach it as a node to the specified property name and the detach value >> will >> remove the node form the message and attach as a property. >> >> With this we preserve the earlier behavior of the property mediator, if >> you >> do not specify the node attribute it will be the string value of the >> expression that we are going to be storing in the property. >> > > What about > <property name="string" (value="literal" | expression="xpath") > [action=set|remove|cloneAsNode|detachAsNode] [scope=...]/>
My feeling is that integrating this into the property mediator will make it too overloaded. We would almost need to include a decision table into the documentation in order to explain to the user which combinations of attributes and attribute values are allowed :-) We should also make sure that we have the option (later) to provide an XML schema for our configuration language and this schema should provide a decent level of validation which is not possible with this degree of overloading. I would definitely prefer a distinct mediator (maybe <extract>?) implementing clone and detach, as well as the remove operation suggested below. >> >> For [3] and [4] I suggest we go for a single mediator called enrich with >> the >> following syntax. >> >> <enrich name="string" expression="xpath" action=["insertBefore" | >> "insertAfter" | "replace"]/> >> > > This looks good, I think we also need a slight variant mediator to just > remove a node (i.e. without setting it as a property) > > cheers > asankha > > -- > Asankha C. Perera > AdroitLogic, http://adroitlogic.org > > http://esbmagic.blogspot.com > > > > >
