[xml] xincludeProcess() behavior



Hello,

I kept think I was doing something wrong, but it seems maybe this function is bugged. I have a python program 
that does all libxml2 work in a seperate module. That module has defines a document class with text and xml 
parsing methods. These results get handed back to the main module. 

The problem is that xincludeProcess() only seems effective when called within the local method doing the 
xpathEval(). But if that method gets called more than once, I start seeing the following error on stdout:

XInclude: no href
XInclude: no href
XInclude: no href
 ..
 ..for each XInclude contained in the XML source. It doesn't make any sense, because the xpath query then 
returns correct results. This also happens from interpreter mode when calling  xincludeProcess() more than 
once. OK, I guess its not really meant to be called more than once, but I have no other choice. I tried 
stuffing  
xincludeProcess() in the __init__ routine. I even tried adding a flag that prevents  xincludeProcess() from 
being 
called more than once. It really seems that xpathEval() only returns the correct info from the include when 
xincludeProcess() is in the same method.

Either I get a screen full of 
XInclude: no href
XInclude: no href
XInclude: no href
XInclude: no href
XInclude: no href
XInclude: no href,
 ...or my XIncludes won't stay open in the next external module call.

What am I doing wrong this time?

Thanks
Ben

250 business cards FREE! Create your own full-colour high-quality business cards easily online. Only at 
www.vistaprint.uk




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