Raymond Feng wrote:
Hi,

The SCA composite file can reference user XSDs to specify the property type or element. For example,


<property name="p1" type="ns1:CustomerType" xmlns:ns1="http://customer";>
<value xsi:type="ns1:CustomerType">
<ns1:name>Ray</ns1:name>
<ns1:id>001</ns1:id>
</value>
</property>


<property name="p1" element="ns1:customer" xmlns:ns1="http://customer";>
<ns1:customer>
<ns1:name>Ray</ns1:name>
<ns1:id>001</ns1:id>
</ns1:customer>
</property>
The XSD for the customer is from the user application (could be packaged into the SCA contribution). Tuscany's schema validation against this composite fails as it
doesn't have knowledge of the user XSDs.

Should we validate the XML "foreign" to the SCA/Tuscany system XSDs? If yes, I guess the composite needs to have xsi:schemaLocation to provide the user XSDs. If not, how can we fix the code to ignore the "foreign" XML elements/attributes/QNames?

Thanks,
Raymond
/________________________________________________________________ Raymond Feng
[email protected] <mailto:[email protected]>
/Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
/
________________________________________________________________/

Raymond,

I'm puzzled here.

If I use some XSD in one of my composites, I'd expect to have that XSD present in my contribution (or imported from some other contribution).

Are you saying that if I do this with the current codebase, it does not work?

If I want to reference some XSD that is on a remote location on the Web, then sure, xsi:schemaLocation is the way to go.

Yours,  Mike.

Reply via email to