[PATCH] Fix a compile error 

Upstream-Status: Pending

by conditional using 'XML_DOCB_DOCUMENT_NODE' since it is only
defined when LIBXML_DOCB_ENABLED is enabled in xmlversion.h.

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 LibXML.xs        |    9 +-
 dom.c            |    2 +
 perl-libxml-mm.c |    4 +
 4 files changed, 678 insertions(+), 658 deletions(-)

diff --git a/LibXML.xs b/LibXML.xs
index b299ba4..66da04b 100644
--- a/LibXML.xs
+++ b/LibXML.xs
@@ -5026,7 +5026,9 @@ addChild( self, nNode )
             XSRETURN_UNDEF;
         case XML_DOCUMENT_NODE :
         case XML_HTML_DOCUMENT_NODE :
+#ifdef LIBXML_DOCB_ENABLED
         case XML_DOCB_DOCUMENT_NODE :
+#endif
             croak("addChild: HIERARCHY_REQUEST_ERR\n");
             XSRETURN_UNDEF;
         case XML_NOTATION_NODE :
@@ -5286,7 +5288,9 @@ _toStringC14N(self, comments=0, xpath=&PL_sv_undef, exclusive=0, inc_prefix_list
         if ( nodepath == NULL
              && self->type != XML_DOCUMENT_NODE
              && self->type != XML_HTML_DOCUMENT_NODE
+#ifdef LIBXML_DOCB_ENABLED
              && self->type != XML_DOCB_DOCUMENT_NODE
+#endif
            ) {
             if (comments)
 	      nodepath = xmlStrdup( (const xmlChar *) "(. | .//node() | .//@* | .//namespace::*)" );
@@ -5297,7 +5301,10 @@ _toStringC14N(self, comments=0, xpath=&PL_sv_undef, exclusive=0, inc_prefix_list
         if ( nodepath != NULL ) {
             if ( self->type == XML_DOCUMENT_NODE
                  || self->type == XML_HTML_DOCUMENT_NODE
-                 || self->type == XML_DOCB_DOCUMENT_NODE ) {
+#ifdef LIBXML_DOCB_ENABLED
+                 || self->type == XML_DOCB_DOCUMENT_NODE
+#endif
+	    ) {
                 refNode = xmlDocGetRootElement( self->doc );
             }
 	    if (SvOK(xpath_context)) {
diff --git a/dom.c b/dom.c
index 87eb61d..cbd391b 100644
--- a/dom.c
+++ b/dom.c
@@ -654,7 +654,9 @@ domName(xmlNodePtr node) {
 
     case XML_DOCUMENT_NODE :
     case XML_HTML_DOCUMENT_NODE :
+#ifdef LIBXML_DOCB_ENABLED
     case XML_DOCB_DOCUMENT_NODE :
+#endif
         name = (const xmlChar *) "#document";
         break;
 
diff --git a/perl-libxml-mm.c b/perl-libxml-mm.c
index d162b06..7ac5436 100644
--- a/perl-libxml-mm.c
+++ b/perl-libxml-mm.c
@@ -331,7 +331,9 @@ PmmNewNode(xmlNodePtr node)
         switch ( node->type ) {
         case XML_DOCUMENT_NODE:
         case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
         case XML_DOCB_DOCUMENT_NODE:
+#endif
             proxy = (ProxyNodePtr)xmlMalloc(sizeof(struct _DocProxyNode));
             if (proxy != NULL) {
                 ((DocProxyNodePtr)proxy)->psvi_status = Pmm_NO_PSVI;
@@ -550,7 +552,9 @@ PmmNodeToSv( xmlNodePtr node, ProxyNodePtr owner )
         switch ( node->type ) {
         case XML_DOCUMENT_NODE:
         case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
         case XML_DOCB_DOCUMENT_NODE:
+#endif
             if ( ((xmlDocPtr)node)->encoding != NULL ) {
                 SetPmmENCODING(dfProxy, (int)xmlParseCharEncoding( (const char*)((xmlDocPtr)node)->encoding ));
             }
-- 
1.7.10.4

