From 54b4ce572b8024785c0e1362ce38317715ae7c8a Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 22 Mar 2002 15:15:36 +0000 Subject: [PATCH] Fixing bug #75777 error with namespaced attribute match rules evaluation * libxslt/pattern.c: Fixing bug #75777 error with namespaced attribute match rules evaluation * tests/docs/Makefile.am tests/docs/bug-78.xml tests/general/Makefile.am tests/general/bug-78.*: added a specific example for bug #75777 in the regression tests Daniel --- ChangeLog | 8 ++++++++ doc/libxslt-api.xml | 3 --- doc/libxslt-decl.txt | 16 ++++++---------- doc/libxslt-refs.xml | 3 --- libxslt/pattern.c | 17 +++++++---------- tests/docs/Makefile.am | 1 + tests/docs/bug-78.xml | 8 ++++++++ tests/general/Makefile.am | 1 + tests/general/bug-78.out | 3 +++ tests/general/bug-78.xsl | 17 +++++++++++++++++ 10 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 tests/docs/bug-78.xml create mode 100644 tests/general/bug-78.out create mode 100644 tests/general/bug-78.xsl diff --git a/ChangeLog b/ChangeLog index f75938c..65b6fdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Mar 22 16:13:22 CET 2002 Daniel Veillard + + * libxslt/pattern.c: Fixing bug #75777 error with namespaced + attribute match rules evaluation + * tests/docs/Makefile.am tests/docs/bug-78.xml + tests/general/Makefile.am tests/general/bug-78.*: added a + specific example for bug #75777 in the regression tests + Thu Mar 21 17:19:56 CET 2002 Daniel Veillard * libxslt/transform.c: found another stupid bug by step by diff --git a/doc/libxslt-api.xml b/doc/libxslt-api.xml index 006888b..667f28a 100644 --- a/doc/libxslt-api.xml +++ b/doc/libxslt-api.xml @@ -42,7 +42,6 @@ - @@ -312,8 +311,6 @@ should be activated only when debugging libxslt. DEBUG_MEMORY_LOCATION should be activated only when libxml has been configured with --with-debug-mem too - - Checks that the element pertains to XSLT namespace. diff --git a/doc/libxslt-decl.txt b/doc/libxslt-decl.txt index 0591a30..92c915e 100644 --- a/doc/libxslt-decl.txt +++ b/doc/libxslt-decl.txt @@ -1,14 +1,14 @@ LIBXSLT_DOTTED_VERSION -#define LIBXSLT_DOTTED_VERSION "1.0.13" +#define LIBXSLT_DOTTED_VERSION "1.0.14" LIBXSLT_VERSION -#define LIBXSLT_VERSION 10013 +#define LIBXSLT_VERSION 10014 LIBXSLT_VERSION_STRING -#define LIBXSLT_VERSION_STRING "10013" +#define LIBXSLT_VERSION_STRING "10014" WITH_XSLT_DEBUG @@ -454,10 +454,6 @@ xsltStylesheetPtr style xsltDocumentPtr doc -IN_LIBXSLT -#define IN_LIBXSLT - - LIBXSLT_PUBLIC #define LIBXSLT_PUBLIC __declspec(dllimport) @@ -1557,15 +1553,15 @@ void LIBXSLT_DOTTED_VERSION -#define LIBXSLT_DOTTED_VERSION "1.0.13" +#define LIBXSLT_DOTTED_VERSION "1.0.14" LIBXSLT_VERSION -#define LIBXSLT_VERSION 10013 +#define LIBXSLT_VERSION 10014 LIBXSLT_VERSION_STRING -#define LIBXSLT_VERSION_STRING "10013" +#define LIBXSLT_VERSION_STRING "10014" WITH_XSLT_DEBUG diff --git a/doc/libxslt-refs.xml b/doc/libxslt-refs.xml index e30a5e3..6ec98b8 100644 --- a/doc/libxslt-refs.xml +++ b/doc/libxslt-refs.xml @@ -7,7 +7,6 @@ - @@ -256,7 +255,6 @@ - @@ -1205,7 +1203,6 @@ - diff --git a/libxslt/pattern.c b/libxslt/pattern.c index a2292b2..4928581 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -455,20 +455,17 @@ xsltTestCompMatch(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp, case XSLT_OP_ATTR: if (node->type != XML_ATTRIBUTE_NODE) return(0); - if (step->value == NULL) - continue; - if (step->value[0] != node->name[0]) - return(0); - if (!xmlStrEqual(step->value, node->name)) - return(0); - + if (step->value != NULL) { + if (step->value[0] != node->name[0]) + return(0); + if (!xmlStrEqual(step->value, node->name)) + return(0); + } /* Namespace test */ if (node->ns == NULL) { if (step->value2 != NULL) return(0); - } else if (node->ns->href != NULL) { - if (step->value2 == NULL) - return(0); + } else if (step->value2 != NULL) { if (!xmlStrEqual(step->value2, node->ns->href)) return(0); } diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index aacbaed..d7cfa7c 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -78,6 +78,7 @@ EXTRA_DIST = \ bug-75.xml \ bug-76.xml \ bug-77.xml \ + bug-78.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-78.xml b/tests/docs/bug-78.xml new file mode 100644 index 0000000..c598794 --- /dev/null +++ b/tests/docs/bug-78.xml @@ -0,0 +1,8 @@ + + + + + tototo + + + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index e33e242..2704a5c 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -81,6 +81,7 @@ EXTRA_DIST = \ bug-75.out bug-75.xsl \ bug-76.out bug-76.xsl \ bug-77.out bug-77.xsl \ + bug-78.out bug-78.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-78.out b/tests/general/bug-78.out new file mode 100644 index 0000000..666454c --- /dev/null +++ b/tests/general/bug-78.out @@ -0,0 +1,3 @@ + + tototo + diff --git a/tests/general/bug-78.xsl b/tests/general/bug-78.xsl new file mode 100644 index 0000000..b2640ff --- /dev/null +++ b/tests/general/bug-78.xsl @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + -- 2.7.4