You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "ant elder (JIRA)" <tu...@ws.apache.org> on 2006/10/06 12:53:40 UTC

[jira] Updated: (TUSCANY-484) Attribute groups only working if defined in the default namespace

     [ http://issues.apache.org/jira/browse/TUSCANY-484?page=all ]

ant elder updated TUSCANY-484:
------------------------------

    Fix Version/s: Java-M2

> Attribute groups only working if defined in the default namespace
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-484
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-484
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>         Environment: Windows
>            Reporter: Graham Charters
>             Fix For: Java-M2
>
>
> When loading the following schema I get a parse error "Use of undefined group commonAttributes".
> <?xml version="1.0" encoding="utf-8" ?>
> <schema targetNamespace="http://example.org"
>   xmlns:ns1="http://example.org" xmlns="http://www.w3.org/2001/XMLSchema">
> 	
> 	<attributeGroup name="commonAttributes">
> 		<attribute name="attr1" type="string" />
> 		<attribute name="attr2" type="string" />
> 	</attributeGroup>  
> 	<complexType name="extendedStringType">
> 		<sequence>
> 			<element name="el1" type="string" />
> 			<element name="el2" type="string" />
> 		</sequence>
> 		<attributeGroup ref="ns1:commonAttributes"/>
> 	</complexType>
> </schema>
> It appears that if I change the schema so that the group is defined in the default namespace for the schema, then the parse works.  So the following schema does not produce the error.
> <?xml version="1.0" encoding="utf-8" ?>
> <xs:schema targetNamespace="http://example.org"
>   xmlns="http://example.org" xmlns:xs="http://www.w3.org/2001/XMLSchema">
> 	
> 	<xs:attributeGroup name="commonAttributes">
> 		<xs:attribute name="attr1" type="xs:string" />
> 		<xs:attribute name="attr2" type="xs:string" />
> 	</xs:attributeGroup>  
> 	<xs:complexType name="extendedStringType">
> 		<xs:sequence>
> 			<xs:element name="el1" type="xs:string" />
> 			<xs:element name="el2" type="xs:string" />
> 		</xs:sequence>
> 		<xs:attributeGroup ref="commonAttributes"/>
> 	</xs:complexType>
> </xs:schema>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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