You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Raymond Zhou <ra...@yahoo.com> on 2009/03/04 20:54:06 UTC

XML schema parsing - namespace abbre defined at an element, not the root schema element

Hi there,
 
I am having a schema parsing problem using Xerces/c++ (I am using version 2..7). I have an XML schema in which a namespace abbreviation is defined as an attribute of an element inside the XM schema, and the element is not the root "schema" element. Here is an example:
 
<xs:schema ....>
.....
   <xs:element name="StringArray" type="q1:ArrayOfString" xmlns:q1="http://schemas.mycompany.com/2009/02/Arrays"/>
.....
</xs:schema>
 
Xerces seems to have problem with this, it complains can not resolve q1. If I move the namespace abbreviation definition to the schema root, then it works fine.
 
My question is: Is this schema valid? If this is a bug in Xerces, if this is fixed?
I also attached my schemas here.
 
Thanks in advance!
Ray 


      

Re: XML schema parsing - namespace abbre defined at an element, not the root schema element

Posted by Alberto Massari <am...@datadirect.com>.
It's a bug of Xerces 2.7 (see 
https://issues.apache.org/jira/browse/XERCESC-1592); it has been fixed 
in Xerces 3.0

Alberto

Raymond Zhou wrote:
> Hi there,
>  
> I am having a schema parsing problem using Xerces/c++ (I am using 
> version 2.7). I have an XML schema in which a namespace abbreviation 
> is defined as an attribute of an element inside the XM schema, and the 
> element is not the root "schema" element. Here is an example:
>  
> <xs:schema ....>
> ....
>    <xs:element name="StringArray" type="q1:ArrayOfString" 
> xmlns:q1="http://schemas.mycompany.com/2009/02/Arrays"/ 
> <http://schemas.mycompany.com/2009/02/Arrays%22/>>
> ....
> </xs:schema>
>  
> Xerces seems to have problem with this, it complains can not resolve 
> q1. If I move the namespace abbreviation definition to the schema 
> root, then it works fine.
>  
> My question is: Is this schema valid? If this is a bug in Xerces, if 
> this is fixed?
> I also attached my schemas here.
>  
> Thanks in advance!
> Ray 
>
>



Re: XML schema parsing - namespace abbre defined at an element, not the root schema element

Posted by Alberto Massari <am...@datadirect.com>.
It's a bug of Xerces 2.7 (see 
https://issues.apache.org/jira/browse/XERCESC-1592); it has been fixed 
in Xerces 3.0

Alberto

Raymond Zhou wrote:
> Hi there,
>  
> I am having a schema parsing problem using Xerces/c++ (I am using 
> version 2.7). I have an XML schema in which a namespace abbreviation 
> is defined as an attribute of an element inside the XM schema, and the 
> element is not the root "schema" element. Here is an example:
>  
> <xs:schema ....>
> ....
>    <xs:element name="StringArray" type="q1:ArrayOfString" 
> xmlns:q1="http://schemas.mycompany.com/2009/02/Arrays"/ 
> <http://schemas.mycompany.com/2009/02/Arrays%22/>>
> ....
> </xs:schema>
>  
> Xerces seems to have problem with this, it complains can not resolve 
> q1. If I move the namespace abbreviation definition to the schema 
> root, then it works fine.
>  
> My question is: Is this schema valid? If this is a bug in Xerces, if 
> this is fixed?
> I also attached my schemas here.
>  
> Thanks in advance!
> Ray 
>
>



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