From 117597ebabeb0c71e06f8d4e26344579b51ef243 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 15 Oct 2002 09:45:29 +0000 Subject: [PATCH] fixed the behaviour of node() patter which didn't patch the one defined in * libxslt/pattern.c: fixed the behaviour of node() patter which didn't patch the one defined in XPath :-( . Closes bug #95793 * tests/docs/Makefile.am tests/docs/bug-92.xml tests/general/Makefile.am tests/general/bug-92.*: added the example in the regression tests for this case Daniel --- ChangeLog | 8 ++++++++ libxslt/pattern.c | 6 ------ tests/docs/Makefile.am | 1 + tests/docs/bug-92.xml | 19 +++++++++++++++++++ tests/general/Makefile.am | 1 + tests/general/bug-92.out | 15 +++++++++++++++ tests/general/bug-92.xsl | 19 +++++++++++++++++++ 7 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 tests/docs/bug-92.xml create mode 100644 tests/general/bug-92.out create mode 100644 tests/general/bug-92.xsl diff --git a/ChangeLog b/ChangeLog index d11dfe6a..1c2fed8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Oct 15 11:40:19 CEST 2002 Daniel Veillard + + * libxslt/pattern.c: fixed the behaviour of node() patter which + didn't patch the one defined in XPath :-( . Closes bug #95793 + * tests/docs/Makefile.am tests/docs/bug-92.xml + tests/general/Makefile.am tests/general/bug-92.*: added the + example in the regression tests for this case + Mon Oct 14 12:29:53 CEST 2002 Igor Zlatkovic * libxslt/win32config.h: remapped mkdir to _mkdir for MS runtime diff --git a/libxslt/pattern.c b/libxslt/pattern.c index c937bceb..d61ca14f 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -939,17 +939,11 @@ wrong_index: break; case XSLT_OP_NODE: switch (node->type) { - case XML_DOCUMENT_NODE: - case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_ELEMENT_NODE: case XML_CDATA_SECTION_NODE: case XML_PI_NODE: case XML_COMMENT_NODE: case XML_TEXT_NODE: - case XML_ATTRIBUTE_NODE: break; default: return(0); diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index aa5e38b6..e2b63e8c 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -91,6 +91,7 @@ EXTRA_DIST = \ bug-89.xml \ bug-90.xml \ bug-91.xml \ + bug-92.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-92.xml b/tests/docs/bug-92.xml new file mode 100644 index 00000000..501b187a --- /dev/null +++ b/tests/docs/bug-92.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 55063af1..f4f3f28e 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -94,6 +94,7 @@ EXTRA_DIST = \ bug-89.out bug-89.xsl \ bug-90.out bug-90.xsl \ bug-91.out bug-91.xsl \ + bug-92.out bug-92.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-92.out b/tests/general/bug-92.out new file mode 100644 index 00000000..032a2642 --- /dev/null +++ b/tests/general/bug-92.out @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tests/general/bug-92.xsl b/tests/general/bug-92.xsl new file mode 100644 index 00000000..501b187a --- /dev/null +++ b/tests/general/bug-92.xsl @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +