[libxslt] Fix a bug in selecting XSLT elements



commit e6a0bc8081271f33b9899eb78e1da1a2a0428419
Author: Daniel Veillard <veillard redhat com>
Date:   Tue Aug 7 11:26:43 2012 +0800

    Fix a bug in selecting XSLT elements

 libxslt/xsltutils.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libxslt/xsltutils.h b/libxslt/xsltutils.h
index 3886be3..c986a9c 100644
--- a/libxslt/xsltutils.h
+++ b/libxslt/xsltutils.h
@@ -52,8 +52,8 @@ extern "C" {
  * Checks that the element pertains to XSLT namespace.
  */
 #define IS_XSLT_ELEM(n)							\
-    (((n) != NULL) && ((n)->ns != NULL) &&				\
-     (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
+    (((n) != NULL) && ((n)->type == XML_ELEMENT_NODE) &&                \
+     ((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
 
 /**
  * IS_XSLT_NAME:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]