mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
Fixes inherited from XSLT testing:
- xpath.c result/XPath/tests/chaptersbase result/XPath/tests/simplebase: fixed XPath node() - tree.c: small fix in xmlNewNs() - Makefile.am: removed extraneous xml2Conf.sh rule Daniel
This commit is contained in:
parent
9cb5ff4e6a
commit
2f913b7470
@ -1,3 +1,10 @@
|
||||
Wed Jan 31 14:19:16 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* xpath.c result/XPath/tests/chaptersbase
|
||||
result/XPath/tests/simplebase: fixed XPath node()
|
||||
* tree.c: small fix in xmlNewNs()
|
||||
* Makefile.am: removed extraneous xml2Conf.sh rule
|
||||
|
||||
Sun Jan 28 08:37:03 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* Makefile.am configure.in libxml.spec.in example/Makefile.am:
|
||||
|
16
Makefile.am
16
Makefile.am
@ -414,11 +414,11 @@ EXTRA_DIST = xml2Conf.sh.in libxml.spec.in libxml.spec libxml.m4 \
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libxml-2.0.pc
|
||||
|
||||
xml2Conf.sh: xml2Conf.sh.in Makefile
|
||||
## Use sed and then mv to avoid problems if the user interrupts.
|
||||
sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
|
||||
-e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
|
||||
-e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
|
||||
-e 's?\@VERSION\@?$(VERSION)?g' \
|
||||
< $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \
|
||||
&& mv xml2Conf.tmp xml2Conf.sh
|
||||
#xml2Conf.sh: xml2Conf.sh.in Makefile
|
||||
### Use sed and then mv to avoid problems if the user interrupts.
|
||||
# sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
|
||||
# -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
|
||||
# -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
|
||||
# -e 's?\@VERSION\@?$(VERSION)?g' \
|
||||
# < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \
|
||||
# && mv xml2Conf.tmp xml2Conf.sh
|
||||
|
@ -71,8 +71,12 @@ Set contains 1 nodes:
|
||||
========================
|
||||
Expression: /child::EXAMPLE/child::head/node()
|
||||
Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT title
|
||||
Set contains 3 nodes:
|
||||
1 TEXT
|
||||
content=
|
||||
2 ELEMENT title
|
||||
3 TEXT
|
||||
content=
|
||||
|
||||
========================
|
||||
Expression: /descendant::title
|
||||
|
@ -52,8 +52,12 @@ Set contains 1 nodes:
|
||||
========================
|
||||
Expression: /child::EXAMPLE/child::head/node()
|
||||
Object is a Node Set :
|
||||
Set contains 1 nodes:
|
||||
1 ELEMENT title
|
||||
Set contains 3 nodes:
|
||||
1 TEXT
|
||||
content=
|
||||
2 ELEMENT title
|
||||
3 TEXT
|
||||
content=
|
||||
|
||||
========================
|
||||
Expression: /descendant::title
|
||||
|
3
tree.c
3
tree.c
@ -120,6 +120,9 @@ xmlNsPtr
|
||||
xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix) {
|
||||
xmlNsPtr cur;
|
||||
|
||||
if ((node != NULL) && (node->type != XML_ELEMENT_NODE))
|
||||
return(NULL);
|
||||
|
||||
/*
|
||||
* Allocate a new Namespace and fill the fields.
|
||||
*/
|
||||
|
19
xpath.c
19
xpath.c
@ -516,7 +516,7 @@ xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file,
|
||||
* Compare two nodes w.r.t document order
|
||||
*
|
||||
* Returns -2 in case of error 1 if first point < second point, 0 if
|
||||
* that's the same point, -1 otherwise
|
||||
* that's the same node, -1 otherwise
|
||||
*/
|
||||
int
|
||||
xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
|
||||
@ -2914,10 +2914,10 @@ typedef enum {
|
||||
} xmlXPathTestVal;
|
||||
|
||||
typedef enum {
|
||||
NODE_TYPE_NODE = 0,
|
||||
NODE_TYPE_COMMENT = XML_COMMENT_NODE,
|
||||
NODE_TYPE_TEXT = XML_TEXT_NODE,
|
||||
NODE_TYPE_PI = XML_PI_NODE,
|
||||
NODE_TYPE_NODE = XML_ELEMENT_NODE
|
||||
NODE_TYPE_PI = XML_PI_NODE
|
||||
} xmlXPathTypeVal;
|
||||
|
||||
#define IS_FUNCTION 200
|
||||
@ -3050,6 +3050,10 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, xmlXPathAxisVal axis,
|
||||
" context contains %d nodes\n",
|
||||
nodelist->nodeNr);
|
||||
switch (test) {
|
||||
case NODE_TEST_NODE:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
" searching all nodes\n");
|
||||
break;
|
||||
case NODE_TEST_NONE:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
" searching for none !!!\n");
|
||||
@ -3109,9 +3113,14 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, xmlXPathAxisVal axis,
|
||||
return;
|
||||
case NODE_TEST_TYPE:
|
||||
if ((cur->type == type) ||
|
||||
((type == XML_ELEMENT_NODE) &&
|
||||
((type == NODE_TYPE_NODE) &&
|
||||
((cur->type == XML_DOCUMENT_NODE) ||
|
||||
(cur->type == XML_HTML_DOCUMENT_NODE)))) {
|
||||
(cur->type == XML_HTML_DOCUMENT_NODE) ||
|
||||
(cur->type == XML_ELEMENT_NODE) ||
|
||||
(cur->type == XML_PI_NODE) ||
|
||||
(cur->type == XML_COMMENT_NODE) ||
|
||||
(cur->type == XML_CDATA_SECTION_NODE) ||
|
||||
(cur->type == XML_TEXT_NODE)))) {
|
||||
#ifdef DEBUG_STEP
|
||||
n++;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user