>From the ruby wrapper....
rxxpc->ctxt->node = node->node;
if (node->node->type == XML_DOCUMENT_NODE) {
rxxpc->ctxt->namespaces = xmlGetNsList(node->node->doc,
xmlDocGetRootElement(node->node->doc));
} else {
rxxpc->ctxt->namespaces = xmlGetNsList(node->node->doc, node->node);
}
rxxpc->ctxt->nsNr = 0;
if (rxxpc->ctxt->namespaces != NULL) {
while (rxxpc->ctxt->namespaces[rxxpc->ctxt->nsNr] != NULL)
rxxpc->ctxt->nsNr++;
}
comp = xmlXPathCompile(STR2CSTR(xpath_expr));
if (comp == NULL) {
xmlXPathFreeCompExpr(comp);
rb_raise(eXMLXPathInvalidPath, "Invalid XPath expression");
}
rxxp->xpop = xmlXPathCompiledEval(comp, rxxpc->ctxt);
xmlXPathFreeCompExpr(comp);
if (rxxpc->ctxt->namespaces != NULL)
xmlFree(rxxpc->ctxt->namespaces);
This seems to agree with another place you answered this question.
http://mail.gnome.org/archives/xml/2001-August/msg00025.html
The error handling in the code looks to be wrong but that's not
causing my problem.
--
Jon Smirl
[EMAIL PROTECTED]
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml