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

Re: [xml] XPath child axis traversal is broken when docb is disabled (libxml2 2.6.27)



Aleksey Sanin wrote:
> If you compile libxml2 with "--without-docb" option then
> XPath child axis traversal is broken due to the following
> ifdef in the xmlXPathNextDescendantOrSelfElemParent()
> function:
>
> 	while (cur != NULL) {
> 	    switch (cur->type) {
> 		case XML_ELEMENT_NODE:
> 		/* TODO: OK to have XInclude here? */
> 		case XML_XINCLUDE_START:
> 		case XML_DOCUMENT_FRAG_NODE:
> 		    if (cur != start)
> 			return(cur);
> 		    if (cur->children != NULL) {
> 			cur = cur->children;
> 			continue;
> 		    }
> 		    break;
> #ifdef LIBXML_DOCB_ENABLED
> 		/* Not sure if we need those here. */
> 		case XML_DOCUMENT_NODE:
> 		case XML_DOCB_DOCUMENT_NODE:
> #endif
> 		case XML_HTML_DOCUMENT_NODE:
> 		    if (cur != start)
> 			return(cur);
> 		    return(xmlDocGetRootElement((xmlDocPtr) cur));
> 		default:
> 		    break;
> 	    }
>
> It seems that the right thing to do is to simply move the
> "case XML_DOCUMENT_NODE:" out of this particular ifdef but
> I am not familiar enough with DOCB stuff to tell the consequences
> of this.
>
> Best,
> Aleksey

I think this one was already reported:
   http://mail.gnome.org/archives/xml/2006-October/msg00123.html
and fixed in CVS the day after 2.6.27 was released :-).

Bill




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