need to check grand-parent exists
This commit is contained in:
parent
0e1ae1deab
commit
07f96934b3
1 changed files with 4 additions and 2 deletions
|
|
@ -1503,8 +1503,9 @@ xml2xpath1(cxobj *x,
|
||||||
char *b;
|
char *b;
|
||||||
enum rfc_6020 keyword;
|
enum rfc_6020 keyword;
|
||||||
|
|
||||||
if (xp = xml_parent(x))
|
if ((xp = xml_parent(x)) == NULL)
|
||||||
xml2xpath1(xp, cb);
|
goto ok;
|
||||||
|
xml2xpath1(xp, cb);
|
||||||
/* XXX: sometimes there should be a /, sometimes not */
|
/* XXX: sometimes there should be a /, sometimes not */
|
||||||
cprintf(cb, "/%s", xml_name(x));
|
cprintf(cb, "/%s", xml_name(x));
|
||||||
if ((y = xml_spec(x)) != NULL){
|
if ((y = xml_spec(x)) != NULL){
|
||||||
|
|
@ -1533,6 +1534,7 @@ xml2xpath1(cxobj *x,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ok:
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
return retval;
|
return retval;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue