'Re: "Re: [xml] Error in schema or in xmllint?"'


on 8/19/2004 9:33 PM Daniel Veillard wrote:

On Thu, Aug 19, 2004 at 06:28:00PM +0200, Roland Lezuo wrote:

The following schema defination produces the follwing error:

roland lezuo shswe:~/temp/libxml2-cvs$ xmllint --schema test2.xsd
Schemas parser error : Element decl.: A global declaration for
'PGPKeyPacket' is already existent.
WXS schema test2.xsd failed to compile

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
targetNamespace="http://www.w3.org/2000/09/xmldsig#"; version="0.1"

 <complexType name="PGPDataType">
       <element name="PGPKeyID" type="base64Binary"/>
       <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
       <any namespace="##other" processContents="lax" minOccurs="0"
       <element name="PGPKeyPacket" type="base64Binary"/>
       <any namespace="##other" processContents="lax" minOccurs="0"

  PGPKeyPacket doesn't look like a top level declarations so I doubt 
it should be declared global, seems a libxml2 bug to me.

Yes, a bug. This was a "dublicate-entry-in-the-hash-table" issue, since 
only <choice> (and not the two <sequence>s) was used for the engine's 
internal symbol space for both element declarations. The error message 
was misleading here.

Fixed in CVS.

Thanks & regards,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]