You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Pawel Stawicki (JIRA)" <xe...@xml.apache.org> on 2008/01/31 18:49:11 UTC

[jira] Commented: (XERCESC-1776) bug in schema processing (using the "xsd:extension" for an another file) since v2.8.0

    [ https://issues.apache.org/jira/browse/XERCESC-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564423#action_12564423 ] 

Pawel Stawicki commented on XERCESC-1776:
-----------------------------------------

Hello.

I have found the bug.

I attache, a patch.

it is made for the tag version 2.8.0 of xerces:

#svn co https://svn.apache.org/repos/asf/xerces/c/tags/Xerces-C_2_8_0

the same bug is in the "trunk" version.

can someone check the patch ?

thanks
Pawel Stawicki


> bug in schema processing (using the "xsd:extension"  for an another file) since v2.8.0
> --------------------------------------------------------------------------------------
>
>                 Key: XERCESC-1776
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1776
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: SAX/SAX2, Validating Parser (Schema) (Xerces 1.5 or up only)
>    Affects Versions: 2.8.0, 3.0.0
>         Environment: Linux  kernel 2.6.18-5-k7  i386
> debian
> gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
>            Reporter: Pawel Stawicki
>         Attachments: test.tar.gz
>
>
> I have 2 schema files:
> 1. smerf.xsd:
> <?xml version="1.0" encoding="UTF-8"?>
> <schema  xmlns="http://www.w3.org/2001/XMLSchema"  xmlns:g="http://gargamel"  targetNamespace="http://smerf"  elementFormDefault="qualified">
>     <import  namespace="http://gargamel"    schemaLocation="gargamel.xsd" />
>     <element name="Alert" > <!--  type="g:gargamelType"> -->
>         <complexType>
>                 <complexContent>
>                         <extension base="g:gargamelType" />
>                 </complexContent>
>         </complexType>
>    </element>
> </schema>
> 2.gargamel.xsd :
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema     xmlns:xsd="http://www.w3.org/2001/XMLSchema"         targetNamespace="http://gargamel" elementFormDefault="qualified" >
>         <xsd:complexType name="gargamelType">
>                 <xsd:sequence>
>                         <xsd:element name="Data">
>                                 <xsd:complexType>
>                                         <xsd:sequence>
>                                                 <xsd:element name="Object" type="xsd:string"/>
>                                         </xsd:sequence>
>                                 </xsd:complexType>
>                         </xsd:element>
>                 </xsd:sequence>
>         </xsd:complexType>
> </xsd:schema>
> when i try to parse my xml file:
> <?xml version="1.0" encoding="UTF-8"?>
> <s:Alert xmlns:s="http://smerf"  xmlns:g="http://gargamel"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation='http://smerf smerf.xsd'  >
>         <g:Data>
>           <g:Object>
>                 pawel
>           </g:Object>
>         </g:Data>
> </s:Alert>
> I get an error:
> # SAX2Print -v=always test.xml
> <?xml version="1.0" encoding="LATIN1"?>
> <s:Alert xsi:schemaLocation="http://smerf smerf.xsd">
>         <g:Data>
>           Cannot load message domain
> this error is generated by the "trunk" version of xerces-c (r616373)
> a similar error occur i version 2.8.0 but not in 2.7.0
> It happens only when the element "Alert" is an "xsd:extension" for  "gargamelType" no when:
>     <element name="Alert"  type="g:gargamelType"/> 
> in version 2.8.0 I get (when using the SAX2 api):
> Xml:While parsing: Xerces-c error: At line 31, char 50, Unknown element
> 'g:Object', std "

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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