[xmlsec] Encryption and namespace

Matthias Jung matthias.jung at xtradyne.com
Tue Mar 23 02:20:15 PST 2004


Aleksey Sanin wrote:
> It seems to me that this is only a warning. The code in
> gnome-xml/parser.c file prints out the error message
>     "Namespace prefix %s for %s on %s is not defined\n"
> and continues. It should still create the XML tree.

Yes it does, but libxml returns XML_NS_ERR_UNDEFINED_NAMESPACE as error 
code. The function xmlSecParseMemoryExt does just like 0 as valid 
xmlParseChunk result.

Changing the three error check expressions (buffer, postfix, finishing) 
after calling xmlParseChunk to:

if(ret != 0 && ret != XML_NS_ERR_UNDEFINED_NAMESPACE) {

XMLDecryption works fine. :-)


I am afraid this is not a capable way to solve the parsing problem.
May be the undefined namespace needs to linked some more to the DOM 
document? What do the experts say?


Regards

Matthias



More information about the xmlsec mailing list