[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Q: Assign semantics
Hi, Could someone help me better understand the semantics of <assign>? Q1: Are the following <from>'s legal? ... <variable name="intTypeVar" type="xsd:int"/> <variable name="intElemVar" element="somens:intElem"/> <!-- intElem is of type xsd:int --> ... <assign> <copy> <from>0</from> <to variable="intTypeVar"/> </copy> </assign> ... <assign> <copy> <from><somens:intElem>0</somens:intElem></from> <to variable="intElemVar"/> </copy> </assign> I expect Yes for Q1. Now, more difficult one. The example 16.1.3 of the specification contains the following <assign>: Case C1: ... <variable name="itemsShipped" type="props:itemCountType"/> ... <assign> <copy> <from expression="0"/> <to variable="itemsShipped"/> </copy> </assign> Suppose part p1 of message type mt1 and part p2 of message type mt2 are defined to be of the same XML schema type. Further suppose we have variable v1 of type mt1 and v2 of mt2. The following assign should be legal: Case C2: <assign> <copy> <from variable="v1" part="p1"/> <to variable="v2" part="p2"/> </copy> </assign> Q2: Is the following legal? Case C3: <assign> <copy> <from expression="bpws:getVariableData ('v1', 'p1')"/> <to variable="v2" part="p2"/> </copy> </assign> Assume the answer to Q2 is Yes. Then, I feel some inconsistency: In C1 the expression is interpreted as the value itself to be assigned while in C3 as a node set containing a node whose content is to be assigned. (According to 14.1 of the specification, the expression in C3 returns a node set containing the single node representing the entire part p1.) If p1 and p2 are of simple type, we can avoid this inconsistency by saying that the from-expression node set is promoted to a value and then assigned to p2. But this interpretation doesn't apply if p1 and p2 are of complex type. Assume the answer is No. I feel uncomfortable also in this case because then it follows that <from variable="v1" part="p1"/> has a different meaning from <from expression="bpws:getVariableData ('v1', 'p1')"/>. Yuzo Fujishima NEC Corporation
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]