On Tue, Jul 16, 2013 at 2:16 PM, Hiranya Jayathilaka <[email protected]>wrote:
> Hi Folks, > > The property mediator supports a pattern attribute which can be used to > specify a regular expression. When specified, the value of the XPath > expression is matched against this regex and the resulting group of the > match is what gets assigned to the property. If the regex doesn't match, > the mediator assigns the original value of the XPath expression to the > property. > > SYNAPSE-890 argues that this behavior is wrong, and the mediator must > assign the empty string to the property if the regex doesn't match. I'm not > quite sure what the right behavior should be. Does anybody have any ideas? > To me it's a contest between: > > 1. Assign the value of the XPath expression (current behavior) > 2. Assign the empty string (behavior proposed in SYNAPSE-890) > 3. Not set the property value at all - leave the current property value > unmodified > > I think this evaluates to following question. if matched against only xpath (no pattern) and result is NOT matched ,then does it output a EMPTY string ? Therefore when we match against both [xpath + pattern] and result is NOT matched then, output should be consistent with the above case. Thanks, > Hiranya > > -- > Hiranya Jayathilaka > Mayhem Lab/RACE Lab; > Dept. of Computer Science, UCSB; http://cs.ucsb.edu > E-mail: [email protected] <[email protected]>; Mobile: +1 (805) 895-7443 > Blog: > http://techfeast-hiranya.**blogspot.com<http://techfeast-hiranya.blogspot.com/> > > -- http://www.udayangawiki.blogspot.com
