You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2009/08/07 01:05:10 UTC

[2.x] Current Schema for Properties does not support value attribute - [ASM50027]

After we updated to sca-core-1.1-cd04.xsd, some schema validation
errors related to properties started to happen as the one below

SEVERE: XMLSchema validation error occured in:
TestComposite50.composite ,line = 26, column = 5, Message =
cvc-complex-type.3.2.2: Attribute 'value' is not allowed to appear in
element 'property'.
org.oasisopen.sca.ServiceRuntimeException: [] - XMLSchema validation
error occured in: TestComposite50.composite ,line = 25, column = 5,
Message = cvc-complex-type.3.2.2: Attribute 'value' is not allowed to
appear in element 'property'.java.lang.IllegalStateException:
org.oasisopen.sca.ServiceRuntimeException: [] - XMLSchema validation
error occured in: TestComposite50.composite ,line = 25, column = 5,
Message = cvc-complex-type.3.2.2: Attribute 'value' is not allowed to
appear in element 'property'.

The root cause of the issue seems to be the change from  <anyAttribute
namespace="##any" processContents="lax"/> to <anyAttribute
namespace="##other" processContents="lax"/> on the property
complexType definition (see below). With this change, only attributes
from another namespace is allowed and thus the validation complaints
about the value attribute.

   <complexType name="Property" mixed="true">
      <complexContent mixed="true">
         <extension base="sca:SCAPropertyBase">
            <attribute name="name" type="NCName" use="required"/>
            <attribute name="type" type="QName" use="optional"/>
            <attribute name="element" type="QName" use="optional"/>
            <attribute name="many" type="boolean" use="optional"
                       default="false"/>
            <attribute name="mustSupply" type="boolean" use="optional"
                       default="false"/>
            <anyAttribute namespace="##other" processContents="lax"/>
         </extension>
         <!-- extension defines the place to hold default value -->
         <!-- an extension point ; attribute-based only -->
      </complexContent>
   </complexType>


Mike, do you want me to create a new issue for the Assembly spec ?

-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: [2.x] Current Schema for Properties does not support value attribute - [ASM50027]

Posted by Mike Edwards <mi...@gmail.com>.
Luciano,

Thanks for spotting this.  It is a spec error, since the @value attribute is described in Section 
4.4 of the spec, but is completely missing from the XSD in appendix A. It is of long standing, 
masked as you point out by that ##any attribute which we have now fixed.

Could you raise the spec issue, please?

Meanwhile, I've fixed the XSD in Tuscany.

Yours,  Mike.

Luciano Resende wrote:
> After we updated to sca-core-1.1-cd04.xsd, some schema validation
> errors related to properties started to happen as the one below
> 
> SEVERE: XMLSchema validation error occured in:
> TestComposite50.composite ,line = 26, column = 5, Message =
> cvc-complex-type.3.2.2: Attribute 'value' is not allowed to appear in
> element 'property'.
> org.oasisopen.sca.ServiceRuntimeException: [] - XMLSchema validation
> error occured in: TestComposite50.composite ,line = 25, column = 5,
> Message = cvc-complex-type.3.2.2: Attribute 'value' is not allowed to
> appear in element 'property'.java.lang.IllegalStateException:
> org.oasisopen.sca.ServiceRuntimeException: [] - XMLSchema validation
> error occured in: TestComposite50.composite ,line = 25, column = 5,
> Message = cvc-complex-type.3.2.2: Attribute 'value' is not allowed to
> appear in element 'property'.
> 
> The root cause of the issue seems to be the change from  <anyAttribute
> namespace="##any" processContents="lax"/> to <anyAttribute
> namespace="##other" processContents="lax"/> on the property
> complexType definition (see below). With this change, only attributes
> from another namespace is allowed and thus the validation complaints
> about the value attribute.
> 
>    <complexType name="Property" mixed="true">
>       <complexContent mixed="true">
>          <extension base="sca:SCAPropertyBase">
>             <attribute name="name" type="NCName" use="required"/>
>             <attribute name="type" type="QName" use="optional"/>
>             <attribute name="element" type="QName" use="optional"/>
>             <attribute name="many" type="boolean" use="optional"
>                        default="false"/>
>             <attribute name="mustSupply" type="boolean" use="optional"
>                        default="false"/>
>             <anyAttribute namespace="##other" processContents="lax"/>
>          </extension>
>          <!-- extension defines the place to hold default value -->
>          <!-- an extension point ; attribute-based only -->
>       </complexContent>
>    </complexType>
> 
> 
> Mike, do you want me to create a new issue for the Assembly spec ?
>