Hi,
I found a few issues in OASIS ASM_5026.
1) What's the correct XPath to access a property with a global element as
the value?
Test_ASM_5026.composite uses unqualified elements such as <firstData>.
<property name="complexType" element="test:globalElement1">
<test:globalElement1>
<firstData>complex1</firstData>
<secondData>complex2</secondData>
</test:globalElement1>
</property>
Well, in this case it's even worse as the default namespace is the SCA one.
Based on my understanding of XML, firstData is really under
"http://docs.oasis-open.org/ns/opencsa/sca/200903". To use unqualified
firstData, we need to use <firstData xmlns="">complex1</firstData>.
How to reference it using XPath? Which node is the context root?
a) $complexType/test:globalElement/firstData
or
b) $complexType/firstData?
b doesn't have a way to use the empty namespace. I think it's due to that
problem that we use SCA one as the default namespace.
The qualified form is cleaner.
<property name="complexType" element="test:globalElement1">
<test:globalElement1>
<test:firstData>complex1</test:firstData>
<test:secondData>complex2</test:secondData>
</test:globalElement1>
</property>
We can reference it as $complexType/test:firstData.
2) Can a property defined using XSD type reference an element with the same
type? If so, the following two are both good.
<property name="serviceData1" source="$complexType/test:firstData"/>
<property name="serviceData1" source="$complexType/test:firstData/text()"/>
3) TestComposite71.composite is missing xmlns:xsd declaration and it should
also reference xsd:string instead of string for the property/@type.
<property name="serviceName" type="xsd:string"/>
<property name="serviceData1" type="xsd:string"/>
<property name="serviceData2" type="xsd:string"/>
After fixing these issues together with my commit
http://svn.apache.org/viewvc?rev=806026&view=rev, ASM_5026 is passing.
Thanks,
Raymond
---
Raymond Feng
Apache Tuscany PMC Member: http://tuscany.apache.org
Co-author of Tuscany In Action: http://www.manning.com/laws