[xml] Bug in xpath.c




Noticed in xmlXPathNextDescendantOrSelfElemParent:

#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:

This makes xpath requests like "//a" to fail under some circumstances when LIBXML_DOCB_ENABLED is 0.

I guess that the intent of the writer was:

                case XML_DOCUMENT_NODE:
#ifdef LIBXML_DOCB_ENABLED
                case XML_DOCB_DOCUMENT_NODE:
#endif
                case XML_HTML_DOCUMENT_NODE:


F.Delyon



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