[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Fw: [wsbpel] Issue - 157 - conf call brief recap ... and carryforward ...
Yes, +1 to what Chris just said. That's why there are "Replace-Element-properties" (RE) vs "Replace-Content" (RC) differentiation defined in the "F2F-Table". Thanks! Regards, Alex Yiu Chris Keller wrote: I think if you define REPLACE as replace contents, then we start to lift the ambiguity and get to the heart of Alex's table. So viewing <a> as a container for its contents implies that referencing <a> is really referring to its contents both in the <to> and <from> clauses. - Chris -----Original Message----- From: Rania Khalaf [mailto:rkhalaf@watson.ibm.com] Sent: Monday, June 20, 2005 3:47 PM To: Alex Yiu Cc: chris.keller@active-endpoints.com; rkhalaf@us.ibm.com; 'Charlton Barreto'; 'wsbpeltc'; jwillis@exchange.microsoft.com Subject: Re: Fw: [wsbpel] Issue - 157 - conf call brief recap ... and carry forward ... So then, it is the case that part of the confusion and why we are discussing a table for 157 is that it is ambiguous in the 'to' what exactly is the location the designer wishes to copy to: In my example I want to copy 'into' the child of <a/> but <to/> only lets me point at all of <a/> and copy semantics are usually REPLACE not ADD CHILD. Alex Yiu wrote:Hi Rania, (and Chris) To avoid confusion, I guess it would be better to answer Rania's question with a full example. *[Clarification-#1]* Say you have an element-based variable: "v1" of "foo:barElem" which has the following content: <foo:bar> <a/> </foo:bar> I expect the following <assign> will create a selectionFailure fault. ------------------------ <assign> <copy> <from> concat('12','3') </from> <to>$v1*/a/text()*</to> </copy> </assign> ------------------------ On the other hand, I expect the following <assign> will NOT create a selectionFailure fault. ------------------------ <assign> <copy> <from> concat('12','3')' </from> <to>$v1*/a*</to> </copy> </assign> ------------------------ Based on the "F2F-table", I expect the <copy> will replace the empty content of <a> with the string content of "123". That was the ReplaceContent entry. *[Clarification-#2]* Regarding to Chris' precaution warning on 3 text nodes cases: I want to clarify it further with 2 examples. For XPath compliant implementation, adjacement text nodes will be merged as one text node. See: http://www.w3.org/TR/xpath#section-Text-Nodes E.g.: <foo:bar> <a>123<![CDATA[456]]>789</a> </foo:bar> I expect "$v1/a/text()" will return one text node ("123456789") for the above data. <foo:bar> <a>123<dummy1 /><![CDATA[456]]><dummy2 />789</a> </foo:bar> On the other hand, I expect "$v1/a/text()" will return 3 text nodes, because they are not separated by <dummy1/> and <dummy2/>. Thanks! Regards, Alex Yiu Chris Keller wrote:Hi Rania, It would result in a selectionFailure as there are no text nodes beneath element a. Also in other cases you may end up with more than one text node which could cause a selectionFaiilure. For example using CDATA for part of an elements text to avoid escaping characters, the following case mayreturn3 text nodes: <a> ... <![CDATA[...bunch of characters I don't want to escape...]]> ... </a> - Chris -----Original Message----- From: Rania Khalaf [mailto:rkhalaf@watson.ibm.com] Sent: Monday, June 20, 2005 9:59 AM To: Alex Yiu Cc: rkhalaf@us.ibm.com; Charlton Barreto; wsbpeltc; jwillis@exchange.microsoft.com Subject: Re: Fw: [wsbpel] Issue - 157 - conf call brief recap ... andcarryforward ... Hi Alex, In the discussion on the call, someone mentioned that 'text' can be used to get to the value of an attribute or the CDATA children of an element (the 123 of <a>123</a>). What happens if I used it on an element <a/> ? If I am trying to copy '123' into '<a/>' to get <a>123</a>, does this cause selectionFailure ? thanks, Rania --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. You may a link to this group and all your TCs inOASISat: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]