OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsbpel message

[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 ...



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 may return
3 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 ... and carry
forward ...

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 in OASIS
at:
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]