Re: [xml] Error: failed to canonicalize XML file "-" (ret=-1)


That explains it.

----- Original Message ----- 
From: "Aleksey Sanin" <aleksey aleksey com>
To: "Mikhail S Grushinskiy" <mgrushinskiy comcast net>
Cc: <xml gnome org>
Sent: Tuesday, February 17, 2004 12:31 AM
Subject: Re: [xml] Error: failed to canonicalize XML file "-" (ret=-1)


Sorry for late reply, I was out of town and was not able to run a test 
on your file.

If you compile LibXML2 with DEBUG_C14N macro defined then you will get
the following output that gives a hint on what caused the problem:

[aleksey lsh libxml2]$ ./testC14N --without-comments /tmp/a.xml
xmlC14NProcessElementNode: xmlC14NCheckForRelativeNamespaces failed.
xmlC14NExecute: process childrens' list failed.
xmlC14NDocDumpMemory: xmlC14NDocSaveTo failed.
Error: failed to canonicalize XML file "./tmp/a.xml" (ret=-1)

The problem is "relative" URI in the namespace declaration. According to 
the spec ([1]),
LibXML2 does the right thing here:

*        Note:* This specification supports the recent XML plenary 
<> to 
        relative namespace URIs as follows: implementations of XML 
        MUST report an operation failure on documents containing 
relative namespace URIs.
        XML canonicalization MUST NOT be implemented with an XML parser 
that converts
        relative URIs to absolute URIs.

With best regards,


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.587 / Virus Database: 371 - Release Date: 2/12/2004

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