You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Venkata Krishnan <fo...@gmail.com> on 2007/02/07 11:49:35 UTC

[Specs Related] Component Properties

Hi,

I just took a look at the latest assembly model specs and find a couple of
things that I don't understand.  Could somebody help me out with
clarifications.

i) There are two different illustrations for the schema for a property
element...

    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
            many="xs:boolean"? required="xs:boolean"?>*
        default-property-value?
    </property>

    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
            many="xs:boolean"? noDefault="xs:boolean"?>*
        default-property-value?
    </property>

i.e. one uses a 'required' attribute and another the 'noDefault' attribute.
The xml schema definitions in the appendix however define only 'noDefault'
and so I understand that 'required' is a typo that needs to be removed.  Is
this right?

ii) When defining a 'property value' what is the need to specify the type
for the property.  Isn't it something that is already specified in the
property definition.  i.e. in the following what is the need for the 'type'
or 'element' attributes

<property name="xs:NCName" (type="xs:QName" | element="xs:QName")?
            many="xs:boolean"? source="xs:string"? file="xs:anyURI"?>*
            property-value?
        </property>

Re: Fwd: [Specs Related] Component Properties

Posted by Venkata Krishnan <fo...@gmail.com>.
Sebastien, Thanks.

- Venkat

On 2/7/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> Venkat,
>
> Some answers inline.
>
> Venkata Krishnan wrote:
> > Hi,
> >
> > I just took a look at the latest assembly model specs and find a
> > couple of
> > things that I don't understand.  Could somebody help me out with
> > clarifications.
> >
> > i) There are two different illustrations for the schema for a property
> > element...
> >
> >    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
> >            many="xs:boolean"? required="xs:boolean"?>*
> >        default-property-value?
> >    </property>
> >
> >    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
> >            many="xs:boolean"? noDefault="xs:boolean"?>*
> >        default-property-value?
> >    </property>
> >
> > i.e. one uses a 'required' attribute and another the 'noDefault'
> > attribute.
> > The xml schema definitions in the appendix however define only
> > 'noDefault'
> > and so I understand that 'required' is a typo that needs to be
> > removed.  Is
> > this right?
>
> Yes, "required" is a typo and should be changed to "noDefault"
>
> >
> > ii) When defining a 'property value' what is the need to specify the
> type
> > for the property.  Isn't it something that is already specified in the
> > property definition.  i.e. in the following what is the need for the
> > 'type'
> > or 'element' attributes
> >
> > <property name="xs:NCName" (type="xs:QName" | element="xs:QName")?
> >            many="xs:boolean"? source="xs:string"? file="xs:anyURI"?>*
> >            property-value?
> > </property>
> >
> > Thanks
> >
> > - Venkat
> >
>
> I think that there are a few cases where you need both the type and the
> value:
> - Define the type of a property inside a <componentType> and at the same
> time configure the default value.
> - Define the type of a property inside a <composite> and at the same
> time configure it, this will be the default value for the property in
> instances of the composite.
> - Configure a property on a <component>, and at the same time define its
> type, I think this is what you'll do in top-down scenarios, where you'll
> define the component "shape" as you declare and configure it, before
> defining its implementation.
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Fwd: [Specs Related] Component Properties

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Venkat,

Some answers inline.

Venkata Krishnan wrote:
> Hi,
>
> I just took a look at the latest assembly model specs and find a 
> couple of
> things that I don't understand.  Could somebody help me out with
> clarifications.
>
> i) There are two different illustrations for the schema for a property
> element...
>
>    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
>            many="xs:boolean"? required="xs:boolean"?>*
>        default-property-value?
>    </property>
>
>    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
>            many="xs:boolean"? noDefault="xs:boolean"?>*
>        default-property-value?
>    </property>
>
> i.e. one uses a 'required' attribute and another the 'noDefault' 
> attribute.
> The xml schema definitions in the appendix however define only 
> 'noDefault'
> and so I understand that 'required' is a typo that needs to be 
> removed.  Is
> this right?

Yes, "required" is a typo and should be changed to "noDefault"

>
> ii) When defining a 'property value' what is the need to specify the type
> for the property.  Isn't it something that is already specified in the
> property definition.  i.e. in the following what is the need for the 
> 'type'
> or 'element' attributes
>
> <property name="xs:NCName" (type="xs:QName" | element="xs:QName")?
>            many="xs:boolean"? source="xs:string"? file="xs:anyURI"?>*
>            property-value?
> </property>
>
> Thanks
>
> - Venkat
>

I think that there are a few cases where you need both the type and the 
value:
- Define the type of a property inside a <componentType> and at the same 
time configure the default value.
- Define the type of a property inside a <composite> and at the same 
time configure it, this will be the default value for the property in 
instances of the composite.
- Configure a property on a <component>, and at the same time define its 
type, I think this is what you'll do in top-down scenarios, where you'll 
define the component "shape" as you declare and configure it, before 
defining its implementation.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Fwd: [Specs Related] Component Properties

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi,

I just took a look at the latest assembly model specs and find a couple of
things that I don't understand.  Could somebody help me out with
clarifications.

i) There are two different illustrations for the schema for a property
element...

    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
            many="xs:boolean"? required="xs:boolean"?>*
        default-property-value?
    </property>

    <property name="xs:NCName" (type="xs:QName" | element="xs:QName")
            many="xs:boolean"? noDefault="xs:boolean"?>*
        default-property-value?
    </property>

i.e. one uses a 'required' attribute and another the 'noDefault' attribute.
The xml schema definitions in the appendix however define only 'noDefault'
and so I understand that 'required' is a typo that needs to be removed.  Is
this right?

ii) When defining a 'property value' what is the need to specify the type
for the property.  Isn't it something that is already specified in the
property definition.  i.e. in the following what is the need for the 'type'
or 'element' attributes

<property name="xs:NCName" (type="xs:QName" | element="xs:QName")?
            many="xs:boolean"? source="xs:string"? file="xs:anyURI"?>*
            property-value?
 </property>

Thanks

- Venkat