aboutsummaryrefslogtreecommitdiff
path: root/xsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-11-13 07:46:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-11-13 07:46:45 +0200
commitf2ec36ab5fa04e11dee655d9c623baac95db1eba (patch)
treef1f51bc34e749ca1f97e2e722a334fc599c8a124 /xsd
parent6e9a647a859d9a95c96e75c77beaf41b166cc4e4 (diff)
Drop support for Xerces-C++ 2-series
Diffstat (limited to 'xsd')
-rw-r--r--xsd/cxx/literal-map.cxx53
1 files changed, 10 insertions, 43 deletions
diff --git a/xsd/cxx/literal-map.cxx b/xsd/cxx/literal-map.cxx
index e31d4aa..ffc5144 100644
--- a/xsd/cxx/literal-map.cxx
+++ b/xsd/cxx/literal-map.cxx
@@ -9,7 +9,6 @@
#include <iostream>
#include <xercesc/util/XMLUni.hpp>
-#include <xercesc/util/XercesVersion.hpp>
#include <xercesc/framework/LocalFileInputSource.hpp>
@@ -115,13 +114,8 @@ namespace CXX
state_ = s_entry;
}
-#if _XERCES_VERSION >= 30000
virtual void
characters (const XMLCh* const s, const XMLSize_t length)
-#else
- virtual void
- characters (const XMLCh* const s, const unsigned int length)
-#endif
{
String str (XML::transcode (s, length));
@@ -175,18 +169,11 @@ namespace CXX
void
handle (const SAXParseException& e, Severity s)
{
- wcerr << file_ << ":";
-
-#if _XERCES_VERSION >= 30000
- wcerr << e.getLineNumber () << ":" << e.getColumnNumber () << ": ";
-#else
- XMLSSize_t l (e.getLineNumber ());
- XMLSSize_t c (e.getColumnNumber ());
- wcerr << (l == -1 ? 0 : l) << ":" << (c == -1 ? 0 : c) << ": ";
-#endif
-
String msg (XML::transcode (e.getMessage ()));
- wcerr << (s == s_warning ? "warning: " : "error: ") << msg << endl;
+
+ wcerr << file_ << ":"
+ << e.getLineNumber () << ":" << e.getColumnNumber () << ": "
+ << (s == s_warning ? "warning: " : "error: ") << msg << endl;
if (s != s_warning)
throw Failed ();
@@ -195,37 +182,17 @@ namespace CXX
size_t
line () const
{
- size_t r (0);
-
- if (locator_ != 0)
- {
-#if _XERCES_VERSION >= 30000
- r = static_cast<size_t> (locator_->getLineNumber ());
-#else
- XMLSSize_t l (locator_->getLineNumber ());
- r = l == -1 ? 0 : static_cast<size_t> (l);
-#endif
- }
-
- return r;
+ return locator_ != 0
+ ? static_cast<size_t> (locator_->getLineNumber ())
+ : 0;
}
size_t
col () const
{
- size_t r (0);
-
- if (locator_ != 0)
- {
-#if _XERCES_VERSION >= 30000
- r = static_cast<size_t> (locator_->getColumnNumber ());
-#else
- XMLSSize_t c (locator_->getColumnNumber ());
- r = c == -1 ? 0 : static_cast<size_t> (c);
-#endif
- }
-
- return r;
+ return locator_ != 0
+ ? static_cast<size_t> (locator_->getColumnNumber ())
+ : 0;
}
private: