Re: [xml] configure/compile problem w/o schemas/xpath



Gary and Joerg,

The required patch to xmlreader.c is very simple. All that is needed are a
couple more conditional defines to exclude a few blocks of code when
LIBXML_SCHEMAS_ENABLED is not defined.

Here's a patch:

Index: xmlreader.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/xmlreader.c,v
retrieving revision 1.47
diff -u -r1.47 xmlreader.c
--- xmlreader.c 30 Apr 2003 12:20:34 -0000      1.47
+++ xmlreader.c 8 May 2003 23:55:33 -0000
@@ -1208,6 +1208,7 @@
 xmlFreeTextReader(xmlTextReaderPtr reader) {
     if (reader == NULL)
        return;
+#ifdef LIBXML_SCHEMAS_ENABLED
     if (reader->rngSchemas != NULL) {
        xmlRelaxNGFree(reader->rngSchemas);
        reader->rngSchemas = NULL;
@@ -1216,6 +1217,7 @@
        xmlRelaxNGFreeValidCtxt(reader->rngValidCtxt);
        reader->rngValidCtxt = NULL;
     }
+#endif
     if (reader->ctxt != NULL) {
        if (reader->ctxt->myDoc != NULL) {
            xmlFreeDoc(reader->ctxt->myDoc);
@@ -2473,6 +2475,7 @@
     return(reader->ctxt->myDoc);
 }
 
+#ifdef LIBXML_SCHEMAS_ENABLED
 /**
  * xmlTextReaderRelaxNGSetSchema:
  * @reader:  the xmlTextReaderPtr used
@@ -2590,6 +2593,7 @@
     reader->validate = XML_TEXTREADER_VALIDATE_RNG;
     return(0);
 }
+#endif
 
 /************************************************************************
  *                                                                     *

Eric Zurcher
CSIRO Livestock Industries
Canberra, Australia
Eric Zurcher csiro au

-----Original Message-----
Date: Thu, 8 May 2003 09:18:18 +0100
From: Gary Pennington sun com
To: Joerg Schmitz-Linneweber <jsl eib-port de>
Cc: XML-List <xml gnome org>
Subject: Re: [xml] configure/compile problem w/o schemas/xpath
Reply-To: Gary Pennington <gary pennington sun com>
Organization: Solaris Kernel Development; Sun Microsystems, Inc.

Coincidentally enough, I also found this out yesterday.

It looks to me like the xmlreader.c file isn't finished. I started working
on adding the required #ifdef support, but it was a big job and I haven't
got time to do it right now.

If I find time I'll submit a patch to the mailing list.

I'm pretty sure you have configured correctly (at least as far as
disabling
schema support is concerned), but you've just encountered some unfinished
work.

Gary




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