Hi,

I changed the code to support the new OASIS SCA syntax for properties under r751079 [1].

Simply speaking, the property value can be declared in the following styles:

For properties as simple types:
* <property name="simpleProperty" value="100"/>
* <property name="simpleProperty">100</property>
* <property name="simpleProperty">
     <value>100</value>
 </property>

For properties as complexTypes:
* <property name="complexProperty">
       <value xmlns:c="http://customer"; c:id="C01">
             <c:firstName>John</c:firstName>
             <c:lastName>Smith</c:lastName>
       </value>
 </property>

For properties as global elements:
* <property name="complexProperty">
       <c:customer xmlns:c="http://customer"; c:id="C01">
             <c:firstName>John</c:firstName>
             <c:lastName>Smith</c:lastName>
       </c:customer>
 </property>

For properties with multiple values:
* <property name="multipleValuedProperty">
      <value>10</value>
      <value>20</value>
 </property>

* <property name="multipleValuedProperty">
       <value xmlns:c="http://customer"; c:id="C01">
             <c:firstName>John</c:firstName>
             <c:lastName>Smith</c:lastName>
       </value>
       <value xmlns:c="http://customer"; c:id="C02">
             <c:firstName>Jane</c:firstName>
             <c:lastName>Smith</c:lastName>
       </value>
 </property>

* <property name="multipleValuedProperty">
       <c:customer xmlns:c="http://customer"; c:id="C01">
             <c:firstName>John</c:firstName>
             <c:lastName>Smith</c:lastName>
       </c:customer>
       <c:customer xmlns:c="http://customer"; c:id="C02">
             <c:firstName>Jane</c:firstName>
             <c:lastName>Smith</c:lastName>
       </c:customer>
 </property>

Now the runtime parse the values into a DOM document, and the root element is <property>. The different styles of the value are normalized as child elements under property.

For example:
* <property name="simpleProperty" value="100"/> ==> <property><value>100</value></property> * <property name="simpleProperty">100</property> ==> <property><value>100</value></property>

[1] http://svn.apache.org/viewvc?rev=751079&view=rev

Reply via email to