RE: [xslt] extension APIs returning a node-set



Thanks.  In the same respect of libxml/xpath handling shouldn't the creation
a tree fragment's
ret->nodesetval be based on val->children (the actual nodes in the tree
fragment) and not the 'fake' container?

xmlXPathObjectPtr
xmlXPathNewValueTree(xmlNodePtr val) {
    xmlXPathObjectPtr ret;

    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
    if (ret == NULL) {
        xmlGenericError(xmlGenericErrorContext,
		"xmlXPathNewNodeSet: out of memory\n");
	return(NULL);
    }
    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
    ret->type = XPATH_XSLT_TREE;
    ret->boolval = 1;
    ret->user = (void *) val;
    ret->nodesetval = xmlXPathNodeSetCreate(val);
    return(ret);
}


-----Original Message-----
From: Thomas Broyer [mailto:tbroyer@ltgt.net]
this the correct document to add the nodes to?

Yes. The EXSLT - Strings implementation is really alpha software, thanks
for the bug reporting (yes, it should be ->document->doc, not ->output)





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