Commit ef0b4501 authored by Daniel Veillard's avatar Daniel Veillard

fixed some problems related to #75813 about handling of Result Value Trees

* xpath.c: fixed some problems related to #75813 about handling
  of Result Value Trees
Daniel
parent 9231ff92
Mon Mar 24 14:56:01 CET 2003 Daniel Veillard <daniel@veillard.com>
* xpath.c: fixed some problems related to #75813 about handling
of Result Value Trees
Sun Mar 23 22:57:20 CET 2003 Daniel Veillard <daniel@veillard.com>
* uri.c: applied a set of patches from Lorenzo Viali correcting
......
......@@ -100,11 +100,6 @@ void xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidCtxtPtr xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
void xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
int xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr instance);
int xmlRelaxNGValidateStream(xmlRelaxNGValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void *user_data);
xmlDocPtr doc);
void xmlRelaxNGCleanupTypes (void);
#endif /* __XML_RELAX_NG__ */
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body bgcolor="#FFFFFF">
<a href="mailto:katherine@cbfanc.org%2Cwebsite@bis.doc.gov?subject=South%20San%20Francisco%20BIS%20Seminar%20-%20October%2016th"></a><br>
<a href="mailto:katherine@cbfanc.org,website@bis.doc.gov?subject=South%20San%20Francisco%20BIS%20Seminar%20-%20October%2016th"></a><br>
</body></html>
This diff is collapsed.
This diff is collapsed.
......@@ -1694,8 +1694,10 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
if (val == NULL) return;
#if 0
if ((val->type == XML_ELEMENT_NODE) && (val->name[0] == ' '))
return; /* an XSLT fake node */
#endif
/* @@ with_ns to check wether namespace nodes should be looked at @@ */
/*
......@@ -1752,8 +1754,10 @@ void
xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
if (val == NULL) return;
#if 0
if ((val->type == XML_ELEMENT_NODE) && (val->name[0] == ' '))
return; /* an XSLT fake node */
#endif
/* @@ with_ns to check wether namespace nodes should be looked at @@ */
/*
......@@ -3130,11 +3134,21 @@ xmlXPathObjectCopy(xmlXPathObjectPtr val) {
case XPATH_XSLT_TREE:
if ((val->nodesetval != NULL) &&
(val->nodesetval->nodeTab != NULL)) {
xmlNodePtr cur, top, tmp;
ret->boolval = 1;
ret->user = xmlDocCopyNode(val->nodesetval->nodeTab[0],
val->nodesetval->nodeTab[0]->doc, 1);
ret->nodesetval = xmlXPathNodeSetCreate(
(xmlNodePtr) ret->user);
top = xmlCopyNode(val->nodesetval->nodeTab[0], 0);
ret->user = top;
if (top != NULL) {
top->doc = (xmlDocPtr) top;
cur = val->nodesetval->nodeTab[0]->children;
while (cur != NULL) {
tmp = xmlDocCopyNode(cur, (xmlDocPtr) top, 1);
xmlAddChild(top, tmp);
cur = cur->next;
}
}
ret->nodesetval = xmlXPathNodeSetCreate(top);
} else
ret->nodesetval = xmlXPathNodeSetCreate(NULL);
/* Deallocate the copied tree value */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment