summaryrefslogtreecommitdiff
path: root/src/raptor_libxml.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2003-02-11 16:02:30 +0000
committerDave Beckett <dave@dajobe.org>2003-02-11 16:02:30 +0000
commitda11dcf4a79db6b61976956b291a7feb5a2e16fc (patch)
tree4e9d2d2e1b652630bcf1a55b1a05a2d3aa786133 /src/raptor_libxml.c
parent0aa886d6f337825fa70c630a37e783ba7f80a137 (diff)
downloadraptor-da11dcf4a79db6b61976956b291a7feb5a2e16fc.tar.gz
Check for xmlSAXHandler externalSubset field, not present in old
libxml v1. Whether raptor works after this is unlikely and untested.
Diffstat (limited to 'src/raptor_libxml.c')
-rw-r--r--src/raptor_libxml.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/raptor_libxml.c b/src/raptor_libxml.c
index 0410544d..858391a4 100644
--- a/src/raptor_libxml.c
+++ b/src/raptor_libxml.c
@@ -73,6 +73,7 @@ raptor_libxml_internalSubset(void *ctx, const xmlChar *name,
}
+#ifdef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET
static void
raptor_libxml_externalSubset(void *ctx, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *SystemID)
@@ -80,6 +81,7 @@ raptor_libxml_externalSubset(void *ctx, const xmlChar *name,
raptor_parser* rdf_parser=(raptor_parser*)ctx;
externalSubset(raptor_get_libxml_context(rdf_parser), name, ExternalID, SystemID);
}
+#endif
static int
@@ -487,7 +489,6 @@ raptor_libxml_get_entity(void *ctx, const xmlChar *name) {
void
raptor_libxml_init(xmlSAXHandler *sax) {
sax->internalSubset = raptor_libxml_internalSubset;
- sax->externalSubset = raptor_libxml_externalSubset;
sax->isStandalone = raptor_libxml_isStandalone;
sax->hasInternalSubset = raptor_libxml_hasInternalSubset;
sax->hasExternalSubset = raptor_libxml_hasExternalSubset;
@@ -514,6 +515,10 @@ raptor_libxml_init(xmlSAXHandler *sax) {
sax->error=raptor_libxml_error;
sax->fatalError=raptor_libxml_fatal_error;
+#ifdef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET
+ sax->externalSubset = raptor_libxml_externalSubset;
+#endif
+
#ifdef RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED
sax->initialized = 1;
#endif