From 9878dfe26a08ea5638c562c22c9becd11d462015 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 5 Nov 2009 06:49:41 +0200 Subject: Enable multiple import support for Xerces-C++ 3.1.0 or later --- libxsd/xsd/cxx/parser/xerces/elements.hxx | 2 +- libxsd/xsd/cxx/parser/xerces/elements.txx | 5 ++++- libxsd/xsd/cxx/xml/dom/parsing-source.txx | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'libxsd') diff --git a/libxsd/xsd/cxx/parser/xerces/elements.hxx b/libxsd/xsd/cxx/parser/xerces/elements.hxx index 9d79e61..a44cf50 100644 --- a/libxsd/xsd/cxx/parser/xerces/elements.hxx +++ b/libxsd/xsd/cxx/parser/xerces/elements.hxx @@ -48,7 +48,7 @@ namespace xsd static const unsigned long dont_initialize = 0x00000002; // Disable handling of subsequent imports for the same namespace - // in Xerces-C++ 3-series. + // in Xerces-C++ 3.1.0 and later. // static const unsigned long no_multiple_imports = 0x00000004; diff --git a/libxsd/xsd/cxx/parser/xerces/elements.txx b/libxsd/xsd/cxx/parser/xerces/elements.txx index e09ffc5..62376d0 100644 --- a/libxsd/xsd/cxx/parser/xerces/elements.txx +++ b/libxsd/xsd/cxx/parser/xerces/elements.txx @@ -607,7 +607,10 @@ namespace xsd sax->setFeature (XMLUni::fgSAX2CoreValidation, true); sax->setFeature (XMLUni::fgXercesSchema, true); -#if _XERCES_VERSION >= 30000 + // Xerces-C++ 3.1.0 is the first version with working multi import + // support. + // +#if _XERCES_VERSION >= 30100 if (!(f & flags::no_multiple_imports)) sax->setFeature (XMLUni::fgXercesHandleMultipleImports, true); #endif diff --git a/libxsd/xsd/cxx/xml/dom/parsing-source.txx b/libxsd/xsd/cxx/xml/dom/parsing-source.txx index ae7ceea..741dedc 100644 --- a/libxsd/xsd/cxx/xml/dom/parsing-source.txx +++ b/libxsd/xsd/cxx/xml/dom/parsing-source.txx @@ -155,8 +155,13 @@ namespace xsd conf->setParameter (XMLUni::fgDOMValidate, true); conf->setParameter (XMLUni::fgXercesSchema, true); + // Xerces-C++ 3.1.0 is the first version with working multi import + // support. + // +#if _XERCES_VERSION >= 30100 if (!(flags & no_muliple_imports)) conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true); +#endif // This feature checks the schema grammar for additional // errors. We most likely do not need it when validating @@ -348,8 +353,13 @@ namespace xsd conf->setParameter (XMLUni::fgDOMValidate, true); conf->setParameter (XMLUni::fgXercesSchema, true); + // Xerces-C++ 3.1.0 is the first version with working multi import + // support. + // +#if _XERCES_VERSION >= 30100 if (!(flags & no_muliple_imports)) conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true); +#endif // This feature checks the schema grammar for additional // errors. We most likely do not need it when validating -- cgit v1.1