Thanks, I've tried that with the jsonp binding and its all working well.

There is still the issue of unknown elements in the tuscany namespace,
so adding  <tuscany:binding.foo /> to a composite still does not cause
any schema validation errors, which it probably should.

   ...ant

On Mon, Aug 10, 2009 at 10:50 PM, Raymond Feng<[email protected]> wrote:
> I'm adding the support to aggregate the XSDs by TNS and resolve xsd:import
> without schemaLocation too. It will enable the schema extensions. I'll check
> in the fix when the build is successful.
>
> Thanks,
> Raymond
>
> --------------------------------------------------
> From: "ant elder" <[email protected]>
> Sent: Sunday, August 09, 2009 11:17 AM
> To: <[email protected]>
> Subject: Re: Adding xsd's for scheme validation of extensions
>
>> Ok cool that sounds good. But there's still something else going on
>> with the tuscany schema's that i've not tracked down as there's no
>> validation errors even without any jsonp schema at all, and also if i
>> add <tuscany:binding.foo /> to a testcase composite the testcase still
>> runs fine its only when using the sca namespace like <sca:binding.foo
>> /> that the testcase fails.
>>
>>  ...ant
>>
>> On Sun, Aug 9, 2009 at 6:46 PM, Raymond Feng<[email protected]> wrote:
>>>
>>> The xsd is picked up by Tuscany and it is passed to the
>>> SchemaFactory.newSchema() method. Now we have two XSDs, one from
>>> assembly-xsd (tuscany-sca-1.1.xsd which includes other xsds) and the
>>> other
>>> is binding-jsonp.xsd.
>>>
>>> SchemaFactory.newSchema is keeping a cache based on target namespaces.
>>> When
>>> the binding-jsonp.xsd is loaded, there is already entries from
>>> tuscany-sca-1.1.xsd that has the same namespace (tuscany namespace) and
>>> binding-jsonp.xsd is ignored.
>>>
>>> We can fix the problem as follows:
>>>
>>> For all the Source passed to newSchema(), we read the targetNamespace
>>> first
>>> and group the XSDs by tns. If we see multiple files have the same
>>> namespace,
>>> then we generate a façade XSD that includes the original XSDs.
>>>
>>> Thanks,
>>> Raymond
>>> --------------------------------------------------
>>> From: "ant elder" <[email protected]>
>>> Sent: Sunday, August 09, 2009 3:59 AM
>>> To: <[email protected]>
>>> Subject: Re: Adding xsd's for scheme validation of extensions
>>>
>>>> On Sat, Aug 8, 2009 at 5:33 PM, Raymond Feng<[email protected]> wrote:
>>>>>
>>>>> You can plug it in using
>>>>>
>>>>>
>>>>> META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema.
>>>>> Each text line in the file can point to an XSD using its resource name.
>>>>> We
>>>>> might need to tweak the following method so that xsd:import/xsd:include
>>>>> across modules can work. I can help to fix it if you see problems.
>>>>>
>>>>>
>>>>>
>>>>> org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory.resolveResource(String,
>>>>> String, String, String, String)
>>>>>
>>>>
>>>> Ok i've started trying this using the JSONP binding to try it out in
>>>> r802514. There must be something else going on as it doesn't seem to
>>>> have made much difference, the testcase in binding-jsonp-runtime runs
>>>> without producing any scheme validation error message both before and
>>>> after that change when the .composite is as is or changed to have
>>>> extra unused attributes added to the binding.jsonp element.
>>>>
>>>>  ...ant
>>>
>>>
>

Reply via email to