Re: [xml] Error: failed to canonicalize XML file "-" (ret=-1)
- From: Aleksey Sanin <aleksey aleksey com>
- To: Mikhail S Grushinskiy <mgrushinskiy comcast net>
- Cc: xml gnome org
- Subject: Re: [xml] Error: failed to canonicalize XML file "-" (ret=-1)
- Date: Mon, 16 Feb 2004 21:31:29 -0800
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 (),
LibXML2 does the right thing here:
* Note:* This specification supports the recent XML plenary
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
relative URIs to absolute URIs.
With best regards,
Mikhail S Grushinskiy wrote:
Why testC14N would choke on this file?
./testC14N --with-comments foo.xml
Error: failed to canonicalize XML file "-" (ret=-1)
] [Thread Prev