Ok, After looking at the discussion, I believe these are the changes that
can be made to resolve this issue....

1. Make the location attribute optional.
2. Create a new tuscany-sca-contributions.xsd for
import/export.java/resource elements with tuscany namespace.
3. Remove the substitutionGroup attribute from the
import/export.java/resource elements.
4. Make package attribute mandatory for import/export.java element
5. Make uri attribute mandatory for import/export.resource element.

I will take care of this one with a JIRA.

On Wed, Dec 10, 2008 at 3:58 PM, Simon Laws <[EMAIL PROTECTED]>wrote:

>
>
> On Wed, Dec 10, 2008 at 8:34 AM, Luciano Resende <[EMAIL PROTECTED]>wrote:
>
>> Do we have a concrete use case where we need to explicitly use the
>> extended import/export schema ? Otherwise, to avoid issues, could we
>> wait for the spec to define a schema for us to use (e.g remove our own
>> schema from 1.4 release)
>>
>> On Wed, Dec 10, 2008 at 12:22 AM, Ramkumar R <[EMAIL PROTECTED]>
>> wrote:
>> > I believe the issue seems to be bigger, another issue that I noticed is
>> that
>> > import/export.java/resource elements can't
>> > act as a subgroup of import/export as there seem to be a conflict with
>> the
>> > specs and the implementation.
>> >
>> > Specs Says:
>> > 2925 Technologies that use naming schemes other than QNames must use a
>> > different import
>> > 2926 element from the same substitution group as the the SCA <import>
>> > element. The
>> > 2927 element used identifies the technology, and may use any value for
>> the
>> > namespace that is
>> > 2928 appropriate for that technology. For example, <import.java> can be
>> used
>> > can be used to
>> > 2929 import java definitions, in which case the namespace should be a
>> fully
>> > qualified package
>> > 2930 name.
>> >
>> > Implementation:
>> > Tuscany Import/ExportProcessor implementation reads the fully qualified
>> > package name from 'package' attribute
>> > rather than from the namespace attribute as mentioned in the specs.
>> Going
>> > with the implementation, we might need to have
>> > the namespace attribute as optional and the package attribute as
>> required.
>> >
>> > This is the case with import/export.resource too.
>> >
>> > Thinking about the changes required, I believe its not going to be a
>> quick
>> > one. Also I see a potential risk in making these
>> > changes for 1.4 at this point of time.
>> >
>> > For 1.4, what we can possibly do is to make the location attribute
>> optional
>> > and remove the dependency (subgroup)
>> > of import/export.java/resource elements with import/export element.
>> >
>> > I will also raise a JIRA to take care of this one for the next release.
>> >
>> > On Wed, Dec 10, 2008 at 11:23 AM, Ramkumar R <[EMAIL PROTECTED]>
>> wrote:
>> >>
>> >> Hi Simon,
>> >>
>> >> Looking at the specs and previous discussions we could now make
>> location
>> >> attribute optional and
>> >>
>> >> have a new schema as tuscany-sca-contribution.xsd with
>> >> import/export.java/resource elements with tuscany namespace.
>> >>
>> >> I will use TUSCANY-2712 to make these changes.
>> >>
>> >> On Tue, Dec 9, 2008 at 8:28 PM, Simon Laws <[EMAIL PROTECTED]>
>> >> wrote:
>> >>>
>> >>>
>> >>> On Tue, Dec 9, 2008 at 2:55 PM, Simon Laws <[EMAIL PROTECTED]
>> >
>> >>> wrote:
>> >>>>
>> >>>>
>> >>>> On Tue, Dec 9, 2008 at 2:29 PM, Ramkumar R <[EMAIL PROTECTED]>
>> >>>> wrote:
>> >>>>>
>> >>>>> I believe the sca-contribution.xsd schema needs a change in this
>> case
>> >>>>> as shown here....
>> >>>>>
>> >>>>> For <import> and <export> element, only namespace attribute is
>> >>>>> required... rest should be optional, as read from
>> NamespaceImportProcessor
>> >>>>> and NamespaceExportProcessor.
>> >>>>> For <import.java> and <export.java> element, only package attribute
>> is
>> >>>>> required... rest should be optional, as read from
>> JavaImportProcessor and
>> >>>>> JavaExportProcessor.
>> >>>>> For <import.resource> and <export.resource> element, only uri
>> attribute
>> >>>>> is required.... rest should be optional, as read from
>> >>>>> ResourceImportProcessor and ResourceExportProcessor.
>> >>>>>
>> >>>>>
>> >>>>> On Tue, Dec 9, 2008 at 7:23 PM, Ramkumar R <[EMAIL PROTECTED]>
>> >>>>> wrote:
>> >>>>>>
>> >>>>>> Hi All,
>> >>>>>>
>> >>>>>> An instance of the validation messages from the
>> sca-contribution.xml
>> >>>>>> file are shown from demo/bigbank module is shown below......
>> >>>>>> In previous releases, there were no issue as we did not have
>> >>>>>> sca-contribution.xsd schema in place.
>> >>>>>>
>> >>>>>>      [java] SEVERE: XMLSchema validation error occured in:
>> >>>>>>
>> file:/C:/Tuscany/1.4RC1/demos/bigbank/target/classes/META-INF/sca-contribution.xml
>> >>>>>> ,line = 26, column = 4, Message = cvc-complex-type.4: Attribute
>> 'namespace'
>> >>>>>> must appear on element
>> >>>>>>  'import.java'.
>> >>>>>>      [java] Dec 9, 2008 5:49:27 PM
>> >>>>>>
>> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
>> >>>>>>      [java] SEVERE: XMLSchema validation error occured in:
>> >>>>>>
>> file:/C:/Tuscany/1.4RC1/demos/bigbank/target/classes/META-INF/sca-contribution.xml
>> >>>>>> ,line = 26, column = 4, Message = cvc-complex-type.4: Attribute
>> 'location'
>> >>>>>> must appear on element
>> >>>>>> 'import.java'.
>> >>>>>>      [java] Dec 9, 2008 5:49:28 PM
>> >>>>>>
>> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
>> >>>>>>      [java] SEVERE: XMLSchema validation error occured in:
>> >>>>>>
>> file:/C:/Tuscany/1.4RC1/demos/bigbank/target/classes/META-INF/sca-contribution.xml
>> >>>>>> ,line = 30, column = 4, Message = cvc-complex-type.4: Attribute
>> 'location'
>> >>>>>> must appear on element
>> >>>>>> 'import'.
>> >>>>>>      [java] Dec 9, 2008 5:49:28 PM
>> >>>>>>
>> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
>> >>>>>>      [java] SEVERE: XMLSchema validation error occured in:
>> >>>>>>
>> file:/C:/Tuscany/1.4RC1/demos/bigbank/target/classes/META-INF/sca-contribution.xml
>> >>>>>> ,line = 31, column = 4, Message = cvc-complex-type.4: Attribute
>> 'location'
>> >>>>>> must appear on element
>> >>>>>> 'import'.
>> >>>>>>      [java] Dec 9, 2008 5:49:28 PM
>> >>>>>>
>> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
>> >>>>>>      [java] SEVERE: XMLSchema validation error occured in:
>> >>>>>>
>> file:/C:/Tuscany/1.4RC1/demos/bigbank/target/classes/META-INF/sca-contribution.xml
>> >>>>>> ,line = 32, column = 4, Message = cvc-complex-type.4: Attribute
>> 'location'
>> >>>>>> must appear on element
>> >>>>>> 'import'.
>> >>>>>>      [java] Dec 9, 2008 5:49:28 PM
>> >>>>>>
>> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
>> >>>>>>      [java] SEVERE: XMLSchema validation error occured in:
>> >>>>>>
>> file:/C:/Tuscany/1.4RC1/demos/bigbank/target/classes/META-INF/sca-contribution.xml
>> >>>>>> ,line = 34, column = 4, Message = cvc-complex-type.4: Attribute
>> 'namespace'
>> >>>>>> must appear on element
>> >>>>>>  'import.resource'.
>> >>>>>>      [java] Dec 9, 2008 5:49:28 PM
>> >>>>>>
>> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
>> >>>>>>      [java] SEVERE: XMLSchema validation error occured in:
>> >>>>>>
>> file:/C:/Tuscany/1.4RC1/demos/bigbank/target/classes/META-INF/sca-contribution.xml
>> >>>>>> ,line = 34, column = 4, Message = cvc-complex-type.4: Attribute
>> 'location'
>> >>>>>> must appear on element
>> >>>>>> 'import.resource'.
>> >>>>>>
>> >>>>>> And the sca-contribution.xml file for demo/bigbank
>> >>>>>>
>> >>>>>> <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0";
>> >>>>>>     xmlns:sca="http://www.osoa.org/xmlns/sca/1.0";
>> >>>>>>     targetNamespace="http://bigbank";
>> >>>>>>     xmlns:bb="http://bigbank";>
>> >>>>>>
>> >>>>>>    <deployable composite="bb:BigBank"/>
>> >>>>>>
>> >>>>>>    <import.java package="bigbank.account.checking"/>
>> >>>>>>    <import.java package="bigbank.account.savings"/>
>> >>>>>>    <import.java package="bigbank.account.stock"/>
>> >>>>>>
>> >>>>>>    <import namespace="http://bigbank/checkings"/>
>> >>>>>>    <import namespace="http://bigbank/savings"/>
>> >>>>>>    <import namespace="http://bigbank/stock"/>
>> >>>>>>
>> >>>>>>    <import.resource uri="definitions.xml"/>
>> >>>>>>  </contribution>
>> >>>>>>
>> >>>>>> Looking at the validation message, I have no idea about what the
>> >>>>>> location attribute should look like for import.resource,
>> import.java and
>> >>>>>> import elements.
>> >>>>>>
>> >>>>>> Please suggest.
>> >>>>>>
>> >>>>>> --
>> >>>>>> Thanks & Regards,
>> >>>>>> Ramkumar Ramalingam
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> --
>> >>>>> Thanks & Regards,
>> >>>>> Ramkumar Ramalingam
>> >>>>
>> >>>> Hi Ram
>> >>>>
>> >>>> Yes, according to the pseudo schema in the assembly spec the location
>> >>>> attribute is optional.
>> >>>>
>> >>>> I agree with what you say about import.java/resource. Also from a
>> >>>> previous thread [1] import/export.java/resource are tuscany specific
>> so
>> >>>> should be in the tuscany namespace. I thought I had gone and fixed
>> that but
>> >>>> I don't see any check ins so I must be dreaming. Or I made the change
>> and
>> >>>> threw it away by accident :-(
>> >>>>
>> >>>> Simon
>> >>>
>> >>> [1] http://www.mail-archive.com/[email protected]/msg03774.html
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards,
>> >> Ramkumar Ramalingam
>> >
>> >
>> >
>> > --
>> > Thanks & Regards,
>> > Ramkumar Ramalingam
>> >
>>
>>
>>
>> --
>> Luciano Resende
>> Apache Tuscany, Apache PhotArk
>> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>> http://lresende.blogspot.com/
>>
>
> I think the natural use case here is the normal validation of user input.
> Tuscany has invented some import/export elements so we should provide a
> schema for it. This won't be fixed in OSOA but they may do something in
> OASIS. That would of course be in a different namespace again.
>
> Simon
>



-- 
Thanks & Regards,
Ramkumar Ramalingam

Reply via email to