[libxml2] Add a missing element check



commit 264cee695ad2ff20776ec880f1bb8185367bbf58
Author: Daniel Veillard <veillard redhat com>
Date:   Mon Aug 13 12:40:53 2012 +0800

    Add a missing element check

 relaxng.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/relaxng.c b/relaxng.c
index 18f6a0b..8ac7ff7 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -39,9 +39,10 @@
 static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
     "http://relaxng.org/ns/structure/1.0";;
 
-#define IS_RELAXNG(node, type)						\
+#define IS_RELAXNG(node, typ)						\
    ((node != NULL) && (node->ns != NULL) &&				\
-    (xmlStrEqual(node->name, (const xmlChar *) type)) &&		\
+    (node->type == XML_ELEMENT_NODE) &&					\
+    (xmlStrEqual(node->name, (const xmlChar *) typ)) &&		\
     (xmlStrEqual(node->ns->href, xmlRelaxNGNs)))
 
 



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