Merge pull request #49 from oci-labs/xercesc-2236
Mark Dependencies as `PRIVATE` in CMake
diff --git a/.gitignore b/.gitignore
index 8451652..5ec5ed6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,7 @@
MinSizeRel/
Release/
RelWithDebInfo/
+doc/html/
.vs/
.dirstamp
*.o
diff --git a/.travis.yml b/.travis.yml
index 78e3e72..34925c8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,7 @@
language: c
sudo: false
-dist: trusty
+dist: bionic
cache:
directories:
@@ -24,11 +24,25 @@
- autoconf
- automake
- libtool
+ - cmake
+ - ninja-build
+ homebrew:
+ packages:
+ - icu
+ - curl
+ - autoconf
+ - automake
+ - libtool
+ - cmake
+ - ninja
+ update: true
os:
- linux
- osx
+osx_image: xcode12.5
+
env:
matrix:
- BUILD=autoconf TYPE=Release MUTEXMGR=posix NETWORK=ON NETACCESSOR=curl MSGLOADER=inmemory TRANSCODER=iconv XMLCH=char16_t
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4254f89..bee6cd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,22 +19,11 @@
# Run "cmake" to generate the build files for your platform
-cmake_minimum_required(VERSION 3.2.0)
+cmake_minimum_required(VERSION 3.12.0)
-# Use new variable expansion policy.
-if (POLICY CMP0053)
- cmake_policy(SET CMP0053 NEW)
-endif(POLICY CMP0053)
-if (POLICY CMP0054)
- cmake_policy(SET CMP0054 NEW)
-endif(POLICY CMP0054)
-if (POLICY CMP0067)
- cmake_policy(SET CMP0067 NEW)
-endif(POLICY CMP0067)
-
-# Try C++14, then fall back to C++11 and C++98. Used for feature tests
+# Try C++17, then fall back to C++14, C++11 then C++98. Used for feature tests
# for optional features.
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)
# Use folders (for IDE project grouping)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@@ -116,7 +105,6 @@
include(XercesIncludes)
include(XercesFunctions)
include(XercesDLL)
-include(XercesIntTypes)
include(XercesPathDelimiters)
include(XercesICU)
include(XercesMutexMgrSelection)
@@ -125,16 +113,7 @@
include(XercesTranscoderSelection)
include(XercesFileMgrSelection)
include(XercesXMLCh)
-include(XercesOperatorDelete)
-include(XercesBool)
-include(XercesConst)
-include(XercesInline)
-include(XercesVolatile)
-include(XercesLString)
include(XercesMFC)
-include(XercesNamespaces)
-include(XercesStdLibs)
-include(XercesStdNamespace)
include(XercesSSE2)
include(XercesPathMax)
include(XercesWChar)
diff --git a/cmake/XercesBool.cmake b/cmake/XercesBool.cmake
deleted file mode 100644
index 3cc49d2..0000000
--- a/cmake/XercesBool.cmake
+++ /dev/null
@@ -1,38 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# bool type
-
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
-int f(int x){return 1;}
-int f(char x){return 1;}
-int f(bool x){return 1;}
-
-int main() {
- bool b = true;
- return f(b);
-}"
- HAVE_BOOL)
-
-set(XERCES_NO_NATIVE_BOOL 0)
-if(NOT HAVE_BOOL)
- set(XERCES_NO_NATIVE_BOOL 1)
-endif()
diff --git a/cmake/XercesConst.cmake b/cmake/XercesConst.cmake
deleted file mode 100644
index fa78435..0000000
--- a/cmake/XercesConst.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# const keyword
-
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
-int main() {
- const char *s = \"Test\";
- return 0;
-}"
- HAVE_CONST)
diff --git a/cmake/XercesIncludes.cmake b/cmake/XercesIncludes.cmake
index 88ba63a..75dc09c 100644
--- a/cmake/XercesIncludes.cmake
+++ b/cmake/XercesIncludes.cmake
@@ -34,9 +34,6 @@
check_include_file_cxx(nl_types.h HAVE_NL_TYPES_H)
check_include_file_cxx(stdbool.h HAVE_STDBOOL_H)
check_include_file_cxx(stddef.h HAVE_STDDEF_H)
-check_include_file_cxx(stdlib.h HAVE_STDLIB_H)
-check_include_file_cxx(string.h HAVE_STRING_H)
-check_include_file_cxx(strings.h HAVE_STRINGS_H)
check_include_file_cxx(sys/param.h HAVE_SYS_PARAM_H)
check_include_file_cxx(sys/socket.h HAVE_SYS_SOCKET_H)
check_include_file_cxx(sys/stat.h HAVE_SYS_STAT_H)
diff --git a/cmake/XercesInline.cmake b/cmake/XercesInline.cmake
deleted file mode 100644
index 2ea6597..0000000
--- a/cmake/XercesInline.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# inline keyword
-
-include(CheckCXXSourceCompiles)
-
-unset(inline_keyword)
-set(NEED_INLINE "0")
-
-# Inspired from /usr/share/autoconf/autoconf/c.m4
-foreach(test_keyword "inline" "__inline__" "__inline")
- set(CMAKE_REQUIRED_DEFINITIONS_SAVE ${CMAKE_REQUIRED_DEFINITIONS})
- set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- "-Dinline=${test_keyword}")
- check_cxx_source_compiles("
- typedef int foo_t;
- static inline foo_t static_foo() {return 0;}
- foo_t foo(){return 0;}
- int main(int argc, char *argv[]) {return 0;}"
- CXX_HAS_${test_keyword})
- set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_SAVE})
- if(CXX_HAS_${test_keyword})
- if(NOT test_keyword STREQUAL "inline")
- set(NEED_INLINE 1)
- else()
- set(HAVE_INLINE 1)
- endif()
- set(inline_keyword "${test_keyword}")
- break()
- endif()
-endforeach()
diff --git a/cmake/XercesIntTypes.cmake b/cmake/XercesIntTypes.cmake
deleted file mode 100644
index 6ad7dd3..0000000
--- a/cmake/XercesIntTypes.cmake
+++ /dev/null
@@ -1,162 +0,0 @@
-
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Integer type checks.
-
-include(CheckCXXSourceCompiles)
-include(CheckIncludeFileCXX)
-include(CheckTypeSize)
-
-check_include_file_cxx(cstdint HAVE_CSTDINT)
-
-check_cxx_source_compiles("
-#include <cstdint>
-
-int main() {
- uint32_t v1 = 342;
- int64_t v2 = -23;
- return 0;
-}" CSTDINT_FUNCTIONAL)
-
-check_include_file_cxx(stdint.h HAVE_STDINT_H)
-check_include_file_cxx(inttypes.h HAVE_INTTYPES_H)
-
-if(HAVE_CSTDINT AND CSTDINT_FUNCTIONAL)
- set(XERCES_HAVE_CSTDINT TRUE)
-else()
- set(XERCES_HAVE_CSTDINT FALSE)
-endif()
-set(XERCES_HAVE_STDINT_H ${HAVE_STDINT_H})
-set(XERCES_HAVE_INTTYPES_H ${HAVE_INTTYPES_H})
-
-# Standard typedefs
-set(CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES})
-set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "stddef.h")
-check_type_size("off_t" SIZEOF_OFF_T)
-check_type_size("size_t" SIZEOF_SIZE_T)
-check_type_size("ssize_t" SIZEOF_SSIZE_T)
-check_type_size("wchar_t" SIZEOF_WCHAR_T)
-set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE})
-set(HAVE_OFF_T ${SIZEOF_OFF_T})
-set(HAVE_SIZE_T ${SIZEOF_SIZE_T})
-set(HAVE_SSIZE_T ${SSIZEOF_SSIZE_T})
-set(HAVE_WCHAR_T ${WCHAROF_WCHAR_T})
-if(SIZEOF_SIZE_T)
- set(XERCES_SIZE_T size_t)
- set(XERCES_SIZE_MAX SIZE_MAX)
-else()
- set(XERCES_SIZE_T "unsigned long")
- set(XERCES_SIZE_MAX ULONG_MAX)
-endif()
-if(SIZEOF_SSIZE_T)
- set(XERCES_SSIZE_T ssize_t)
- set(XERCES_SSIZE_MAX SSIZE_MAX)
-else()
- set(XERCES_SSIZE_T long)
- set(XERCES_SSIZE_MAX LONG_MAX)
-endif()
-
-# Check type sizes
-check_type_size("signed short" SIZEOF_SHORT)
-check_type_size("unsigned short" SIZEOF_UNSIGNED_SHORT)
-check_type_size("signed int" SIZEOF_INT)
-check_type_size("unsigned int" SIZEOF_UNSIGNED_INT)
-check_type_size("signed long" SIZEOF_LONG)
-check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
-check_type_size("signed long long" SIZEOF_LONG_LONG)
-check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
-check_type_size("__int64" SIZEOF___INT64)
-check_type_size("unsigned __int64" SIZEOF_UNSIGNED__INT64)
-check_type_size("unsigned char *" SIZEOF_UNSIGNED_CHAR_P)
-
-# If this failed, set size to zero to match autoconf
-if(NOT SIZEOF___INT64)
- set(SIZEOF___INT64 0)
-endif()
-if(NOT SIZEOF_UNSIGNED__INT64)
- set(SIZEOF_UNSIGNED__INT64 0)
-endif()
-
-if(HAVE_CSTDINT OR HAVE_STDINT_H OR HAVE_INTTYPES_H)
- # Use standard sized types if possible
- set(XERCES_S16BIT_INT "int16_t")
- set(XERCES_U16BIT_INT "uint16_t")
- set(XERCES_S32BIT_INT "int32_t")
- set(XERCES_U32BIT_INT "uint32_t")
- set(XERCES_S64BIT_INT "int64_t")
- set(XERCES_U64BIT_INT "uint64_t")
-else()
- # Fallback to basic language types
- if(SIZEOF_SHORT EQUAL 2)
- set(XERCES_S16BIT_INT "signed short")
- elseif(SIZEOF_INT EQUAL 2)
- set(XERCES_S16BIT_INT "int")
- else()
- message(FATAL_ERROR "Couldn't find a signed 16-bit type")
- endif()
-
- if(SIZEOF_UNSIGNED_SHORT EQUAL 2)
- set(XERCES_U16BIT_INT "unsigned short")
- elseif(SIZEOF_UNSIGNED_INT EQUAL 2)
- set(XERCES_U16BIT_INT "unsigned int")
- else()
- message(FATAL_ERROR "Couldn't find an unsigned 16-bit type")
- endif()
-
- if(SIZEOF_INT EQUAL 4)
- set(XERCES_S32BIT_INT "signed int")
- elseif(SIZEOF_LONG EQUAL 4)
- set(XERCES_S32BIT_INT "signed long")
- else()
- message(FATAL_ERROR "Couldn't find a signed 32-bit type")
- endif()
-
- if(SIZEOF_UNSIGNED_INT EQUAL 4)
- set(XERCES_U32BIT_INT "unsigned int")
- elseif(SIZEOF_UNSIGNED_LONG EQUAL 4)
- set(XERCES_U32BIT_INT "unsigned long")
- else()
- message(FATAL_ERROR "Couldn't find an unsigned 32-bit type")
- endif()
-
- if(SIZEOF_INT EQUAL 8)
- set(XERCES_S64BIT_INT "signed int")
- elseif(SIZEOF_LONG EQUAL 8)
- set(XERCES_S64BIT_INT "signed long")
- elseif(SIZEOF_LONG_LONG EQUAL 8)
- set(XERCES_S64BIT_INT "signed long long")
- elseif(SIZEOF___INT64 EQUAL 8)
- set(XERCES_S64BIT_INT "__int64")
- else()
- message(FATAL_ERROR "Couldn't find a signed 64-bit type")
- endif()
-
- if(SIZEOF_UNSIGNED_INT EQUAL 8)
- set(XERCES_U64BIT_INT "unsigned int")
- elseif(SIZEOF_UNSIGNED_LONG EQUAL 8)
- set(XERCES_U64BIT_INT "unsigned long")
- elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL 8)
- set(XERCES_U64BIT_INT "unsigned long long")
- elseif(SIZEOF_UNSIGNED__INT64 EQUAL 8)
- set(XERCES_U64BIT_INT "unsigned __int64")
- else()
- message(FATAL_ERROR "Couldn't find an unsigned 64-bit type")
- endif()
-endif()
diff --git a/cmake/XercesLString.cmake b/cmake/XercesLString.cmake
deleted file mode 100644
index 81975cb..0000000
--- a/cmake/XercesLString.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Wide string literals
-
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
-int main() {
- const wchar_t* s=L\"wide string\";
- return 0;
-}"
- HAVE_LSTRING)
-
-set(XERCES_LSTRSUPPORT ${HAVE_LSTRING})
diff --git a/cmake/XercesNamespaces.cmake b/cmake/XercesNamespaces.cmake
deleted file mode 100644
index 1acbd79..0000000
--- a/cmake/XercesNamespaces.cmake
+++ /dev/null
@@ -1,37 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# namespace keyword
-
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
-namespace Outer {
- namespace Inner {
- int i = 0;
- }
-}
-
-int main() {
- using namespace Outer::Inner;
- return i;
-}"
- HAVE_NAMESPACES)
-
-set(XERCES_HAS_CPP_NAMESPACE ${HAVE_NAMESPACES})
diff --git a/cmake/XercesOperatorDelete.cmake b/cmake/XercesOperatorDelete.cmake
deleted file mode 100644
index 0ab9d1f..0000000
--- a/cmake/XercesOperatorDelete.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Check whether the compiler chokes on a placement operator delete
-
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
-#include <stdlib.h>
-
-class XMemory {
-public:
- void* operator new(size_t s) { return 0; }
- void* operator new(size_t s, void* ptr) { return 0; }
- void operator delete(void* p) {}
- void operator delete(void* p, void* ptr) {}
-};
-
-int main() {
- return 0;
-}"
- CXX_matching-delete-operator)
-
-set(XERCES_NO_MATCHING_DELETE_OPERATOR 0)
-if(NOT CXX_matching-delete-operator)
- set(XERCES_NO_MATCHING_DELETE_OPERATOR 1)
-endif()
diff --git a/cmake/XercesStdLibs.cmake b/cmake/XercesStdLibs.cmake
deleted file mode 100644
index c898d03..0000000
--- a/cmake/XercesStdLibs.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# C++ standard library includes
-
-include(CheckCXXSourceCompiles)
-include(XercesNamespaces)
-
-set(CMAKE_REQUIRED_DEFINITIONS_SAVE ${CMAKE_REQUIRED_DEFINITIONS})
-if(HAVE_NAMESPACES)
- set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DHAVE_NAMESPACES)
-endif()
-
-check_cxx_source_compiles("
-#include <map>
-#include <iomanip>
-#include <cmath>
-#ifdef HAVE_NAMESPACES
-using namespace std;
-#endif
-
-int main() {
- return 0;
-}"
- HAVE_STD_LIBS)
-
-set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_SAVE})
-
-set(XERCES_NEW_IOSTREAMS ${HAVE_STD_LIBS})
diff --git a/cmake/XercesStdNamespace.cmake b/cmake/XercesStdNamespace.cmake
deleted file mode 100644
index fc68fb3..0000000
--- a/cmake/XercesStdNamespace.cmake
+++ /dev/null
@@ -1,33 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# C++ standard library std:: namespace
-
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
-#include <iostream>
-std::istream& is = std::cin;
-
-int main() {
- return 0;
-}"
- HAVE_STD_NAMESPACE)
-
-set(XERCES_STD_NAMESPACE ${HAVE_STD_NAMESPACE})
diff --git a/cmake/XercesTranscoderSelection.cmake b/cmake/XercesTranscoderSelection.cmake
index 4ff5b16..5dd7c62 100644
--- a/cmake/XercesTranscoderSelection.cmake
+++ b/cmake/XercesTranscoderSelection.cmake
@@ -43,9 +43,6 @@
check_include_file_cxx(iconv.h HAVE_ICONV_H)
check_include_file_cxx(wchar.h HAVE_WCHAR_H)
-check_include_file_cxx(string.h HAVE_STRING_H)
-check_include_file_cxx(stdlib.h HAVE_STDLIB_H)
-check_include_file_cxx(stdio.h HAVE_STDIO_H)
check_include_file_cxx(ctype.h HAVE_CTYPE_H)
check_include_file_cxx(locale.h HAVE_LOCALE_H)
check_include_file_cxx(errno.h HAVE_ERRNO_H)
@@ -57,8 +54,8 @@
check_function_exists(iconv HAVE_ICONV)
set(gnuiconv_available 0)
-if(HAVE_ICONV_H AND HAVE_WCHAR_H AND HAVE_STRING_H AND HAVE_STDLIB_H AND
- HAVE_STDIO_H AND HAVE_CTYPE_H AND HAVE_LOCALE_H AND HAVE_ERRNO_H)
+if(HAVE_ICONV_H AND HAVE_WCHAR_H AND
+ HAVE_CTYPE_H AND HAVE_LOCALE_H AND HAVE_ERRNO_H)
if (HAVE_ENDIAN_H OR HAVE_MACHINE_ENDIAN_H OR HAVE_ARPA_NAMESER_COMPAT_H)
if(HAVE_ICONV_OPEN AND HAVE_ICONV_CLOSE AND HAVE_ICONV)
set(gnuiconv_available 1)
diff --git a/cmake/XercesVolatile.cmake b/cmake/XercesVolatile.cmake
deleted file mode 100644
index 6029fe6..0000000
--- a/cmake/XercesVolatile.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-# CMake build for xerces-c
-#
-# Written by Roger Leigh <rleigh@codelibre.net>
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# volatile keyword
-
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
-int main() {
- volatile int i = 1;
- return 0;
-}"
- HAVE_VOLATILE)
diff --git a/cmake/XercesXMLCh.cmake b/cmake/XercesXMLCh.cmake
index df8d2d3..d3b7fce 100644
--- a/cmake/XercesXMLCh.cmake
+++ b/cmake/XercesXMLCh.cmake
@@ -24,7 +24,6 @@
include(CheckCXXSourceCompiles)
include(CheckTypeSize)
-include(XercesIntTypes)
check_cxx_source_compiles("
int main() {
@@ -74,7 +73,7 @@
message(FATAL_ERROR "${xmlch_type} xmlch_type unavailable")
endif()
-set(XERCES_XMLCH_T ${XERCES_U16BIT_INT})
+set(XERCES_XMLCH_T uint16_t)
set(XERCES_USE_CHAR16_T 0)
set(XERCES_INCLUDE_WCHAR_H 0)
if(xmlch_type STREQUAL "char16_t")
diff --git a/config.h.cmake.in b/config.h.cmake.in
index 4972d29..b86c12f 100644
--- a/config.h.cmake.in
+++ b/config.h.cmake.in
@@ -1,20 +1,6 @@
/* config.h.cmake.in. Not generated, but originated from autoheader. */
/* This file must be kept up-to-date with needed substitutions from config.h.in. */
-/* Define to 1 if you have the <cstdint> header file. */
-#cmakedefine HAVE_CSTDINT 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H 1
-
-#if defined(__cplusplus) && defined(HAVE_CSTDINT)
-#include <cstdint>
-#elif HAVE_STDINT_H
-#include <stdint.h>
-#elif HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
/* Define to specify no threading is used */
#cmakedefine APP_NO_THREADS 1
@@ -24,9 +10,6 @@
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
#cmakedefine HAVE_ARPA_NAMESER_COMPAT_H 1
-/* define if bool is a built-in type */
-#cmakedefine HAVE_BOOL 1
-
/* Define to 1 if you have the `catclose' function. */
#cmakedefine HAVE_CATCLOSE 1
@@ -96,9 +79,6 @@
/* Define to 1 if you have the `iconv_open' function. */
#cmakedefine HAVE_ICONV_OPEN 1
-/* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H 1
-
/* Define to 1 if you have the <langinfo.h> header file. */
#cmakedefine HAVE_LANGINFO_H 1
@@ -117,9 +97,6 @@
/* Define to 1 if you have the <locale.h> header file. */
#cmakedefine HAVE_LOCALE_H 1
-/* define if the compiler implements L"widestring" */
-#cmakedefine HAVE_LSTRING 1
-
/* Define to 1 if you have the <machine/endian.h> header file. */
#cmakedefine HAVE_MACHINE_ENDIAN_H 1
@@ -144,9 +121,6 @@
/* Define to 1 if you have the `memset' function. */
#cmakedefine HAVE_MEMSET 1
-/* define if the compiler implements namespaces */
-#cmakedefine HAVE_NAMESPACES 1
-
/* Define to 1 if you have the <netdb.h> header file. */
#cmakedefine HAVE_NETDB_H 1
@@ -186,18 +160,6 @@
/* Define to 1 if you have the <stddef.h> header file. */
#cmakedefine HAVE_STDDEF_H 1
-/* Define to 1 if you have the <stdio.h> header file. */
-#cmakedefine HAVE_STDIO_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H 1
-
-/* define if the compiler supports ISO C++ standard library */
-#cmakedefine HAVE_STD_LIBS 1
-
-/* define if the compiler supports the std namespace */
-#cmakedefine HAVE_STD_NAMESPACE 1
-
/* Define to 1 if you have the `strcasecmp' function. */
#cmakedefine HAVE_STRCASECMP 1
@@ -210,12 +172,6 @@
/* Define to 1 if you have the `stricmp' function. */
#cmakedefine HAVE_STRICMP 1
-/* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H 1
-
/* Define to 1 if you have the `strncasecmp' function. */
#cmakedefine HAVE_STRNCASECMP 1
@@ -319,33 +275,12 @@
/* Define to the version of this package. */
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT @SIZEOF_INT@
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG @SIZEOF_LONG@
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT @SIZEOF_SHORT@
-
-/* The size of `wchar_t', as computed by sizeof. */
-#define SIZEOF_WCHAR_T @SIZEOF_WCHAR_T@
-
-/* The size of `__int64', as computed by sizeof. */
-#define SIZEOF___INT64 @SIZEOF___INT64@
-
/* Version number of package */
#define VERSION "@PACKAGE_VERSION@"
/* Define if DLL symbols should be exported */
#cmakedefine XERCES_DLL_EXPORT 1
-/* Define if namespaces is supported by the compiler */
-#cmakedefine XERCES_HAS_CPP_NAMESPACE 1
-
/* Define to have SSE2 instruction support detected at runtime using __cpuid
*/
#cmakedefine XERCES_HAVE_CPUID_INTRINSIC 1
@@ -360,9 +295,6 @@
/* Define to 1 if you have intrin.h */
#cmakedefine XERCES_HAVE_INTRIN_H 1
-/* Define to 1 if we have inttypes.h */
-#cmakedefine XERCES_HAVE_INTTYPES_H 1
-
/* Define to have SSE2 instruction used at runtime */
#cmakedefine XERCES_HAVE_SSE2_INTRINSIC 1
@@ -375,16 +307,6 @@
/* Define if there is support for L"widestring" */
#cmakedefine XERCES_LSTRSUPPORT 1
-/* Define if the isstream library can be included as <iostream> */
-#cmakedefine XERCES_NEW_IOSTREAMS 1
-
-/* Define to have XMemory.hpp avoid declaring a matching operator delete for
- the placement operator new */
-#cmakedefine XERCES_NO_MATCHING_DELETE_OPERATOR 1
-
-/* Define if there is no native bool support in this environment */
-#cmakedefine XERCES_NO_NATIVE_BOOL 1
-
/* Define to use backslash as an extra path delimiter character */
#cmakedefine XERCES_PATH_DELIMITER_BACKSLASH 1
@@ -394,42 +316,9 @@
/* Define as the platform's import attribute */
#define XERCES_PLATFORM_IMPORT @XERCES_PLATFORM_IMPORT@
-/* An appropriate signed 16 bit integer type */
-#define XERCES_S16BIT_INT @XERCES_S16BIT_INT@
-
-/* An appropriate signed 32 bit integer type */
-#define XERCES_S32BIT_INT @XERCES_S32BIT_INT@
-
-/* An appropriate signed 64 bit integer type */
-#define XERCES_S64BIT_INT @XERCES_S64BIT_INT@
-
-/* Define as the appropriate SIZE_MAX macro */
-#define XERCES_SIZE_MAX @XERCES_SIZE_MAX@
-
-/* Define as the appropriate size_t type */
-#define XERCES_SIZE_T @XERCES_SIZE_T@
-
-/* Define as the appropriate SSIZE_MAX macro */
-#define XERCES_SSIZE_MAX @XERCES_SSIZE_MAX@
-
-/* Define as the appropriate ssize_t type */
-#define XERCES_SSIZE_T @XERCES_SSIZE_T@
-
/* Define if building a static library */
#cmakedefine XERCES_STATIC_LIBRARY 1
-/* Define if the std namespace is supported */
-#cmakedefine XERCES_STD_NAMESPACE 1
-
-/* An appropriate unsigned 16 bit integer type */
-#define XERCES_U16BIT_INT @XERCES_U16BIT_INT@
-
-/* An appropriate unsigned 32 bit integer type */
-#define XERCES_U32BIT_INT @XERCES_U32BIT_INT@
-
-/* An appropriate unsigned 64 bit integer type */
-#define XERCES_U64BIT_INT @XERCES_U64BIT_INT@
-
/* Define to use the POSIX file mgr */
#cmakedefine XERCES_USE_FILEMGR_POSIX 1
@@ -486,26 +375,3 @@
/* Define to the 16 bit type used to represent Xerces UTF-16 characters */
#define XERCES_XMLCH_T @XERCES_XMLCH_T@
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#if !@HAVE_CONST@
-#define const
-#endif
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#if !@HAVE_INLINE@
-#if @NEED_INLINE@
-#define inline @inline_keyword@
-#else
-#define inline
-#endif
-#endif
-#endif
-
-/* Define to empty if the keyword `volatile' does not work. Warning: valid
-code using `volatile' can become incorrect without. Disable with care. */
-#if !@HAVE_VOLATILE@
-#define volatile
-#endif
diff --git a/configure.ac b/configure.ac
index 1a38ec8..4e804ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,8 +24,8 @@
#
AC_PREREQ(2.60)
-AC_INIT([xerces-c],[3.2.3])
-INTERFACE_VERSION=3.2
+AC_INIT([xerces-c],[4.0.0])
+INTERFACE_VERSION=4.0
GRAMMAR_SERIALIZATION_LEVEL=7
XERCES_VERSION_MAJOR=$(echo $PACKAGE_VERSION | cut -d. -f1)
@@ -79,6 +79,15 @@
AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 tar-ustar])
AM_MAINTAINER_MODE
+# Checks for C++ standard version
+AX_CXX_COMPILE_STDCXX([17], [ext], [optional])
+if test "$HAVE_CXX17" = "0"; then
+ AX_CXX_COMPILE_STDCXX([14], [ext], [optional])
+ if test "$HAVE_CXX14" = "0"; then
+ AX_CXX_COMPILE_STDCXX([11], [ext], [optional])
+ fi
+fi
+
# Check if rpath is disabled
AC_MSG_CHECKING(whether to use rpath)
AC_ARG_ENABLE(rpath,
@@ -128,9 +137,8 @@
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h langinfo.h limits.h locale.h \
- memory.h netdb.h netinet/in.h nl_types.h stddef.h stdint.h stdlib.h \
- string.h strings.h \
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h langinfo.h limits.h locale.h \
+ memory.h netdb.h netinet/in.h nl_types.h stddef.h \
sys/param.h sys/socket.h sys/time.h sys/timeb.h \
unistd.h wchar.h wctype.h \
CoreServices/CoreServices.h \
@@ -139,24 +147,8 @@
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
-AC_C_CONST
-AC_C_INLINE
-AC_C_VOLATILE
AC_CHECK_SIZEOF(wchar_t)
-AC_CHECK_TYPE(size_t)
-AC_CHECK_TYPE(ssize_t)
-
-AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-
-XERCES_INT_TYPES
-
-AC_CXX_HAVE_BOOL
-AC_CXX_HAVE_NAMESPACES
-AC_CXX_HAVE_STD_NAMESPACE
-AC_CXX_HAVE_STD_LIBS
-AC_CXX_HAVE_LSTRING
ACX_PTHREAD
@@ -190,24 +182,6 @@
]
)
-# Check for functional cstdint header
-AC_MSG_CHECKING([for cstdint])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cstdint>]],
-[[
- uint32_t v1 = 342;
- int64_t v2 = -23;
- return 0;
-]])],
- [
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED([XERCES_HAVE_CSTDINT], 1, [Define to 1 if cstdint is functional.])
- ],
- [
- AC_MSG_RESULT([no])
- AC_DEFINE_UNQUOTED([XERCES_HAVE_CSTDINT], 0, [Define to 1 if cstdint is functional.])
- ]
- )
-
# The check for mbrlen, wcsrtombs and mbsrtowcs gives a false
# positive on HP-UX, so we use a different snippet to set the
# corresponding macro
@@ -229,7 +203,7 @@
)
AC_MSG_CHECKING([for wcsrtombs])
AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
-#include <string.h>]],
+#include <cstring>]],
[[
mbstate_t st;
memset(&st, 0, sizeof(st));
@@ -251,7 +225,7 @@
)
AC_MSG_CHECKING([for mbsrtowcs])
AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
-#include <string.h>]],
+#include <cstring>]],
[[
mbstate_t st;
memset(&st, 0, sizeof(st));
@@ -337,14 +311,8 @@
# publicly visible Xerces_autoconf_config.h file.
######################################################
-AC_DEFINE([XERCES_AUTOCONF], 1, [Define to true if autoconf is used in this configuration])
-
-AS_IF([test x$ac_cv_header_stdint_h = xyes],
- AC_DEFINE([XERCES_HAVE_STDINT_H], 1, [Define to 1 if we have stdint.h]))
AS_IF([test x$ac_cv_header_sys_types_h = xyes],
AC_DEFINE([XERCES_HAVE_SYS_TYPES_H], 1, [Define to 1 if we have sys/types.h]))
-AS_IF([test x$ac_cv_header_inttypes_h = xyes],
- AC_DEFINE([XERCES_HAVE_INTTYPES_H], 1, [Define to 1 if we have inttypes.h]))
case $host in
*-*-msdos* | *-*-mingw32* | *-*-cygwin* | *-*-windows* )
@@ -363,32 +331,8 @@
AC_DEFINE_UNQUOTED([XERCES_PLATFORM_IMPORT], [$platform_import], [Define as the platform's import attribute])
AC_DEFINE_UNQUOTED([XERCES_TEMPLATE_EXTERN], [$template_extern], [Define as the platform's template extern attribute])
-AS_IF([test ! $ac_cv_cxx_have_bool],
- AC_DEFINE([XERCES_NO_NATIVE_BOOL], 1, [Define if there is no native bool support in this environment]))
-
XERCES_XMLCH_SELECTION
-AC_MSG_CHECKING([whether the compiler chokes on a placement operator delete])
-AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <stdlib.h>
-
- class XMemory
- {
- public :
- void* operator new(size_t s) { return 0; }
- void* operator new(size_t s, void* ptr) { return 0; }
- void operator delete(void* p) {}
- void operator delete(void* p, void* ptr) {}
- };]],
- [[ ]])],
- [
- AC_MSG_RESULT([no])
- ],
- [
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED([XERCES_NO_MATCHING_DELETE_OPERATOR], 1, [Define to have XMemory.hpp avoid declaring a matching operator delete for the placement operator new])
- ]
- )
-
if test "$have_sse2" = "yes"; then
no_sse2_CXXFLAGS="$CXXFLAGS"
@@ -511,28 +455,6 @@
fi
fi
-AS_IF([test x$ac_cv_type_size_t = xyes],
- AC_DEFINE([XERCES_SIZE_T], [size_t], [Define as the appropriate size_t type])
- AC_DEFINE([XERCES_SIZE_MAX], [SIZE_MAX], [Define as the appropriate SIZE_MAX macro]),
- AC_DEFINE([XERCES_SIZE_T], [unsigned long], [Define as the appropriate size_t type])
- AC_DEFINE([XERCES_SIZE_MAX], [ULONG_MAX], [Define as the appropriate SIZE_MAX macro]))
-
-AS_IF([test x$ac_cv_type_ssize_t = xyes],
- AC_DEFINE([XERCES_SSIZE_T], [ssize_t], [Define as the appropriate ssize_t type])
- AC_DEFINE([XERCES_SSIZE_MAX], [SSIZE_MAX], [Define as the appropriate SSIZE_MAX macro]),
- AC_DEFINE([XERCES_SSIZE_T], [long], [Define as the appropriate ssize_t type])
- AC_DEFINE([XERCES_SSIZE_MAX], [LONG_MAX], [Define as the appropriate SSIZE_MAX macro]))
-
-AS_IF([test x$ac_cv_cxx_have_namespaces = xyes],
- AC_DEFINE([XERCES_HAS_CPP_NAMESPACE], 1, [Define if namespaces is supported by the compiler]))
-
-AS_IF([test x$ac_cv_cxx_have_std_namespace = xyes],
- AC_DEFINE([XERCES_STD_NAMESPACE], 1, [Define if the std namespace is supported]))
-
-AS_IF([test x$ac_cv_cxx_have_std_libs = xyes],
- AC_DEFINE([XERCES_NEW_IOSTREAMS], 1, [Define if the isstream library can be included as <iostream>]))
-
-
AC_OUTPUT
AC_MSG_NOTICE
diff --git a/doc/build.xml b/doc/build.xml
index 3f706b9..aedb4bd 100644
--- a/doc/build.xml
+++ b/doc/build.xml
@@ -572,14 +572,16 @@
<td>AIX PowerPC</td>
<td>IBM XL C++</td>
<td><code>./configure CXX=xlC_r CC=xlc_r</code><br/>
- <code>gmake libxerces_c_la_LDFLAGS=-qmkshrobj</code></td>
+ <code>gmake libxerces_c_la_LDFLAGS=-qmkshrobj</code><br/>
+ (for xlC v11-v13, libxerces_c_la_LDFLAGS is not needed, but CXXFLAGS=-rtti is needed otherwise RTTI is disabled by default)</td>
</tr>
<tr>
<td>AIX PowerPC-64</td>
<td>IBM XL C++</td>
<td><code>export OBJECT_MODE=64</code><br/>
<code>./configure CXX=xlC_r CC=xlc_r CXXFLAGS=-q64 CFLAGS=-q64</code><br/>
- <code>gmake libxerces_c_la_LDFLAGS=-qmkshrobj</code></td>
+ <code>gmake libxerces_c_la_LDFLAGS=-qmkshrobj</code><br/>
+ (for xlC v11-v13, libxerces_c_la_LDFLAGS is not needed, but CXXFLAGS="-q64 -rtti" is needed otherwise RTTI is disabled by default)</td>
</tr>
<tr>
<td>HP-UX IA-64-32</td>
diff --git a/doc/download.xml b/doc/download.xml
index fe1b377..ae6e288 100644
--- a/doc/download.xml
+++ b/doc/download.xml
@@ -26,15 +26,15 @@
integrity</link> of the downloaded files using signatures downloaded
from our main distribution directory.</p>
- <p>You can download the &XercesCName; distributions from
- the <jump href="http://www.apache.org/dist/xerces/c/">master
+ <p>You can download the &XercesCName; source distributions from
+ the <jump href="https://downloads.apache.org/xerces/c/3/sources/">master
distribution directory</jump> or, preferably, its <jump
href="[preferred]/xerces/c/">mirror</jump>. Only current
recommended releases are available on the main distribution
site and its mirrors.</p>
<p>Older releases are available from the
- <jump href="http://archive.apache.org/dist/xerces/c/">archive
+ <jump href="https://archive.apache.org/dist/xerces/c/">archive
download site</jump>, but you should be aware that there is a lot
of accumulated "cruft" in the archives, and many confusingly
named files. Anything labeled "current" is likely not.</p>
@@ -76,22 +76,18 @@
<p>
<jump href="[preferred]/xerces/c/3/sources/xerces-c-&XercesCLatest;.zip">xerces-c-&XercesCLatest;.zip</jump>
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.zip.asc">PGP</jump>]
- [<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.zip.sha1">SHA1</jump>]
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.zip.sha256">SHA2</jump>]<br/>
<jump href="[preferred]/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.gz">xerces-c-&XercesCLatest;.tar.gz</jump>
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.gz.asc">PGP</jump>]
- [<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.gz.sha1">SHA1</jump>]
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.gz.sha256">SHA2</jump>]<br/>
<jump href="[preferred]/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.bz2">xerces-c-&XercesCLatest;.tar.bz2</jump>
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.bz2.asc">PGP</jump>]
- [<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.bz2.sha1">SHA1</jump>]
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.bz2.sha256">SHA2</jump>]<br/>
<jump href="[preferred]/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.xz">xerces-c-&XercesCLatest;.tar.xz</jump>
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.xz.asc">PGP</jump>]
- [<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.xz.sha1">SHA1</jump>]
[<jump href="http://www.apache.org/dist/xerces/c/3/sources/xerces-c-&XercesCLatest;.tar.xz.sha256">SHA2</jump>]
</p>
diff --git a/doc/install.xml b/doc/install.xml
index 50ed2a6..53d5b19 100644
--- a/doc/install.xml
+++ b/doc/install.xml
@@ -28,6 +28,14 @@
Patches are accepted for other platforms, as are maintainers
interested in taking over responsibility for supporting them.</p>
+ <p>The officially supported Windows platforms consist of only those
+ Windows versions that are actively supported by Microsoft, which at
+ time of writing excludes all releases prior to Server 2008 R2.
+ The currently supported Windows compilers include Visual Studio 2015
+ and later; this set is subject to change in the future.</p>
+
+ <p>Support for C++ RTTI is an absolute requirement when building.</p>
+
<anchor name="Windows"/>
<s2 title="Windows">
diff --git a/doc/program-others.xml b/doc/program-others.xml
index d65af85..d2783e1 100644
--- a/doc/program-others.xml
+++ b/doc/program-others.xml
@@ -381,9 +381,9 @@
</s2>
<anchor name="CPPNamespace"/>
- <s2 title="Using C++ Namespace">
+ <s2 title="Using C++ Namespaces">
- <p>&XercesCName; makes use of C++ namespace to make sure its
+ <p>&XercesCName; makes use of C++ namespaces to make sure its
definitions do not conflict with other libraries and
applications. As a result applications must
namespace-qualify all &XercesCName; classes, data and
@@ -395,23 +395,6 @@
or <code>using namespace xercesc;</code>
definition to make all &XercesCName; names visible in the
current scope.</p>
-
- <p>While the above information should be sufficient for the majority
- of applications, for cases where several versions of the &XercesCName;
- library must be used in the same application, namespace versioning is
- provided. The following convenience macros can be used to access the
- &XercesCName; namespace names with versions embedded
- (see <code>src/xercesc/util/XercesDefs.hpp</code>):</p>
-
-<source>
- #define XERCES_CPP_NAMESPACE_BEGIN namespace &XercesC3NSVersion; {
- #define XERCES_CPP_NAMESPACE_END }
- #define XERCES_CPP_NAMESPACE_USE using namespace &XercesC3NSVersion;;
- #define XERCES_CPP_NAMESPACE_QUALIFIER &XercesC3NSVersion;::
-
- namespace &XercesC3NSVersion; { }
- namespace &XercesC3Namespace; = &XercesC3NSVersion;;
-</source>
</s2>
diff --git a/doc/readme.xml b/doc/readme.xml
index d37be08..1635d13 100644
--- a/doc/readme.xml
+++ b/doc/readme.xml
@@ -100,8 +100,8 @@
</s2>
<s2 title="License Information">
- <p>The &XercesCName; Version &XercesC3Version; is available in both source distribution and
- binary distribution. &XercesCName; is made available under the
+ <p>The &XercesCName; Version &XercesC3Version; is available as a source
+ distribution only. &XercesCName; is made available under the
<jump href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Software License, Version 2.0</jump>.
</p>
</s2>
diff --git a/doc/releases.xml b/doc/releases.xml
index b372d9f..67409f4 100644
--- a/doc/releases.xml
+++ b/doc/releases.xml
@@ -36,7 +36,7 @@
<s2 title="Release Information for &XercesCName; &XercesCLatest;">
<p>For a list of bug fixes in &XercesCName; &XercesCLatest;, see the
-<jump href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12342890&styleName=Text&projectId=10510">Release Notes</jump>
+<jump href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12344135&styleName=Text&projectId=10510">Release Notes</jump>
</p>
</s2>
diff --git a/doc/releases_archive.xml b/doc/releases_archive.xml
index 1e5ad84..1e648c1 100644
--- a/doc/releases_archive.xml
+++ b/doc/releases_archive.xml
@@ -21,6 +21,7 @@
<s1 title="Releases Archive">
<s2 title="Release Information for earlier releases">
<ul>
+ <li><link anchor="Release322">Release Information for &XercesCName; 3.2.2</link></li>
<li><link anchor="Release321">Release Information for &XercesCName; 3.2.1</link></li>
<li><link anchor="Release320">Release Information for &XercesCName; 3.2.0</link></li>
<li><link anchor="Release314">Release Information for &XercesCName; 3.1.4</link></li>
@@ -54,6 +55,14 @@
</ul>
</s2>
+<anchor name="Release322"/>
+<s2 title="Release Information for &XercesCName; 3.2.2">
+
+<p>For a list of bug fixes in &XercesCName; 3.2.2, see the
+<jump href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12342890&projectId=10510">Release Notes</jump>
+</p>
+</s2>
+
<anchor name="Release321"/>
<s2 title="Release Information for &XercesCName; 3.2.1">
diff --git a/doc/releases_plan.xml b/doc/releases_plan.xml
index e41924d..a8c0d66 100644
--- a/doc/releases_plan.xml
+++ b/doc/releases_plan.xml
@@ -24,7 +24,8 @@
<p>This document highlights the release plan for &XercesCName;.</p>
<s3 title="Next Target Release">
- <p>There are no specific plans for the next 3.x release.</p>
+ <p>There has been some discussion of incorporating some improvements and modernizing the code to use
+ C++11 features in a 4.0.0 release.</p>
<p>There will be no further releases in the Xerces-C++ 2-series.</p>
</s3>
diff --git a/doc/source-repository.xml b/doc/source-repository.xml
index 5931dfb..163acf8 100644
--- a/doc/source-repository.xml
+++ b/doc/source-repository.xml
@@ -35,7 +35,7 @@
<p>A writeable mirror of the same official repository is also present in GitHub at <jump href="https://github.com/apache/xerces-c/">https://github.com/apache/xerces-c/</jump> but the official mechanism for contributions remains attaching patches to issues filed in the Apache Jira instance at <jump href="https://issues.apache.org/jira/projects/XERCESC">https://issues.apache.org/jira/projects/XERCESC</jump></p>
- <p>Development generally takes place on the master branch, with legacy branches left open or closed depending on the status of older releases. At present, the master branch is the only open branch.</p>
+ <p>Development generally takes place on the master branch, with legacy branches left open or closed depending on the status of older releases. At present, the master branch and the xerces-3.2 branches are open. Proposed work for a V4.0.0 release is currently occurring on master.</p>
</s2>
</s1>
diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
new file mode 100644
index 0000000..5032bba
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx.m4
@@ -0,0 +1,982 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+# Check for baseline language coverage in the compiler for the specified
+# version of the C++ standard. If necessary, add switches to CXX and
+# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
+# or '14' (for the C++14 standard).
+#
+# The second argument, if specified, indicates whether you insist on an
+# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+# -std=c++11). If neither is specified, you get whatever works, with
+# preference for an extended mode.
+#
+# The third argument, if specified 'mandatory' or if left unspecified,
+# indicates that baseline support for the specified C++ standard is
+# required and that the macro should error out if no mode with that
+# support is found. If specified 'optional', then configuration proceeds
+# regardless, after defining HAVE_CXX${VERSION} if and only if a
+# supporting mode is found.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
+# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
+# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
+# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
+# Copyright (c) 2015 Paul Norman <penorman@mac.com>
+# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 7
+
+dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
+dnl (serial version number 13).
+
+AX_REQUIRE_DEFINED([AC_MSG_WARN])
+AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
+ m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
+ [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
+ [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+ [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$2], [], [],
+ [$2], [ext], [],
+ [$2], [noext], [],
+ [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+ [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
+ AC_LANG_PUSH([C++])dnl
+ ac_success=no
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
+ ax_cv_cxx_compile_cxx$1,
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [ax_cv_cxx_compile_cxx$1=yes],
+ [ax_cv_cxx_compile_cxx$1=no])])
+ if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
+ ac_success=yes
+ fi
+
+ m4_if([$2], [noext], [], [dnl
+ if test x$ac_success = xno; then
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ switch="-std=gnu++${alternative}"
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ fi])
+
+ m4_if([$2], [ext], [], [dnl
+ if test x$ac_success = xno; then
+ dnl HP's aCC needs +std=c++11 according to:
+ dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
+ dnl Cray's crayCC needs "-h std=c++11"
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ if test x$ac_success = xyes; then
+ break
+ fi
+ done
+ fi])
+ AC_LANG_POP([C++])
+ if test x$ax_cxx_compile_cxx$1_required = xtrue; then
+ if test x$ac_success = xno; then
+ AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
+ fi
+ fi
+ if test x$ac_success = xno; then
+ HAVE_CXX$1=0
+ AC_MSG_NOTICE([No compiler with C++$1 support was found])
+ else
+ HAVE_CXX$1=1
+ AC_DEFINE(HAVE_CXX$1,1,
+ [define if the compiler supports basic C++$1 syntax])
+ fi
+ AC_SUBST(HAVE_CXX$1)
+ m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
+])
+
+
+dnl Test body for checking C++11 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+)
+
+
+dnl Test body for checking C++14 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+)
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
+)
+
+dnl Tests for new features in C++11
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+ namespace test_static_assert
+ {
+
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ }
+
+ namespace test_final_override
+ {
+
+ struct Base
+ {
+ virtual void f() {}
+ };
+
+ struct Derived : public Base
+ {
+ virtual void f() override {}
+ };
+
+ }
+
+ namespace test_double_right_angle_brackets
+ {
+
+ template < typename T >
+ struct check {};
+
+ typedef check<void> single_type;
+ typedef check<check<void>> double_type;
+ typedef check<check<check<void>>> triple_type;
+ typedef check<check<check<check<void>>>> quadruple_type;
+
+ }
+
+ namespace test_decltype
+ {
+
+ int
+ f()
+ {
+ int a = 1;
+ decltype(a) b = 2;
+ return a + b;
+ }
+
+ }
+
+ namespace test_type_deduction
+ {
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static const bool value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static const bool value = true;
+ };
+
+ template < typename T1, typename T2 >
+ auto
+ add(T1 a1, T2 a2) -> decltype(a1 + a2)
+ {
+ return a1 + a2;
+ }
+
+ int
+ test(const int c, volatile int v)
+ {
+ static_assert(is_same<int, decltype(0)>::value == true, "");
+ static_assert(is_same<int, decltype(c)>::value == false, "");
+ static_assert(is_same<int, decltype(v)>::value == false, "");
+ auto ac = c;
+ auto av = v;
+ auto sumi = ac + av + 'x';
+ auto sumf = ac + av + 1.0;
+ static_assert(is_same<int, decltype(ac)>::value == true, "");
+ static_assert(is_same<int, decltype(av)>::value == true, "");
+ static_assert(is_same<int, decltype(sumi)>::value == true, "");
+ static_assert(is_same<int, decltype(sumf)>::value == false, "");
+ static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+ return (sumf > 0.0) ? sumi : add(c, v);
+ }
+
+ }
+
+ namespace test_noexcept
+ {
+
+ int f() { return 0; }
+ int g() noexcept { return 0; }
+
+ static_assert(noexcept(f()) == false, "");
+ static_assert(noexcept(g()) == true, "");
+
+ }
+
+ namespace test_constexpr
+ {
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+ {
+ return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+ }
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c(const CharT *const s) noexcept
+ {
+ return strlen_c_r(s, 0UL);
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("1") == 1UL, "");
+ static_assert(strlen_c("example") == 7UL, "");
+ static_assert(strlen_c("another\0example") == 7UL, "");
+
+ }
+
+ namespace test_rvalue_references
+ {
+
+ template < int N >
+ struct answer
+ {
+ static constexpr int value = N;
+ };
+
+ answer<1> f(int&) { return answer<1>(); }
+ answer<2> f(const int&) { return answer<2>(); }
+ answer<3> f(int&&) { return answer<3>(); }
+
+ void
+ test()
+ {
+ int i = 0;
+ const int c = 0;
+ static_assert(decltype(f(i))::value == 1, "");
+ static_assert(decltype(f(c))::value == 2, "");
+ static_assert(decltype(f(0))::value == 3, "");
+ }
+
+ }
+
+ namespace test_uniform_initialization
+ {
+
+ struct test
+ {
+ static const int zero {};
+ static const int one {1};
+ };
+
+ static_assert(test::zero == 0, "");
+ static_assert(test::one == 1, "");
+
+ }
+
+ namespace test_lambdas
+ {
+
+ void
+ test1()
+ {
+ auto lambda1 = [](){};
+ auto lambda2 = lambda1;
+ lambda1();
+ lambda2();
+ }
+
+ int
+ test2()
+ {
+ auto a = [](int i, int j){ return i + j; }(1, 2);
+ auto b = []() -> int { return '0'; }();
+ auto c = [=](){ return a + b; }();
+ auto d = [&](){ return c; }();
+ auto e = [a, &b](int x) mutable {
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
+ }(0);
+ return a + b + c + d + e;
+ }
+
+ int
+ test3()
+ {
+ const auto nullary = [](){ return 0; };
+ const auto unary = [](int x){ return x; };
+ using nullary_t = decltype(nullary);
+ using unary_t = decltype(unary);
+ const auto higher1st = [](nullary_t f){ return f(); };
+ const auto higher2nd = [unary](nullary_t f1){
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ };
+ return higher1st(nullary) + higher2nd(nullary)(unary);
+ }
+
+ }
+
+ namespace test_variadic_templates
+ {
+
+ template <int...>
+ struct sum;
+
+ template <int N0, int... N1toN>
+ struct sum<N0, N1toN...>
+ {
+ static constexpr auto value = N0 + sum<N1toN...>::value;
+ };
+
+ template <>
+ struct sum<>
+ {
+ static constexpr auto value = 0;
+ };
+
+ static_assert(sum<>::value == 0, "");
+ static_assert(sum<1>::value == 1, "");
+ static_assert(sum<23>::value == 23, "");
+ static_assert(sum<1, 2>::value == 3, "");
+ static_assert(sum<5, 5, 11>::value == 21, "");
+ static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+ }
+
+ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+ // because of this.
+ namespace test_template_alias_sfinae
+ {
+
+ struct foo {};
+
+ template<typename T>
+ using member = typename T::member_type;
+
+ template<typename T>
+ void func(...) {}
+
+ template<typename T>
+ void func(member<T>*) {}
+
+ void test();
+
+ void test() { func<foo>(0); }
+
+ }
+
+} // namespace cxx11
+
+#endif // __cplusplus >= 201103L
+
+]])
+
+
+dnl Tests for new features in C++14
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
+
+// If the compiler admits that it is not ready for C++14, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201402L
+
+#error "This is not a C++14 compiler"
+
+#else
+
+namespace cxx14
+{
+
+ namespace test_polymorphic_lambdas
+ {
+
+ int
+ test()
+ {
+ const auto lambda = [](auto&&... args){
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
+ };
+ return lambda(1, 1L, 1.0f, '1');
+ }
+
+ }
+
+ namespace test_binary_literals
+ {
+
+ constexpr auto ivii = 0b0000000000101010;
+ static_assert(ivii == 42, "wrong value");
+
+ }
+
+ namespace test_generalized_constexpr
+ {
+
+ template < typename CharT >
+ constexpr unsigned long
+ strlen_c(const CharT *const s) noexcept
+ {
+ auto length = 0UL;
+ for (auto p = s; *p; ++p)
+ ++length;
+ return length;
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("x") == 1UL, "");
+ static_assert(strlen_c("test") == 4UL, "");
+ static_assert(strlen_c("another\0test") == 7UL, "");
+
+ }
+
+ namespace test_lambda_init_capture
+ {
+
+ int
+ test()
+ {
+ auto x = 0;
+ const auto lambda1 = [a = x](int b){ return a + b; };
+ const auto lambda2 = [a = lambda1(x)](){ return a; };
+ return lambda2();
+ }
+
+ }
+
+ namespace test_digit_separators
+ {
+
+ constexpr auto ten_million = 100'000'000;
+ static_assert(ten_million == 100000000, "");
+
+ }
+
+ namespace test_return_type_deduction
+ {
+
+ auto f(int& x) { return x; }
+ decltype(auto) g(int& x) { return x; }
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static constexpr auto value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static constexpr auto value = true;
+ };
+
+ int
+ test()
+ {
+ auto x = 0;
+ static_assert(is_same<int, decltype(f(x))>::value, "");
+ static_assert(is_same<int&, decltype(g(x))>::value, "");
+ return x;
+ }
+
+ }
+
+} // namespace cxx14
+
+#endif // __cplusplus >= 201402L
+
+]])
+
+
+dnl Tests for new features in C++17
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
+
+// If the compiler admits that it is not ready for C++17, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus <= 201402L
+
+#error "This is not a C++17 compiler"
+
+#else
+
+#if defined(__clang__)
+ #define REALLY_CLANG
+#else
+ #if defined(__GNUC__)
+ #define REALLY_GCC
+ #endif
+#endif
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+#if !defined(REALLY_CLANG)
+ namespace test_constexpr_lambdas
+ {
+
+ // TODO: test it with clang++ from git
+
+ constexpr int foo = [](){return 42;}();
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+ namespace test::nested_namespace::definitions
+ {
+
+ }
+
+ namespace test_fold_expression
+ {
+
+ template<typename... Args>
+ int multiply(Args... args)
+ {
+ return (args * ... * 1);
+ }
+
+ template<typename... Args>
+ bool all(Args... args)
+ {
+ return (args && ...);
+ }
+
+ }
+
+ namespace test_extended_static_assert
+ {
+
+ static_assert (true);
+
+ }
+
+ namespace test_auto_brace_init_list
+ {
+
+ auto foo = {5};
+ auto bar {5};
+
+ static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+ static_assert(std::is_same<int, decltype(bar)>::value);
+ }
+
+ namespace test_typename_in_template_template_parameter
+ {
+
+ template<template<typename> typename X> struct D;
+
+ }
+
+ namespace test_fallthrough_nodiscard_maybe_unused_attributes
+ {
+
+ int f1()
+ {
+ return 42;
+ }
+
+ [[nodiscard]] int f2()
+ {
+ [[maybe_unused]] auto unused = f1();
+
+ switch (f1())
+ {
+ case 17:
+ f1();
+ [[fallthrough]];
+ case 42:
+ f1();
+ }
+ return f1();
+ }
+
+ }
+
+ namespace test_extended_aggregate_initialization
+ {
+
+ struct base1
+ {
+ int b1, b2 = 42;
+ };
+
+ struct base2
+ {
+ base2() {
+ b3 = 42;
+ }
+ int b3;
+ };
+
+ struct derived : base1, base2
+ {
+ int d;
+ };
+
+ derived d1 {{1, 2}, {}, 4}; // full initialization
+ derived d2 {{}, {}, 4}; // value-initialized bases
+
+ }
+
+ namespace test_general_range_based_for_loop
+ {
+
+ struct iter
+ {
+ int i;
+
+ int& operator* ()
+ {
+ return i;
+ }
+
+ const int& operator* () const
+ {
+ return i;
+ }
+
+ iter& operator++()
+ {
+ ++i;
+ return *this;
+ }
+ };
+
+ struct sentinel
+ {
+ int i;
+ };
+
+ bool operator== (const iter& i, const sentinel& s)
+ {
+ return i.i == s.i;
+ }
+
+ bool operator!= (const iter& i, const sentinel& s)
+ {
+ return !(i == s);
+ }
+
+ struct range
+ {
+ iter begin() const
+ {
+ return {0};
+ }
+
+ sentinel end() const
+ {
+ return {5};
+ }
+ };
+
+ void f()
+ {
+ range r {};
+
+ for (auto i : r)
+ {
+ [[maybe_unused]] auto v = i;
+ }
+ }
+
+ }
+
+ namespace test_lambda_capture_asterisk_this_by_value
+ {
+
+ struct t
+ {
+ int i;
+ int foo()
+ {
+ return [*this]()
+ {
+ return i;
+ }();
+ }
+ };
+
+ }
+
+ namespace test_enum_class_construction
+ {
+
+ enum class byte : unsigned char
+ {};
+
+ byte foo {42};
+
+ }
+
+ namespace test_constexpr_if
+ {
+
+ template <bool cond>
+ int f ()
+ {
+ if constexpr(cond)
+ {
+ return 13;
+ }
+ else
+ {
+ return 42;
+ }
+ }
+
+ }
+
+ namespace test_selection_statement_with_initializer
+ {
+
+ int f()
+ {
+ return 13;
+ }
+
+ int f2()
+ {
+ if (auto i = f(); i > 0)
+ {
+ return 3;
+ }
+
+ switch (auto i = f(); i + 4)
+ {
+ case 17:
+ return 2;
+
+ default:
+ return 1;
+ }
+ }
+
+ }
+
+#if !defined(REALLY_CLANG)
+ namespace test_template_argument_deduction_for_class_templates
+ {
+
+ // TODO: test it with clang++ from git
+
+ template <typename T1, typename T2>
+ struct pair
+ {
+ pair (T1 p1, T2 p2)
+ : m1 {p1},
+ m2 {p2}
+ {}
+
+ T1 m1;
+ T2 m2;
+ };
+
+ void f()
+ {
+ [[maybe_unused]] auto p = pair{13, 42u};
+ }
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+ namespace test_non_type_auto_template_parameters
+ {
+
+ template <auto n>
+ struct B
+ {};
+
+ B<5> b1;
+ B<'a'> b2;
+
+ }
+
+#if !defined(REALLY_CLANG)
+ namespace test_structured_bindings
+ {
+
+ // TODO: test it with clang++ from git
+
+ int arr[2] = { 1, 2 };
+ std::pair<int, int> pr = { 1, 2 };
+
+ auto f1() -> int(&)[2]
+ {
+ return arr;
+ }
+
+ auto f2() -> std::pair<int, int>&
+ {
+ return pr;
+ }
+
+ struct S
+ {
+ int x1 : 2;
+ volatile double y1;
+ };
+
+ S f3()
+ {
+ return {};
+ }
+
+ auto [ x1, y1 ] = f1();
+ auto& [ xr1, yr1 ] = f1();
+ auto [ x2, y2 ] = f2();
+ auto& [ xr2, yr2 ] = f2();
+ const auto [ x3, y3 ] = f3();
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+#if !defined(REALLY_CLANG)
+ namespace test_exception_spec_type_system
+ {
+
+ // TODO: test it with clang++ from git
+
+ struct Good {};
+ struct Bad {};
+
+ void g1() noexcept;
+ void g2();
+
+ template<typename T>
+ Bad
+ f(T*, T*);
+
+ template<typename T1, typename T2>
+ Good
+ f(T1*, T2*);
+
+ static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+ }
+#endif // !defined(REALLY_CLANG)
+
+ namespace test_inline_variables
+ {
+
+ template<class T> void f(T)
+ {}
+
+ template<class T> inline T g(T)
+ {
+ return T{};
+ }
+
+ template<> inline void f<>(int)
+ {}
+
+ template<> int g<>(int)
+ {
+ return 5;
+ }
+
+ }
+
+} // namespace cxx17
+
+#endif // __cplusplus <= 201402L
+
+]])
diff --git a/m4/cxx_have_bool.m4 b/m4/cxx_have_bool.m4
deleted file mode 100644
index 53e6c6a..0000000
--- a/m4/cxx_have_bool.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl @synopsis AC_CXX_HAVE_BOOL
-dnl
-dnl If the compiler recognizes bool as a separate built-in type, define
-dnl HAVE_BOOL. Note that a typedef is not a separate type since you
-dnl cannot overload a function such that it accepts either the basic
-dnl type or the typedef.
-dnl
-dnl @category Cxx
-dnl @author Todd Veldhuizen
-dnl @author Luc Maisonobe <luc@spaceroots.org>
-dnl @version 2004-02-04
-dnl @license AllPermissive
-
-AC_DEFUN([AC_CXX_HAVE_BOOL],
-[AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type,
-ac_cv_cxx_have_bool,
-[AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([
-int f(int x){return 1;}
-int f(char x){return 1;}
-int f(bool x){return 1;}
-],[bool b = true; return f(b);],
- ac_cv_cxx_have_bool=yes, ac_cv_cxx_have_bool=no)
- AC_LANG_RESTORE
-])
-if test "$ac_cv_cxx_have_bool" = yes; then
- AC_DEFINE(HAVE_BOOL,,[define if bool is a built-in type])
-fi
-])
diff --git a/m4/cxx_have_lstring.m4 b/m4/cxx_have_lstring.m4
deleted file mode 100644
index 3d35f70..0000000
--- a/m4/cxx_have_lstring.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl @synopsis AC_CXX_HAVE_LSTRING
-dnl
-dnl If the compiler can prevent names clashes using namespaces, define
-dnl HAVE_LSTRING.
-dnl
-dnl @category Cxx
-dnl @author James Berry
-dnl @version 2005-02-21
-dnl @license AllPermissive
-
-AC_DEFUN([AC_CXX_HAVE_LSTRING],
-[AC_CACHE_CHECK([whether the compiler implements L"widestring"],
-ac_cv_cxx_have_lstring,
-[AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[const wchar_t* s=L"wide string";]])],
- ac_cv_cxx_have_lstring=yes, ac_cv_cxx_have_lstring=no)
- AC_LANG_RESTORE
-])
-if test "$ac_cv_cxx_have_lstring" = yes; then
- AC_DEFINE(HAVE_LSTRING,,[define if the compiler implements L"widestring"])
-fi
-])
diff --git a/m4/cxx_have_namespaces.m4 b/m4/cxx_have_namespaces.m4
deleted file mode 100644
index 70dcc14..0000000
--- a/m4/cxx_have_namespaces.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl @synopsis AC_CXX_HAVE_NAMESPACES
-dnl
-dnl If the compiler can prevent names clashes using namespaces, define
-dnl HAVE_NAMESPACES.
-dnl
-dnl @category Cxx
-dnl @author Todd Veldhuizen
-dnl @author Luc Maisonobe <luc@spaceroots.org>
-dnl @version 2004-02-04
-dnl @license AllPermissive
-
-AC_DEFUN([AC_CXX_HAVE_NAMESPACES],
-[AC_CACHE_CHECK(whether the compiler implements namespaces,
-ac_cv_cxx_have_namespaces,
-[AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
- [using namespace Outer::Inner; return i;],
- ac_cv_cxx_have_namespaces=yes, ac_cv_cxx_have_namespaces=no)
- AC_LANG_RESTORE
-])
-if test "$ac_cv_cxx_have_namespaces" = yes; then
- AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
-fi
-])
diff --git a/m4/cxx_have_std_libs.m4 b/m4/cxx_have_std_libs.m4
deleted file mode 100644
index 28a28b3..0000000
--- a/m4/cxx_have_std_libs.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl @synopsis AC_CXX_HAVE_STD_LIBS
-dnl
-dnl If the compiler supports ISO C++ standard library (i.e., can
-dnl include the files iostream, map, iomanip and cmath}), define
-dnl HAVE_STD_LIBS.
-dnl
-dnl @category Cxx
-dnl @author Todd Veldhuizen
-dnl @author Luc Maisonobe <luc@spaceroots.org>
-dnl @version 2004-02-04
-dnl @license AllPermissive
-
-AC_DEFUN([AC_CXX_HAVE_STD_LIBS],
-[AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library,
-ac_cv_cxx_have_std_libs,
-[AC_REQUIRE([AC_CXX_HAVE_NAMESPACES])
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <iostream>
-#include <map>
-#include <iomanip>
-#include <cmath>
-#ifdef HAVE_NAMESPACES
-using namespace std;
-#endif],[return 0;],
- ac_cv_cxx_have_std_libs=yes, ac_cv_cxx_have_std_libs=no)
- AC_LANG_RESTORE
-])
-if test "$ac_cv_cxx_have_std_libs" = yes; then
- AC_DEFINE(HAVE_STD_LIBS,,[define if the compiler supports ISO C++ standard library])
-fi
-])
diff --git a/m4/cxx_have_std_namespace.m4 b/m4/cxx_have_std_namespace.m4
deleted file mode 100644
index 35be1cd..0000000
--- a/m4/cxx_have_std_namespace.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-dnl @synopsis AC_CXX_HAVE_STD_NAMESPACE
-dnl
-dnl If the compiler supports the std namespace, define
-dnl HAVE_STD_NAMESPACE.
-dnl
-dnl @category Cxx
-dnl @author Todd Veldhuizen
-dnl @author Luc Maisonobe <luc@spaceroots.org>
-dnl @version 2004-02-04
-dnl @license AllPermissive
-
-AC_DEFUN([AC_CXX_HAVE_STD_NAMESPACE],
-[AC_CACHE_CHECK(whether the compiler supports the std namespace,
-ac_cv_cxx_have_std_namespace,
-[AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <iostream>
- std::istream& is = std::cin;
- ],[return 0;],
- ac_cv_cxx_have_std_namespace=yes, ac_cv_cxx_have_std_namespace=no)
- AC_LANG_RESTORE
-])
-if test "$ac_cv_cxx_have_std_namespace" = yes; then
- AC_DEFINE(HAVE_STD_NAMESPACE,,[define if the compiler supports the std namespace])
-fi
-])
diff --git a/m4/cxx_have_std_thread.m4 b/m4/cxx_have_std_thread.m4
index 6caeca3..236eee8 100644
--- a/m4/cxx_have_std_thread.m4
+++ b/m4/cxx_have_std_thread.m4
@@ -12,8 +12,7 @@
AC_DEFUN([AC_CXX_HAVE_STD_THREAD],
[AC_CACHE_CHECK(whether the compiler supports ISO C++11 <thread> and <mutex>,
ac_cv_cxx_have_std_thread,
-[AC_REQUIRE([AC_CXX_HAVE_NAMESPACES])
- AC_REQUIRE([ACX_PTHREAD])
+[AC_REQUIRE([ACX_PTHREAD])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CFLAGS="$CFLAGS"
diff --git a/m4/xerces_int_types.m4 b/m4/xerces_int_types.m4
deleted file mode 100644
index 7e665a2..0000000
--- a/m4/xerces_int_types.m4
+++ /dev/null
@@ -1,183 +0,0 @@
-dnl @synopsis XERCES_INT_TYPES
-dnl
-dnl Determines what int types to use for various
-dnl Xerces standard integer types.
-dnl
-dnl @category C
-dnl @author James Berry
-dnl @version 2005-06-07
-dnl @license AllPermissive
-dnl
-dnl $Id$
-
-AC_DEFUN([XERCES_INT_TYPES],
- [
- AC_CHECK_HEADERS([inttypes.h])
- AC_CHECK_SIZEOF(short)
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int64)
- AC_CHECK_TYPE(int16_t)
- AC_CHECK_TYPE(int32_t)
- AC_CHECK_TYPE(int64_t)
- AC_CHECK_TYPE(uint16_t)
- AC_CHECK_TYPE(uint32_t)
- AC_CHECK_TYPE(uint64_t)
-
- #
- # Select a signed 16 bit integer type
- #
- AC_CACHE_CHECK([for an appropriate signed 16 bit integer type], [xerces_cv_type_s16bit_int], [
- AS_IF([test x$ac_cv_header_inttypes_h = xyes && test x$ac_cv_type_int16_t = xyes],
- [xerces_cv_type_s16bit_int=int16_t],
- [
- case $ac_cv_sizeof_int in
- 2*) xerces_cv_type_s16bit_int=int;;
- *)
- case $ac_cv_sizeof_short in
- 2*) xerces_cv_type_s16bit_int=short;;
- *) AC_MSG_ERROR([Couldn't find a signed 16 bit int type]);;
- esac
- ;;
- esac
- ])
- ])
-
- #
- # Select an unsigned 16 bit integer type
- #
- AC_CACHE_CHECK([for an appropriate unsigned 16 bit integer type], [xerces_cv_type_u16bit_int], [
- AS_IF([test x$ac_cv_header_inttypes_h = xyes && test x$ac_cv_type_uint16_t = xyes],
- [xerces_cv_type_u16bit_int=uint16_t],
- [
- case $ac_cv_sizeof_int in
- 2*) xerces_cv_type_u16bit_int="unsigned int";;
- *)
- case $ac_cv_sizeof_short in
- 2*) xerces_cv_type_u16bit_int="unsigned short";;
- *) AC_MSG_ERROR([Couldn't find an unsigned 16 bit int type]);;
- esac
- ;;
- esac
- ])
- ])
-
-
- #
- # Select a signed 32 bit integer type
- #
- AC_CACHE_CHECK([for an appropriate signed 32 bit integer type], [xerces_cv_type_s32bit_int], [
- AS_IF([test x$ac_cv_header_inttypes_h = xyes && test x$ac_cv_type_int32_t = xyes],
- [xerces_cv_type_s32bit_int=int32_t],
- [
- case $ac_cv_sizeof_int in
- 4*) xerces_cv_type_s32bit_int=int;;
- *)
- case $ac_cv_sizeof_long in
- 4*) xerces_cv_type_s32bit_int=long;;
- *) AC_MSG_ERROR([Couldn't find a signed 32 bit int type]);;
- esac
- ;;
- esac
- ])
- ])
-
- #
- # Select an unsigned 32 bit integer type
- #
- AC_CACHE_CHECK([for an appropriate unsigned 32 bit integer type], [xerces_cv_type_u32bit_int], [
- AS_IF([test x$ac_cv_header_inttypes_h = xyes && test x$ac_cv_type_uint32_t = xyes],
- [xerces_cv_type_u32bit_int=uint32_t],
- [
- case $ac_cv_sizeof_int in
- 4*) xerces_cv_type_u32bit_int="unsigned int";;
- *)
- case $ac_cv_sizeof_long in
- 4*) xerces_cv_type_u32bit_int="unsigned long";;
- *) AC_MSG_ERROR([Couldn't find an unsigned 32 bit int type]);;
- esac
- ;;
- esac
- ])
- ])
-
- #
- # Select an signed 64 bit integer type
- #
- AC_CACHE_CHECK([for an appropriate signed 64 bit integer type], [xerces_cv_type_s64bit_int], [
- AS_IF([test x$ac_cv_header_inttypes_h = xyes && test x$ac_cv_type_int64_t = xyes],
- [
- xerces_cv_type_s64bit_int=int64_t
- xerces_cv_sizeof_int64=8
- ],
- [
- case $ac_cv_sizeof_int in
- 8*) xerces_cv_type_s64bit_int="int"
- xerces_cv_sizeof_int64=8
- ;;
- *)
- case $ac_cv_sizeof_long in
- 8*) xerces_cv_type_s64bit_int="long"
- xerces_cv_sizeof_int64=8
- ;;
- *)
- case $ac_cv_sizeof_long_long in
- 8*) xerces_cv_type_s64bit_int="long long"
- xerces_cv_sizeof_int64=8
- ;;
- *)
- case $ac_cv_sizeof___int64 in
- 8*) xerces_cv_type_s64bit_int="__int64"
- xerces_cv_sizeof_int64=8
- ;;
- *) xerces_cv_type_s64bit_int=$xerces_cv_type_s32bit_int
- xerces_cv_sizeof_int64=4
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ])
- ])
-
- #
- # Select an unsigned 64 bit integer type
- #
- AC_CACHE_CHECK([for an appropriate unsigned 64 bit integer type], [xerces_cv_type_u64bit_int], [
- AS_IF([test x$ac_cv_header_inttypes_h = xyes && test x$ac_cv_type_uint64_t = xyes],
- [xerces_cv_type_u64bit_int=uint64_t],
- [
- case $ac_cv_sizeof_int in
- 8*) xerces_cv_type_u64bit_int="unsigned int";;
- *)
- case $ac_cv_sizeof_long in
- 8*) xerces_cv_type_u64bit_int="unsigned long";;
- *)
- case $ac_cv_sizeof_long_long in
- 8*) xerces_cv_type_u64bit_int="unsigned long long";;
- *)
- case $ac_cv_sizeof___int64 in
- 8*) xerces_cv_type_u64bit_int="unsigned __int64";;
- *) xerces_cv_type_u64bit_int=$xerces_cv_type_u32bit_int;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ])
- ])
-
- AC_DEFINE_UNQUOTED([XERCES_S16BIT_INT], $xerces_cv_type_s16bit_int, [An appropriate signed 16 bit integer type])
- AC_DEFINE_UNQUOTED([XERCES_U16BIT_INT], $xerces_cv_type_u16bit_int, [An appropriate unsigned 16 bit integer type])
- AC_DEFINE_UNQUOTED([XERCES_S32BIT_INT], $xerces_cv_type_s32bit_int, [An appropriate signed 32 bit integer type])
- AC_DEFINE_UNQUOTED([XERCES_U32BIT_INT], $xerces_cv_type_u32bit_int, [An appropriate unsigned 32 bit integer type])
- AC_DEFINE_UNQUOTED([XERCES_S64BIT_INT], $xerces_cv_type_s64bit_int, [An appropriate signed 64 bit integer type])
- AC_DEFINE_UNQUOTED([XERCES_U64BIT_INT], $xerces_cv_type_u64bit_int, [An appropriate unsigned 64 bit integer type])
- ]
-)
diff --git a/m4/xerces_transcoder_selection.m4 b/m4/xerces_transcoder_selection.m4
index 80f432a..af5e979 100644
--- a/m4/xerces_transcoder_selection.m4
+++ b/m4/xerces_transcoder_selection.m4
@@ -23,7 +23,7 @@
# Check for GNU iconv support
no_GNUiconv=false
- AC_CHECK_HEADERS([iconv.h wchar.h string.h stdlib.h stdio.h ctype.h locale.h errno.h], [], [no_GNUiconv=true])
+ AC_CHECK_HEADERS([iconv.h wchar.h ctype.h locale.h errno.h], [], [no_GNUiconv=true])
# The code in iconv needs just on of these include files
AC_CHECK_HEADER([endian.h],
[],
diff --git a/m4/xerces_xmlch_selection.m4 b/m4/xerces_xmlch_selection.m4
index a6f7156..1ba25af 100644
--- a/m4/xerces_xmlch_selection.m4
+++ b/m4/xerces_xmlch_selection.m4
@@ -122,14 +122,14 @@
*-uint16_t-*)
xmlch=uint16_t
- xmlch_type=$xerces_cv_type_u16bit_int
+ xmlch_type=uint16_t
break
;;
*)
AS_IF([test $i -eq 2], [
xmlch=uint16_t
- xmlch_type=$xerces_cv_type_u16bit_int
+ xmlch_type=uint16_t
AC_MSG_RESULT([none available; falling back to uint16_t])
]
)
diff --git a/samples/src/CreateDOMDocument/CreateDOMDocument.cpp b/samples/src/CreateDOMDocument/CreateDOMDocument.cpp
index 8acace7..e8d5620 100644
--- a/samples/src/CreateDOMDocument/CreateDOMDocument.cpp
+++ b/samples/src/CreateDOMDocument/CreateDOMDocument.cpp
@@ -33,14 +33,10 @@
#include <xercesc/dom/DOM.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
// ---------------------------------------------------------------------------
// This is a simple class that lets us do easy (though not terribly efficient)
@@ -100,7 +96,7 @@
catch(const XMLException& toCatch)
{
char *pMsg = XMLString::transcode(toCatch.getMessage());
- XERCES_STD_QUALIFIER cerr << "Error during Xerces-c Initialization.\n"
+ std::cerr << "Error during Xerces-c Initialization.\n"
<< " Exception message:"
<< pMsg;
XMLString::release(&pMsg);
@@ -111,11 +107,11 @@
int errorCode = 0;
if (argC > 1)
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" CreateDOMDocument\n\n"
"This program creates a new DOM document from scratch in memory.\n"
"It then prints the count of elements in the tree.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
errorCode = 1;
}
if(errorCode) {
@@ -172,30 +168,30 @@
//
const XMLSize_t elementCount = doc->getElementsByTagName(X("*"))->getLength();
- XERCES_STD_QUALIFIER cout << "The tree just created contains: " << elementCount
- << " elements." << XERCES_STD_QUALIFIER endl;
+ std::cout << "The tree just created contains: " << elementCount
+ << " elements." << std::endl;
doc->release();
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const DOMException& e)
{
- XERCES_STD_QUALIFIER cerr << "DOMException code is: " << e.code << XERCES_STD_QUALIFIER endl;
+ std::cerr << "DOMException code is: " << e.code << std::endl;
errorCode = 2;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "An error occurred creating the document" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "An error occurred creating the document" << std::endl;
errorCode = 3;
}
} // (inpl != NULL)
else
{
- XERCES_STD_QUALIFIER cerr << "Requested implementation is not supported" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Requested implementation is not supported" << std::endl;
errorCode = 4;
}
}
diff --git a/samples/src/DOMCount/DOMCount.cpp b/samples/src/DOMCount/DOMCount.cpp
index d8c9a01..d13a80f 100644
--- a/samples/src/DOMCount/DOMCount.cpp
+++ b/samples/src/DOMCount/DOMCount.cpp
@@ -36,14 +36,10 @@
#include <xercesc/dom/DOMNamedNodeMap.hpp>
#include <xercesc/dom/DOMAttr.hpp>
#include "DOMCount.hpp"
-#include <string.h>
-#include <stdlib.h>
+#include <cstring>
+#include <cstdlib>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <fstream>
-#else
-#include <fstream.h>
-#endif
// ---------------------------------------------------------------------------
@@ -53,7 +49,7 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" DOMCount [options] <XML file | List file>\n\n"
"This program invokes the DOMLSParser, builds the DOM tree,\n"
"and then prints the number of elements found in each XML file.\n\n"
@@ -69,7 +65,7 @@
" -p Print out names of elements and attributes encountered.\n"
" -? Show this help.\n\n"
" * = Default if not provided explicitly.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -89,8 +85,8 @@
{
if(printOutEncounteredEles) {
char *name = XMLString::transcode(n->getNodeName());
- XERCES_STD_QUALIFIER cout <<"----------------------------------------------------------"<<XERCES_STD_QUALIFIER endl;
- XERCES_STD_QUALIFIER cout <<"Encountered Element : "<< name << XERCES_STD_QUALIFIER endl;
+ std::cout <<"----------------------------------------------------------"<<std::endl;
+ std::cout <<"Encountered Element : "<< name << std::endl;
XMLString::release(&name);
@@ -98,19 +94,19 @@
// get all the attributes of the node
DOMNamedNodeMap *pAttributes = n->getAttributes();
const XMLSize_t nSize = pAttributes->getLength();
- XERCES_STD_QUALIFIER cout <<"\tAttributes" << XERCES_STD_QUALIFIER endl;
- XERCES_STD_QUALIFIER cout <<"\t----------" << XERCES_STD_QUALIFIER endl;
+ std::cout <<"\tAttributes" << std::endl;
+ std::cout <<"\t----------" << std::endl;
for(XMLSize_t i=0;i<nSize;++i) {
DOMAttr *pAttributeNode = (DOMAttr*) pAttributes->item(i);
// get attribute name
char *name = XMLString::transcode(pAttributeNode->getName());
- XERCES_STD_QUALIFIER cout << "\t" << name << "=";
+ std::cout << "\t" << name << "=";
XMLString::release(&name);
// get attribute type
name = XMLString::transcode(pAttributeNode->getValue());
- XERCES_STD_QUALIFIER cout << name << XERCES_STD_QUALIFIER endl;
+ std::cout << name << std::endl;
XMLString::release(&name);
}
}
@@ -177,7 +173,7 @@
valScheme = AbstractDOMParser::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
return 2;
}
}
@@ -227,8 +223,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[argInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[argInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -262,8 +258,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! :\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! :\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -306,14 +302,14 @@
unsigned long duration;
bool more = true;
- XERCES_STD_QUALIFIER ifstream fin;
+ std::ifstream fin;
// the input is a list file
if (doList)
fin.open(argV[argInd]);
if (fin.fail()) {
- XERCES_STD_QUALIFIER cerr <<"Cannot open the list file: " << argV[argInd] << XERCES_STD_QUALIFIER endl;
+ std::cerr <<"Cannot open the list file: " << argV[argInd] << std::endl;
return 2;
}
@@ -330,7 +326,7 @@
continue;
else {
xmlFile = fURI;
- XERCES_STD_QUALIFIER cerr << "==Parsing== " << xmlFile << XERCES_STD_QUALIFIER endl;
+ std::cerr << "==Parsing== " << xmlFile << std::endl;
}
}
else
@@ -344,7 +340,7 @@
//reset error count first
errorHandler.resetErrors();
- XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = 0;
+ xercesc::DOMDocument *doc = 0;
try
{
@@ -359,9 +355,9 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << xmlFile << "'\n"
+ std::cerr << "\nError during parsing: '" << xmlFile << "'\n"
<< "Exception message is: \n"
- << StrX(toCatch.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(toCatch.getMessage()) << "\n" << std::endl;
errorOccurred = true;
continue;
}
@@ -370,18 +366,18 @@
const unsigned int maxChars = 2047;
XMLCh errText[maxChars + 1];
- XERCES_STD_QUALIFIER cerr << "\nDOM Error during parsing: '" << xmlFile << "'\n"
- << "DOMException code is: " << toCatch.code << XERCES_STD_QUALIFIER endl;
+ std::cerr << "\nDOM Error during parsing: '" << xmlFile << "'\n"
+ << "DOMException code is: " << toCatch.code << std::endl;
if (DOMImplementation::loadDOMExceptionMsg(toCatch.code, errText, maxChars))
- XERCES_STD_QUALIFIER cerr << "Message is: " << StrX(errText) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Message is: " << StrX(errText) << std::endl;
errorOccurred = true;
continue;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n";
+ std::cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n";
errorOccurred = true;
continue;
}
@@ -392,7 +388,7 @@
//
if (errorHandler.getSawErrors())
{
- XERCES_STD_QUALIFIER cout << "\nErrors occurred, no output available\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\nErrors occurred, no output available\n" << std::endl;
errorOccurred = true;
}
else
@@ -403,14 +399,14 @@
// test getElementsByTagName and getLength
XMLCh xa[] = {chAsterisk, chNull};
if (elementCount != doc->getElementsByTagName(xa)->getLength()) {
- XERCES_STD_QUALIFIER cout << "\nErrors occurred, element count is wrong\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\nErrors occurred, element count is wrong\n" << std::endl;
errorOccurred = true;
}
}
// Print out the stats that we collected and time taken.
- XERCES_STD_QUALIFIER cout << xmlFile << ": " << duration << " ms ("
- << elementCount << " elems)." << XERCES_STD_QUALIFIER endl;
+ std::cout << xmlFile << ": " << duration << " ms ("
+ << elementCount << " elems)." << std::endl;
}
}
@@ -453,16 +449,16 @@
{
fSawErrors = true;
if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
- XERCES_STD_QUALIFIER cerr << "\nWarning at file ";
+ std::cerr << "\nWarning at file ";
else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
- XERCES_STD_QUALIFIER cerr << "\nError at file ";
+ std::cerr << "\nError at file ";
else
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file ";
+ std::cerr << "\nFatal Error at file ";
- XERCES_STD_QUALIFIER cerr << StrX(domError.getLocation()->getURI())
+ std::cerr << StrX(domError.getLocation()->getURI())
<< ", line " << domError.getLocation()->getLineNumber()
<< ", char " << domError.getLocation()->getColumnNumber()
- << "\n Message: " << StrX(domError.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(domError.getMessage()) << std::endl;
return true;
}
diff --git a/samples/src/DOMCount/DOMCount.hpp b/samples/src/DOMCount/DOMCount.hpp
index 2d9c8c1..0ea6d70 100644
--- a/samples/src/DOMCount/DOMCount.hpp
+++ b/samples/src/DOMCount/DOMCount.hpp
@@ -24,13 +24,9 @@
// ---------------------------------------------------------------------------
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/util/XMLString.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
// ---------------------------------------------------------------------------
// Simple error handler deriviative to install on parser
@@ -118,7 +114,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/DOMPrint/DOMPrint.cpp b/samples/src/DOMPrint/DOMPrint.cpp
index 3c8ed42..5f113ea 100644
--- a/samples/src/DOMPrint/DOMPrint.cpp
+++ b/samples/src/DOMPrint/DOMPrint.cpp
@@ -80,8 +80,8 @@
#include "DOMPrintErrorHandler.hpp"
#include <xercesc/util/OutOfMemoryException.hpp>
-#include <string.h>
-#include <stdlib.h>
+#include <cstring>
+#include <cstdlib>
// ---------------------------------------------------------------------------
// Local data
@@ -153,7 +153,7 @@
// ---------------------------------------------------------------------------
void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" DOMPrint [options] <XML file>\n\n"
"This program invokes the DOM parser, and builds the DOM tree.\n"
"It then asks the DOMLSSerializer to serialize the DOM tree.\n"
@@ -179,7 +179,7 @@
"The parser has intrinsic support for the following encodings:\n"
" UTF-8, US-ASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,\n"
" WINDOWS-1252, IBM1140, IBM037, IBM1047.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
// ---------------------------------------------------------------------------
@@ -199,9 +199,9 @@
catch(const XMLException &toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during Xerces-c Initialization.\n"
+ std::cerr << "Error during Xerces-c Initialization.\n"
<< " Exception message:"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -241,7 +241,7 @@
gValScheme = XercesDOMParser::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -285,7 +285,7 @@
gDiscardDefaultContent = false;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -wddc= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -wddc= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -301,7 +301,7 @@
gSplitCdataSections = false;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -wscs= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -wscs= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -316,7 +316,7 @@
gUseFilter = false;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -wflt= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -wflt= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -331,7 +331,7 @@
gFormatPrettyPrint = false;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -wfpp= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -wfpp= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -346,7 +346,7 @@
gXMLDeclaration = false;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -wfdecl= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -wfdecl= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -361,7 +361,7 @@
gWriteBOM = false;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -wbom= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -wbom= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -372,8 +372,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[parmInd]
- << "', ignoring it.\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[parmInd]
+ << "', ignoring it.\n" << std::endl;
}
}
@@ -416,13 +416,13 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorsOccured = true;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "An error occurred during parsing\n Message: "
- << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "An error occurred during parsing\n Message: "
+ << StrX(e.getMessage()) << std::endl;
errorsOccured = true;
}
@@ -431,18 +431,18 @@
const unsigned int maxChars = 2047;
XMLCh errText[maxChars + 1];
- XERCES_STD_QUALIFIER cerr << "\nDOM Error during parsing: '" << gXmlFile << "'\n"
- << "DOMException code is: " << e.code << XERCES_STD_QUALIFIER endl;
+ std::cerr << "\nDOM Error during parsing: '" << gXmlFile << "'\n"
+ << "DOMException code is: " << e.code << std::endl;
if (DOMImplementation::loadDOMExceptionMsg(e.code, errText, maxChars))
- XERCES_STD_QUALIFIER cerr << "Message is: " << StrX(errText) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Message is: " << StrX(errText) << std::endl;
errorsOccured = true;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "An error occurred during parsing\n " << XERCES_STD_QUALIFIER endl;
+ std::cerr << "An error occurred during parsing\n " << std::endl;
errorsOccured = true;
}
@@ -546,16 +546,16 @@
}
catch(const DOMXPathException& e)
{
- XERCES_STD_QUALIFIER cerr << "An error occurred during processing of the XPath expression. Msg is:"
- << XERCES_STD_QUALIFIER endl
- << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "An error occurred during processing of the XPath expression. Msg is:"
+ << std::endl
+ << StrX(e.getMessage()) << std::endl;
retval = 4;
}
catch(const DOMException& e)
{
- XERCES_STD_QUALIFIER cerr << "An error occurred during processing of the XPath expression. Msg is:"
- << XERCES_STD_QUALIFIER endl
- << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "An error occurred during processing of the XPath expression. Msg is:"
+ << std::endl
+ << StrX(e.getMessage()) << std::endl;
retval = 4;
}
XMLString::release(&xpathStr);
@@ -579,21 +579,21 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
retval = 5;
}
catch (const DOMLSException& e)
{
- XERCES_STD_QUALIFIER cerr << "An error occurred during serialization of the DOM tree. Msg is:"
- << XERCES_STD_QUALIFIER endl
- << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "An error occurred during serialization of the DOM tree. Msg is:"
+ << std::endl
+ << StrX(e.getMessage()) << std::endl;
retval = 4;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "An error occurred during creation of output transcoder. Msg is:"
- << XERCES_STD_QUALIFIER endl
- << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "An error occurred during creation of output transcoder. Msg is:"
+ << std::endl
+ << StrX(e.getMessage()) << std::endl;
retval = 4;
}
diff --git a/samples/src/DOMPrint/DOMPrintErrorHandler.cpp b/samples/src/DOMPrint/DOMPrintErrorHandler.cpp
index dd7391e..5c56f47 100644
--- a/samples/src/DOMPrint/DOMPrintErrorHandler.cpp
+++ b/samples/src/DOMPrint/DOMPrintErrorHandler.cpp
@@ -21,11 +21,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/dom/DOMError.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
#include "DOMPrintErrorHandler.hpp"
@@ -33,14 +29,14 @@
{
// Display whatever error message passed from the serializer
if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
- XERCES_STD_QUALIFIER cerr << "\nWarning Message: ";
+ std::cerr << "\nWarning Message: ";
else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
- XERCES_STD_QUALIFIER cerr << "\nError Message: ";
+ std::cerr << "\nError Message: ";
else
- XERCES_STD_QUALIFIER cerr << "\nFatal Message: ";
+ std::cerr << "\nFatal Message: ";
char *msg = XMLString::transcode(domError.getMessage());
- XERCES_STD_QUALIFIER cerr<< msg <<XERCES_STD_QUALIFIER endl;
+ std::cerr<< msg <<std::endl;
XMLString::release(&msg);
// Instructs the serializer to continue serialization if possible.
diff --git a/samples/src/DOMPrint/DOMPrintErrorHandler.hpp b/samples/src/DOMPrint/DOMPrintErrorHandler.hpp
index d51682b..14e3167 100644
--- a/samples/src/DOMPrint/DOMPrintErrorHandler.hpp
+++ b/samples/src/DOMPrint/DOMPrintErrorHandler.hpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOMErrorHandler.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class DOMPrintErrorHandler : public DOMErrorHandler
{
diff --git a/samples/src/DOMPrint/DOMPrintFilter.hpp b/samples/src/DOMPrint/DOMPrintFilter.hpp
index b76123c..c38e429 100644
--- a/samples/src/DOMPrint/DOMPrintFilter.hpp
+++ b/samples/src/DOMPrint/DOMPrintFilter.hpp
@@ -29,7 +29,7 @@
#include <xercesc/dom/DOMLSSerializerFilter.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class DOMPrintFilter : public DOMLSSerializerFilter {
public:
diff --git a/samples/src/DOMPrint/DOMTreeErrorReporter.cpp b/samples/src/DOMPrint/DOMTreeErrorReporter.cpp
index 9a24fac..ba8a1a6 100644
--- a/samples/src/DOMPrint/DOMTreeErrorReporter.cpp
+++ b/samples/src/DOMPrint/DOMTreeErrorReporter.cpp
@@ -24,13 +24,9 @@
// ---------------------------------------------------------------------------
#include <xercesc/sax/SAXParseException.hpp>
#include "DOMTreeErrorReporter.hpp"
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
void DOMTreeErrorReporter::warning(const SAXParseException&)
@@ -43,19 +39,19 @@
void DOMTreeErrorReporter::error(const SAXParseException& toCatch)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "Error at file \"" << StrX(toCatch.getSystemId())
+ std::cerr << "Error at file \"" << StrX(toCatch.getSystemId())
<< "\", line " << toCatch.getLineNumber()
<< ", column " << toCatch.getColumnNumber()
- << "\n Message: " << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(toCatch.getMessage()) << std::endl;
}
void DOMTreeErrorReporter::fatalError(const SAXParseException& toCatch)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "Fatal Error at file \"" << StrX(toCatch.getSystemId())
+ std::cerr << "Fatal Error at file \"" << StrX(toCatch.getSystemId())
<< "\", line " << toCatch.getLineNumber()
<< ", column " << toCatch.getColumnNumber()
- << "\n Message: " << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(toCatch.getMessage()) << std::endl;
}
void DOMTreeErrorReporter::resetErrors()
diff --git a/samples/src/DOMPrint/DOMTreeErrorReporter.hpp b/samples/src/DOMPrint/DOMTreeErrorReporter.hpp
index 5807c2b..5ae6e85 100644
--- a/samples/src/DOMPrint/DOMTreeErrorReporter.hpp
+++ b/samples/src/DOMPrint/DOMTreeErrorReporter.hpp
@@ -21,14 +21,10 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/sax/ErrorHandler.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class DOMTreeErrorReporter : public ErrorHandler
@@ -116,7 +112,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/EnumVal/EnumVal.cpp b/samples/src/EnumVal/EnumVal.cpp
index 6cc4c17..cc7bf77 100644
--- a/samples/src/EnumVal/EnumVal.cpp
+++ b/samples/src/EnumVal/EnumVal.cpp
@@ -28,16 +28,12 @@
#include <xercesc/parsers/SAXParser.hpp>
#include <xercesc/validators/DTD/DTDValidator.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
// ---------------------------------------------------------------------------
// Forward references
@@ -87,7 +83,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
@@ -99,13 +95,13 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" EnumVal <XML file>\n\n"
"This program parses the specified XML file, then shows how to\n"
"enumerate the contents of the DTD Grammar. Essentially,\n"
"shows how one can access the DTD information stored in internal\n"
"data structures.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -122,8 +118,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -169,14 +165,14 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << xmlFile << "'\n"
+ std::cerr << "\nError during parsing: '" << xmlFile << "'\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << "\n" << std::endl;
errorCode = 4;
}
if(errorCode) {
@@ -194,25 +190,25 @@
NameIdPoolEnumerator<DTDElementDecl> elemEnum = grammar->getElemEnumerator();
if (elemEnum.hasMoreElements())
{
- XERCES_STD_QUALIFIER cout << "\nELEMENTS:\n----------------------------\n";
+ std::cout << "\nELEMENTS:\n----------------------------\n";
while(elemEnum.hasMoreElements())
{
const DTDElementDecl& curElem = elemEnum.nextElement();
- XERCES_STD_QUALIFIER cout << " Name: " << StrX(curElem.getFullName()) << "\n";
+ std::cout << " Name: " << StrX(curElem.getFullName()) << "\n";
- XERCES_STD_QUALIFIER cout << " Content Model: "
+ std::cout << " Content Model: "
<< StrX(curElem.getFormattedContentModel())
<< "\n";
// Get an enumerator for this guy's attributes if any
if (curElem.hasAttDefs())
{
- XERCES_STD_QUALIFIER cout << " Attributes:\n";
+ std::cout << " Attributes:\n";
XMLAttDefList& attList = curElem.getAttDefList();
for (unsigned int i=0; i<attList.getAttDefCount(); i++)
{
const XMLAttDef& curAttDef = attList.getAttDef(i);
- XERCES_STD_QUALIFIER cout << " Name:" << StrX(curAttDef.getFullName())
+ std::cout << " Name:" << StrX(curAttDef.getFullName())
<< ", Type: ";
// Get the type and display it
@@ -220,52 +216,52 @@
switch(type)
{
case XMLAttDef::CData :
- XERCES_STD_QUALIFIER cout << "CDATA";
+ std::cout << "CDATA";
break;
case XMLAttDef::ID :
- XERCES_STD_QUALIFIER cout << "ID";
+ std::cout << "ID";
break;
case XMLAttDef::IDRef :
case XMLAttDef::IDRefs :
- XERCES_STD_QUALIFIER cout << "IDREF(S)";
+ std::cout << "IDREF(S)";
break;
case XMLAttDef::Entity :
case XMLAttDef::Entities :
- XERCES_STD_QUALIFIER cout << "ENTITY(IES)";
+ std::cout << "ENTITY(IES)";
break;
case XMLAttDef::NmToken :
case XMLAttDef::NmTokens :
- XERCES_STD_QUALIFIER cout << "NMTOKEN(S)";
+ std::cout << "NMTOKEN(S)";
break;
case XMLAttDef::Notation :
- XERCES_STD_QUALIFIER cout << "NOTATION";
+ std::cout << "NOTATION";
break;
case XMLAttDef::Enumeration :
- XERCES_STD_QUALIFIER cout << "ENUMERATION";
+ std::cout << "ENUMERATION";
break;
default:
break;
}
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\n";
}
}
- XERCES_STD_QUALIFIER cout << XERCES_STD_QUALIFIER endl;
+ std::cout << std::endl;
}
}
else
{
- XERCES_STD_QUALIFIER cout << "The validator has no elements to display\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "The validator has no elements to display\n" << std::endl;
}
}
else
- XERCES_STD_QUALIFIER cout << "\nErrors occurred, no output available\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\nErrors occurred, no output available\n" << std::endl;
//
// Delete the parser itself. Must be done prior to calling Terminate, below.
diff --git a/samples/src/MemParse/MemParse.cpp b/samples/src/MemParse/MemParse.cpp
index 61fa667..8325d7e 100644
--- a/samples/src/MemParse/MemParse.cpp
+++ b/samples/src/MemParse/MemParse.cpp
@@ -95,7 +95,7 @@
// ---------------------------------------------------------------------------
void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" MemParse [options]\n\n"
"This program uses the SAX Parser to parse a memory buffer\n"
"containing XML statements, and reports the number of\n"
@@ -107,7 +107,7 @@
" -f Enable full schema constraint checking. Defaults to off.\n"
" -? Show this help.\n\n"
" * = Default if not provided explicitly.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -123,8 +123,8 @@
}
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -164,7 +164,7 @@
valScheme = SAXParser::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
return 2;
}
}
@@ -185,8 +185,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[argInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[argInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -243,14 +243,14 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing memory stream:\n"
+ std::cerr << "\nError during parsing memory stream:\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << "\n" << std::endl;
errorCode = 4;
}
if(errorCode) {
@@ -260,7 +260,7 @@
// Print out the stats that we collected and time taken.
if (!errorCount) {
- XERCES_STD_QUALIFIER cout << "\nFinished parsing the memory buffer containing the following "
+ std::cout << "\nFinished parsing the memory buffer containing the following "
<< "XML statements:\n\n"
<< gXMLInMemBuf
<< "\n\n\n"
@@ -268,7 +268,7 @@
<< handler.getElementCount() << " elements, "
<< handler.getAttrCount() << " attributes, "
<< handler.getSpaceCount() << " spaces, "
- << handler.getCharacterCount() << " characters).\n" << XERCES_STD_QUALIFIER endl;
+ << handler.getCharacterCount() << " characters).\n" << std::endl;
}
//
diff --git a/samples/src/MemParse/MemParse.hpp b/samples/src/MemParse/MemParse.hpp
index db44bde..5f1146c 100644
--- a/samples/src/MemParse/MemParse.hpp
+++ b/samples/src/MemParse/MemParse.hpp
@@ -23,16 +23,12 @@
// ---------------------------------------------------------------------------
// Includes for all the program files to see
// ---------------------------------------------------------------------------
-#include <string.h>
-#include <stdlib.h>
+#include <cstring>
+#include <cstdlib>
#include <xercesc/util/PlatformUtils.hpp>
#include "MemParseHandlers.hpp"
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
@@ -78,7 +74,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/MemParse/MemParseHandlers.cpp b/samples/src/MemParse/MemParseHandlers.cpp
index ee91ce7..c32d260 100644
--- a/samples/src/MemParse/MemParseHandlers.cpp
+++ b/samples/src/MemParse/MemParseHandlers.cpp
@@ -25,7 +25,7 @@
// Includes
// ---------------------------------------------------------------------------
#include "MemParse.hpp"
-#include <string.h>
+#include <cstring>
#include <xercesc/sax/AttributeList.hpp>
#include <xercesc/sax/SAXParseException.hpp>
#include <xercesc/sax/SAXException.hpp>
@@ -85,26 +85,26 @@
// ---------------------------------------------------------------------------
void MemParseHandlers::error(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError at (file " << StrX(e.getSystemId())
+ std::cerr << "\nError at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
void MemParseHandlers::fatalError(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
void MemParseHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at (file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
diff --git a/samples/src/MemParse/MemParseHandlers.hpp b/samples/src/MemParse/MemParseHandlers.hpp
index 741189a..ef867bc 100644
--- a/samples/src/MemParse/MemParseHandlers.hpp
+++ b/samples/src/MemParse/MemParseHandlers.hpp
@@ -25,11 +25,11 @@
// ---------------------------------------------------------------------------
#include <xercesc/sax/HandlerBase.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class AttributeList;
-XERCES_CPP_NAMESPACE_END
+}
class MemParseHandlers : public HandlerBase
diff --git a/samples/src/PParse/PParse.cpp b/samples/src/PParse/PParse.cpp
index e292b5b..eb77ffc 100644
--- a/samples/src/PParse/PParse.cpp
+++ b/samples/src/PParse/PParse.cpp
@@ -83,7 +83,7 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" PParse [options] <XML file>\n\n"
"This program demonstrates the progressive parse capabilities of\n"
"the parser system. It allows you to do a scanFirst() call followed by\n"
@@ -98,7 +98,7 @@
" -f - Enable full schema constraint checking [default is off].\n"
" -? - Show this help.\n\n"
" * = Default if not provided explicitly.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -116,8 +116,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! :\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! :\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -157,7 +157,7 @@
valScheme = SAXParser::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -179,8 +179,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[parmInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[parmInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -226,7 +226,7 @@
const unsigned long startMillis = XMLPlatformUtils::getCurrentMillis();
if (!parser->parseFirst(xmlFile, token))
{
- XERCES_STD_QUALIFIER cerr << "scanFirst() failed\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "scanFirst() failed\n" << std::endl;
XMLPlatformUtils::Terminate();
return 1;
}
@@ -254,15 +254,15 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "\nAn error occurred: '" << xmlFile << "'\n"
+ std::cerr << "\nAn error occurred: '" << xmlFile << "'\n"
<< "Exception message is: \n"
<< StrX(toCatch.getMessage())
- << "\n" << XERCES_STD_QUALIFIER endl;
+ << "\n" << std::endl;
errorCode = 4;
}
@@ -272,11 +272,11 @@
}
if (!errorCount) {
- XERCES_STD_QUALIFIER cout << xmlFile << ": " << duration << " ms ("
+ std::cout << xmlFile << ": " << duration << " ms ("
<< handler.getElementCount() << " elems, "
<< handler.getAttrCount() << " attrs, "
<< handler.getSpaceCount() << " spaces, "
- << handler.getCharacterCount() << " chars)" << XERCES_STD_QUALIFIER endl;
+ << handler.getCharacterCount() << " chars)" << std::endl;
}
//
diff --git a/samples/src/PParse/PParse.hpp b/samples/src/PParse/PParse.hpp
index 0283a32..d055b05 100644
--- a/samples/src/PParse/PParse.hpp
+++ b/samples/src/PParse/PParse.hpp
@@ -22,13 +22,9 @@
// ---------------------------------------------------------------------------
// Includes for all the program files to see
// ---------------------------------------------------------------------------
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-#include <string.h>
-#include <stdlib.h>
+#include <cstring>
+#include <cstdlib>
#include "PParseHandlers.hpp"
@@ -74,7 +70,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/PParse/PParseHandlers.cpp b/samples/src/PParse/PParseHandlers.cpp
index 891a7db..7fa09db 100644
--- a/samples/src/PParse/PParseHandlers.cpp
+++ b/samples/src/PParse/PParseHandlers.cpp
@@ -83,25 +83,25 @@
// ---------------------------------------------------------------------------
void PParseHandlers::error(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
+ std::cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void PParseHandlers::fatalError(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void PParseHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
diff --git a/samples/src/PParse/PParseHandlers.hpp b/samples/src/PParse/PParseHandlers.hpp
index 5698466..5869a37 100644
--- a/samples/src/PParse/PParseHandlers.hpp
+++ b/samples/src/PParse/PParseHandlers.hpp
@@ -22,7 +22,7 @@
#include <xercesc/sax/HandlerBase.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class PParseHandlers : public HandlerBase
{
diff --git a/samples/src/PSVIWriter/PSVIWriter.cpp b/samples/src/PSVIWriter/PSVIWriter.cpp
index d7de612..0da1cef 100644
--- a/samples/src/PSVIWriter/PSVIWriter.cpp
+++ b/samples/src/PSVIWriter/PSVIWriter.cpp
@@ -34,17 +34,15 @@
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <fstream>
-#else
-#include <fstream.h>
-#endif
+
+
// ---------------------------------------------------------------------------
// Local helper methods
// ---------------------------------------------------------------------------
void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" PSVIWriter [options] <XML file | List file>\n\n"
"This program invokes the SAX2XMLReaderImpl, and then exposes the\n"
"underlying PSVI of each parsed XML file, using SAX2 API.\n\n"
@@ -58,7 +56,7 @@
" Default to off (Input file is an XML file).\n"
" -? Show this help.\n\n"
" * = Default if not provided explicitly.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -142,15 +140,15 @@
unRepFlags = XMLFormatter::UnRep_CharRef;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -u= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -u= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[argInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[argInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -169,8 +167,8 @@
{
XMLPlatformUtils::Initialize();
} catch (const XMLException& toCatch) {
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -225,14 +223,14 @@
parser->setErrorHandler(handler);
bool more = true;
- XERCES_STD_QUALIFIER ifstream fin;
+ std::ifstream fin;
// the input is a list file
if (doList) //REVISIT
fin.open(argV[argInd]);
if (fin.fail()) {
- XERCES_STD_QUALIFIER cerr <<"Cannot open the list file: " << argV[argInd] << XERCES_STD_QUALIFIER endl;
+ std::cerr <<"Cannot open the list file: " << argV[argInd] << std::endl;
return 2;
}
@@ -250,7 +248,7 @@
else {
xmlFile =fURI;
XMLString::trim((char*)xmlFile);
- XERCES_STD_QUALIFIER cerr << "==Parsing== \"" << xmlFile << "\"" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "==Parsing== \"" << xmlFile << "\"" << std::endl;
}
if (psviOut==0) {
@@ -293,22 +291,22 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorOccurred = true;
continue;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << xmlFile << "'\n"
+ std::cerr << "\nError during parsing: '" << xmlFile << "'\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << "\n" << std::endl;
errorOccurred = true;
continue;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n" << XERCES_STD_QUALIFIER endl;;
+ std::cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n" << std::endl;;
errorOccurred = true;
continue;
}
diff --git a/samples/src/PSVIWriter/PSVIWriter.hpp b/samples/src/PSVIWriter/PSVIWriter.hpp
index 70bb9c2..5c802d4 100644
--- a/samples/src/PSVIWriter/PSVIWriter.hpp
+++ b/samples/src/PSVIWriter/PSVIWriter.hpp
@@ -24,17 +24,13 @@
// ---------------------------------------------------------------------------
#include "PSVIWriterHandlers.hpp"
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLUni.hpp>
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include <xercesc/sax2/SAX2XMLReader.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
// ---------------------------------------------------------------------------
@@ -76,7 +72,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/PSVIWriter/PSVIWriterHandlers.cpp b/samples/src/PSVIWriter/PSVIWriterHandlers.cpp
index 29965a5..a950674 100644
--- a/samples/src/PSVIWriter/PSVIWriterHandlers.cpp
+++ b/samples/src/PSVIWriter/PSVIWriterHandlers.cpp
@@ -34,10 +34,10 @@
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/framework/psvi/XSValue.hpp>
-#include <string.h>
-#include <stdio.h>
+#include <cstring>
+#include <cstdio>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
static const XMLCh fgSpace[] = { chSpace, chNull };
static const XMLCh fgChar[] = { chSpace, chLatin_C, chLatin_h, chLatin_a, chLatin_r, chNull }; // char
@@ -876,7 +876,7 @@
annot = annotation;
while (annot) {
- XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* document = DOMImplementationRegistry::getDOMImplementation(XMLUni::fgZeroLenString)->
+ xercesc::DOMDocument* document = DOMImplementationRegistry::getDOMImplementation(XMLUni::fgZeroLenString)->
createDocument();
annot->writeAnnotation((DOMNode*)document, XSAnnotation::W3C_DOM_DOCUMENT);
DOMElement* elem = document->getDocumentElement();
diff --git a/samples/src/PSVIWriter/PSVIWriterHandlers.hpp b/samples/src/PSVIWriter/PSVIWriterHandlers.hpp
index f3cdd1b..8bdf713 100644
--- a/samples/src/PSVIWriter/PSVIWriterHandlers.hpp
+++ b/samples/src/PSVIWriter/PSVIWriterHandlers.hpp
@@ -56,10 +56,10 @@
#include <xercesc/util/ValueVectorOf.hpp>
#include <xercesc/util/XMLEntityResolver.hpp>
#include <xercesc/util/XMLResourceIdentifier.hpp>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class AttrInfo {
diff --git a/samples/src/Redirect/Redirect.cpp b/samples/src/Redirect/Redirect.cpp
index bdc96ba..85273d9 100644
--- a/samples/src/Redirect/Redirect.cpp
+++ b/samples/src/Redirect/Redirect.cpp
@@ -51,14 +51,14 @@
// ---------------------------------------------------------------------------
void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" Redirect <XML file>\n\n"
"This program installs an entity resolver, traps the call to\n"
"the external DTD file and redirects it to another application\n"
"specific file which contains the actual dtd.\n\n"
"The program then counts and reports the number of elements and\n"
"attributes in the given XML file.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -74,8 +74,8 @@
}
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -124,14 +124,14 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << xmlFile << "'\n"
+ std::cerr << "\nError during parsing: '" << xmlFile << "'\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << "\n" << std::endl;
errorCode = 4;
}
@@ -142,11 +142,11 @@
// Print out the stats that we collected and time taken.
if (!errorCount) {
- XERCES_STD_QUALIFIER cout << xmlFile << ": " << duration << " ms ("
+ std::cout << xmlFile << ": " << duration << " ms ("
<< handler.getElementCount() << " elems, "
<< handler.getAttrCount() << " attrs, "
<< handler.getSpaceCount() << " spaces, "
- << handler.getCharacterCount() << " chars)" << XERCES_STD_QUALIFIER endl;
+ << handler.getCharacterCount() << " chars)" << std::endl;
}
//
diff --git a/samples/src/Redirect/Redirect.hpp b/samples/src/Redirect/Redirect.hpp
index ab7ba64..a2b44b2 100644
--- a/samples/src/Redirect/Redirect.hpp
+++ b/samples/src/Redirect/Redirect.hpp
@@ -23,13 +23,9 @@
// ---------------------------------------------------------------------------
// Includes for all the program files to see
// ---------------------------------------------------------------------------
-#include <stdlib.h>
-#include <string.h>
-#if defined(XERCES_NEW_IOSTREAMS)
+#include <cstdlib>
+#include <cstring>
#include <iostream>
-#else
-#include <iostream.h>
-#endif
#include <xercesc/util/PlatformUtils.hpp>
#include "RedirectHandlers.hpp"
@@ -74,7 +70,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/Redirect/RedirectHandlers.cpp b/samples/src/Redirect/RedirectHandlers.cpp
index 86e76a6..8f06c53 100644
--- a/samples/src/Redirect/RedirectHandlers.cpp
+++ b/samples/src/Redirect/RedirectHandlers.cpp
@@ -31,7 +31,7 @@
#include <xercesc/sax/SAXException.hpp>
#include <xercesc/framework/LocalFileInputSource.hpp>
#include "Redirect.hpp"
-#include <string.h>
+#include <cstring>
// ---------------------------------------------------------------------------
@@ -111,26 +111,26 @@
// ---------------------------------------------------------------------------
void RedirectHandlers::error(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError at (file " << StrX(e.getSystemId())
+ std::cerr << "\nError at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
void RedirectHandlers::fatalError(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
void RedirectHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at (file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
diff --git a/samples/src/Redirect/RedirectHandlers.hpp b/samples/src/Redirect/RedirectHandlers.hpp
index cedbb16..2210766 100644
--- a/samples/src/Redirect/RedirectHandlers.hpp
+++ b/samples/src/Redirect/RedirectHandlers.hpp
@@ -26,11 +26,11 @@
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/util/XMLEntityResolver.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class AttributeList;
-XERCES_CPP_NAMESPACE_END
+}
class RedirectHandlers : public HandlerBase, public XMLEntityResolver
diff --git a/samples/src/SAX2Count/SAX2Count.cpp b/samples/src/SAX2Count/SAX2Count.cpp
index 93714bf..168cb59 100644
--- a/samples/src/SAX2Count/SAX2Count.cpp
+++ b/samples/src/SAX2Count/SAX2Count.cpp
@@ -27,11 +27,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/sax2/SAX2XMLReader.hpp>
#include <xercesc/sax2/XMLReaderFactory.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <fstream>
-#else
-#include <fstream.h>
-#endif
#include <xercesc/util/OutOfMemoryException.hpp>
// ---------------------------------------------------------------------------
@@ -39,7 +35,7 @@
// ---------------------------------------------------------------------------
void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" SAX2Count [options] <XML file | List file>\n\n"
"This program invokes the SAX2XMLReader, and then prints the\n"
"number of elements, attributes, spaces and characters found\n"
@@ -59,7 +55,7 @@
" -locale=ll_CC specify the locale, default: en_US.\n"
" -? Show this help.\n\n"
" * = Default if not provided explicitly.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -115,7 +111,7 @@
valScheme = SAX2XMLReader::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
return 2;
}
}
@@ -164,8 +160,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[argInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[argInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -199,8 +195,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -246,14 +242,14 @@
unsigned long duration;
bool more = true;
- XERCES_STD_QUALIFIER ifstream fin;
+ std::ifstream fin;
// the input is a list file
if (doList)
fin.open(argV[argInd]);
if (fin.fail()) {
- XERCES_STD_QUALIFIER cerr <<"Cannot open the list file: " << argV[argInd] << XERCES_STD_QUALIFIER endl;
+ std::cerr <<"Cannot open the list file: " << argV[argInd] << std::endl;
return 2;
}
@@ -270,7 +266,7 @@
continue;
else {
xmlFile = fURI;
- XERCES_STD_QUALIFIER cerr << "==Parsing== " << xmlFile << XERCES_STD_QUALIFIER endl;
+ std::cerr << "==Parsing== " << xmlFile << std::endl;
}
}
else
@@ -293,22 +289,22 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorOccurred = true;
continue;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << xmlFile << "'\n"
+ std::cerr << "\nError during parsing: '" << xmlFile << "'\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << "\n" << std::endl;
errorOccurred = true;
continue;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n";
+ std::cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n";
errorOccurred = true;
continue;
}
@@ -317,11 +313,11 @@
// Print out the stats that we collected and time taken
if (!handler.getSawErrors())
{
- XERCES_STD_QUALIFIER cout << xmlFile << ": " << duration << " ms ("
+ std::cout << xmlFile << ": " << duration << " ms ("
<< handler.getElementCount() << " elems, "
<< handler.getAttrCount() << " attrs, "
<< handler.getSpaceCount() << " spaces, "
- << handler.getCharacterCount() << " chars)" << XERCES_STD_QUALIFIER endl;
+ << handler.getCharacterCount() << " chars)" << std::endl;
}
else
errorOccurred = true;
diff --git a/samples/src/SAX2Count/SAX2Count.hpp b/samples/src/SAX2Count/SAX2Count.hpp
index b2cff19..5d6929c 100644
--- a/samples/src/SAX2Count/SAX2Count.hpp
+++ b/samples/src/SAX2Count/SAX2Count.hpp
@@ -25,13 +25,9 @@
// ---------------------------------------------------------------------------
#include <xercesc/util/PlatformUtils.hpp>
-#include <stdlib.h>
-#include <string.h>
-#if defined(XERCES_NEW_IOSTREAMS)
+#include <cstdlib>
+#include <cstring>
#include <iostream>
-#else
-#include <iostream.h>
-#endif
#include "SAX2CountHandlers.hpp"
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include <xercesc/sax2/SAX2XMLReader.hpp>
@@ -76,7 +72,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/SAX2Count/SAX2CountHandlers.cpp b/samples/src/SAX2Count/SAX2CountHandlers.cpp
index ac150b0..2c5da21 100644
--- a/samples/src/SAX2Count/SAX2CountHandlers.cpp
+++ b/samples/src/SAX2Count/SAX2CountHandlers.cpp
@@ -85,27 +85,27 @@
void SAX2CountHandlers::error(const SAXParseException& e)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
+ std::cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAX2CountHandlers::fatalError(const SAXParseException& e)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAX2CountHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAX2CountHandlers::resetErrors()
diff --git a/samples/src/SAX2Count/SAX2CountHandlers.hpp b/samples/src/SAX2Count/SAX2CountHandlers.hpp
index f48ceec..ba336b5 100644
--- a/samples/src/SAX2Count/SAX2CountHandlers.hpp
+++ b/samples/src/SAX2Count/SAX2CountHandlers.hpp
@@ -26,7 +26,7 @@
#include <xercesc/sax2/Attributes.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class SAX2CountHandlers : public DefaultHandler
{
diff --git a/samples/src/SAX2Print/SAX2FilterHandlers.hpp b/samples/src/SAX2Print/SAX2FilterHandlers.hpp
index 3e5789a..2a2654d 100644
--- a/samples/src/SAX2Print/SAX2FilterHandlers.hpp
+++ b/samples/src/SAX2Print/SAX2FilterHandlers.hpp
@@ -21,7 +21,7 @@
#include <xercesc/parsers/SAX2XMLFilterImpl.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class SAX2SortAttributesFilter : public SAX2XMLFilterImpl
{
diff --git a/samples/src/SAX2Print/SAX2Print.cpp b/samples/src/SAX2Print/SAX2Print.cpp
index a0a8ce5..8ea0608 100644
--- a/samples/src/SAX2Print/SAX2Print.cpp
+++ b/samples/src/SAX2Print/SAX2Print.cpp
@@ -66,7 +66,7 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" SAX2Print [options] <XML file>\n\n"
"This program invokes the SAX2XMLReader, and then prints the\n"
"data returned by the various SAX2 handlers for the specified\n"
@@ -88,7 +88,7 @@
"The parser has intrinsic support for the following encodings:\n"
" UTF-8, US-ASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,\n"
" WINDOWS-1252, IBM1140, IBM037, IBM1047.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -106,8 +106,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! :\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! :\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -146,7 +146,7 @@
valScheme = SAX2XMLReader::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -175,7 +175,7 @@
unRepFlags = XMLFormatter::UnRep_CharRef;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -u= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -u= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -206,8 +206,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[parmInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[parmInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -283,14 +283,14 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "\nAn error occurred\n Error: "
+ std::cerr << "\nAn error occurred\n Error: "
<< StrX(toCatch.getMessage())
- << "\n" << XERCES_STD_QUALIFIER endl;
+ << "\n" << std::endl;
errorCode = 4;
}
diff --git a/samples/src/SAX2Print/SAX2Print.hpp b/samples/src/SAX2Print/SAX2Print.hpp
index 65e4845..53e714a 100644
--- a/samples/src/SAX2Print/SAX2Print.hpp
+++ b/samples/src/SAX2Print/SAX2Print.hpp
@@ -22,13 +22,9 @@
// ---------------------------------------------------------------------------
// Includes for all the program files to see
// ---------------------------------------------------------------------------
-#include <string.h>
-#if defined(XERCES_NEW_IOSTREAMS)
+#include <cstring>
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-#include <stdlib.h>
+#include <cstdlib>
#include "SAX2PrintHandlers.hpp"
@@ -71,7 +67,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/SAX2Print/SAX2PrintHandlers.cpp b/samples/src/SAX2Print/SAX2PrintHandlers.cpp
index 8af8e32..2291bcf 100644
--- a/samples/src/SAX2Print/SAX2PrintHandlers.cpp
+++ b/samples/src/SAX2Print/SAX2PrintHandlers.cpp
@@ -105,8 +105,8 @@
// Without the cast, it was printing the pointer value in hex.
// Quite annoying, considering every other platform printed
// the string with the explicit cast to char* below.
- XERCES_STD_QUALIFIER cout.write((char *) toWrite, (int) count);
- XERCES_STD_QUALIFIER cout.flush();
+ std::cout.write((char *) toWrite, (int) count);
+ std::cout.flush();
}
@@ -115,26 +115,26 @@
// ---------------------------------------------------------------------------
void SAX2PrintHandlers::error(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
+ std::cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAX2PrintHandlers::fatalError(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAX2PrintHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
diff --git a/samples/src/SAX2Print/SAX2PrintHandlers.hpp b/samples/src/SAX2Print/SAX2PrintHandlers.hpp
index 5a199b7..68615ca 100644
--- a/samples/src/SAX2Print/SAX2PrintHandlers.hpp
+++ b/samples/src/SAX2Print/SAX2PrintHandlers.hpp
@@ -22,7 +22,7 @@
#include <xercesc/sax2/DefaultHandler.hpp>
#include <xercesc/framework/XMLFormatter.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class SAX2PrintHandlers : public DefaultHandler, private XMLFormatTarget
{
diff --git a/samples/src/SAXCount/SAXCount.cpp b/samples/src/SAXCount/SAXCount.cpp
index 331d09c..1549e4e 100644
--- a/samples/src/SAXCount/SAXCount.cpp
+++ b/samples/src/SAXCount/SAXCount.cpp
@@ -24,11 +24,7 @@
// Includes
// ---------------------------------------------------------------------------
#include "SAXCount.hpp"
-#if defined(XERCES_NEW_IOSTREAMS)
#include <fstream>
-#else
-#include <fstream.h>
-#endif
#include <xercesc/util/OutOfMemoryException.hpp>
// ---------------------------------------------------------------------------
@@ -36,7 +32,7 @@
// ---------------------------------------------------------------------------
void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" SAXCount [options] <XML file | List file>\n\n"
"This program invokes the SAX Parser, and then prints the\n"
"number of elements, attributes, spaces and characters found\n"
@@ -51,7 +47,7 @@
" -locale=ll_CC specify the locale, default: en_US.\n"
" -? Show this help.\n\n"
" * = Default if not provided explicitly.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -105,7 +101,7 @@
valScheme = SAXParser::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
return 2;
}
}
@@ -144,8 +140,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[argInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[argInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -179,8 +175,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -211,14 +207,14 @@
//
unsigned long duration;
- XERCES_STD_QUALIFIER ifstream fin;
+ std::ifstream fin;
// the input is a list file
if (doList)
fin.open(argV[argInd]);
if (fin.fail()) {
- XERCES_STD_QUALIFIER cerr <<"Cannot open the list file: " << argV[argInd] << XERCES_STD_QUALIFIER endl;
+ std::cerr <<"Cannot open the list file: " << argV[argInd] << std::endl;
return 2;
}
@@ -235,7 +231,7 @@
continue;
else {
xmlFile = fURI;
- XERCES_STD_QUALIFIER cerr << "==Parsing== " << xmlFile << XERCES_STD_QUALIFIER endl;
+ std::cerr << "==Parsing== " << xmlFile << std::endl;
}
}
else
@@ -263,22 +259,22 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorOccurred = true;
continue;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << xmlFile << "'\n"
+ std::cerr << "\nError during parsing: '" << xmlFile << "'\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << "\n" << std::endl;
errorOccurred = true;
continue;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n";
+ std::cerr << "\nUnexpected exception during parsing: '" << xmlFile << "'\n";
errorOccurred = true;
continue;
}
@@ -287,11 +283,11 @@
// Print out the stats that we collected and time taken
if (!handler.getSawErrors())
{
- XERCES_STD_QUALIFIER cout << xmlFile << ": " << duration << " ms ("
+ std::cout << xmlFile << ": " << duration << " ms ("
<< handler.getElementCount() << " elems, "
<< handler.getAttrCount() << " attrs, "
<< handler.getSpaceCount() << " spaces, "
- << handler.getCharacterCount() << " chars)" << XERCES_STD_QUALIFIER endl;
+ << handler.getCharacterCount() << " chars)" << std::endl;
}
else
errorOccurred = true;
diff --git a/samples/src/SAXCount/SAXCount.hpp b/samples/src/SAXCount/SAXCount.hpp
index 51d1e4c..9169bb1 100644
--- a/samples/src/SAXCount/SAXCount.hpp
+++ b/samples/src/SAXCount/SAXCount.hpp
@@ -24,13 +24,9 @@
// Includes for all the program files to see
// ---------------------------------------------------------------------------
#include <xercesc/util/PlatformUtils.hpp>
-#include <stdlib.h>
-#include <string.h>
-#if defined(XERCES_NEW_IOSTREAMS)
+#include <cstdlib>
+#include <cstring>
#include <iostream>
-#else
-#include <iostream.h>
-#endif
#include <xercesc/parsers/SAXParser.hpp>
#include "SAXCountHandlers.hpp"
@@ -74,7 +70,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/SAXCount/SAXCountHandlers.cpp b/samples/src/SAXCount/SAXCountHandlers.cpp
index 725dcd1..3e17c54 100644
--- a/samples/src/SAXCount/SAXCountHandlers.cpp
+++ b/samples/src/SAXCount/SAXCountHandlers.cpp
@@ -84,27 +84,27 @@
void SAXCountHandlers::error(const SAXParseException& e)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
+ std::cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAXCountHandlers::fatalError(const SAXParseException& e)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAXCountHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAXCountHandlers::resetErrors()
diff --git a/samples/src/SAXCount/SAXCountHandlers.hpp b/samples/src/SAXCount/SAXCountHandlers.hpp
index 3f39b2e..3a9f805 100644
--- a/samples/src/SAXCount/SAXCountHandlers.hpp
+++ b/samples/src/SAXCount/SAXCountHandlers.hpp
@@ -25,11 +25,11 @@
// ---------------------------------------------------------------------------
#include <xercesc/sax/HandlerBase.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class AttributeList;
-XERCES_CPP_NAMESPACE_END
+}
class SAXCountHandlers : public HandlerBase
{
diff --git a/samples/src/SAXPrint/SAXPrint.cpp b/samples/src/SAXPrint/SAXPrint.cpp
index 9362088..2486161 100644
--- a/samples/src/SAXPrint/SAXPrint.cpp
+++ b/samples/src/SAXPrint/SAXPrint.cpp
@@ -70,7 +70,7 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" SAXPrint [options] <XML file>\n\n"
"This program invokes the SAX Parser, and then prints the\n"
"data returned by the various SAX handlers for the specified\n"
@@ -87,7 +87,7 @@
"The parser has intrinsic support for the following encodings:\n"
" UTF-8, US-ASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,\n"
" WINDOWS-1252, IBM1140, IBM037, IBM1047.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -105,8 +105,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! :\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! :\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -145,7 +145,7 @@
valScheme = SAXParser::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -184,15 +184,15 @@
unRepFlags = XMLFormatter::UnRep_CharRef;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -u= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -u= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[parmInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[parmInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -236,14 +236,14 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "\nAn error occurred\n Error: "
+ std::cerr << "\nAn error occurred\n Error: "
<< StrX(toCatch.getMessage())
- << "\n" << XERCES_STD_QUALIFIER endl;
+ << "\n" << std::endl;
errorCode = 4;
}
if(errorCode) {
diff --git a/samples/src/SAXPrint/SAXPrint.hpp b/samples/src/SAXPrint/SAXPrint.hpp
index 50a117c..10fda1c 100644
--- a/samples/src/SAXPrint/SAXPrint.hpp
+++ b/samples/src/SAXPrint/SAXPrint.hpp
@@ -22,13 +22,9 @@
// ---------------------------------------------------------------------------
// Includes for all the program files to see
// ---------------------------------------------------------------------------
-#include <string.h>
-#if defined(XERCES_NEW_IOSTREAMS)
+#include <cstring>
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-#include <stdlib.h>
+#include <cstdlib>
#include "SAXPrintHandlers.hpp"
@@ -71,7 +67,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/SAXPrint/SAXPrintHandlers.cpp b/samples/src/SAXPrint/SAXPrintHandlers.cpp
index ff6652f..e208179 100644
--- a/samples/src/SAXPrint/SAXPrintHandlers.cpp
+++ b/samples/src/SAXPrint/SAXPrintHandlers.cpp
@@ -103,8 +103,8 @@
// Without the cast, it was printing the pointer value in hex.
// Quite annoying, considering every other platform printed
// the string with the explicit cast to char* below.
- XERCES_STD_QUALIFIER cout.write((char *) toWrite, (int) count);
- XERCES_STD_QUALIFIER cout.flush();
+ std::cout.write((char *) toWrite, (int) count);
+ std::cout.flush();
}
@@ -113,26 +113,26 @@
// ---------------------------------------------------------------------------
void SAXPrintHandlers::error(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
+ std::cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAXPrintHandlers::fatalError(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SAXPrintHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
diff --git a/samples/src/SAXPrint/SAXPrintHandlers.hpp b/samples/src/SAXPrint/SAXPrintHandlers.hpp
index 7432186..ce9f251 100644
--- a/samples/src/SAXPrint/SAXPrintHandlers.hpp
+++ b/samples/src/SAXPrint/SAXPrintHandlers.hpp
@@ -23,7 +23,7 @@
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/framework/XMLFormatter.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
class SAXPrintHandlers : public HandlerBase, private XMLFormatTarget
{
diff --git a/samples/src/SCMPrint/SCMPrint.cpp b/samples/src/SCMPrint/SCMPrint.cpp
index 4e13e99..25b7d84 100644
--- a/samples/src/SCMPrint/SCMPrint.cpp
+++ b/samples/src/SCMPrint/SCMPrint.cpp
@@ -33,19 +33,14 @@
#include <xercesc/framework/psvi/XSComplexTypeDefinition.hpp>
#include <xercesc/framework/psvi/XSParticle.hpp>
#include <xercesc/framework/psvi/XSModelGroup.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
#include <fstream>
-#else
-#include <iostream.h>
-#include <fstream.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
// ---------------------------------------------------------------------------
// Forward references
@@ -100,7 +95,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
@@ -145,27 +140,27 @@
void SCMPrintHandler::error(const SAXParseException& e)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
+ std::cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SCMPrintHandler::fatalError(const SAXParseException& e)
{
fSawErrors = true;
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SCMPrintHandler::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(e.getMessage()) << std::endl;
}
void SCMPrintHandler::resetErrors()
@@ -178,7 +173,7 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" SCMPrint [options] <XSD file | List file>\n\n"
"This program parses XML Schema file(s), to show how one can\n"
"access the Schema Content Model information.\n\n"
@@ -187,7 +182,7 @@
" -l Indicate the input file is a List File that has a list of XSD files.\n"
" Default to off (Input file is a XSD file).\n"
" -? Show this help.\n\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
// ---------------------------------------------------------------------------
@@ -212,8 +207,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
errorCode = 2;
}
if(errorCode) {
@@ -250,8 +245,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[argInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[argInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -286,14 +281,14 @@
bool more = true;
bool parsedOneSchemaOkay = false;
- XERCES_STD_QUALIFIER ifstream fin;
+ std::ifstream fin;
// the input is a list file
if (doList)
fin.open(argV[argInd]);
if (fin.fail()) {
- XERCES_STD_QUALIFIER cerr <<"Cannot open the list file: " << argV[argInd] << XERCES_STD_QUALIFIER endl;
+ std::cerr <<"Cannot open the list file: " << argV[argInd] << std::endl;
return 3;
}
@@ -310,7 +305,7 @@
continue;
else {
xsdFile = fURI;
- XERCES_STD_QUALIFIER cerr << "==Parsing== " << xsdFile << XERCES_STD_QUALIFIER endl;
+ std::cerr << "==Parsing== " << xsdFile << std::endl;
}
}
else
@@ -334,7 +329,7 @@
if (parsedOneSchemaOkay)
{
- XERCES_STD_QUALIFIER cout << "********** Printing out information from Schema **********" << "\n\n";
+ std::cout << "********** Printing out information from Schema **********" << "\n\n";
bool updatedXSModel;
XSModel *xsModel = grammarPool->getXSModel(updatedXSModel);
if (xsModel)
@@ -342,11 +337,11 @@
StringList *namespaces = xsModel->getNamespaces();
for (unsigned i = 0; i < namespaces->size(); i++) {
- XERCES_STD_QUALIFIER cout << "Processing Namespace: ";
+ std::cout << "Processing Namespace: ";
const XMLCh *nameSpace = namespaces->elementAt(i);
if (nameSpace && *nameSpace)
- XERCES_STD_QUALIFIER cout << StrX(nameSpace);
- XERCES_STD_QUALIFIER cout << "\n============================================" << XERCES_STD_QUALIFIER endl << XERCES_STD_QUALIFIER endl;
+ std::cout << StrX(nameSpace);
+ std::cout << "\n============================================" << std::endl << std::endl;
processElements(xsModel->getComponentsByNamespace(XSConstants::ELEMENT_DECLARATION,
nameSpace));
@@ -356,31 +351,31 @@
}
else
{
- XERCES_STD_QUALIFIER cout << "No XSModel to print" << "\n\n";
+ std::cout << "No XSModel to print" << "\n\n";
}
}
else
{
- XERCES_STD_QUALIFIER cout << "Did not parse a schema document cleanly so not printing Schema for Schema XSModel information";
+ std::cout << "Did not parse a schema document cleanly so not printing Schema for Schema XSModel information";
}
- XERCES_STD_QUALIFIER cout << XERCES_STD_QUALIFIER endl;
+ std::cout << std::endl;
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException during parsing: '" << xsdFile << "'\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException during parsing: '" << xsdFile << "'\n" << std::endl;
errorCode = 6;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << xsdFile << "'\n"
+ std::cerr << "\nError during parsing: '" << xsdFile << "'\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << std::endl;
errorCode = 4;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "\nUnexpected exception during parsing: '" << xsdFile << "'\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "\nUnexpected exception during parsing: '" << xsdFile << "'\n" << std::endl;
errorCode = 5;
}
@@ -393,19 +388,19 @@
void printBasic(XSObject *xsObject, const char *type)
{
- XERCES_STD_QUALIFIER cout << "Name:\t\t\t";
+ std::cout << "Name:\t\t\t";
const XMLCh *nameSpace = xsObject->getNamespace();
if (nameSpace && *nameSpace) {
- XERCES_STD_QUALIFIER cout << StrX(nameSpace) << ", ";
+ std::cout << StrX(nameSpace) << ", ";
}
- XERCES_STD_QUALIFIER cout << StrX(xsObject->getName()) << "\n";
- XERCES_STD_QUALIFIER cout << "Component Type:\t" << type << XERCES_STD_QUALIFIER endl;
+ std::cout << StrX(xsObject->getName()) << "\n";
+ std::cout << "Component Type:\t" << type << std::endl;
}
void processElements(XSNamedMap<XSObject> *xsElements)
{
if (!xsElements || xsElements->getLength() == 0) {
- XERCES_STD_QUALIFIER cout << "no elements\n\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "no elements\n\n" << std::endl;
return;
}
for (XMLSize_t i=0; i < xsElements->getLength(); i++) {
@@ -414,68 +409,68 @@
// Content Model
XSTypeDefinition *xsTypeDef = xsElement->getTypeDefinition();
- XERCES_STD_QUALIFIER cout << "Content Model" << "\n";
- XERCES_STD_QUALIFIER cout << "\tType:\t";
+ std::cout << "Content Model" << "\n";
+ std::cout << "\tType:\t";
if (xsTypeDef->getTypeCategory() == XSTypeDefinition::SIMPLE_TYPE) {
- XERCES_STD_QUALIFIER cout << "Simple\n";
+ std::cout << "Simple\n";
} else {
- XERCES_STD_QUALIFIER cout << "Complex\n";
+ std::cout << "Complex\n";
}
- XERCES_STD_QUALIFIER cout << "\tName:\t"
+ std::cout << "\tName:\t"
<< StrX(xsTypeDef->getName()) << "\n";
- XERCES_STD_QUALIFIER cout << "\n--------------------------------------------" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\n--------------------------------------------" << std::endl;
}
}
void processSimpleTypeDefinition(XSSimpleTypeDefinition * xsSimpleTypeDef)
{
XSTypeDefinition *xsBaseTypeDef = xsSimpleTypeDef->getBaseType();
- XERCES_STD_QUALIFIER cout << "Base:\t\t\t";
- XERCES_STD_QUALIFIER cout << StrX(xsBaseTypeDef->getName()) << XERCES_STD_QUALIFIER endl;
+ std::cout << "Base:\t\t\t";
+ std::cout << StrX(xsBaseTypeDef->getName()) << std::endl;
int facets = xsSimpleTypeDef->getDefinedFacets();
if (facets) {
- XERCES_STD_QUALIFIER cout << "Facets:\n";
+ std::cout << "Facets:\n";
if (facets & XSSimpleTypeDefinition::FACET_LENGTH)
- XERCES_STD_QUALIFIER cout << "\tLength:\t\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_LENGTH)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tLength:\t\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_LENGTH)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_MINLENGTH)
- XERCES_STD_QUALIFIER cout << "\tMinLength:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MINLENGTH)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tMinLength:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MINLENGTH)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_MAXLENGTH)
- XERCES_STD_QUALIFIER cout << "\tMaxLength:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MAXLENGTH)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tMaxLength:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MAXLENGTH)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_PATTERN) {
StringList *lexicalPatterns = xsSimpleTypeDef->getLexicalPattern();
if (lexicalPatterns && lexicalPatterns->size()) {
- XERCES_STD_QUALIFIER cout << "\tPattern:\t\t";
+ std::cout << "\tPattern:\t\t";
for (unsigned i = 0; i < lexicalPatterns->size(); i++) {
- XERCES_STD_QUALIFIER cout << StrX(lexicalPatterns->elementAt(i));
+ std::cout << StrX(lexicalPatterns->elementAt(i));
}
- XERCES_STD_QUALIFIER cout << XERCES_STD_QUALIFIER endl;
+ std::cout << std::endl;
}
}
if (facets & XSSimpleTypeDefinition::FACET_WHITESPACE)
- XERCES_STD_QUALIFIER cout << "\tWhitespace:\t\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_WHITESPACE)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tWhitespace:\t\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_WHITESPACE)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_MAXINCLUSIVE)
- XERCES_STD_QUALIFIER cout << "\tMaxInclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MAXINCLUSIVE)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tMaxInclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MAXINCLUSIVE)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_MAXEXCLUSIVE)
- XERCES_STD_QUALIFIER cout << "\tMaxExclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MAXEXCLUSIVE)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tMaxExclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MAXEXCLUSIVE)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_MINEXCLUSIVE)
- XERCES_STD_QUALIFIER cout << "\tMinExclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MINEXCLUSIVE)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tMinExclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MINEXCLUSIVE)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_MININCLUSIVE)
- XERCES_STD_QUALIFIER cout << "\tMinInclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MININCLUSIVE)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tMinInclusive:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_MININCLUSIVE)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_TOTALDIGITS)
- XERCES_STD_QUALIFIER cout << "\tTotalDigits:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_TOTALDIGITS)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tTotalDigits:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_TOTALDIGITS)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_FRACTIONDIGITS)
- XERCES_STD_QUALIFIER cout << "\tFractionDigits:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_FRACTIONDIGITS)) << XERCES_STD_QUALIFIER endl;
+ std::cout << "\tFractionDigits:\t" << StrX(xsSimpleTypeDef->getLexicalFacetValue(XSSimpleTypeDefinition::FACET_FRACTIONDIGITS)) << std::endl;
if (facets & XSSimpleTypeDefinition::FACET_ENUMERATION) {
StringList *lexicalEnums = xsSimpleTypeDef->getLexicalEnumeration();
if (lexicalEnums && lexicalEnums->size()) {
- XERCES_STD_QUALIFIER cout << "\tEnumeration:\n";
+ std::cout << "\tEnumeration:\n";
for (unsigned i = 0; i < lexicalEnums->size(); i++) {
- XERCES_STD_QUALIFIER cout << "\t\t\t" << StrX(lexicalEnums->elementAt(i)) << "\n";
+ std::cout << "\t\t\t" << StrX(lexicalEnums->elementAt(i)) << "\n";
}
- XERCES_STD_QUALIFIER cout << XERCES_STD_QUALIFIER endl;
+ std::cout << std::endl;
}
}
}
@@ -485,13 +480,13 @@
{
switch (type) {
case XSModelGroup::COMPOSITOR_SEQUENCE :
- XERCES_STD_QUALIFIER cout << ",";
+ std::cout << ",";
break;
case XSModelGroup::COMPOSITOR_CHOICE :
- XERCES_STD_QUALIFIER cout << "|";
+ std::cout << "|";
break;
case XSModelGroup::COMPOSITOR_ALL :
- XERCES_STD_QUALIFIER cout << "*";
+ std::cout << "*";
break;
}
}
@@ -499,15 +494,15 @@
void processParticle(XSParticle *xsParticle)
{
if (!xsParticle) {
- XERCES_STD_QUALIFIER cout << "xsParticle is NULL";
+ std::cout << "xsParticle is NULL";
return;
}
XSParticle::TERM_TYPE termType = xsParticle->getTermType();
if (termType == XSParticle::TERM_ELEMENT) {
XSElementDeclaration *xsElement = xsParticle->getElementTerm();
- XERCES_STD_QUALIFIER cout << StrX(xsElement->getName());
+ std::cout << StrX(xsElement->getName());
} else if (termType == XSParticle::TERM_MODELGROUP) {
- XERCES_STD_QUALIFIER cout << "(";
+ std::cout << "(";
XSModelGroup *xsModelGroup = xsParticle->getModelGroupTerm();
XSModelGroup::COMPOSITOR_TYPE compositorType = xsModelGroup->getCompositor();
@@ -518,9 +513,9 @@
}
processParticle(xsParticleList->elementAt(xsParticleList->size()-1));
- XERCES_STD_QUALIFIER cout << ")";
+ std::cout << ")";
} else if (termType == XSParticle::TERM_WILDCARD) {
- XERCES_STD_QUALIFIER cout << "* (wildcard)";
+ std::cout << "* (wildcard)";
}
}
@@ -528,16 +523,16 @@
{
XSTypeDefinition *xsBaseTypeDef = xsComplexTypeDef->getBaseType();
if (xsBaseTypeDef) {
- XERCES_STD_QUALIFIER cout << "Base:\t\t\t";
- XERCES_STD_QUALIFIER cout << StrX(xsBaseTypeDef->getName()) << "\n";
+ std::cout << "Base:\t\t\t";
+ std::cout << StrX(xsBaseTypeDef->getName()) << "\n";
}
- XERCES_STD_QUALIFIER cout << "Content Model:\t";
+ std::cout << "Content Model:\t";
XSComplexTypeDefinition::CONTENT_TYPE contentType = xsComplexTypeDef->getContentType();
if (contentType == XSComplexTypeDefinition::CONTENTTYPE_ELEMENT ||
contentType == XSComplexTypeDefinition::CONTENTTYPE_MIXED) {
processParticle(xsComplexTypeDef->getParticle());
- XERCES_STD_QUALIFIER cout << XERCES_STD_QUALIFIER endl;
+ std::cout << std::endl;
}
}
@@ -551,15 +546,15 @@
printBasic(xsTypeDef, "Type Definition");
// Content Model
- XERCES_STD_QUALIFIER cout << "Category:\t";
+ std::cout << "Category:\t";
if (xsTypeDef->getTypeCategory() == XSTypeDefinition::SIMPLE_TYPE) {
- XERCES_STD_QUALIFIER cout << "\tSimple\n";
+ std::cout << "\tSimple\n";
processSimpleTypeDefinition((XSSimpleTypeDefinition *)xsTypeDef);
} else {
- XERCES_STD_QUALIFIER cout << "\tComplex\n";
+ std::cout << "\tComplex\n";
processComplexTypeDefinition((XSComplexTypeDefinition *)xsTypeDef);
}
- XERCES_STD_QUALIFIER cout << "\n--------------------------------------------" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\n--------------------------------------------" << std::endl;
}
}
diff --git a/samples/src/SEnumVal/SEnumVal.cpp b/samples/src/SEnumVal/SEnumVal.cpp
index 3ce46f9..971c9f5 100644
--- a/samples/src/SEnumVal/SEnumVal.cpp
+++ b/samples/src/SEnumVal/SEnumVal.cpp
@@ -30,16 +30,12 @@
#include <xercesc/validators/schema/SchemaSymbols.hpp>
#include <xercesc/validators/common/ContentSpecNode.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
// ---------------------------------------------------------------------------
// Forward references
@@ -93,7 +89,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
@@ -104,12 +100,12 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" SEnumVal <XML file>\n\n"
"This program parses a file, then shows how to enumerate the\n"
"contents of the Schema Grammar. Essentially, shows how one can\n"
"access the Schema information stored in internal data structures.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
// ---------------------------------------------------------------------------
@@ -128,8 +124,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
errorCode = 1;
}
if(errorCode) {
@@ -153,14 +149,14 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCode = 5;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << argV[1] << "'\n"
+ std::cerr << "\nError during parsing: '" << argV[1] << "'\n"
<< "Exception message is: \n"
- << StrX(e.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(e.getMessage()) << "\n" << std::endl;
errorCode = 3;
}
@@ -186,20 +182,20 @@
if (parser.getErrorCount())
{
- XERCES_STD_QUALIFIER cout << "\nErrors occurred, no output available\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\nErrors occurred, no output available\n" << std::endl;
return;
}
if (!parser.getValidator().handlesSchema())
{
- XERCES_STD_QUALIFIER cout << "\n Non schema document, no output available\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\n Non schema document, no output available\n" << std::endl;
return;
}
Grammar* rootGrammar = parser.getRootGrammar();
if (!rootGrammar || rootGrammar->getGrammarType() != Grammar::SchemaGrammarType)
{
- XERCES_STD_QUALIFIER cout << "\n Non schema grammar, no output available\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\n Non schema grammar, no output available\n" << std::endl;
return;
}
@@ -214,7 +210,7 @@
if (!elemEnum.hasMoreElements())
{
- XERCES_STD_QUALIFIER cout << "\nThe validator has no elements to display\n" << XERCES_STD_QUALIFIER endl;
+ std::cout << "\nThe validator has no elements to display\n" << std::endl;
return;
}
@@ -223,40 +219,40 @@
const SchemaElementDecl& curElem = elemEnum.nextElement();
// Name
- XERCES_STD_QUALIFIER cout << "Name:\t\t\t" << StrX(curElem.getFullName()) << "\n";
+ std::cout << "Name:\t\t\t" << StrX(curElem.getFullName()) << "\n";
// Model Type
- XERCES_STD_QUALIFIER cout << "Model Type:\t\t";
+ std::cout << "Model Type:\t\t";
switch( curElem.getModelType() )
{
- case SchemaElementDecl::Empty: XERCES_STD_QUALIFIER cout << "Empty"; break;
- case SchemaElementDecl::Any: XERCES_STD_QUALIFIER cout << "Any"; break;
- case SchemaElementDecl::Mixed_Simple: XERCES_STD_QUALIFIER cout << "Mixed_Simple"; break;
- case SchemaElementDecl::Mixed_Complex: XERCES_STD_QUALIFIER cout << "Mixed_Complex"; break;
- case SchemaElementDecl::Children: XERCES_STD_QUALIFIER cout << "Children"; break;
- case SchemaElementDecl::Simple: XERCES_STD_QUALIFIER cout << "Simple"; break;
- case SchemaElementDecl::ElementOnlyEmpty: XERCES_STD_QUALIFIER cout << "ElementOnlyEmpty"; break;
+ case SchemaElementDecl::Empty: std::cout << "Empty"; break;
+ case SchemaElementDecl::Any: std::cout << "Any"; break;
+ case SchemaElementDecl::Mixed_Simple: std::cout << "Mixed_Simple"; break;
+ case SchemaElementDecl::Mixed_Complex: std::cout << "Mixed_Complex"; break;
+ case SchemaElementDecl::Children: std::cout << "Children"; break;
+ case SchemaElementDecl::Simple: std::cout << "Simple"; break;
+ case SchemaElementDecl::ElementOnlyEmpty: std::cout << "ElementOnlyEmpty"; break;
- default: XERCES_STD_QUALIFIER cout << "Unknown"; break;
+ default: std::cout << "Unknown"; break;
}
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\n";
// Create Reason
- XERCES_STD_QUALIFIER cout << "Create Reason:\t";
+ std::cout << "Create Reason:\t";
switch( curElem.getCreateReason() )
{
- case XMLElementDecl::NoReason: XERCES_STD_QUALIFIER cout << "Empty"; break;
- case XMLElementDecl::Declared: XERCES_STD_QUALIFIER cout << "Declared"; break;
- case XMLElementDecl::AttList: XERCES_STD_QUALIFIER cout << "AttList"; break;
- case XMLElementDecl::InContentModel: XERCES_STD_QUALIFIER cout << "InContentModel"; break;
- case XMLElementDecl::AsRootElem: XERCES_STD_QUALIFIER cout << "AsRootElem"; break;
- case XMLElementDecl::JustFaultIn: XERCES_STD_QUALIFIER cout << "JustFaultIn"; break;
+ case XMLElementDecl::NoReason: std::cout << "Empty"; break;
+ case XMLElementDecl::Declared: std::cout << "Declared"; break;
+ case XMLElementDecl::AttList: std::cout << "AttList"; break;
+ case XMLElementDecl::InContentModel: std::cout << "InContentModel"; break;
+ case XMLElementDecl::AsRootElem: std::cout << "AsRootElem"; break;
+ case XMLElementDecl::JustFaultIn: std::cout << "JustFaultIn"; break;
- default: XERCES_STD_QUALIFIER cout << "Unknown"; break;
+ default: std::cout << "Unknown"; break;
}
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\n";
// Content Spec Node
processContentSpecNode( curElem.getContentSpec() );
@@ -265,21 +261,21 @@
int mflags = curElem.getMiscFlags();
if( mflags !=0 )
{
- XERCES_STD_QUALIFIER cout << "Misc. Flags:\t";
+ std::cout << "Misc. Flags:\t";
}
if ( mflags & SchemaSymbols::XSD_NILLABLE )
- XERCES_STD_QUALIFIER cout << "Nillable ";
+ std::cout << "Nillable ";
if ( mflags & SchemaSymbols::XSD_ABSTRACT )
- XERCES_STD_QUALIFIER cout << "Abstract ";
+ std::cout << "Abstract ";
if ( mflags & SchemaSymbols::XSD_FIXED )
- XERCES_STD_QUALIFIER cout << "Fixed ";
+ std::cout << "Fixed ";
if( mflags !=0 )
{
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\n";
}
// Substitution Name
@@ -287,7 +283,7 @@
if( subsGroup )
{
const XMLCh* uriText = parser.getURIText(subsGroup->getURI());
- XERCES_STD_QUALIFIER cout << "Substitution Name:\t" << StrX(uriText)
+ std::cout << "Substitution Name:\t" << StrX(uriText)
<< "," << StrX(subsGroup->getBaseName()) << "\n";
}
@@ -295,14 +291,14 @@
const XMLCh* fmtCntModel = curElem.getFormattedContentModel();
if( fmtCntModel != NULL )
{
- XERCES_STD_QUALIFIER cout << "Content Model:\t" << StrX(fmtCntModel) << "\n";
+ std::cout << "Content Model:\t" << StrX(fmtCntModel) << "\n";
}
const ComplexTypeInfo* ctype = curElem.getComplexTypeInfo();
if( ctype != NULL)
{
- XERCES_STD_QUALIFIER cout << "ComplexType:\n";
- XERCES_STD_QUALIFIER cout << "\tTypeName:\t" << StrX(ctype->getTypeName()) << "\n";
+ std::cout << "ComplexType:\n";
+ std::cout << "\tTypeName:\t" << StrX(ctype->getTypeName()) << "\n";
ContentSpecNode* cSpecNode = ctype->getContentSpec();
processContentSpecNode(cSpecNode, true );
@@ -318,8 +314,8 @@
processAttributes( curElem.getAttDefList() );
}
- XERCES_STD_QUALIFIER cout << "--------------------------------------------";
- XERCES_STD_QUALIFIER cout << XERCES_STD_QUALIFIER endl;
+ std::cout << "--------------------------------------------";
+ std::cout << std::endl;
}
@@ -339,46 +335,46 @@
if ( margin )
{
- XERCES_STD_QUALIFIER cout << "\t";
+ std::cout << "\t";
}
- XERCES_STD_QUALIFIER cout << "Attributes:\n";
+ std::cout << "Attributes:\n";
for (unsigned int i=0; i<attList.getAttDefCount(); i++)
{
// Name
SchemaAttDef& curAttDef = (SchemaAttDef&)attList.getAttDef(i);
- XERCES_STD_QUALIFIER cout << "\tName:\t\t\t" << StrX(curAttDef.getFullName()) << "\n";
+ std::cout << "\tName:\t\t\t" << StrX(curAttDef.getFullName()) << "\n";
// Type
- XERCES_STD_QUALIFIER cout << "\tType:\t\t\t";
- XERCES_STD_QUALIFIER cout << StrX(XMLAttDef::getAttTypeString(curAttDef.getType()));
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\tType:\t\t\t";
+ std::cout << StrX(XMLAttDef::getAttTypeString(curAttDef.getType()));
+ std::cout << "\n";
// Default Type
- XERCES_STD_QUALIFIER cout << "\tDefault Type:\t";
- XERCES_STD_QUALIFIER cout << StrX(XMLAttDef::getDefAttTypeString(curAttDef.getDefaultType()));
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\tDefault Type:\t";
+ std::cout << StrX(XMLAttDef::getDefAttTypeString(curAttDef.getDefaultType()));
+ std::cout << "\n";
// Value
if( curAttDef.getValue() )
{
- XERCES_STD_QUALIFIER cout << "\tValue:\t\t\t";
- XERCES_STD_QUALIFIER cout << StrX(curAttDef.getValue());
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\tValue:\t\t\t";
+ std::cout << StrX(curAttDef.getValue());
+ std::cout << "\n";
}
// Enum. values
if( curAttDef.getEnumeration() )
{
- XERCES_STD_QUALIFIER cout << "\tEnumeration:\t";
- XERCES_STD_QUALIFIER cout << StrX(curAttDef.getEnumeration());
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\tEnumeration:\t";
+ std::cout << StrX(curAttDef.getEnumeration());
+ std::cout << "\n";
}
const DatatypeValidator* dv = curAttDef.getDatatypeValidator();
processDatatypeValidator( dv, true );
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\n";
}
}
@@ -391,43 +387,43 @@
if( margin )
{
- XERCES_STD_QUALIFIER cout << "\t";
+ std::cout << "\t";
}
- XERCES_STD_QUALIFIER cout << "Base Datatype:\t\t";
+ std::cout << "Base Datatype:\t\t";
switch( dtValidator->getType() )
{
- case DatatypeValidator::String: XERCES_STD_QUALIFIER cout << "string"; break;
- case DatatypeValidator::AnyURI: XERCES_STD_QUALIFIER cout << "AnyURI"; break;
- case DatatypeValidator::QName: XERCES_STD_QUALIFIER cout << "QName"; break;
- case DatatypeValidator::Name: XERCES_STD_QUALIFIER cout << "Name"; break;
- case DatatypeValidator::NCName: XERCES_STD_QUALIFIER cout << "NCName"; break;
- case DatatypeValidator::Boolean: XERCES_STD_QUALIFIER cout << "Boolean"; break;
- case DatatypeValidator::Float: XERCES_STD_QUALIFIER cout << "Float"; break;
- case DatatypeValidator::Double: XERCES_STD_QUALIFIER cout << "Double"; break;
- case DatatypeValidator::Decimal: XERCES_STD_QUALIFIER cout << "Decimal"; break;
- case DatatypeValidator::HexBinary: XERCES_STD_QUALIFIER cout << "HexBinary"; break;
- case DatatypeValidator::Base64Binary: XERCES_STD_QUALIFIER cout << "Base64Binary";break;
- case DatatypeValidator::Duration: XERCES_STD_QUALIFIER cout << "Duration"; break;
- case DatatypeValidator::DateTime: XERCES_STD_QUALIFIER cout << "DateTime"; break;
- case DatatypeValidator::Date: XERCES_STD_QUALIFIER cout << "Date"; break;
- case DatatypeValidator::Time: XERCES_STD_QUALIFIER cout << "Time"; break;
- case DatatypeValidator::MonthDay: XERCES_STD_QUALIFIER cout << "MonthDay"; break;
- case DatatypeValidator::YearMonth: XERCES_STD_QUALIFIER cout << "YearMonth"; break;
- case DatatypeValidator::Year: XERCES_STD_QUALIFIER cout << "Year"; break;
- case DatatypeValidator::Month: XERCES_STD_QUALIFIER cout << "Month"; break;
- case DatatypeValidator::Day: XERCES_STD_QUALIFIER cout << "Day"; break;
- case DatatypeValidator::ID: XERCES_STD_QUALIFIER cout << "ID"; break;
- case DatatypeValidator::IDREF: XERCES_STD_QUALIFIER cout << "IDREF"; break;
- case DatatypeValidator::ENTITY: XERCES_STD_QUALIFIER cout << "ENTITY"; break;
- case DatatypeValidator::NOTATION: XERCES_STD_QUALIFIER cout << "NOTATION"; break;
- case DatatypeValidator::List: XERCES_STD_QUALIFIER cout << "List"; break;
- case DatatypeValidator::Union: XERCES_STD_QUALIFIER cout << "Union"; break;
- case DatatypeValidator::AnySimpleType: XERCES_STD_QUALIFIER cout << "AnySimpleType"; break;
- case DatatypeValidator::UnKnown: XERCES_STD_QUALIFIER cout << "UNKNOWN"; break;
+ case DatatypeValidator::String: std::cout << "string"; break;
+ case DatatypeValidator::AnyURI: std::cout << "AnyURI"; break;
+ case DatatypeValidator::QName: std::cout << "QName"; break;
+ case DatatypeValidator::Name: std::cout << "Name"; break;
+ case DatatypeValidator::NCName: std::cout << "NCName"; break;
+ case DatatypeValidator::Boolean: std::cout << "Boolean"; break;
+ case DatatypeValidator::Float: std::cout << "Float"; break;
+ case DatatypeValidator::Double: std::cout << "Double"; break;
+ case DatatypeValidator::Decimal: std::cout << "Decimal"; break;
+ case DatatypeValidator::HexBinary: std::cout << "HexBinary"; break;
+ case DatatypeValidator::Base64Binary: std::cout << "Base64Binary";break;
+ case DatatypeValidator::Duration: std::cout << "Duration"; break;
+ case DatatypeValidator::DateTime: std::cout << "DateTime"; break;
+ case DatatypeValidator::Date: std::cout << "Date"; break;
+ case DatatypeValidator::Time: std::cout << "Time"; break;
+ case DatatypeValidator::MonthDay: std::cout << "MonthDay"; break;
+ case DatatypeValidator::YearMonth: std::cout << "YearMonth"; break;
+ case DatatypeValidator::Year: std::cout << "Year"; break;
+ case DatatypeValidator::Month: std::cout << "Month"; break;
+ case DatatypeValidator::Day: std::cout << "Day"; break;
+ case DatatypeValidator::ID: std::cout << "ID"; break;
+ case DatatypeValidator::IDREF: std::cout << "IDREF"; break;
+ case DatatypeValidator::ENTITY: std::cout << "ENTITY"; break;
+ case DatatypeValidator::NOTATION: std::cout << "NOTATION"; break;
+ case DatatypeValidator::List: std::cout << "List"; break;
+ case DatatypeValidator::Union: std::cout << "Union"; break;
+ case DatatypeValidator::AnySimpleType: std::cout << "AnySimpleType"; break;
+ case DatatypeValidator::UnKnown: std::cout << "UNKNOWN"; break;
}
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\n";
// Facets
RefHashTableOf<KVStringPair>* facets = dtValidator->getFacets();
@@ -435,7 +431,7 @@
{
XMLSize_t i;
// Element's properties
- XERCES_STD_QUALIFIER cout << "Facets:\t\t\n";
+ std::cout << "Facets:\t\t\n";
// use a list to print them sorted, or the list could be different on 64-bit machines
RefVectorOf<XMLCh> sortedList(facets->getCount(), false);
RefHashTableOfEnumerator<KVStringPair> enumFacets(facets);
@@ -458,7 +454,7 @@
for(i=0;i<len;i++)
{
const XMLCh* key = sortedList.elementAt(i);
- XERCES_STD_QUALIFIER cout << "\t" << StrX( key ) << "="
+ std::cout << "\t" << StrX( key ) << "="
<< StrX( facets->get(key)->getValue() ) << "\n";
}
}
@@ -467,12 +463,12 @@
RefVectorOf<XMLCh>* enums = (RefVectorOf<XMLCh>*) dtValidator->getEnumString();
if (enums)
{
- XERCES_STD_QUALIFIER cout << "Enumeration:\t\t\n";
+ std::cout << "Enumeration:\t\t\n";
XMLSize_t enumLength = enums->size();
for ( XMLSize_t i = 0; i < enumLength; i++)
{
- XERCES_STD_QUALIFIER cout << "\t" << StrX( enums->elementAt(i)) << "\n";
+ std::cout << "\t" << StrX( enums->elementAt(i)) << "\n";
}
}
@@ -487,34 +483,34 @@
if( margin )
{
- XERCES_STD_QUALIFIER cout << "\t";
+ std::cout << "\t";
}
- XERCES_STD_QUALIFIER cout << "ContentType:\t";
+ std::cout << "ContentType:\t";
switch( cSpecNode->getType() )
{
- case ContentSpecNode::Leaf: XERCES_STD_QUALIFIER cout << "Leaf"; break;
- case ContentSpecNode::ZeroOrOne: XERCES_STD_QUALIFIER cout << "ZeroOrOne"; break;
- case ContentSpecNode::ZeroOrMore: XERCES_STD_QUALIFIER cout << "ZeroOrMore"; break;
- case ContentSpecNode::OneOrMore: XERCES_STD_QUALIFIER cout << "OneOrMore"; break;
+ case ContentSpecNode::Leaf: std::cout << "Leaf"; break;
+ case ContentSpecNode::ZeroOrOne: std::cout << "ZeroOrOne"; break;
+ case ContentSpecNode::ZeroOrMore: std::cout << "ZeroOrMore"; break;
+ case ContentSpecNode::OneOrMore: std::cout << "OneOrMore"; break;
case ContentSpecNode::ModelGroupChoice:
- case ContentSpecNode::Choice: XERCES_STD_QUALIFIER cout << "Choice"; break;
+ case ContentSpecNode::Choice: std::cout << "Choice"; break;
case ContentSpecNode::ModelGroupSequence:
- case ContentSpecNode::Sequence: XERCES_STD_QUALIFIER cout << "Sequence"; break;
- case ContentSpecNode::All: XERCES_STD_QUALIFIER cout << "All"; break;
- case ContentSpecNode::Loop: XERCES_STD_QUALIFIER cout << "Loop"; break;
- case ContentSpecNode::Any: XERCES_STD_QUALIFIER cout << "Any"; break;
- case ContentSpecNode::Any_Other: XERCES_STD_QUALIFIER cout << "Any_Other"; break;
- case ContentSpecNode::Any_NS: XERCES_STD_QUALIFIER cout << "Any_NS"; break;
- case ContentSpecNode::Any_Lax: XERCES_STD_QUALIFIER cout << "Any_Lax"; break;
- case ContentSpecNode::Any_Other_Lax: XERCES_STD_QUALIFIER cout << "Any_Other_Lax"; break;
- case ContentSpecNode::Any_NS_Lax: XERCES_STD_QUALIFIER cout << "Any_NS_Lax"; break;
- case ContentSpecNode::Any_Skip: XERCES_STD_QUALIFIER cout << "Any_Skip"; break;
- case ContentSpecNode::Any_Other_Skip: XERCES_STD_QUALIFIER cout << "Any_Other_Skip"; break;
- case ContentSpecNode::Any_NS_Skip: XERCES_STD_QUALIFIER cout << "Any_NS_Skip"; break;
- case ContentSpecNode::Any_NS_Choice: XERCES_STD_QUALIFIER cout << "Any_NS_Choice"; break;
- case ContentSpecNode::UnknownType: XERCES_STD_QUALIFIER cout << "UnknownType"; break;
+ case ContentSpecNode::Sequence: std::cout << "Sequence"; break;
+ case ContentSpecNode::All: std::cout << "All"; break;
+ case ContentSpecNode::Loop: std::cout << "Loop"; break;
+ case ContentSpecNode::Any: std::cout << "Any"; break;
+ case ContentSpecNode::Any_Other: std::cout << "Any_Other"; break;
+ case ContentSpecNode::Any_NS: std::cout << "Any_NS"; break;
+ case ContentSpecNode::Any_Lax: std::cout << "Any_Lax"; break;
+ case ContentSpecNode::Any_Other_Lax: std::cout << "Any_Other_Lax"; break;
+ case ContentSpecNode::Any_NS_Lax: std::cout << "Any_NS_Lax"; break;
+ case ContentSpecNode::Any_Skip: std::cout << "Any_Skip"; break;
+ case ContentSpecNode::Any_Other_Skip: std::cout << "Any_Other_Skip"; break;
+ case ContentSpecNode::Any_NS_Skip: std::cout << "Any_NS_Skip"; break;
+ case ContentSpecNode::Any_NS_Choice: std::cout << "Any_NS_Choice"; break;
+ case ContentSpecNode::UnknownType: std::cout << "UnknownType"; break;
}
- XERCES_STD_QUALIFIER cout << "\n";
+ std::cout << "\n";
}
diff --git a/samples/src/StdInParse/StdInParse.cpp b/samples/src/StdInParse/StdInParse.cpp
index f685989..0b28356 100644
--- a/samples/src/StdInParse/StdInParse.cpp
+++ b/samples/src/StdInParse/StdInParse.cpp
@@ -59,7 +59,7 @@
// ---------------------------------------------------------------------------
void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" StdInParse [options] < <XML file>\n\n"
"This program demonstrates streaming XML data from standard\n"
"input. It then uses the SAX Parser, and prints the\n"
@@ -72,7 +72,7 @@
" -f Enable full schema constraint checking. Defaults to off.\n"
" -? Show this help.\n\n"
" * = Default if not provided explicitly.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
@@ -89,8 +89,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! Message:\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! Message:\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -121,7 +121,7 @@
valScheme = SAXParser::Val_Always;
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown -v= value: " << parm << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown -v= value: " << parm << std::endl;
XMLPlatformUtils::Terminate();
return 2;
}
@@ -143,8 +143,8 @@
}
else
{
- XERCES_STD_QUALIFIER cerr << "Unknown option '" << argV[parmInd]
- << "', ignoring it\n" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Unknown option '" << argV[parmInd]
+ << "', ignoring it\n" << std::endl;
}
}
@@ -190,26 +190,26 @@
}
catch (const OutOfMemoryException&)
{
- XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
+ std::cerr << "OutOfMemoryException" << std::endl;
errorCount = 2;
return 4;
}
catch (const XMLException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: \n"
+ std::cerr << "\nError during parsing: \n"
<< StrX(e.getMessage())
- << "\n" << XERCES_STD_QUALIFIER endl;
+ << "\n" << std::endl;
errorCount = 1;
return 4;
}
// Print out the stats that we collected and time taken
if (!errorCount) {
- XERCES_STD_QUALIFIER cout << StrX(src.getSystemId()) << ": " << duration << " ms ("
+ std::cout << StrX(src.getSystemId()) << ": " << duration << " ms ("
<< handler.getElementCount() << " elems, "
<< handler.getAttrCount() << " attrs, "
<< handler.getSpaceCount() << " spaces, "
- << handler.getCharacterCount() << " chars)" << XERCES_STD_QUALIFIER endl;
+ << handler.getCharacterCount() << " chars)" << std::endl;
}
}
diff --git a/samples/src/StdInParse/StdInParse.hpp b/samples/src/StdInParse/StdInParse.hpp
index 671807f..9ca6c01 100644
--- a/samples/src/StdInParse/StdInParse.hpp
+++ b/samples/src/StdInParse/StdInParse.hpp
@@ -23,13 +23,9 @@
// ---------------------------------------------------------------------------
// Includes for all the program files to see
// ---------------------------------------------------------------------------
-#include <string.h>
-#include <stdlib.h>
-#if defined(XERCES_NEW_IOSTREAMS)
+#include <cstring>
+#include <cstdlib>
#include <iostream>
-#else
-#include <iostream.h>
-#endif
#include <xercesc/util/PlatformUtils.hpp>
#include "StdInParseHandlers.hpp"
@@ -73,7 +69,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/samples/src/StdInParse/StdInParseHandlers.cpp b/samples/src/StdInParse/StdInParseHandlers.cpp
index 4736dfe..76c98ab 100644
--- a/samples/src/StdInParse/StdInParseHandlers.cpp
+++ b/samples/src/StdInParse/StdInParseHandlers.cpp
@@ -89,24 +89,24 @@
// ---------------------------------------------------------------------------
void StdInParseHandlers::error(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nError at (file " << StrX(e.getSystemId())
+ std::cerr << "\nError at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
void StdInParseHandlers::fatalError(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
+ std::cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
void StdInParseHandlers::warning(const SAXParseException& e)
{
- XERCES_STD_QUALIFIER cerr << "\nWarning at (file " << StrX(e.getSystemId())
+ std::cerr << "\nWarning at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
- << "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "): " << StrX(e.getMessage()) << std::endl;
}
diff --git a/samples/src/StdInParse/StdInParseHandlers.hpp b/samples/src/StdInParse/StdInParseHandlers.hpp
index 0a3ff06..8fa45cb 100644
--- a/samples/src/StdInParse/StdInParseHandlers.hpp
+++ b/samples/src/StdInParse/StdInParseHandlers.hpp
@@ -25,11 +25,11 @@
// ---------------------------------------------------------------------------
#include <xercesc/sax/HandlerBase.hpp>
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class AttributeList;
-XERCES_CPP_NAMESPACE_END
+}
class StdInParseHandlers : public HandlerBase
{
diff --git a/samples/src/XInclude/XInclude.cpp b/samples/src/XInclude/XInclude.cpp
index 14970c2..3451cbd 100644
--- a/samples/src/XInclude/XInclude.cpp
+++ b/samples/src/XInclude/XInclude.cpp
@@ -39,10 +39,10 @@
// ---------------------------------------------------------------------------
static void usage()
{
- XERCES_STD_QUALIFIER cout << "\nUsage:\n"
+ std::cout << "\nUsage:\n"
" XInclude [-h] InputFile OutputFile\n"
" -h : Prints this help message and exits.\n"
- << XERCES_STD_QUALIFIER endl;
+ << std::endl;
}
// ---------------------------------------------------------------------------
@@ -81,8 +81,8 @@
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "Error during initialization! :\n"
- << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Error during initialization! :\n"
+ << StrX(toCatch.getMessage()) << std::endl;
return 1;
}
@@ -110,37 +110,37 @@
XIncludeErrorHandler errorHandler;
config->setParameter(XMLUni::fgDOMErrorHandler, &errorHandler);
- XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = 0;
+ xercesc::DOMDocument *doc = 0;
try
{
// load up the test source document
- XERCES_STD_QUALIFIER cerr << "Parse " << testFileName << " in progress ...";
+ std::cerr << "Parse " << testFileName << " in progress ...";
parser->resetDocumentPool();
doc = parser->parseURI(testFileName);
- XERCES_STD_QUALIFIER cerr << " finished." << XERCES_STD_QUALIFIER endl;
+ std::cerr << " finished." << std::endl;
}
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "\nError during parsing: '" << testFileName << "'\n"
+ std::cerr << "\nError during parsing: '" << testFileName << "'\n"
<< "Exception message is: \n"
- << StrX(toCatch.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(toCatch.getMessage()) << "\n" << std::endl;
}
catch (const DOMException& toCatch)
{
const unsigned int maxChars = 2047;
XMLCh errText[maxChars + 1];
- XERCES_STD_QUALIFIER cerr << "\nDOM Error during parsing: '" << testFileName << "'\n"
- << "DOMException code is: " << toCatch.code << XERCES_STD_QUALIFIER endl;
+ std::cerr << "\nDOM Error during parsing: '" << testFileName << "'\n"
+ << "DOMException code is: " << toCatch.code << std::endl;
if (DOMImplementation::loadDOMExceptionMsg(toCatch.code, errText, maxChars))
- XERCES_STD_QUALIFIER cerr << "Message is: " << StrX(errText) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Message is: " << StrX(errText) << std::endl;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "\nUnexpected exception during parsing: '" << testFileName << "'\n";
+ std::cerr << "\nUnexpected exception during parsing: '" << testFileName << "'\n";
}
if (!errorHandler.getSawErrors() && doc) {
@@ -149,7 +149,7 @@
try {
// write out the results
- XERCES_STD_QUALIFIER cerr << "Writing result to: " << outputFileName << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Writing result to: " << outputFileName << std::endl;
XMLFormatTarget *myFormTarget = new LocalFileFormatTarget(outputFileName);
theOutputDesc->setByteStream(myFormTarget);
@@ -158,24 +158,24 @@
}
catch (const XMLException& toCatch)
{
- XERCES_STD_QUALIFIER cerr << "\nXMLException during writing: '" << testFileName << "'\n"
+ std::cerr << "\nXMLException during writing: '" << testFileName << "'\n"
<< "Exception message is: \n"
- << StrX(toCatch.getMessage()) << "\n" << XERCES_STD_QUALIFIER endl;
+ << StrX(toCatch.getMessage()) << "\n" << std::endl;
}
catch (const DOMException& toCatch)
{
const unsigned int maxChars = 2047;
XMLCh errText[maxChars + 1];
- XERCES_STD_QUALIFIER cerr << "\nDOM Error during writing: '" << testFileName << "'\n"
- << "DOMException code is: " << toCatch.code << XERCES_STD_QUALIFIER endl;
+ std::cerr << "\nDOM Error during writing: '" << testFileName << "'\n"
+ << "DOMException code is: " << toCatch.code << std::endl;
if (DOMImplementation::loadDOMExceptionMsg(toCatch.code, errText, maxChars))
- XERCES_STD_QUALIFIER cerr << "Message is: " << StrX(errText) << XERCES_STD_QUALIFIER endl;
+ std::cerr << "Message is: " << StrX(errText) << std::endl;
}
catch (...)
{
- XERCES_STD_QUALIFIER cerr << "\nUnexpected exception during writing: '" << testFileName << "'\n";
+ std::cerr << "\nUnexpected exception during writing: '" << testFileName << "'\n";
}
writer->release();
theOutputDesc->release();
@@ -208,22 +208,22 @@
{
bool continueParsing = true;
if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
- XERCES_STD_QUALIFIER cerr << "\nWarning at file ";
+ std::cerr << "\nWarning at file ";
else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
{
- XERCES_STD_QUALIFIER cerr << "\nError at file ";
+ std::cerr << "\nError at file ";
fSawErrors = true;
}
else {
- XERCES_STD_QUALIFIER cerr << "\nFatal Error at file ";
+ std::cerr << "\nFatal Error at file ";
continueParsing = false;
fSawErrors = true;
}
- XERCES_STD_QUALIFIER cerr << StrX(domError.getLocation()->getURI())
+ std::cerr << StrX(domError.getLocation()->getURI())
<< ", line " << domError.getLocation()->getLineNumber()
<< ", char " << domError.getLocation()->getColumnNumber()
- << "\n Message: " << StrX(domError.getMessage()) << XERCES_STD_QUALIFIER endl;
+ << "\n Message: " << StrX(domError.getMessage()) << std::endl;
return continueParsing;
}
diff --git a/samples/src/XInclude/XInclude.hpp b/samples/src/XInclude/XInclude.hpp
index 7791367..f9de09a 100644
--- a/samples/src/XInclude/XInclude.hpp
+++ b/samples/src/XInclude/XInclude.hpp
@@ -25,13 +25,9 @@
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/util/XMLString.hpp>
-#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
-#else
-#include <iostream.h>
-#endif
-XERCES_CPP_NAMESPACE_USE
+using namespace XERCES_CPP_NAMESPACE;
// ---------------------------------------------------------------------------
// Simple error handler deriviative to install on parser
@@ -119,7 +115,7 @@
char* fLocalForm;
};
-inline XERCES_STD_QUALIFIER ostream& operator<<(XERCES_STD_QUALIFIER ostream& target, const StrX& toDump)
+inline std::ostream& operator<<(std::ostream& target, const StrX& toDump)
{
target << toDump.localForm();
return target;
diff --git a/scripts/ci-appveyor-setup b/scripts/ci-appveyor-setup
index 984c07b..771fd9d 100755
--- a/scripts/ci-appveyor-setup
+++ b/scripts/ci-appveyor-setup
@@ -27,14 +27,9 @@
[ "$(sha512sum "$file")" = "$hash_output" ]
)
-icu_source=icu4c-60_2-src.zip
-icu_url="http://download.icu-project.org/files/icu4c/60.2/${icu_source}"
-icu_hash="63232d6c15f725a60c14465b0479995b488b51288517e522abebdf5996fac7f214c424520bdbedb4c0801ea85ea7ad35de13e00512a25c1399cb827b0aca4744"
-
-ninja_binary="ninja-win.zip"
-ninja_url="https://github.com/ninja-build/ninja/releases/download/v1.8.2/${ninja_binary}"
-ninja_hash="9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5"
-
+icu_source=icu4c-60_3-src.zip
+icu_url="https://github.com/unicode-org/icu/releases/download/release-60-3/${icu_source}"
+icu_hash="8b6b5d8f629c3daea9f8b4b368db8701915ffdc1c90fe79876dd39a9c13f30968af1371fc1dcd443a9a4e02754edbd96a3592c6e6affb6b895687a1a3f70b0f6"
if [ "$msgloader" = "icu" ] || [ "$transcoder" = icu ]; then
cd "$AV_XERCES_CYG_DOWNLOAD"
@@ -46,11 +41,3 @@
rm -rf icu
7z x "${AV_XERCES_DOWNLOAD}\\$icu_source"
fi
-
-if [ "$generator" = "Ninja" ]; then
- cd "$AV_XERCES_CYG_DOWNLOAD"
- download_file "$ninja_url" "$ninja_binary" "$ninja_hash"
- cd "$AV_XERCES_CYG_TOOLS"
- rm -f ninja
- 7z e "${AV_XERCES_DOWNLOAD}\\$ninja_binary"
-fi
diff --git a/scripts/ci-travis b/scripts/ci-travis
index e2a4dcc..9c6577e 100755
--- a/scripts/ci-travis
+++ b/scripts/ci-travis
@@ -65,57 +65,6 @@
make check
}
-# Install needed tools
-cmake_deps()
-{
- mkdir -p download
- mkdir -p tools
-
- if [ "$(uname -s)" = "Linux" ]; then
- cmake_file="cmake-3.8.2-Linux-x86_64.tar.gz"
- cmake_hash="574673d3f37b0be6a0813b894a8bce9c4af08c13f1ec25c030a69f42e0e4b349e0192385ef20c8a9271055b7c3b24c5b20fb5009762131a3fba3d17576e641f1"
- elif [ "$(uname -s)" = "Darwin" ]; then
- cmake_file="cmake-3.8.2-Darwin-x86_64.tar.gz"
- cmake_hash="fd1c09dd73fe2b23fdc9ac915a90343d2e27409182dd1f2bf509ddf54ca926f97e1906fc18f119e8ea52797c05d4b919772f43500bffbcf2c3cdc86828d9067e"
- fi
- cmake_url="https://cmake.org/files/v3.8/${cmake_file}"
-
- if [ "$(uname -s)" = "Linux" ]; then
- ninja_file="ninja-linux.zip"
- ninja_hash="2dddc52750c5e6f841acd0d978b894c9a6562f12ddb4ba9e5118a213f54265f065682ffe1bc7bc2ac6146760145d17800a4b7373791cd1fbbaf0836faf050e19"
- elif [ "$(uname -s)" = "Darwin" ]; then
- ninja_file="ninja-mac.zip"
- ninja_hash="e008c9814447bbf356be7f2daf6d212657fb22b67e7de3885bd2f27766cd7c8a2ad61a4aace170674464ccf55813cbe2bf311485bc2058e89867f17b692642b9"
- fi
- ninja_url="https://github.com/ninja-build/ninja/releases/download/v1.7.2/${ninja_file}"
-
- (
- cd download
- if [ ! -f "$cmake_file" ] || [ "$(shasum -a 512 "$cmake_file")" != "$cmake_hash $cmake_file" ]; then
- wget "$cmake_url"
- if [ "$(shasum -a 512 "$cmake_file")" != "$cmake_hash $cmake_file" ]; then
- echo "Error: cmake download hash mismatch" >&2
- exit 1
- fi
- fi
- tar xf "$cmake_file"
- cp -a ${cmake_file%.tar.gz}/* ../tools
-
- if [ "$1" = "Ninja" ]; then
- if [ ! -f "$ninja_file" ] || [ "$(shasum -a 512 "$ninja_file")" != "$ninja_hash $ninja_file" ]; then
- wget "$ninja_url"
- if [ "$(shasum -a 512 "$ninja_file")" != "$ninja_hash $ninja_file" ]; then
- echo "Error: ninja download hash mismatch" >&2
- exit 1
- fi
- fi
- unzip "$ninja_file"
- mkdir -p ../tools/bin
- mv ninja ../tools/bin
- fi
- )
-}
-
# Test autoconf build
cmake_build()
{
@@ -162,7 +111,6 @@
;;
cmake)
echo "Testing CMake build"
- cmake_deps "$@"
cmake_build "$@"
;;
*)
diff --git a/scripts/makeStringDefinition.pl b/scripts/makeStringDefinition.pl
index e514f24..9dd6fbb 100755
--- a/scripts/makeStringDefinition.pl
+++ b/scripts/makeStringDefinition.pl
@@ -53,7 +53,7 @@
Options:
-h Displays this help message
- -x add the XERCES_CPP_NAMESPACE_QUALIFIER before each item
+ -x add the xercesc::before each item
EOF
exit(1);
}
@@ -84,12 +84,12 @@
}
}
if($opt_x) {
- print "XERCES_CPP_NAMESPACE_QUALIFIER ";
+ print "xercesc::";
}
print "$ch, ";
}
if($opt_x) {
- print "XERCES_CPP_NAMESPACE_QUALIFIER ";
+ print "xercesc::";
}
print "chNull };\n";
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9a81e50..a168db1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1085,7 +1085,7 @@
if(XERCES_USE_NETACCESSOR_CURL)
list(APPEND libxerces_c_SOURCES ${curl_sources})
list(APPEND libxerces_c_HEADERS ${curl_headers})
- list(APPEND libxerces_c_DEPS ${CURL_LIBRARIES})
+ list(APPEND libxerces_c_DEPS CURL::libcurl)
endif()
if(XERCES_USE_NETACCESSOR_SOCKET)
@@ -1289,11 +1289,13 @@
# set the version in the filename, and create the symlink at install
# time. Note: could be dropped when the SONAME is updated and
# libtool compatibility is no longer required.
- set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}")
- file(GENERATE
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake"
- CONTENT "execute_process(COMMAND ln -sf \"$<TARGET_FILE_NAME:xerces-c>\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c.so\")")
- install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake")
+ if(BUILD_SHARED_LIBS)
+ set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}")
+ file(GENERATE
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake"
+ CONTENT "execute_process(COMMAND ln -sf \"$<TARGET_FILE_NAME:xerces-c>\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c${CMAKE_SHARED_LIBRARY_SUFFIX}\")")
+ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake")
+ endif()
else()
# Not used for the common cases, though this would be the default if
# not for libtool compatibility.
diff --git a/src/stricmp.c b/src/stricmp.c
index 9c9f467..58f04d7 100644
--- a/src/stricmp.c
+++ b/src/stricmp.c
@@ -22,12 +22,7 @@
#include "stricmp.h"
#include "config.h"
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
+#include <string.h>
int stricmp(const char* str1, const char* str2)
{
diff --git a/src/strnicmp.c b/src/strnicmp.c
index d5f498a..5b6418d 100644
--- a/src/strnicmp.c
+++ b/src/strnicmp.c
@@ -22,12 +22,7 @@
#include "strnicmp.h"
#include "config.h"
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
+#include <string.h>
int strnicmp(const char* str1, const char* str2, size_t count)
{
diff --git a/src/xercesc/dom/DOMAttr.hpp b/src/xercesc/dom/DOMAttr.hpp
index b00caa8..5b974eb 100644
--- a/src/xercesc/dom/DOMAttr.hpp
+++ b/src/xercesc/dom/DOMAttr.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMElement;
class DOMTypeInfo;
@@ -169,7 +169,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMCDATASection.hpp b/src/xercesc/dom/DOMCDATASection.hpp
index 5975c01..35e1be8 100644
--- a/src/xercesc/dom/DOMCDATASection.hpp
+++ b/src/xercesc/dom/DOMCDATASection.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMText.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -97,7 +97,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMCharacterData.hpp b/src/xercesc/dom/DOMCharacterData.hpp
index f79154a..9eb4b76 100644
--- a/src/xercesc/dom/DOMCharacterData.hpp
+++ b/src/xercesc/dom/DOMCharacterData.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -208,7 +208,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMComment.hpp b/src/xercesc/dom/DOMComment.hpp
index b0c9b53..b9ad918 100644
--- a/src/xercesc/dom/DOMComment.hpp
+++ b/src/xercesc/dom/DOMComment.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMCharacterData.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -70,7 +70,7 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMConfiguration.hpp b/src/xercesc/dom/DOMConfiguration.hpp
index bbd8809..7103837 100644
--- a/src/xercesc/dom/DOMConfiguration.hpp
+++ b/src/xercesc/dom/DOMConfiguration.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/dom/DOMStringList.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* The DOMConfiguration interface represents the configuration of
@@ -445,7 +445,7 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMDocument.hpp b/src/xercesc/dom/DOMDocument.hpp
index ae8e65c..ec234f4 100644
--- a/src/xercesc/dom/DOMDocument.hpp
+++ b/src/xercesc/dom/DOMDocument.hpp
@@ -28,7 +28,7 @@
#include <xercesc/dom/DOMDocumentTraversal.hpp>
#include <xercesc/dom/DOMXPathEvaluator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMConfiguration;
class DOMDocumentType;
@@ -814,6 +814,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMDocumentFragment.hpp b/src/xercesc/dom/DOMDocumentFragment.hpp
index 8c55042..ae9a4ef 100644
--- a/src/xercesc/dom/DOMDocumentFragment.hpp
+++ b/src/xercesc/dom/DOMDocumentFragment.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -103,6 +103,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMDocumentRange.hpp b/src/xercesc/dom/DOMDocumentRange.hpp
index cee4010..b484800 100644
--- a/src/xercesc/dom/DOMDocumentRange.hpp
+++ b/src/xercesc/dom/DOMDocumentRange.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMRange;
@@ -90,6 +90,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMDocumentTraversal.hpp b/src/xercesc/dom/DOMDocumentTraversal.hpp
index b24e591..f6b5d03 100644
--- a/src/xercesc/dom/DOMDocumentTraversal.hpp
+++ b/src/xercesc/dom/DOMDocumentTraversal.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNodeFilter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -150,6 +150,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMDocumentType.hpp b/src/xercesc/dom/DOMDocumentType.hpp
index ae91c2a..c031aac 100644
--- a/src/xercesc/dom/DOMDocumentType.hpp
+++ b/src/xercesc/dom/DOMDocumentType.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNamedNodeMap;
@@ -153,7 +153,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMElement.hpp b/src/xercesc/dom/DOMElement.hpp
index 9527fea..8698f65 100644
--- a/src/xercesc/dom/DOMElement.hpp
+++ b/src/xercesc/dom/DOMElement.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMAttr;
@@ -520,7 +520,7 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMEntity.hpp b/src/xercesc/dom/DOMEntity.hpp
index 8acea35..9c7f66a 100644
--- a/src/xercesc/dom/DOMEntity.hpp
+++ b/src/xercesc/dom/DOMEntity.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This interface represents an entity, either parsed or unparsed, in an XML
@@ -164,7 +164,7 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMEntityReference.hpp b/src/xercesc/dom/DOMEntityReference.hpp
index c88eb82..8d1d5d4 100644
--- a/src/xercesc/dom/DOMEntityReference.hpp
+++ b/src/xercesc/dom/DOMEntityReference.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -89,7 +89,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMError.hpp b/src/xercesc/dom/DOMError.hpp
index a83c985..9f89227 100644
--- a/src/xercesc/dom/DOMError.hpp
+++ b/src/xercesc/dom/DOMError.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMLocator;
@@ -168,6 +168,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMErrorHandler.hpp b/src/xercesc/dom/DOMErrorHandler.hpp
index 70e061e..3a5414f 100644
--- a/src/xercesc/dom/DOMErrorHandler.hpp
+++ b/src/xercesc/dom/DOMErrorHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMError;
@@ -102,6 +102,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMException.cpp b/src/xercesc/dom/DOMException.cpp
index b284621..093c1cd 100644
--- a/src/xercesc/dom/DOMException.cpp
+++ b/src/xercesc/dom/DOMException.cpp
@@ -28,7 +28,7 @@
#include "DOMException.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Destructor and Constructor
@@ -81,4 +81,4 @@
msg = other.fMsgOwned? XMLString::replicate(other.msg, other.fMemoryManager) : other.msg;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/DOMException.hpp b/src/xercesc/dom/DOMException.hpp
index 29dc152..020231b 100644
--- a/src/xercesc/dom/DOMException.hpp
+++ b/src/xercesc/dom/DOMException.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -252,6 +252,6 @@
return msg;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMImplementation.hpp b/src/xercesc/dom/DOMImplementation.hpp
index e03ee69..86390ca 100644
--- a/src/xercesc/dom/DOMImplementation.hpp
+++ b/src/xercesc/dom/DOMImplementation.hpp
@@ -28,7 +28,7 @@
#include <xercesc/dom/DOMRangeException.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMDocument;
@@ -244,6 +244,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMImplementationLS.hpp b/src/xercesc/dom/DOMImplementationLS.hpp
index 9687c66..f99cc2d 100644
--- a/src/xercesc/dom/DOMImplementationLS.hpp
+++ b/src/xercesc/dom/DOMImplementationLS.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMLSParser;
@@ -178,6 +178,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMImplementationList.hpp b/src/xercesc/dom/DOMImplementationList.hpp
index 449ba48..356bcd8 100644
--- a/src/xercesc/dom/DOMImplementationList.hpp
+++ b/src/xercesc/dom/DOMImplementationList.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMImplementation;
@@ -119,6 +119,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMImplementationRegistry.hpp b/src/xercesc/dom/DOMImplementationRegistry.hpp
index 91ce67a..d90e8f6 100644
--- a/src/xercesc/dom/DOMImplementationRegistry.hpp
+++ b/src/xercesc/dom/DOMImplementationRegistry.hpp
@@ -38,7 +38,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMImplementation;
@@ -96,6 +96,6 @@
DOMImplementationRegistry();
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMImplementationSource.hpp b/src/xercesc/dom/DOMImplementationSource.hpp
index 7afc03a..c5e5e3a 100644
--- a/src/xercesc/dom/DOMImplementationSource.hpp
+++ b/src/xercesc/dom/DOMImplementationSource.hpp
@@ -33,7 +33,7 @@
*/
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMImplementation;
@@ -107,6 +107,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSException.cpp b/src/xercesc/dom/DOMLSException.cpp
index 3e055c8..466a4a0 100644
--- a/src/xercesc/dom/DOMLSException.cpp
+++ b/src/xercesc/dom/DOMLSException.cpp
@@ -22,7 +22,7 @@
#include "DOMLSException.hpp"
#include <xercesc/util/XMLDOMMsg.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMLSException::DOMLSException()
: DOMException()
@@ -46,4 +46,4 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/DOMLSException.hpp b/src/xercesc/dom/DOMLSException.hpp
index 862c02b..a8da6b5 100644
--- a/src/xercesc/dom/DOMLSException.hpp
+++ b/src/xercesc/dom/DOMLSException.hpp
@@ -24,7 +24,7 @@
#include <xercesc/dom/DOMException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -118,6 +118,6 @@
DOMLSException & operator = (const DOMLSException &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSInput.hpp b/src/xercesc/dom/DOMLSInput.hpp
index 1a6ebc8..4048bc0 100644
--- a/src/xercesc/dom/DOMLSInput.hpp
+++ b/src/xercesc/dom/DOMLSInput.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class InputSource;
@@ -269,6 +269,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSOutput.hpp b/src/xercesc/dom/DOMLSOutput.hpp
index b59a6c0..df99d0d 100644
--- a/src/xercesc/dom/DOMLSOutput.hpp
+++ b/src/xercesc/dom/DOMLSOutput.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLFormatTarget;
@@ -164,6 +164,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSParser.hpp b/src/xercesc/dom/DOMLSParser.hpp
index dabdffc..c7a28b9 100644
--- a/src/xercesc/dom/DOMLSParser.hpp
+++ b/src/xercesc/dom/DOMLSParser.hpp
@@ -28,7 +28,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/validators/common/Grammar.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMErrorHandler;
@@ -761,6 +761,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSParserFilter.hpp b/src/xercesc/dom/DOMLSParserFilter.hpp
index f72c83b..0a19e95 100644
--- a/src/xercesc/dom/DOMLSParserFilter.hpp
+++ b/src/xercesc/dom/DOMLSParserFilter.hpp
@@ -37,7 +37,7 @@
#include <xercesc/dom/DOMNodeFilter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMElement;
class DOMNode;
@@ -159,6 +159,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSResourceResolver.hpp b/src/xercesc/dom/DOMLSResourceResolver.hpp
index e2d740c..84aa04f 100644
--- a/src/xercesc/dom/DOMLSResourceResolver.hpp
+++ b/src/xercesc/dom/DOMLSResourceResolver.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMLSInput;
@@ -138,6 +138,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSSerializer.hpp b/src/xercesc/dom/DOMLSSerializer.hpp
index 8bb4ff7..785823c 100644
--- a/src/xercesc/dom/DOMLSSerializer.hpp
+++ b/src/xercesc/dom/DOMLSSerializer.hpp
@@ -268,7 +268,7 @@
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/dom/DOMConfiguration.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMLSOutput;
@@ -542,6 +542,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLSSerializerFilter.hpp b/src/xercesc/dom/DOMLSSerializerFilter.hpp
index 12b048c..4f2bdb5 100644
--- a/src/xercesc/dom/DOMLSSerializerFilter.hpp
+++ b/src/xercesc/dom/DOMLSSerializerFilter.hpp
@@ -41,7 +41,7 @@
#include <xercesc/dom/DOMNodeFilter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMLSSerializerFilter : public DOMNodeFilter {
@@ -102,6 +102,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMLocator.hpp b/src/xercesc/dom/DOMLocator.hpp
index 18b3c6a..50f7119 100644
--- a/src/xercesc/dom/DOMLocator.hpp
+++ b/src/xercesc/dom/DOMLocator.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -130,6 +130,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMMemoryManager.hpp b/src/xercesc/dom/DOMMemoryManager.hpp
index c1dd83c..97609f2 100644
--- a/src/xercesc/dom/DOMMemoryManager.hpp
+++ b/src/xercesc/dom/DOMMemoryManager.hpp
@@ -22,7 +22,7 @@
// Includes
//------------------------------------------------------------------------------------
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* The <code>DOMMemoryManager</code> interface exposes the memory allocation-related
@@ -151,7 +151,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMNamedNodeMap.hpp b/src/xercesc/dom/DOMNamedNodeMap.hpp
index b13d188..f802369 100644
--- a/src/xercesc/dom/DOMNamedNodeMap.hpp
+++ b/src/xercesc/dom/DOMNamedNodeMap.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -240,6 +240,6 @@
#define GetDOMNamedNodeMapMemoryManager GET_INDIRECT_MM(fOwnerNode)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMNode.hpp b/src/xercesc/dom/DOMNode.hpp
index 49d45f2..f108548 100644
--- a/src/xercesc/dom/DOMNode.hpp
+++ b/src/xercesc/dom/DOMNode.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMDocument;
@@ -920,6 +920,6 @@
***/
#define GetDOMNodeMemoryManager GET_INDIRECT_MM(this)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMNodeFilter.hpp b/src/xercesc/dom/DOMNodeFilter.hpp
index 0373aff..7fba2fa 100644
--- a/src/xercesc/dom/DOMNodeFilter.hpp
+++ b/src/xercesc/dom/DOMNodeFilter.hpp
@@ -24,7 +24,7 @@
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -216,6 +216,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMNodeIterator.hpp b/src/xercesc/dom/DOMNodeIterator.hpp
index cc08e72..4124c11 100644
--- a/src/xercesc/dom/DOMNodeIterator.hpp
+++ b/src/xercesc/dom/DOMNodeIterator.hpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOMNodeFilter.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -191,6 +191,6 @@
#define GetDOMNodeIteratorMemoryManager GET_DIRECT_MM(fDocument)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMNodeList.hpp b/src/xercesc/dom/DOMNodeList.hpp
index 52249cf..5c7444a 100644
--- a/src/xercesc/dom/DOMNodeList.hpp
+++ b/src/xercesc/dom/DOMNodeList.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -107,6 +107,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMNotation.hpp b/src/xercesc/dom/DOMNotation.hpp
index 26811b3..74cbec8 100644
--- a/src/xercesc/dom/DOMNotation.hpp
+++ b/src/xercesc/dom/DOMNotation.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -107,7 +107,7 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMPSVITypeInfo.hpp b/src/xercesc/dom/DOMPSVITypeInfo.hpp
index 8ccd1fb..e4a52e0 100644
--- a/src/xercesc/dom/DOMPSVITypeInfo.hpp
+++ b/src/xercesc/dom/DOMPSVITypeInfo.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* The <code>DOMPSVITypeInfo</code> interface represent the PSVI info used by
@@ -109,7 +109,7 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMProcessingInstruction.hpp b/src/xercesc/dom/DOMProcessingInstruction.hpp
index fe89606..27e5d15 100644
--- a/src/xercesc/dom/DOMProcessingInstruction.hpp
+++ b/src/xercesc/dom/DOMProcessingInstruction.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -115,7 +115,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMRange.hpp b/src/xercesc/dom/DOMRange.hpp
index 3aec0de..011ceb0 100644
--- a/src/xercesc/dom/DOMRange.hpp
+++ b/src/xercesc/dom/DOMRange.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
class DOMDocumentFragment;
@@ -525,6 +525,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMRangeException.cpp b/src/xercesc/dom/DOMRangeException.cpp
index dc8c355..078de90 100644
--- a/src/xercesc/dom/DOMRangeException.cpp
+++ b/src/xercesc/dom/DOMRangeException.cpp
@@ -22,7 +22,7 @@
#include "DOMRangeException.hpp"
#include <xercesc/util/XMLDOMMsg.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMRangeException::DOMRangeException()
@@ -49,4 +49,4 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/DOMRangeException.hpp b/src/xercesc/dom/DOMRangeException.hpp
index 34eb342..1f3315a 100644
--- a/src/xercesc/dom/DOMRangeException.hpp
+++ b/src/xercesc/dom/DOMRangeException.hpp
@@ -24,7 +24,7 @@
#include <xercesc/dom/DOMException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Range operations may throw a <code>DOMRangeException</code> as specified in
@@ -109,6 +109,6 @@
DOMRangeException & operator = (const DOMRangeException &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMStringList.hpp b/src/xercesc/dom/DOMStringList.hpp
index c0ac421..8ea0312 100644
--- a/src/xercesc/dom/DOMStringList.hpp
+++ b/src/xercesc/dom/DOMStringList.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -126,6 +126,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMText.hpp b/src/xercesc/dom/DOMText.hpp
index ab5a0b1..33c0091 100644
--- a/src/xercesc/dom/DOMText.hpp
+++ b/src/xercesc/dom/DOMText.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMCharacterData.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -175,7 +175,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMTreeWalker.hpp b/src/xercesc/dom/DOMTreeWalker.hpp
index bd8ce4b..c016aa1 100644
--- a/src/xercesc/dom/DOMTreeWalker.hpp
+++ b/src/xercesc/dom/DOMTreeWalker.hpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOMNode.hpp>
#include <xercesc/dom/DOMNodeFilter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -271,6 +271,6 @@
#define GetDOMTreeWalkerMemoryManager GET_INDIRECT_MM(fCurrentNode)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMTypeInfo.hpp b/src/xercesc/dom/DOMTypeInfo.hpp
index 4e22b8d..48a085e 100644
--- a/src/xercesc/dom/DOMTypeInfo.hpp
+++ b/src/xercesc/dom/DOMTypeInfo.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* The <code>DOMTypeInfo</code> interface represent a type used by
@@ -187,7 +187,7 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMUserDataHandler.hpp b/src/xercesc/dom/DOMUserDataHandler.hpp
index 8487f29..aba0af8 100644
--- a/src/xercesc/dom/DOMUserDataHandler.hpp
+++ b/src/xercesc/dom/DOMUserDataHandler.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* When associating an object to a key on a node using <code>setUserData</code>
@@ -134,7 +134,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMXPathEvaluator.hpp b/src/xercesc/dom/DOMXPathEvaluator.hpp
index 84d8eb2..47169ed 100644
--- a/src/xercesc/dom/DOMXPathEvaluator.hpp
+++ b/src/xercesc/dom/DOMXPathEvaluator.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMXPathResult.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMXPathNSResolver;
class DOMXPathExpression;
@@ -175,6 +175,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMXPathException.cpp b/src/xercesc/dom/DOMXPathException.cpp
index 8e4877e..0e0bd30 100644
--- a/src/xercesc/dom/DOMXPathException.cpp
+++ b/src/xercesc/dom/DOMXPathException.cpp
@@ -22,7 +22,7 @@
#include <xercesc/util/XMLDOMMsg.hpp>
#include "impl/DOMImplementationImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMXPathException::DOMXPathException()
@@ -49,4 +49,4 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/DOMXPathException.hpp b/src/xercesc/dom/DOMXPathException.hpp
index b276353..7ad9114 100644
--- a/src/xercesc/dom/DOMXPathException.hpp
+++ b/src/xercesc/dom/DOMXPathException.hpp
@@ -24,7 +24,7 @@
#include <xercesc/dom/DOMException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* @since DOM Level 3
@@ -100,6 +100,6 @@
DOMXPathException& operator = (const DOMXPathException&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMXPathExpression.hpp b/src/xercesc/dom/DOMXPathExpression.hpp
index 9ffd144..cfe0969 100644
--- a/src/xercesc/dom/DOMXPathExpression.hpp
+++ b/src/xercesc/dom/DOMXPathExpression.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMXPathResult.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -124,6 +124,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMXPathNSResolver.hpp b/src/xercesc/dom/DOMXPathNSResolver.hpp
index d486661..98c80d8 100644
--- a/src/xercesc/dom/DOMXPathNSResolver.hpp
+++ b/src/xercesc/dom/DOMXPathNSResolver.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* The <code>DOMXPathNSResolver</code> interface permit prefix strings
* in the expression to be properly bound to namespaceURI strings.
@@ -125,6 +125,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMXPathNamespace.hpp b/src/xercesc/dom/DOMXPathNamespace.hpp
index 81f634f..40a828a 100644
--- a/src/xercesc/dom/DOMXPathNamespace.hpp
+++ b/src/xercesc/dom/DOMXPathNamespace.hpp
@@ -24,7 +24,7 @@
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMElement;
@@ -110,6 +110,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/DOMXPathResult.hpp b/src/xercesc/dom/DOMXPathResult.hpp
index bc584b6..443647d 100644
--- a/src/xercesc/dom/DOMXPathResult.hpp
+++ b/src/xercesc/dom/DOMXPathResult.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMXPathNSResolver;
class DOMXPathExpression;
@@ -346,6 +346,6 @@
//@}
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/StDOMNode.hpp b/src/xercesc/dom/StDOMNode.hpp
index 49cec3a..66fe32a 100644
--- a/src/xercesc/dom/StDOMNode.hpp
+++ b/src/xercesc/dom/StDOMNode.hpp
@@ -26,7 +26,7 @@
#include <xercesc/dom/DOMAttr.hpp>
#include <xercesc/dom/DOMElement.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/* This class is a smart pointer implementation over DOMNode interface and
** classes derived from it. It takes care of reference counting automatically.
@@ -89,7 +89,7 @@
typedef DOMElement* DOMElementSPtr;
#endif
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMAttrImpl.cpp b/src/xercesc/dom/impl/DOMAttrImpl.cpp
index 8702284..de2e6c7 100644
--- a/src/xercesc/dom/impl/DOMAttrImpl.cpp
+++ b/src/xercesc/dom/impl/DOMAttrImpl.cpp
@@ -28,7 +28,7 @@
#include "DOMCasts.hpp"
#include "DOMTypeInfoImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMAttrImpl::DOMAttrImpl(DOMDocument *ownerDoc, const XMLCh *aName)
: fNode(this, ownerDoc), fParent(this, ownerDoc), fSchemaType(0)
@@ -363,4 +363,4 @@
DOMNODEIMPL_IMPL(DOMAttrImpl);
DOMPARENTIMPL_IMPL(DOMAttrImpl);
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMAttrImpl.hpp b/src/xercesc/dom/impl/DOMAttrImpl.hpp
index 8c6a5ae..9de15cc 100644
--- a/src/xercesc/dom/impl/DOMAttrImpl.hpp
+++ b/src/xercesc/dom/impl/DOMAttrImpl.hpp
@@ -41,7 +41,7 @@
#include <xercesc/framework/XMLBuffer.hpp>
#include "DOMNodeIDMap.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMElementImpl;
class DOMTypeInfoImpl;
@@ -137,6 +137,6 @@
doc->getNodeIDMap()->add(this);
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMAttrMapImpl.cpp b/src/xercesc/dom/impl/DOMAttrMapImpl.cpp
index 00014f2..f3c9abe 100644
--- a/src/xercesc/dom/impl/DOMAttrMapImpl.cpp
+++ b/src/xercesc/dom/impl/DOMAttrMapImpl.cpp
@@ -30,7 +30,7 @@
#include <xercesc/dom/DOMAttr.hpp>
#include <xercesc/dom/DOMException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMAttrMapImpl::DOMAttrMapImpl(DOMNode *ownerNod)
{
@@ -491,4 +491,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMAttrMapImpl.hpp b/src/xercesc/dom/impl/DOMAttrMapImpl.hpp
index eeebf40..909dd7b 100644
--- a/src/xercesc/dom/impl/DOMAttrMapImpl.hpp
+++ b/src/xercesc/dom/impl/DOMAttrMapImpl.hpp
@@ -34,7 +34,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNamedNodeMap.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
class DOMNodeVector;
@@ -119,7 +119,7 @@
attrDefaults = value;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMAttrNSImpl.cpp b/src/xercesc/dom/impl/DOMAttrNSImpl.cpp
index 5a82f98..2d0e88f 100644
--- a/src/xercesc/dom/impl/DOMAttrNSImpl.cpp
+++ b/src/xercesc/dom/impl/DOMAttrNSImpl.cpp
@@ -28,7 +28,7 @@
#include "assert.h"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMAttrNSImpl::DOMAttrNSImpl(DOMDocument *ownerDoc, const XMLCh *nam) :
DOMAttrImpl(ownerDoc, nam)
@@ -244,4 +244,4 @@
this -> fNamespaceURI = (URI == 0) ? 0 : ownerDoc->getPooledString(URI);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMAttrNSImpl.hpp b/src/xercesc/dom/impl/DOMAttrNSImpl.hpp
index c612267..0eb1c26 100644
--- a/src/xercesc/dom/impl/DOMAttrNSImpl.hpp
+++ b/src/xercesc/dom/impl/DOMAttrNSImpl.hpp
@@ -33,7 +33,7 @@
#include "DOMAttrImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMAttrNSImpl: public DOMAttrImpl {
@@ -80,6 +80,6 @@
DOMAttrNSImpl & operator = (const DOMAttrNSImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp b/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
index 19dd491..249f3d5 100644
--- a/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
+++ b/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
@@ -30,7 +30,7 @@
#include <xercesc/dom/DOMTreeWalker.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMCDATASectionImpl::DOMCDATASectionImpl(DOMDocument *ownerDoc, const XMLCh *dat)
: fNode(this, ownerDoc), fCharacterData(ownerDoc, dat)
@@ -320,4 +320,4 @@
DOMNODEIMPL_IMPL(DOMCDATASectionImpl);
DOMCHILDIMPL_IMPL(DOMCDATASectionImpl);
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp b/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp
index d141deb..6cf9f0e 100644
--- a/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp
+++ b/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp
@@ -40,7 +40,7 @@
#include "DOMParentNode.hpp"
#include "DOMCharacterDataImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMCDATASectionImpl: public DOMCDATASection, public HasDOMNodeImpl, public HasDOMChildImpl {
@@ -98,6 +98,6 @@
DOMCDATASectionImpl & operator = (const DOMCDATASectionImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMCasts.hpp b/src/xercesc/dom/impl/DOMCasts.hpp
index 7d99dae..0b02c54 100644
--- a/src/xercesc/dom/impl/DOMCasts.hpp
+++ b/src/xercesc/dom/impl/DOMCasts.hpp
@@ -51,7 +51,7 @@
#include "DOMElementImpl.hpp"
#include "DOMTextImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
static inline const DOMNodeImpl *castToNodeImpl(const DOMNode *p)
@@ -104,6 +104,6 @@
return pE->getChildNodeImpl();
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMCharacterDataImpl.cpp b/src/xercesc/dom/impl/DOMCharacterDataImpl.cpp
index ad3a6ca..5ca7d86 100644
--- a/src/xercesc/dom/impl/DOMCharacterDataImpl.cpp
+++ b/src/xercesc/dom/impl/DOMCharacterDataImpl.cpp
@@ -28,7 +28,7 @@
#include "DOMStringPool.hpp"
#include <xercesc/util/XMLUniDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMCharacterDataImpl::DOMCharacterDataImpl(DOMDocument *doc, const XMLCh *dat)
{
@@ -325,4 +325,4 @@
fDoc->releaseBuffer(fDataBuf);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMCharacterDataImpl.hpp b/src/xercesc/dom/impl/DOMCharacterDataImpl.hpp
index 55c9495..c4f5797 100644
--- a/src/xercesc/dom/impl/DOMCharacterDataImpl.hpp
+++ b/src/xercesc/dom/impl/DOMCharacterDataImpl.hpp
@@ -34,7 +34,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -84,7 +84,7 @@
#define GetDOMCharacterDataImplMemoryManager GET_DIRECT_MM(fDoc)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMChildNode.cpp b/src/xercesc/dom/impl/DOMChildNode.cpp
index 5076230..496c21c 100644
--- a/src/xercesc/dom/impl/DOMChildNode.cpp
+++ b/src/xercesc/dom/impl/DOMChildNode.cpp
@@ -26,7 +26,7 @@
#include "DOMChildNode.hpp"
#include "DOMCasts.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMChildNode::DOMChildNode()
@@ -74,5 +74,5 @@
return castToNodeImpl(thisNode)->isFirstChild() ? 0 : previousSibling;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMChildNode.hpp b/src/xercesc/dom/impl/DOMChildNode.hpp
index 5cacbf0..8225573 100644
--- a/src/xercesc/dom/impl/DOMChildNode.hpp
+++ b/src/xercesc/dom/impl/DOMChildNode.hpp
@@ -38,7 +38,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMDocument;
@@ -67,6 +67,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMCommentImpl.cpp b/src/xercesc/dom/impl/DOMCommentImpl.cpp
index cfe7b2a..07ff462 100644
--- a/src/xercesc/dom/impl/DOMCommentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMCommentImpl.cpp
@@ -29,7 +29,7 @@
#include <xercesc/dom/DOMException.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMCommentImpl::DOMCommentImpl(DOMDocument *ownerDoc, const XMLCh *dat)
: fNode(this, ownerDoc), fCharacterData(ownerDoc, dat)
@@ -190,4 +190,4 @@
DOMNODEIMPL_IMPL(DOMCommentImpl);
DOMCHILDIMPL_IMPL(DOMCommentImpl);
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMCommentImpl.hpp b/src/xercesc/dom/impl/DOMCommentImpl.hpp
index 45c6eed..cc824cc 100644
--- a/src/xercesc/dom/impl/DOMCommentImpl.hpp
+++ b/src/xercesc/dom/impl/DOMCommentImpl.hpp
@@ -40,7 +40,7 @@
#include "DOMChildNode.hpp"
#include "DOMCharacterDataImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMCommentImpl: public DOMComment, public HasDOMNodeImpl, public HasDOMChildImpl {
@@ -83,7 +83,7 @@
DOMCommentImpl & operator = (const DOMCommentImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMConfigurationImpl.cpp b/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
index fa4fb87..d298439 100644
--- a/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
+++ b/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
@@ -22,7 +22,7 @@
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/dom/DOMException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
const unsigned short DOMConfigurationImpl::fDEFAULT_VALUES = 0x2596;
@@ -263,7 +263,7 @@
}
-XERCES_CPP_NAMESPACE_END
+}
/**
diff --git a/src/xercesc/dom/impl/DOMConfigurationImpl.hpp b/src/xercesc/dom/impl/DOMConfigurationImpl.hpp
index 91033a1..cff054d 100644
--- a/src/xercesc/dom/impl/DOMConfigurationImpl.hpp
+++ b/src/xercesc/dom/impl/DOMConfigurationImpl.hpp
@@ -34,7 +34,7 @@
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMDocumentImpl;
class DOMStringListImpl;
@@ -141,7 +141,7 @@
MemoryManager* fMemoryManager;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMDeepNodeListImpl.cpp b/src/xercesc/dom/impl/DOMDeepNodeListImpl.cpp
index 84c349a..54315b8 100644
--- a/src/xercesc/dom/impl/DOMDeepNodeListImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDeepNodeListImpl.cpp
@@ -27,7 +27,7 @@
#include <xercesc/util/XMLUniDefs.hpp>
#include <limits.h>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
static const XMLCh kAstr[] = {chAsterisk, chNull};
@@ -216,4 +216,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMDeepNodeListImpl.hpp b/src/xercesc/dom/impl/DOMDeepNodeListImpl.hpp
index 9b040da..2038244 100644
--- a/src/xercesc/dom/impl/DOMDeepNodeListImpl.hpp
+++ b/src/xercesc/dom/impl/DOMDeepNodeListImpl.hpp
@@ -34,7 +34,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNodeList.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -75,6 +75,6 @@
DOMDeepNodeListImpl & operator = (const DOMDeepNodeListImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMDeepNodeListPool.c b/src/xercesc/dom/impl/DOMDeepNodeListPool.c
index 7b3521d..408145d 100644
--- a/src/xercesc/dom/impl/DOMDeepNodeListPool.c
+++ b/src/xercesc/dom/impl/DOMDeepNodeListPool.c
@@ -30,7 +30,7 @@
#include <assert.h>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
@@ -425,4 +425,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMDeepNodeListPool.hpp b/src/xercesc/dom/impl/DOMDeepNodeListPool.hpp
index 5eecc36..c59154a 100644
--- a/src/xercesc/dom/impl/DOMDeepNodeListPool.hpp
+++ b/src/xercesc/dom/impl/DOMDeepNodeListPool.hpp
@@ -39,7 +39,7 @@
#include <xercesc/util/XMLExceptMsgs.hpp>
#include <xercesc/util/XMLEnumerator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
//
// This should really be a nested class, but some of the compilers we
@@ -191,7 +191,7 @@
THasher fHasher;
};
-XERCES_CPP_NAMESPACE_END
+}
#if !defined(XERCES_TMPLSINC)
#include <xercesc/dom/impl/DOMDeepNodeListPool.c>
diff --git a/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp b/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp
index 0718418..0e50782 100644
--- a/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp
@@ -26,7 +26,7 @@
#include <xercesc/dom/DOMException.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMDocumentFragmentImpl::DOMDocumentFragmentImpl(DOMDocument *masterDoc)
: fNode(this, masterDoc), fParent(this, masterDoc)
@@ -138,4 +138,4 @@
DOMNODEIMPL_IMPL(DOMDocumentFragmentImpl);
DOMPARENTIMPL_IMPL(DOMDocumentFragmentImpl);
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMDocumentFragmentImpl.hpp b/src/xercesc/dom/impl/DOMDocumentFragmentImpl.hpp
index dfdd626..dacae89 100644
--- a/src/xercesc/dom/impl/DOMDocumentFragmentImpl.hpp
+++ b/src/xercesc/dom/impl/DOMDocumentFragmentImpl.hpp
@@ -37,7 +37,7 @@
#include "DOMParentNode.hpp"
#include "DOMNodeImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMDocumentFragmentImpl: public DOMDocumentFragment,
@@ -69,7 +69,7 @@
DOMPARENTIMPL_DECL;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMDocumentImpl.cpp b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
index b1b16c3..f2de623 100644
--- a/src/xercesc/dom/impl/DOMDocumentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
@@ -50,7 +50,7 @@
#include <xercesc/util/XMLInitializer.hpp>
#include <xercesc/util/Janitor.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// The chunk size to allocate from the system allocator.
static XMLSize_t kInitialHeapAllocSize = 0x4000;
@@ -1534,4 +1534,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMDocumentImpl.hpp b/src/xercesc/dom/impl/DOMDocumentImpl.hpp
index c748e0a..797ceb1 100644
--- a/src/xercesc/dom/impl/DOMDocumentImpl.hpp
+++ b/src/xercesc/dom/impl/DOMDocumentImpl.hpp
@@ -46,7 +46,7 @@
#include "DOMParentNode.hpp"
#include "DOMDeepNodeListPool.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMAttrImpl;
@@ -452,7 +452,7 @@
return colon != -1 ? colon : 0;
}
-XERCES_CPP_NAMESPACE_END
+}
// ---------------------------------------------------------------------------
//
@@ -460,59 +460,52 @@
// the heap owned by a document.
//
// ---------------------------------------------------------------------------
-inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType type)
+inline void * operator new(size_t amt, xercesc::DOMDocumentImpl *doc, xercesc::DOMMemoryManager::NodeObjectType type)
{
void *p = doc->allocate(amt, type);
return p;
}
-inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType type)
+inline void * operator new(size_t amt, xercesc::DOMDocument *doc, xercesc::DOMMemoryManager::NodeObjectType type)
{
- XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager* mgr=(XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager*)doc->getFeature(XERCES_CPP_NAMESPACE_QUALIFIER XMLUni::fgXercescInterfaceDOMMemoryManager,0);
+ xercesc::DOMMemoryManager* mgr=(xercesc::DOMMemoryManager*)doc->getFeature(xercesc::XMLUni::fgXercescInterfaceDOMMemoryManager,0);
void* p=0;
if(mgr)
p = mgr->allocate(amt, type);
return p;
}
-inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *doc)
+inline void * operator new(size_t amt, xercesc::DOMDocumentImpl *doc)
{
void* p = doc->allocate(amt);
return p;
}
-inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc)
+inline void * operator new(size_t amt, xercesc::DOMDocument *doc)
{
- XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager* mgr=(XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager*)doc->getFeature(XERCES_CPP_NAMESPACE_QUALIFIER XMLUni::fgXercescInterfaceDOMMemoryManager,0);
+ xercesc::DOMMemoryManager* mgr=(xercesc::DOMMemoryManager*)doc->getFeature(xercesc::XMLUni::fgXercescInterfaceDOMMemoryManager,0);
void* p=0;
if(mgr)
p = mgr->allocate(amt);
return p;
}
-// ---------------------------------------------------------------------------
-// For DOM:
-// Bypass compiler warning:
-// no matching operator delete found; memory will not be freed if initialization throws an exception
-// ---------------------------------------------------------------------------
-#if !defined(XERCES_NO_MATCHING_DELETE_OPERATOR)
-inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType /*type*/)
+inline void operator delete(void* /*ptr*/, xercesc::DOMDocumentImpl * /*doc*/, xercesc::DOMMemoryManager::NodeObjectType /*type*/)
{
return;
}
-inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMMemoryManager::NodeObjectType /*type*/)
+inline void operator delete(void* /*ptr*/, xercesc::DOMDocument * /*doc*/, xercesc::DOMMemoryManager::NodeObjectType /*type*/)
{
return;
}
-inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl * /*doc*/)
+inline void operator delete(void* /*ptr*/, xercesc::DOMDocumentImpl * /*doc*/)
{
return;
}
-inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/)
+inline void operator delete(void* /*ptr*/, xercesc::DOMDocument * /*doc*/)
{
return;
}
-#endif
#endif
diff --git a/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp b/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
index 4fe2ba1..d801ca7 100644
--- a/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
@@ -34,7 +34,7 @@
#include "DOMDocumentImpl.hpp"
#include "DOMCasts.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
static DOMDocument* sDocument = 0;
static XMLMutex* sDocumentMutex = 0;
@@ -557,4 +557,4 @@
return fNode.getFeature(feature,version);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp b/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp
index 3c3ba49..cc11cbc 100644
--- a/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp
+++ b/src/xercesc/dom/impl/DOMDocumentTypeImpl.hpp
@@ -40,7 +40,7 @@
#include "DOMChildNode.hpp"
#include "DOMParentNode.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNamedNodeMapImpl;
@@ -109,6 +109,6 @@
DOMDocumentTypeImpl & operator = (const DOMDocumentTypeImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMElementImpl.cpp b/src/xercesc/dom/impl/DOMElementImpl.cpp
index dd438e7..c18ca7e 100644
--- a/src/xercesc/dom/impl/DOMElementImpl.cpp
+++ b/src/xercesc/dom/impl/DOMElementImpl.cpp
@@ -38,7 +38,7 @@
#include "DOMDocumentTypeImpl.hpp"
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMAttr;
@@ -880,4 +880,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMElementImpl.hpp b/src/xercesc/dom/impl/DOMElementImpl.hpp
index e4eb193..5d59f69 100644
--- a/src/xercesc/dom/impl/DOMElementImpl.hpp
+++ b/src/xercesc/dom/impl/DOMElementImpl.hpp
@@ -43,7 +43,7 @@
#include "DOMAttrMapImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMTypeInfo;
class DOMNodeList;
@@ -145,6 +145,6 @@
DOMElementImpl & operator = (const DOMElementImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMElementNSImpl.cpp b/src/xercesc/dom/impl/DOMElementNSImpl.cpp
index 609860d..c34fba5 100644
--- a/src/xercesc/dom/impl/DOMElementNSImpl.cpp
+++ b/src/xercesc/dom/impl/DOMElementNSImpl.cpp
@@ -28,7 +28,7 @@
#include <xercesc/util/XMLUri.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMElementNSImpl::DOMElementNSImpl(DOMDocument *ownerDoc, const XMLCh *nam) :
DOMElementImpl(ownerDoc, nam)
@@ -261,4 +261,4 @@
return DOMElementImpl::getFeature(feature, version);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMElementNSImpl.hpp b/src/xercesc/dom/impl/DOMElementNSImpl.hpp
index 8e55288..dbe47ce 100644
--- a/src/xercesc/dom/impl/DOMElementNSImpl.hpp
+++ b/src/xercesc/dom/impl/DOMElementNSImpl.hpp
@@ -34,7 +34,7 @@
#include "DOMElementImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMTypeInfoImpl;
@@ -90,6 +90,6 @@
DOMElementNSImpl & operator = (const DOMElementNSImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMEntityImpl.cpp b/src/xercesc/dom/impl/DOMEntityImpl.cpp
index 59a6d2f..9e0d13a 100644
--- a/src/xercesc/dom/impl/DOMEntityImpl.cpp
+++ b/src/xercesc/dom/impl/DOMEntityImpl.cpp
@@ -25,7 +25,7 @@
#include "DOMEntityImpl.hpp"
#include "DOMDocumentImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMEntityImpl::DOMEntityImpl(DOMDocument *ownerDoc, const XMLCh *eName)
: fNode(this, ownerDoc),
@@ -295,4 +295,4 @@
fXmlVersion = doc->cloneString(version);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMEntityImpl.hpp b/src/xercesc/dom/impl/DOMEntityImpl.hpp
index 0c50ecb..086d727 100644
--- a/src/xercesc/dom/impl/DOMEntityImpl.hpp
+++ b/src/xercesc/dom/impl/DOMEntityImpl.hpp
@@ -37,7 +37,7 @@
#include "DOMParentNode.hpp"
#include <xercesc/dom/DOMEntity.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMEntityReference;
@@ -106,7 +106,7 @@
DOMEntityImpl & operator = (const DOMEntityImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp b/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp
index 5d525b0..7c5f976 100644
--- a/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp
+++ b/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp
@@ -28,7 +28,7 @@
#include <xercesc/dom/DOMNode.hpp>
#include <xercesc/dom/DOMNamedNodeMap.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMEntityReferenceImpl::DOMEntityReferenceImpl(DOMDocument *ownerDoc,
const XMLCh *entityName)
@@ -224,4 +224,4 @@
DOMPARENTIMPL_IMPL(DOMEntityReferenceImpl);
DOMCHILDIMPL_IMPL(DOMEntityReferenceImpl);
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp b/src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp
index 4afc436..73b9252 100644
--- a/src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp
+++ b/src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp
@@ -38,7 +38,7 @@
#include "DOMChildNode.hpp"
#include "DOMNodeImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMEntityReferenceImpl: public DOMEntityReference,
@@ -79,7 +79,7 @@
DOMEntityReferenceImpl & operator = (const DOMEntityReferenceImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMErrorImpl.cpp b/src/xercesc/dom/impl/DOMErrorImpl.cpp
index a4b06e0..3ff24f0 100644
--- a/src/xercesc/dom/impl/DOMErrorImpl.cpp
+++ b/src/xercesc/dom/impl/DOMErrorImpl.cpp
@@ -23,7 +23,7 @@
#include <xercesc/dom/DOMException.hpp>
#include <xercesc/dom/DOMLocator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
@@ -87,4 +87,4 @@
throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMErrorImpl.hpp b/src/xercesc/dom/impl/DOMErrorImpl.hpp
index 1a83a4c..9dc9f24 100644
--- a/src/xercesc/dom/impl/DOMErrorImpl.hpp
+++ b/src/xercesc/dom/impl/DOMErrorImpl.hpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOMError.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -183,6 +183,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMImplementationImpl.cpp b/src/xercesc/dom/impl/DOMImplementationImpl.cpp
index 69fe65a..d522af4 100644
--- a/src/xercesc/dom/impl/DOMImplementationImpl.cpp
+++ b/src/xercesc/dom/impl/DOMImplementationImpl.cpp
@@ -39,7 +39,7 @@
#include <xercesc/util/XMLMsgLoader.hpp>
#include <xercesc/parsers/DOMLSParserImpl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ------------------------------------------------------------
@@ -288,4 +288,4 @@
return list;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMImplementationImpl.hpp b/src/xercesc/dom/impl/DOMImplementationImpl.hpp
index f1ae178..f79332e 100644
--- a/src/xercesc/dom/impl/DOMImplementationImpl.hpp
+++ b/src/xercesc/dom/impl/DOMImplementationImpl.hpp
@@ -35,7 +35,7 @@
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMImplementationSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLMsgLoader;
@@ -97,6 +97,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMImplementationListImpl.cpp b/src/xercesc/dom/impl/DOMImplementationListImpl.cpp
index 6ed1e04..7ef3908 100644
--- a/src/xercesc/dom/impl/DOMImplementationListImpl.cpp
+++ b/src/xercesc/dom/impl/DOMImplementationListImpl.cpp
@@ -22,7 +22,7 @@
#include "DOMImplementationListImpl.hpp"
#include <xercesc/dom/DOMImplementation.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMImplementationListImpl::DOMImplementationListImpl()
{
@@ -56,4 +56,4 @@
delete this;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMImplementationListImpl.hpp b/src/xercesc/dom/impl/DOMImplementationListImpl.hpp
index 5142a2a..48bc114 100644
--- a/src/xercesc/dom/impl/DOMImplementationListImpl.hpp
+++ b/src/xercesc/dom/impl/DOMImplementationListImpl.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/dom/DOMImplementationList.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMImplementation;
@@ -51,6 +51,6 @@
virtual void release();
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMImplementationRegistry.cpp b/src/xercesc/dom/impl/DOMImplementationRegistry.cpp
index 8597169..8b9a263 100644
--- a/src/xercesc/dom/impl/DOMImplementationRegistry.cpp
+++ b/src/xercesc/dom/impl/DOMImplementationRegistry.cpp
@@ -29,7 +29,7 @@
#include "DOMImplementationImpl.hpp"
#include "DOMImplementationListImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// Points to the singleton instance of a registry of DOMImplementationSource.
//
@@ -113,5 +113,5 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMLSInputImpl.cpp b/src/xercesc/dom/impl/DOMLSInputImpl.cpp
index 6b101f8..3c30bac 100644
--- a/src/xercesc/dom/impl/DOMLSInputImpl.cpp
+++ b/src/xercesc/dom/impl/DOMLSInputImpl.cpp
@@ -23,7 +23,7 @@
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMLSInputImpl::DOMLSInputImpl(MemoryManager* const manager /*= XMLPlatformUtils::fgMemoryManager*/)
:fStringData(0)
@@ -91,5 +91,5 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMLSInputImpl.hpp b/src/xercesc/dom/impl/DOMLSInputImpl.hpp
index 7594809..ab01ae6 100644
--- a/src/xercesc/dom/impl/DOMLSInputImpl.hpp
+++ b/src/xercesc/dom/impl/DOMLSInputImpl.hpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOM.hpp>
#include <xercesc/dom/DOMLSInput.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMLSInputImpl : public XMemory, public DOMLSInput
{
@@ -129,6 +129,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMLSOutputImpl.cpp b/src/xercesc/dom/impl/DOMLSOutputImpl.cpp
index 8a24c6a..0bc3697 100644
--- a/src/xercesc/dom/impl/DOMLSOutputImpl.cpp
+++ b/src/xercesc/dom/impl/DOMLSOutputImpl.cpp
@@ -23,7 +23,7 @@
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMLSOutputImpl::DOMLSOutputImpl(MemoryManager* const manager /*= XMLPlatformUtils::fgMemoryManager*/)
:fByteStream(0)
@@ -62,5 +62,5 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMLSOutputImpl.hpp b/src/xercesc/dom/impl/DOMLSOutputImpl.hpp
index 523e90c..ca9cd25 100644
--- a/src/xercesc/dom/impl/DOMLSOutputImpl.hpp
+++ b/src/xercesc/dom/impl/DOMLSOutputImpl.hpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOM.hpp>
#include <xercesc/dom/DOMLSOutput.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMLSOutputImpl : public XMemory, public DOMLSOutput
{
@@ -87,6 +87,6 @@
return fSystemId;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp b/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp
index fc59de0..7322b3b 100644
--- a/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp
+++ b/src/xercesc/dom/impl/DOMLSSerializerImpl.cpp
@@ -39,7 +39,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLChar.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
@@ -1764,4 +1764,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMLSSerializerImpl.hpp b/src/xercesc/dom/impl/DOMLSSerializerImpl.hpp
index af115fd..824bcad 100644
--- a/src/xercesc/dom/impl/DOMLSSerializerImpl.hpp
+++ b/src/xercesc/dom/impl/DOMLSSerializerImpl.hpp
@@ -29,7 +29,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/framework/XMLFormatter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMStringListImpl;
@@ -229,6 +229,6 @@
fFormatter->setUnRepFlags(XMLFormatter::UnRep_CharRef);
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMLocatorImpl.cpp b/src/xercesc/dom/impl/DOMLocatorImpl.cpp
index d83e99c..43ebec9 100644
--- a/src/xercesc/dom/impl/DOMLocatorImpl.cpp
+++ b/src/xercesc/dom/impl/DOMLocatorImpl.cpp
@@ -21,7 +21,7 @@
#include "DOMLocatorImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
@@ -57,4 +57,4 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMLocatorImpl.hpp b/src/xercesc/dom/impl/DOMLocatorImpl.hpp
index 235bab5..677a633 100644
--- a/src/xercesc/dom/impl/DOMLocatorImpl.hpp
+++ b/src/xercesc/dom/impl/DOMLocatorImpl.hpp
@@ -24,7 +24,7 @@
#include <xercesc/dom/DOMLocator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Introduced in DOM Level 3
@@ -182,6 +182,6 @@
fURI = uri;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNamedNodeMapImpl.cpp b/src/xercesc/dom/impl/DOMNamedNodeMapImpl.cpp
index adceddf..43a1b46 100644
--- a/src/xercesc/dom/impl/DOMNamedNodeMapImpl.cpp
+++ b/src/xercesc/dom/impl/DOMNamedNodeMapImpl.cpp
@@ -31,7 +31,7 @@
#include "DOMDocumentImpl.hpp"
#include "DOMNodeImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMNamedNodeMapImpl::DOMNamedNodeMapImpl(DOMNode *ownerNod)
{
@@ -337,4 +337,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp b/src/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp
index b8c334e..3376d9d 100644
--- a/src/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp
+++ b/src/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp
@@ -34,7 +34,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNamedNodeMap.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNodeVector;
@@ -75,6 +75,6 @@
DOMNamedNodeMapImpl & operator = (const DOMNamedNodeMapImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNodeBase.hpp b/src/xercesc/dom/impl/DOMNodeBase.hpp
index 443e2dd..d6e95f3 100644
--- a/src/xercesc/dom/impl/DOMNodeBase.hpp
+++ b/src/xercesc/dom/impl/DOMNodeBase.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNodeImpl;
@@ -239,6 +239,6 @@
const DOMChildNode* classname::getChildNodeImpl() const {return &fChild;}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNodeIDMap.cpp b/src/xercesc/dom/impl/DOMNodeIDMap.cpp
index 3e90029..9d7cbb6 100644
--- a/src/xercesc/dom/impl/DOMNodeIDMap.cpp
+++ b/src/xercesc/dom/impl/DOMNodeIDMap.cpp
@@ -25,9 +25,9 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/RuntimeException.hpp>
-#include <stdio.h>
+#include <cstdio>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
static const XMLSize_t gPrimes[] = {997, 9973, 99991, 999983, 0 }; // To do - add a few more.
@@ -227,4 +227,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNodeIDMap.hpp b/src/xercesc/dom/impl/DOMNodeIDMap.hpp
index faf12ad..2c698e5 100644
--- a/src/xercesc/dom/impl/DOMNodeIDMap.hpp
+++ b/src/xercesc/dom/impl/DOMNodeIDMap.hpp
@@ -32,7 +32,7 @@
//
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
//
@@ -81,6 +81,6 @@
DOMDocument *fDoc; // The owning document.
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNodeImpl.cpp b/src/xercesc/dom/impl/DOMNodeImpl.cpp
index d2f8a8b..0945eee 100644
--- a/src/xercesc/dom/impl/DOMNodeImpl.cpp
+++ b/src/xercesc/dom/impl/DOMNodeImpl.cpp
@@ -36,10 +36,10 @@
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLInitializer.hpp>
-#include <stdio.h>
+#include <cstdio>
#include <assert.h>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
//Though DOMNodeImpl does not derivate from DOMNode, it shares
//the same GetDOMNodeMemoryManager
@@ -1041,5 +1041,5 @@
throw DOMException(DOMException::INVALID_ACCESS_ERR,0, GetDOMNodeMemoryManager);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNodeImpl.hpp b/src/xercesc/dom/impl/DOMNodeImpl.hpp
index 5f82e5a..4eec7a7 100644
--- a/src/xercesc/dom/impl/DOMNodeImpl.hpp
+++ b/src/xercesc/dom/impl/DOMNodeImpl.hpp
@@ -52,7 +52,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMUserDataHandler.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNamedNodeMap;
@@ -386,6 +386,6 @@
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNodeIteratorImpl.cpp b/src/xercesc/dom/impl/DOMNodeIteratorImpl.cpp
index 8c88603..624b50d 100644
--- a/src/xercesc/dom/impl/DOMNodeIteratorImpl.cpp
+++ b/src/xercesc/dom/impl/DOMNodeIteratorImpl.cpp
@@ -29,7 +29,7 @@
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
@@ -362,4 +362,4 @@
// chance that this is allocated again and again is not usual
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNodeIteratorImpl.hpp b/src/xercesc/dom/impl/DOMNodeIteratorImpl.hpp
index e6cb537..158129d 100644
--- a/src/xercesc/dom/impl/DOMNodeIteratorImpl.hpp
+++ b/src/xercesc/dom/impl/DOMNodeIteratorImpl.hpp
@@ -39,7 +39,7 @@
#include <xercesc/dom/DOMNode.hpp>
#include <xercesc/dom/DOMNodeIterator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMNodeIteratorImpl : public DOMNodeIterator {
protected:
@@ -117,6 +117,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNodeListImpl.cpp b/src/xercesc/dom/impl/DOMNodeListImpl.cpp
index bdd2637..0e7590e 100644
--- a/src/xercesc/dom/impl/DOMNodeListImpl.cpp
+++ b/src/xercesc/dom/impl/DOMNodeListImpl.cpp
@@ -24,7 +24,7 @@
#include "DOMNodeListImpl.hpp"
#include "DOMCasts.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// revisit
@@ -69,4 +69,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNodeListImpl.hpp b/src/xercesc/dom/impl/DOMNodeListImpl.hpp
index e7a79c8..0bce518 100644
--- a/src/xercesc/dom/impl/DOMNodeListImpl.hpp
+++ b/src/xercesc/dom/impl/DOMNodeListImpl.hpp
@@ -45,7 +45,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNodeList.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMParentNode;
class DOMNode;
@@ -68,6 +68,6 @@
virtual XMLSize_t getLength() const;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNodeVector.cpp b/src/xercesc/dom/impl/DOMNodeVector.cpp
index b146898..5fd5827 100644
--- a/src/xercesc/dom/impl/DOMNodeVector.cpp
+++ b/src/xercesc/dom/impl/DOMNodeVector.cpp
@@ -32,7 +32,7 @@
#include "DOMDocumentImpl.hpp"
#include <assert.h>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMNodeVector::DOMNodeVector(DOMDocument *doc)
@@ -120,4 +120,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNodeVector.hpp b/src/xercesc/dom/impl/DOMNodeVector.hpp
index d3e5e02..55bf829 100644
--- a/src/xercesc/dom/impl/DOMNodeVector.hpp
+++ b/src/xercesc/dom/impl/DOMNodeVector.hpp
@@ -33,7 +33,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -83,6 +83,6 @@
return nextFreeSlot;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNormalizer.cpp b/src/xercesc/dom/impl/DOMNormalizer.cpp
index 649c5a1..66138bb 100644
--- a/src/xercesc/dom/impl/DOMNormalizer.cpp
+++ b/src/xercesc/dom/impl/DOMNormalizer.cpp
@@ -38,7 +38,7 @@
#include "DOMNormalizer.hpp"
#include "DOMTextImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
static XMLMsgLoader* gMsgLoader = 0;
@@ -497,4 +497,4 @@
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNormalizer.hpp b/src/xercesc/dom/impl/DOMNormalizer.hpp
index e37604f..841c119 100644
--- a/src/xercesc/dom/impl/DOMNormalizer.hpp
+++ b/src/xercesc/dom/impl/DOMNormalizer.hpp
@@ -37,7 +37,7 @@
#include <xercesc/framework/XMLErrorCodes.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMConfigurationImpl;
class DOMErrorHandler;
@@ -161,6 +161,6 @@
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMNotationImpl.cpp b/src/xercesc/dom/impl/DOMNotationImpl.cpp
index 2e5fc1c..a7d6597 100644
--- a/src/xercesc/dom/impl/DOMNotationImpl.cpp
+++ b/src/xercesc/dom/impl/DOMNotationImpl.cpp
@@ -24,7 +24,7 @@
#include <xercesc/dom/DOMException.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMNotationImpl::DOMNotationImpl(DOMDocument *ownerDoc, const XMLCh *nName)
: fNode(this, ownerDoc), fName(0), fPublicId(0), fSystemId(0), fBaseURI(0)
@@ -179,4 +179,4 @@
DOMNODEIMPL_IMPL(DOMNotationImpl);
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMNotationImpl.hpp b/src/xercesc/dom/impl/DOMNotationImpl.hpp
index 23ff621..e2c858a 100644
--- a/src/xercesc/dom/impl/DOMNotationImpl.hpp
+++ b/src/xercesc/dom/impl/DOMNotationImpl.hpp
@@ -34,7 +34,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNotation.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
#include "DOMNodeBase.hpp"
#include "DOMNodeImpl.hpp"
@@ -91,6 +91,6 @@
DOMNotationImpl& operator= (const DOMNotationImpl& other);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMParentNode.cpp b/src/xercesc/dom/impl/DOMParentNode.cpp
index 73920f9..5dbaf4d 100644
--- a/src/xercesc/dom/impl/DOMParentNode.cpp
+++ b/src/xercesc/dom/impl/DOMParentNode.cpp
@@ -29,7 +29,7 @@
#include "DOMParentNode.hpp"
#include "DOMCasts.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMParentNode::DOMParentNode(DOMNode* containingNode, DOMDocument *ownerDoc)
: fContainingNode(containingNode), fOwnerDocument(ownerDoc), fFirstChild(0), fChildNodeList(this)
@@ -488,4 +488,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMParentNode.hpp b/src/xercesc/dom/impl/DOMParentNode.hpp
index 72b9794..6b20780 100644
--- a/src/xercesc/dom/impl/DOMParentNode.hpp
+++ b/src/xercesc/dom/impl/DOMParentNode.hpp
@@ -45,7 +45,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include "DOMNodeListImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMChildNode;
@@ -120,6 +120,6 @@
#define GetDOMParentNodeMemoryManager GET_DIRECT_MM(fOwnerDocument)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp b/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp
index 104ea12..4b8a36a 100644
--- a/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp
+++ b/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp
@@ -28,7 +28,7 @@
#include <xercesc/dom/DOMException.hpp>
#include <xercesc/dom/DOMNode.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMProcessingInstructionImpl::DOMProcessingInstructionImpl(DOMDocument *ownerDoc,
const XMLCh *targt,
@@ -216,4 +216,4 @@
void DOMProcessingInstructionImpl::setNodeValue(const XMLCh *nodeValue) {fCharacterData.setNodeValue (this, nodeValue); }
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp b/src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp
index c336b67..0921bc6 100644
--- a/src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp
+++ b/src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp
@@ -39,7 +39,7 @@
#include "DOMNodeImpl.hpp"
#include "DOMChildNode.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DocumentImpl;
@@ -92,7 +92,7 @@
DOMProcessingInstructionImpl & operator = (const DOMProcessingInstructionImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMRangeImpl.cpp b/src/xercesc/dom/impl/DOMRangeImpl.cpp
index 4e74bd0..e040d3b 100644
--- a/src/xercesc/dom/impl/DOMRangeImpl.cpp
+++ b/src/xercesc/dom/impl/DOMRangeImpl.cpp
@@ -35,7 +35,7 @@
#include <xercesc/framework/XMLBuffer.hpp>
#include <xercesc/util/Janitor.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
//---------------------
@@ -2112,5 +2112,5 @@
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMRangeImpl.hpp b/src/xercesc/dom/impl/DOMRangeImpl.hpp
index 9f3b606..05a5659 100644
--- a/src/xercesc/dom/impl/DOMRangeImpl.hpp
+++ b/src/xercesc/dom/impl/DOMRangeImpl.hpp
@@ -35,7 +35,7 @@
#include <xercesc/dom/DOMRange.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
@@ -171,6 +171,6 @@
DOMRangeImpl & operator = (const DOMRangeImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMStringListImpl.cpp b/src/xercesc/dom/impl/DOMStringListImpl.cpp
index 34a7f07..862fc68 100644
--- a/src/xercesc/dom/impl/DOMStringListImpl.cpp
+++ b/src/xercesc/dom/impl/DOMStringListImpl.cpp
@@ -22,7 +22,7 @@
#include "DOMStringListImpl.hpp"
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMStringListImpl::DOMStringListImpl(int nInitialSize, MemoryManager* manager)
{
@@ -61,4 +61,4 @@
delete this;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMStringListImpl.hpp b/src/xercesc/dom/impl/DOMStringListImpl.hpp
index b6c5c07..cb2238c 100644
--- a/src/xercesc/dom/impl/DOMStringListImpl.hpp
+++ b/src/xercesc/dom/impl/DOMStringListImpl.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/dom/DOMStringList.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMStringListImpl: public XMemory,
@@ -51,6 +51,6 @@
virtual void release();
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMStringPool.cpp b/src/xercesc/dom/impl/DOMStringPool.cpp
index 5ae6ccf..2cbc713 100644
--- a/src/xercesc/dom/impl/DOMStringPool.cpp
+++ b/src/xercesc/dom/impl/DOMStringPool.cpp
@@ -25,7 +25,7 @@
#include "DOMStringPool.hpp"
#include "DOMDocumentImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMBuffer::
DOMBuffer(DOMDocumentImpl *doc, XMLSize_t capacity) :
@@ -64,4 +64,4 @@
fCapacity = newCap;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMStringPool.hpp b/src/xercesc/dom/impl/DOMStringPool.hpp
index f26e611..80f3f0d 100644
--- a/src/xercesc/dom/impl/DOMStringPool.hpp
+++ b/src/xercesc/dom/impl/DOMStringPool.hpp
@@ -33,7 +33,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMDocumentImpl;
@@ -221,6 +221,6 @@
fBuffer[fIndex] = 0;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMTextImpl.cpp b/src/xercesc/dom/impl/DOMTextImpl.cpp
index da700eb..91c20f5 100644
--- a/src/xercesc/dom/impl/DOMTextImpl.cpp
+++ b/src/xercesc/dom/impl/DOMTextImpl.cpp
@@ -39,7 +39,7 @@
#include <assert.h>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMDocument;
@@ -333,4 +333,4 @@
void DOMTextImpl::appendData(const XMLCh *arg, XMLSize_t n) {fCharacterData.appendData(this, arg, n);}
void DOMTextImpl::appendDataFast(const XMLCh *arg, XMLSize_t n) {fCharacterData.appendDataFast(this, arg, n);}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMTextImpl.hpp b/src/xercesc/dom/impl/DOMTextImpl.hpp
index ecd3b98..d6d7651 100644
--- a/src/xercesc/dom/impl/DOMTextImpl.hpp
+++ b/src/xercesc/dom/impl/DOMTextImpl.hpp
@@ -40,7 +40,7 @@
#include "DOMNodeImpl.hpp"
#include "DOMCharacterDataImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMTextImpl: public DOMText, public HasDOMNodeImpl, public HasDOMChildImpl {
@@ -103,6 +103,6 @@
DOMTextImpl & operator = (const DOMTextImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMTreeWalkerImpl.cpp b/src/xercesc/dom/impl/DOMTreeWalkerImpl.cpp
index 92d2fbd..2e17a36 100644
--- a/src/xercesc/dom/impl/DOMTreeWalkerImpl.cpp
+++ b/src/xercesc/dom/impl/DOMTreeWalkerImpl.cpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/** constructor */
DOMTreeWalkerImpl::DOMTreeWalkerImpl (
@@ -481,4 +481,4 @@
// chance that this is allocated again and again is not usual
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMTreeWalkerImpl.hpp b/src/xercesc/dom/impl/DOMTreeWalkerImpl.hpp
index 4ecbbb4..c619eec 100644
--- a/src/xercesc/dom/impl/DOMTreeWalkerImpl.hpp
+++ b/src/xercesc/dom/impl/DOMTreeWalkerImpl.hpp
@@ -33,7 +33,7 @@
#include <xercesc/dom/DOMTreeWalker.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMTreeWalkerImpl : public DOMTreeWalker {
@@ -163,6 +163,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMTypeInfoImpl.cpp b/src/xercesc/dom/impl/DOMTypeInfoImpl.cpp
index 90786b1..7f4726a 100644
--- a/src/xercesc/dom/impl/DOMTypeInfoImpl.cpp
+++ b/src/xercesc/dom/impl/DOMTypeInfoImpl.cpp
@@ -20,7 +20,7 @@
#include <xercesc/framework/psvi/PSVIItem.hpp>
#include <xercesc/framework/psvi/XSTypeDefinition.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/*static*/ DOMTypeInfoImpl DOMTypeInfoImpl::g_DtdValidatedElement;
/*static*/ DOMTypeInfoImpl DOMTypeInfoImpl::g_DtdNotValidatedAttribute;
@@ -180,7 +180,7 @@
}
-XERCES_CPP_NAMESPACE_END
+}
/**
* End of file DOMTypeInfo.cpp
*/
diff --git a/src/xercesc/dom/impl/DOMTypeInfoImpl.hpp b/src/xercesc/dom/impl/DOMTypeInfoImpl.hpp
index f290fe1..24dc1ae 100644
--- a/src/xercesc/dom/impl/DOMTypeInfoImpl.hpp
+++ b/src/xercesc/dom/impl/DOMTypeInfoImpl.hpp
@@ -34,7 +34,7 @@
#include <xercesc/dom/DOMTypeInfo.hpp>
#include <xercesc/dom/DOMPSVITypeInfo.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMDocumentImpl;
@@ -97,7 +97,7 @@
DOMTypeInfoImpl & operator = (const DOMTypeInfoImpl &);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMXPathExpressionImpl.cpp b/src/xercesc/dom/impl/DOMXPathExpressionImpl.cpp
index f832d8a..b9c4fa7 100644
--- a/src/xercesc/dom/impl/DOMXPathExpressionImpl.cpp
+++ b/src/xercesc/dom/impl/DOMXPathExpressionImpl.cpp
@@ -26,7 +26,7 @@
#include <xercesc/dom/DOMXPathException.hpp>
#include <xercesc/dom/DOM.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class WrapperForXPathNSResolver : public XercesNamespaceResolver
{
@@ -213,4 +213,4 @@
delete me;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMXPathExpressionImpl.hpp b/src/xercesc/dom/impl/DOMXPathExpressionImpl.hpp
index 1065fb6..a053f90 100644
--- a/src/xercesc/dom/impl/DOMXPathExpressionImpl.hpp
+++ b/src/xercesc/dom/impl/DOMXPathExpressionImpl.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/dom/DOMXPathExpression.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMElement;
class XercesXPath;
@@ -64,6 +64,6 @@
MemoryManager* const fMemoryManager;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMXPathNSResolverImpl.cpp b/src/xercesc/dom/impl/DOMXPathNSResolverImpl.cpp
index 960046e..a1cb31b 100644
--- a/src/xercesc/dom/impl/DOMXPathNSResolverImpl.cpp
+++ b/src/xercesc/dom/impl/DOMXPathNSResolverImpl.cpp
@@ -21,7 +21,7 @@
#include <xercesc/util/Janitor.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMXPathNSResolverImpl::DOMXPathNSResolverImpl(const DOMNode *nodeResolver, MemoryManager* const manager) :
fNamespaceBindings(0),
@@ -106,4 +106,4 @@
delete me;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMXPathNSResolverImpl.hpp b/src/xercesc/dom/impl/DOMXPathNSResolverImpl.hpp
index 0435200..f0c7cc8 100644
--- a/src/xercesc/dom/impl/DOMXPathNSResolverImpl.hpp
+++ b/src/xercesc/dom/impl/DOMXPathNSResolverImpl.hpp
@@ -28,7 +28,7 @@
#include <xercesc/dom/DOMXPathNSResolver.hpp>
#include <xercesc/util/KVStringPair.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMNode;
@@ -51,7 +51,7 @@
MemoryManager* fManager;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/DOMXPathResultImpl.cpp b/src/xercesc/dom/impl/DOMXPathResultImpl.cpp
index ffaf4f6..8ef82c8 100644
--- a/src/xercesc/dom/impl/DOMXPathResultImpl.cpp
+++ b/src/xercesc/dom/impl/DOMXPathResultImpl.cpp
@@ -19,7 +19,7 @@
#include <xercesc/dom/DOMNode.hpp>
#include <xercesc/dom/DOMXPathException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
DOMXPathResultImpl::DOMXPathResultImpl(ResultType type,
MemoryManager* const manager)
@@ -135,4 +135,4 @@
fSnapshot->addElement(node);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/DOMXPathResultImpl.hpp b/src/xercesc/dom/impl/DOMXPathResultImpl.hpp
index ae0aa62..d267998 100644
--- a/src/xercesc/dom/impl/DOMXPathResultImpl.hpp
+++ b/src/xercesc/dom/impl/DOMXPathResultImpl.hpp
@@ -26,7 +26,7 @@
#include <xercesc/dom/DOMXPathResult.hpp>
#include <xercesc/util/RefVectorOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class CDOM_EXPORT DOMXPathResultImpl : public XMemory,
public DOMXPathResult
@@ -61,6 +61,6 @@
XMLSize_t fIndex;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/dom/impl/XSDElementNSImpl.cpp b/src/xercesc/dom/impl/XSDElementNSImpl.cpp
index 4e60762..fcac087 100644
--- a/src/xercesc/dom/impl/XSDElementNSImpl.cpp
+++ b/src/xercesc/dom/impl/XSDElementNSImpl.cpp
@@ -24,7 +24,7 @@
#include "DOMDocumentImpl.hpp"
#include "XSDElementNSImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
XSDElementNSImpl::XSDElementNSImpl(DOMDocument *ownerDoc, const XMLCh *nam) :
@@ -60,4 +60,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/dom/impl/XSDElementNSImpl.hpp b/src/xercesc/dom/impl/XSDElementNSImpl.hpp
index fd78772..9f3b045 100644
--- a/src/xercesc/dom/impl/XSDElementNSImpl.hpp
+++ b/src/xercesc/dom/impl/XSDElementNSImpl.hpp
@@ -35,7 +35,7 @@
#include "DOMElementNSImpl.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
@@ -66,6 +66,6 @@
XSDElementNSImpl& operator=(const XSDElementNSImpl&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/BinOutputStream.cpp b/src/xercesc/framework/BinOutputStream.cpp
index f7b2ae1..99e311d 100644
--- a/src/xercesc/framework/BinOutputStream.cpp
+++ b/src/xercesc/framework/BinOutputStream.cpp
@@ -25,7 +25,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/framework/BinOutputStream.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// BinOutputStream: Virtual destructor!
@@ -42,4 +42,4 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/BinOutputStream.hpp b/src/xercesc/framework/BinOutputStream.hpp
index b750862..cb3e41e 100644
--- a/src/xercesc/framework/BinOutputStream.hpp
+++ b/src/xercesc/framework/BinOutputStream.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XMemory.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT BinOutputStream : public XMemory
{
@@ -60,6 +60,6 @@
BinOutputStream& operator=(const BinOutputStream&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/LocalFileFormatTarget.cpp b/src/xercesc/framework/LocalFileFormatTarget.cpp
index fdd8266..4d3473b 100644
--- a/src/xercesc/framework/LocalFileFormatTarget.cpp
+++ b/src/xercesc/framework/LocalFileFormatTarget.cpp
@@ -24,9 +24,9 @@
#include <xercesc/util/IOException.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
#include <assert.h>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
const XMLSize_t MAX_BUFFER_SIZE = 65536;
@@ -151,4 +151,4 @@
fCapacity = newCap;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/LocalFileFormatTarget.hpp b/src/xercesc/framework/LocalFileFormatTarget.hpp
index 9cae3d9..f15a69e 100644
--- a/src/xercesc/framework/LocalFileFormatTarget.hpp
+++ b/src/xercesc/framework/LocalFileFormatTarget.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/XMLFormatter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLPARSER_EXPORT LocalFileFormatTarget : public XMLFormatTarget {
public:
@@ -94,6 +94,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/LocalFileInputSource.cpp b/src/xercesc/framework/LocalFileInputSource.cpp
index f5adce8..f7cebcc 100644
--- a/src/xercesc/framework/LocalFileInputSource.cpp
+++ b/src/xercesc/framework/LocalFileInputSource.cpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/***
*
@@ -168,5 +168,5 @@
return retStrm;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/LocalFileInputSource.hpp b/src/xercesc/framework/LocalFileInputSource.hpp
index acbd922..d14827f 100644
--- a/src/xercesc/framework/LocalFileInputSource.hpp
+++ b/src/xercesc/framework/LocalFileInputSource.hpp
@@ -25,7 +25,7 @@
#include <xercesc/sax/InputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class BinInputStream;
@@ -147,6 +147,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/MemBufFormatTarget.cpp b/src/xercesc/framework/MemBufFormatTarget.cpp
index 0cc5919..084f817 100644
--- a/src/xercesc/framework/MemBufFormatTarget.cpp
+++ b/src/xercesc/framework/MemBufFormatTarget.cpp
@@ -21,9 +21,9 @@
#include <xercesc/framework/MemBufFormatTarget.hpp>
#include <xercesc/util/XMLString.hpp>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
MemBufFormatTarget::MemBufFormatTarget( XMLSize_t initCapacity
, MemoryManager* const manager)
@@ -102,4 +102,4 @@
fCapacity = newCap;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/MemBufFormatTarget.hpp b/src/xercesc/framework/MemBufFormatTarget.hpp
index e6ac33f..4a23f41 100644
--- a/src/xercesc/framework/MemBufFormatTarget.hpp
+++ b/src/xercesc/framework/MemBufFormatTarget.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/XMLFormatter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/*
* The MemBufFormatTarget is a derivative from XMLFormatTarget, which user code
@@ -130,7 +130,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/MemBufInputSource.cpp b/src/xercesc/framework/MemBufInputSource.cpp
index a247c6a..430d343 100644
--- a/src/xercesc/framework/MemBufInputSource.cpp
+++ b/src/xercesc/framework/MemBufInputSource.cpp
@@ -26,7 +26,7 @@
#include <xercesc/util/BinMemInputStream.hpp>
#include <xercesc/framework/MemBufInputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// MemBufInputSource: Constructors and Destructor
@@ -90,5 +90,5 @@
);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/MemBufInputSource.hpp b/src/xercesc/framework/MemBufInputSource.hpp
index 9bc7b5a..677271b 100644
--- a/src/xercesc/framework/MemBufInputSource.hpp
+++ b/src/xercesc/framework/MemBufInputSource.hpp
@@ -25,7 +25,7 @@
#include <xercesc/sax/InputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class BinInputStream;
@@ -225,6 +225,6 @@
fCopyBufToStream = newState;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/MemoryManager.hpp b/src/xercesc/framework/MemoryManager.hpp
index 564eea9..1961aa6 100644
--- a/src/xercesc/framework/MemoryManager.hpp
+++ b/src/xercesc/framework/MemoryManager.hpp
@@ -24,10 +24,10 @@
#define XERCESC_INCLUDE_GUARD_MEMORYMANAGER_HPP
#include <xercesc/util/XercesDefs.hpp>
-#include <stdlib.h>
+#include <cstdlib>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -120,6 +120,6 @@
MemoryManager& operator=(const MemoryManager&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/StdInInputSource.cpp b/src/xercesc/framework/StdInInputSource.cpp
index 4559a72..c7f3504 100644
--- a/src/xercesc/framework/StdInInputSource.cpp
+++ b/src/xercesc/framework/StdInInputSource.cpp
@@ -27,7 +27,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/framework/StdInInputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// StdInInputSource: Implementation of the input source interface
@@ -48,5 +48,5 @@
return retStream;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/StdInInputSource.hpp b/src/xercesc/framework/StdInInputSource.hpp
index e90dc31..3fb06d2 100644
--- a/src/xercesc/framework/StdInInputSource.hpp
+++ b/src/xercesc/framework/StdInInputSource.hpp
@@ -25,7 +25,7 @@
#include <xercesc/sax/InputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class BinInputStream;
@@ -103,6 +103,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/StdOutFormatTarget.cpp b/src/xercesc/framework/StdOutFormatTarget.cpp
index bdfa24c..0bc7df5 100644
--- a/src/xercesc/framework/StdOutFormatTarget.cpp
+++ b/src/xercesc/framework/StdOutFormatTarget.cpp
@@ -20,9 +20,9 @@
*/
#include <xercesc/framework/StdOutFormatTarget.hpp>
-#include <stdio.h>
+#include <cstdio>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
StdOutFormatTarget::StdOutFormatTarget()
{}
@@ -47,5 +47,5 @@
fflush(stdout);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/StdOutFormatTarget.hpp b/src/xercesc/framework/StdOutFormatTarget.hpp
index c58502c..b36a691 100644
--- a/src/xercesc/framework/StdOutFormatTarget.hpp
+++ b/src/xercesc/framework/StdOutFormatTarget.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/XMLFormatter.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLPARSER_EXPORT StdOutFormatTarget : public XMLFormatTarget {
public:
@@ -52,6 +52,6 @@
StdOutFormatTarget& operator=(const StdOutFormatTarget&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/URLInputSource.cpp b/src/xercesc/framework/URLInputSource.cpp
index 814fcae..5186414 100644
--- a/src/xercesc/framework/URLInputSource.cpp
+++ b/src/xercesc/framework/URLInputSource.cpp
@@ -29,7 +29,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/framework/URLInputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// URLInputSource: Constructors and Destructor
@@ -96,5 +96,5 @@
return fURL.makeNewStream();
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/URLInputSource.hpp b/src/xercesc/framework/URLInputSource.hpp
index 0cdcfe2..b3f2d88 100644
--- a/src/xercesc/framework/URLInputSource.hpp
+++ b/src/xercesc/framework/URLInputSource.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XMLURL.hpp>
#include <xercesc/sax/InputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class BinInputStream;
@@ -231,6 +231,6 @@
return fURL;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/ValidationContext.hpp b/src/xercesc/framework/ValidationContext.hpp
index edb3231..662f096 100644
--- a/src/xercesc/framework/ValidationContext.hpp
+++ b/src/xercesc/framework/ValidationContext.hpp
@@ -27,7 +27,7 @@
#include <xercesc/util/NameIdPool.hpp>
#include <xercesc/util/XMemory.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLRefInfo;
class DTDEntityDecl;
@@ -133,7 +133,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/Wrapper4DOMLSInput.cpp b/src/xercesc/framework/Wrapper4DOMLSInput.cpp
index 4e3c9e5..38ee5fa 100644
--- a/src/xercesc/framework/Wrapper4DOMLSInput.cpp
+++ b/src/xercesc/framework/Wrapper4DOMLSInput.cpp
@@ -32,7 +32,7 @@
#include <xercesc/framework/LocalFileInputSource.hpp>
#include <xercesc/framework/URLInputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Wrapper4DOMLSInput: Constructor and Destructor
@@ -156,5 +156,5 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/Wrapper4DOMLSInput.hpp b/src/xercesc/framework/Wrapper4DOMLSInput.hpp
index aaa5187..17928d1 100644
--- a/src/xercesc/framework/Wrapper4DOMLSInput.hpp
+++ b/src/xercesc/framework/Wrapper4DOMLSInput.hpp
@@ -24,7 +24,7 @@
#include <xercesc/sax/InputSource.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DOMLSInput;
class DOMLSResourceResolver;
@@ -224,7 +224,7 @@
DOMLSResourceResolver* fEntityResolver;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/Wrapper4InputSource.cpp b/src/xercesc/framework/Wrapper4InputSource.cpp
index e628fbd..f5b12d0 100644
--- a/src/xercesc/framework/Wrapper4InputSource.cpp
+++ b/src/xercesc/framework/Wrapper4InputSource.cpp
@@ -27,7 +27,7 @@
#include <xercesc/sax/InputSource.hpp>
#include <xercesc/util/NullPointerException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Wrapper4InputSource: Constructor and Destructor
@@ -117,5 +117,5 @@
delete src;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/Wrapper4InputSource.hpp b/src/xercesc/framework/Wrapper4InputSource.hpp
index 9c88699..11bfddb 100644
--- a/src/xercesc/framework/Wrapper4InputSource.hpp
+++ b/src/xercesc/framework/Wrapper4InputSource.hpp
@@ -25,7 +25,7 @@
#include <xercesc/dom/DOMLSInput.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class InputSource;
@@ -285,6 +285,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLAttDef.cpp b/src/xercesc/framework/XMLAttDef.cpp
index 849454a..e13f4f1 100644
--- a/src/xercesc/framework/XMLAttDef.cpp
+++ b/src/xercesc/framework/XMLAttDef.cpp
@@ -28,7 +28,7 @@
#include <xercesc/util/XMLUni.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Local const data
@@ -217,4 +217,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLAttDef.hpp b/src/xercesc/framework/XMLAttDef.hpp
index f5e479d..c72bd4e 100644
--- a/src/xercesc/framework/XMLAttDef.hpp
+++ b/src/xercesc/framework/XMLAttDef.hpp
@@ -27,7 +27,7 @@
#include <xercesc/util/XMemory.hpp>
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLAttr;
@@ -534,6 +534,6 @@
fExternalAttribute = aValue;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLAttDefList.cpp b/src/xercesc/framework/XMLAttDefList.cpp
index eb2c9c1..ac4a882 100644
--- a/src/xercesc/framework/XMLAttDefList.cpp
+++ b/src/xercesc/framework/XMLAttDefList.cpp
@@ -25,7 +25,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/framework/XMLAttDefList.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/***
* Support for Serialization/De-serialization
@@ -38,5 +38,5 @@
//no data
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLAttDefList.hpp b/src/xercesc/framework/XMLAttDefList.hpp
index f0353a9..76d505e 100644
--- a/src/xercesc/framework/XMLAttDefList.hpp
+++ b/src/xercesc/framework/XMLAttDefList.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/XMemory.hpp>
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLAttDef;
@@ -166,6 +166,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLAttr.cpp b/src/xercesc/framework/XMLAttr.cpp
index 4c61550..4aa8a0f 100644
--- a/src/xercesc/framework/XMLAttr.cpp
+++ b/src/xercesc/framework/XMLAttr.cpp
@@ -27,7 +27,7 @@
#include <xercesc/framework/MemoryManager.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XMLAttr: Constructors and Destructor
@@ -169,4 +169,4 @@
fMemoryManager->deallocate(fValue); //delete [] fValue;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLAttr.hpp b/src/xercesc/framework/XMLAttr.hpp
index 27a1ecb..e1eb921 100644
--- a/src/xercesc/framework/XMLAttr.hpp
+++ b/src/xercesc/framework/XMLAttr.hpp
@@ -27,7 +27,7 @@
#include <xercesc/framework/XMLAttDef.hpp>
#include <xercesc/validators/datatype/DatatypeValidator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class defines the information about an attribute that will come out
@@ -496,6 +496,6 @@
fSpecified = newValue;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLBuffer.cpp b/src/xercesc/framework/XMLBuffer.cpp
index 5ae3a14..b7810a9 100644
--- a/src/xercesc/framework/XMLBuffer.cpp
+++ b/src/xercesc/framework/XMLBuffer.cpp
@@ -27,7 +27,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/RuntimeException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XMLBuffer: Buffer management
@@ -82,5 +82,5 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLBuffer.hpp b/src/xercesc/framework/XMLBuffer.hpp
index 1062f6d..c2e57cf 100644
--- a/src/xercesc/framework/XMLBuffer.hpp
+++ b/src/xercesc/framework/XMLBuffer.hpp
@@ -25,9 +25,9 @@
#include <xercesc/util/XMemory.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/framework/MemoryManager.hpp>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLBufferFullHandler;
@@ -276,6 +276,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLBufferMgr.cpp b/src/xercesc/framework/XMLBufferMgr.cpp
index a0a4799..f6dc508 100644
--- a/src/xercesc/framework/XMLBufferMgr.cpp
+++ b/src/xercesc/framework/XMLBufferMgr.cpp
@@ -23,11 +23,11 @@
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
-//#include <string.h>
+//#include <cstring>
#include <xercesc/framework/XMLBufferMgr.hpp>
#include <xercesc/util/RuntimeException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Constructors and Destructor
@@ -111,4 +111,4 @@
ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::BufMgr_BufferNotInPool, fMemoryManager);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLBufferMgr.hpp b/src/xercesc/framework/XMLBufferMgr.hpp
index a77405f..66ca261 100644
--- a/src/xercesc/framework/XMLBufferMgr.hpp
+++ b/src/xercesc/framework/XMLBufferMgr.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/XMLBuffer.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLBufBid;
@@ -207,6 +207,6 @@
XMLBufferMgr* const fMgr;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLContentModel.cpp b/src/xercesc/framework/XMLContentModel.cpp
index a92c3f3..9e6f227 100644
--- a/src/xercesc/framework/XMLContentModel.cpp
+++ b/src/xercesc/framework/XMLContentModel.cpp
@@ -25,7 +25,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/framework/XMLContentModel.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// public static data
@@ -34,5 +34,5 @@
const unsigned int XMLContentModel::gEOCFakeId = 0xFFFFFFF1;
const unsigned int XMLContentModel::gEpsilonFakeId = 0xFFFFFFF2;
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLContentModel.hpp b/src/xercesc/framework/XMLContentModel.hpp
index 24d23ac..31fde21 100644
--- a/src/xercesc/framework/XMLContentModel.hpp
+++ b/src/xercesc/framework/XMLContentModel.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XMemory.hpp>
#include <xercesc/util/QName.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class ContentLeafNameTypeVector;
class GrammarResolver;
@@ -140,6 +140,6 @@
XMLContentModel& operator=(const XMLContentModel&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLDTDDescription.cpp b/src/xercesc/framework/XMLDTDDescription.cpp
index 058e56a..58b5dc9 100644
--- a/src/xercesc/framework/XMLDTDDescription.cpp
+++ b/src/xercesc/framework/XMLDTDDescription.cpp
@@ -25,7 +25,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/framework/XMLDTDDescription.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
XMLDTDDescription::~XMLDTDDescription()
{
@@ -50,5 +50,5 @@
//no data
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLDTDDescription.hpp b/src/xercesc/framework/XMLDTDDescription.hpp
index e4a5455..3ef2532 100644
--- a/src/xercesc/framework/XMLDTDDescription.hpp
+++ b/src/xercesc/framework/XMLDTDDescription.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/XMLGrammarDescription.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLPARSER_EXPORT XMLDTDDescription : public XMLGrammarDescription
{
@@ -98,6 +98,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLDocumentHandler.hpp b/src/xercesc/framework/XMLDocumentHandler.hpp
index 29d10ab..65b30d4 100644
--- a/src/xercesc/framework/XMLDocumentHandler.hpp
+++ b/src/xercesc/framework/XMLDocumentHandler.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/framework/XMLAttr.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLElementDecl;
class XMLEntityDecl;
@@ -278,6 +278,6 @@
XMLDocumentHandler& operator=(const XMLDocumentHandler&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLElementDecl.cpp b/src/xercesc/framework/XMLElementDecl.cpp
index a0f4353..104cb8f 100644
--- a/src/xercesc/framework/XMLElementDecl.cpp
+++ b/src/xercesc/framework/XMLElementDecl.cpp
@@ -30,7 +30,7 @@
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
#include <xercesc/validators/DTD/DTDElementDecl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XMLElementDecl: Public, static data
@@ -167,4 +167,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLElementDecl.hpp b/src/xercesc/framework/XMLElementDecl.hpp
index 4501362..f73ca4c 100644
--- a/src/xercesc/framework/XMLElementDecl.hpp
+++ b/src/xercesc/framework/XMLElementDecl.hpp
@@ -28,7 +28,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class ContentSpecNode;
class XMLContentModel;
@@ -547,6 +547,6 @@
fExternalElement = aValue;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLEntityDecl.cpp b/src/xercesc/framework/XMLEntityDecl.cpp
index 43204b2..b6a7308 100644
--- a/src/xercesc/framework/XMLEntityDecl.cpp
+++ b/src/xercesc/framework/XMLEntityDecl.cpp
@@ -27,7 +27,7 @@
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XMLEntityDecl: Constructors and Destructor
@@ -197,4 +197,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLEntityDecl.hpp b/src/xercesc/framework/XMLEntityDecl.hpp
index 25c6049..048e2fb 100644
--- a/src/xercesc/framework/XMLEntityDecl.hpp
+++ b/src/xercesc/framework/XMLEntityDecl.hpp
@@ -27,7 +27,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class defines that core information that defines an XML entity, no
@@ -507,6 +507,6 @@
return fName;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLEntityHandler.hpp b/src/xercesc/framework/XMLEntityHandler.hpp
index 67e1ec7..d46ff68 100644
--- a/src/xercesc/framework/XMLEntityHandler.hpp
+++ b/src/xercesc/framework/XMLEntityHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class InputSource;
class XMLBuffer;
@@ -152,6 +152,6 @@
XMLEntityHandler& operator=(const XMLEntityHandler&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLErrorCodes.hpp b/src/xercesc/framework/XMLErrorCodes.hpp
index ea3a629..3431d67 100644
--- a/src/xercesc/framework/XMLErrorCodes.hpp
+++ b/src/xercesc/framework/XMLErrorCodes.hpp
@@ -7,7 +7,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMError.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLErrs
{
@@ -345,7 +345,7 @@
XMLErrs();
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLErrorReporter.hpp b/src/xercesc/framework/XMLErrorReporter.hpp
index e49cf65..ef80e24 100644
--- a/src/xercesc/framework/XMLErrorReporter.hpp
+++ b/src/xercesc/framework/XMLErrorReporter.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -157,6 +157,6 @@
XMLErrorReporter& operator=(const XMLErrorReporter&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLFormatter.cpp b/src/xercesc/framework/XMLFormatter.cpp
index 797335d..07dbc3d 100644
--- a/src/xercesc/framework/XMLFormatter.cpp
+++ b/src/xercesc/framework/XMLFormatter.cpp
@@ -33,9 +33,9 @@
#include <xercesc/util/Janitor.hpp>
#include <xercesc/util/XMLChar.hpp>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Local data
@@ -701,4 +701,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLFormatter.hpp b/src/xercesc/framework/XMLFormatter.hpp
index af3845c..f9c30eb 100644
--- a/src/xercesc/framework/XMLFormatter.hpp
+++ b/src/xercesc/framework/XMLFormatter.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLFormatTarget;
class XMLTranscoder;
@@ -533,6 +533,6 @@
return fUnRepFlags;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLGrammarDescription.cpp b/src/xercesc/framework/XMLGrammarDescription.cpp
index 942f730..3f5ebd5 100644
--- a/src/xercesc/framework/XMLGrammarDescription.cpp
+++ b/src/xercesc/framework/XMLGrammarDescription.cpp
@@ -25,7 +25,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/framework/XMLGrammarDescription.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
XMLGrammarDescription::~XMLGrammarDescription()
{
@@ -47,5 +47,5 @@
//no data
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLGrammarDescription.hpp b/src/xercesc/framework/XMLGrammarDescription.hpp
index 12e309d..eeee885 100644
--- a/src/xercesc/framework/XMLGrammarDescription.hpp
+++ b/src/xercesc/framework/XMLGrammarDescription.hpp
@@ -27,7 +27,7 @@
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLPARSER_EXPORT XMLGrammarDescription : public XSerializable, public XMemory
{
@@ -100,6 +100,6 @@
return fMemMgr;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLGrammarPool.hpp b/src/xercesc/framework/XMLGrammarPool.hpp
index ae9d654..abe038c 100644
--- a/src/xercesc/framework/XMLGrammarPool.hpp
+++ b/src/xercesc/framework/XMLGrammarPool.hpp
@@ -28,7 +28,7 @@
#include <xercesc/framework/psvi/XSModel.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class Grammar;
class XMLGrammarDescription;
@@ -317,6 +317,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLGrammarPoolImpl.cpp b/src/xercesc/framework/XMLGrammarPoolImpl.cpp
index 7e67c2d..506b68c 100644
--- a/src/xercesc/framework/XMLGrammarPoolImpl.cpp
+++ b/src/xercesc/framework/XMLGrammarPoolImpl.cpp
@@ -33,7 +33,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/SynchronizedStringPool.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// private function used to update fXSModel
void XMLGrammarPoolImpl::createXSModel()
@@ -361,4 +361,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLGrammarPoolImpl.hpp b/src/xercesc/framework/XMLGrammarPoolImpl.hpp
index 877a170..5fc5eaf 100644
--- a/src/xercesc/framework/XMLGrammarPoolImpl.hpp
+++ b/src/xercesc/framework/XMLGrammarPoolImpl.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/XMLGrammarPool.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLSynchronizedStringPool;
@@ -274,6 +274,6 @@
bool fXSModelIsValid;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLNotationDecl.cpp b/src/xercesc/framework/XMLNotationDecl.cpp
index 0fcf4cb..816634f 100644
--- a/src/xercesc/framework/XMLNotationDecl.cpp
+++ b/src/xercesc/framework/XMLNotationDecl.cpp
@@ -26,7 +26,7 @@
#include <xercesc/framework/XMLNotationDecl.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XMLNotationDecl: Constructors and operators
@@ -137,4 +137,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLNotationDecl.hpp b/src/xercesc/framework/XMLNotationDecl.hpp
index 5f1e4ac..6396f13 100644
--- a/src/xercesc/framework/XMLNotationDecl.hpp
+++ b/src/xercesc/framework/XMLNotationDecl.hpp
@@ -27,7 +27,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class represents the core information about a notation declaration
@@ -226,6 +226,6 @@
return fName;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLPScanToken.hpp b/src/xercesc/framework/XMLPScanToken.hpp
index f816396..5ddcde5 100644
--- a/src/xercesc/framework/XMLPScanToken.hpp
+++ b/src/xercesc/framework/XMLPScanToken.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XMemory.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLScanner;
@@ -146,6 +146,6 @@
fSequenceId = sequenceId;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLRecognizer.cpp b/src/xercesc/framework/XMLRecognizer.cpp
index 6fbf978..f173c7a 100644
--- a/src/xercesc/framework/XMLRecognizer.cpp
+++ b/src/xercesc/framework/XMLRecognizer.cpp
@@ -27,7 +27,7 @@
#include <xercesc/util/RuntimeException.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Local data
@@ -267,4 +267,4 @@
return gEncodingNameMap[theEncoding];
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLRecognizer.hpp b/src/xercesc/framework/XMLRecognizer.hpp
index 255e5b2..91cab6e 100644
--- a/src/xercesc/framework/XMLRecognizer.hpp
+++ b/src/xercesc/framework/XMLRecognizer.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class provides some simple code to recognize the encodings of
@@ -133,6 +133,6 @@
XMLRecognizer& operator=(const XMLRecognizer&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLRefInfo.cpp b/src/xercesc/framework/XMLRefInfo.cpp
index 37529fa..05d88b3 100644
--- a/src/xercesc/framework/XMLRefInfo.cpp
+++ b/src/xercesc/framework/XMLRefInfo.cpp
@@ -24,7 +24,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/framework/XMLRefInfo.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/***
* Support for Serialization/De-serialization
@@ -57,4 +57,4 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLRefInfo.hpp b/src/xercesc/framework/XMLRefInfo.hpp
index f2c7137..413001e 100644
--- a/src/xercesc/framework/XMLRefInfo.hpp
+++ b/src/xercesc/framework/XMLRefInfo.hpp
@@ -28,7 +28,7 @@
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class provides a simple means to track ID Ref usage. Since id/idref
@@ -176,6 +176,6 @@
fUsed = newValue;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLSchemaDescription.cpp b/src/xercesc/framework/XMLSchemaDescription.cpp
index 7396105..927e6d0 100644
--- a/src/xercesc/framework/XMLSchemaDescription.cpp
+++ b/src/xercesc/framework/XMLSchemaDescription.cpp
@@ -25,7 +25,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/framework/XMLSchemaDescription.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
XMLSchemaDescription::~XMLSchemaDescription()
{
@@ -49,5 +49,5 @@
//no data
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLSchemaDescription.hpp b/src/xercesc/framework/XMLSchemaDescription.hpp
index f0c2920..2b7b25c 100644
--- a/src/xercesc/framework/XMLSchemaDescription.hpp
+++ b/src/xercesc/framework/XMLSchemaDescription.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/XMLGrammarDescription.hpp>
#include <xercesc/util/RefArrayVectorOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
typedef const XMLCh* const LocationHint;
@@ -173,6 +173,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLValidator.cpp b/src/xercesc/framework/XMLValidator.cpp
index 233ea23..d6982d5 100644
--- a/src/xercesc/framework/XMLValidator.cpp
+++ b/src/xercesc/framework/XMLValidator.cpp
@@ -28,7 +28,7 @@
#include <xercesc/util/XMLMsgLoader.hpp>
#include <xercesc/internal/XMLScanner.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
static XMLMsgLoader* sMsgLoader = 0;
@@ -293,4 +293,4 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/XMLValidator.hpp b/src/xercesc/framework/XMLValidator.hpp
index 959483c..355df07 100644
--- a/src/xercesc/framework/XMLValidator.hpp
+++ b/src/xercesc/framework/XMLValidator.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/XMLAttr.hpp>
#include <xercesc/framework/XMLValidityCodes.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class ReaderMgr;
class XMLBufferMgr;
@@ -421,6 +421,6 @@
return fScanner;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/XMLValidityCodes.hpp b/src/xercesc/framework/XMLValidityCodes.hpp
index aed00fb..08339bf 100644
--- a/src/xercesc/framework/XMLValidityCodes.hpp
+++ b/src/xercesc/framework/XMLValidityCodes.hpp
@@ -7,7 +7,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMError.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLValid
{
@@ -141,7 +141,7 @@
XMLValid();
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/PSVIAttribute.cpp b/src/xercesc/framework/psvi/PSVIAttribute.cpp
index 9500bb4..1e0839a 100644
--- a/src/xercesc/framework/psvi/PSVIAttribute.cpp
+++ b/src/xercesc/framework/psvi/PSVIAttribute.cpp
@@ -21,7 +21,7 @@
#include <xercesc/framework/psvi/PSVIAttribute.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
PSVIAttribute::PSVIAttribute( MemoryManager* const manager ):
PSVIItem(manager)
@@ -66,6 +66,6 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/PSVIAttribute.hpp b/src/xercesc/framework/psvi/PSVIAttribute.hpp
index ecc2100..6711d09 100644
--- a/src/xercesc/framework/psvi/PSVIAttribute.hpp
+++ b/src/xercesc/framework/psvi/PSVIAttribute.hpp
@@ -26,7 +26,7 @@
#include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp>
#include <xercesc/validators/datatype/DatatypeValidator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Represent the PSVI contributions for one attribute information item.
@@ -174,6 +174,6 @@
fValidityState = newValue;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/PSVIAttributeList.cpp b/src/xercesc/framework/psvi/PSVIAttributeList.cpp
index a44882e..5ea441c 100644
--- a/src/xercesc/framework/psvi/PSVIAttributeList.cpp
+++ b/src/xercesc/framework/psvi/PSVIAttributeList.cpp
@@ -23,7 +23,7 @@
#include <xercesc/framework/psvi/XSAttributeDeclaration.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
PSVIAttributeList::PSVIAttributeList( MemoryManager* const manager ):
fMemoryManager(manager)
@@ -107,4 +107,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/PSVIAttributeList.hpp b/src/xercesc/framework/psvi/PSVIAttributeList.hpp
index 2e0c59e..58cb7ca 100644
--- a/src/xercesc/framework/psvi/PSVIAttributeList.hpp
+++ b/src/xercesc/framework/psvi/PSVIAttributeList.hpp
@@ -26,7 +26,7 @@
#include <xercesc/framework/psvi/PSVIAttribute.hpp>
#include <xercesc/util/RefVectorOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* A container for the PSVI contributions to attributes that occur
@@ -210,6 +210,6 @@
fAttrPos = 0;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/PSVIElement.cpp b/src/xercesc/framework/psvi/PSVIElement.cpp
index fa93b9c..ba7b93b 100644
--- a/src/xercesc/framework/psvi/PSVIElement.cpp
+++ b/src/xercesc/framework/psvi/PSVIElement.cpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSComplexTypeDefinition.hpp>
#include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
PSVIElement::PSVIElement(MemoryManager* const manager):
PSVIItem(manager),
@@ -88,6 +88,6 @@
fCanonicalValue = canonicalValue;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/PSVIElement.hpp b/src/xercesc/framework/psvi/PSVIElement.hpp
index 40a3991..517b7e6 100644
--- a/src/xercesc/framework/psvi/PSVIElement.hpp
+++ b/src/xercesc/framework/psvi/PSVIElement.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/PSVIItem.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Represent the PSVI contributions for one element information item.
@@ -169,6 +169,6 @@
return fSchemaInfo;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/PSVIHandler.hpp b/src/xercesc/framework/psvi/PSVIHandler.hpp
index 07d4887..c47ffed 100644
--- a/src/xercesc/framework/psvi/PSVIHandler.hpp
+++ b/src/xercesc/framework/psvi/PSVIHandler.hpp
@@ -23,7 +23,7 @@
#define XERCESC_INCLUDE_GUARD_PSVIHANDLER_HPP
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class PSVIElement;
@@ -143,6 +143,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/PSVIItem.cpp b/src/xercesc/framework/psvi/PSVIItem.cpp
index 641f708..1e463d1 100644
--- a/src/xercesc/framework/psvi/PSVIItem.cpp
+++ b/src/xercesc/framework/psvi/PSVIItem.cpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSComplexTypeDefinition.hpp>
#include <xercesc/validators/datatype/DatatypeValidatorFactory.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
PSVIItem::PSVIItem( MemoryManager* const manager ):
fMemoryManager(manager),
@@ -140,6 +140,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/PSVIItem.hpp b/src/xercesc/framework/psvi/PSVIItem.hpp
index ab8a135..3e89dff 100644
--- a/src/xercesc/framework/psvi/PSVIItem.hpp
+++ b/src/xercesc/framework/psvi/PSVIItem.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Represent the PSVI contributions for one element or one attribute information item.
@@ -304,6 +304,6 @@
return fAssessmentType;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSAnnotation.cpp b/src/xercesc/framework/psvi/XSAnnotation.cpp
index c714e3a..171a5be 100644
--- a/src/xercesc/framework/psvi/XSAnnotation.cpp
+++ b/src/xercesc/framework/psvi/XSAnnotation.cpp
@@ -29,7 +29,7 @@
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/dom/DOMElement.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
XSAnnotation::XSAnnotation(const XMLCh* const content,
MemoryManager * const manager)
@@ -187,4 +187,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSAnnotation.hpp b/src/xercesc/framework/psvi/XSAnnotation.hpp
index f10755a..a53efd0 100644
--- a/src/xercesc/framework/psvi/XSAnnotation.hpp
+++ b/src/xercesc/framework/psvi/XSAnnotation.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
#include <xercesc/internal/XSerializable.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Annotation
@@ -190,6 +190,6 @@
fCol = col;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSAttributeDeclaration.cpp b/src/xercesc/framework/psvi/XSAttributeDeclaration.cpp
index 43aab76..def0aaf 100644
--- a/src/xercesc/framework/psvi/XSAttributeDeclaration.cpp
+++ b/src/xercesc/framework/psvi/XSAttributeDeclaration.cpp
@@ -27,7 +27,7 @@
#include <xercesc/validators/schema/SchemaGrammar.hpp>
#include <xercesc/validators/schema/SchemaAttDef.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSAttributeDeclaration: Constructors and Destructor
@@ -107,6 +107,6 @@
return false;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSAttributeDeclaration.hpp b/src/xercesc/framework/psvi/XSAttributeDeclaration.hpp
index 8a3fa6b..1cf4b8b 100644
--- a/src/xercesc/framework/psvi/XSAttributeDeclaration.hpp
+++ b/src/xercesc/framework/psvi/XSAttributeDeclaration.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Attribute
@@ -205,6 +205,6 @@
fEnclosingCTDefinition = toSet;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSAttributeGroupDefinition.cpp b/src/xercesc/framework/psvi/XSAttributeGroupDefinition.cpp
index f4e24bc..5d0a1b1 100644
--- a/src/xercesc/framework/psvi/XSAttributeGroupDefinition.cpp
+++ b/src/xercesc/framework/psvi/XSAttributeGroupDefinition.cpp
@@ -24,7 +24,7 @@
#include <xercesc/validators/schema/XercesAttGroupInfo.hpp>
#include <xercesc/framework/psvi/XSModel.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSAttributeGroupDefinition: Constructors and Destructor
@@ -71,6 +71,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSAttributeGroupDefinition.hpp b/src/xercesc/framework/psvi/XSAttributeGroupDefinition.hpp
index fc610de..3cf41c9 100644
--- a/src/xercesc/framework/psvi/XSAttributeGroupDefinition.hpp
+++ b/src/xercesc/framework/psvi/XSAttributeGroupDefinition.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Attribute
@@ -162,6 +162,6 @@
return fAnnotation;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSAttributeUse.cpp b/src/xercesc/framework/psvi/XSAttributeUse.cpp
index c9e407a..5cb981a 100644
--- a/src/xercesc/framework/psvi/XSAttributeUse.cpp
+++ b/src/xercesc/framework/psvi/XSAttributeUse.cpp
@@ -21,7 +21,7 @@
#include <xercesc/framework/psvi/XSAttributeUse.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSAttributeUse: Constructors and Destructor
@@ -56,6 +56,6 @@
fConstraintValue = constraintValue;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSAttributeUse.hpp b/src/xercesc/framework/psvi/XSAttributeUse.hpp
index a3b7629..7534b62 100644
--- a/src/xercesc/framework/psvi/XSAttributeUse.hpp
+++ b/src/xercesc/framework/psvi/XSAttributeUse.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Attribute
@@ -151,6 +151,6 @@
return fConstraintValue;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSComplexTypeDefinition.cpp b/src/xercesc/framework/psvi/XSComplexTypeDefinition.cpp
index 70b2acb..60b30f2 100644
--- a/src/xercesc/framework/psvi/XSComplexTypeDefinition.cpp
+++ b/src/xercesc/framework/psvi/XSComplexTypeDefinition.cpp
@@ -31,7 +31,7 @@
#include <xercesc/validators/schema/SchemaAttDefList.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSComplexTypeDefinition: Constructors and Destructor
@@ -204,4 +204,4 @@
return (type == ancestorType);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSComplexTypeDefinition.hpp b/src/xercesc/framework/psvi/XSComplexTypeDefinition.hpp
index 8ee1a4f..269dd60 100644
--- a/src/xercesc/framework/psvi/XSComplexTypeDefinition.hpp
+++ b/src/xercesc/framework/psvi/XSComplexTypeDefinition.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSTypeDefinition.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class represents a complexType definition
@@ -289,6 +289,6 @@
fBaseType = xsBaseType;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSConstants.hpp b/src/xercesc/framework/psvi/XSConstants.hpp
index 897dea2..2bf90b2 100644
--- a/src/xercesc/framework/psvi/XSConstants.hpp
+++ b/src/xercesc/framework/psvi/XSConstants.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/util/RefArrayVectorOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This contains constants needed in the schema component model.
@@ -53,9 +53,8 @@
typedef RefVectorOf <XSSimpleTypeDefinition> XSSimpleTypeDefinitionList;
typedef RefArrayVectorOf <XMLCh> StringList;
-class XMLPARSER_EXPORT XSConstants
+namespace XSConstants
{
-public:
// XML Schema Components
enum COMPONENT_TYPE {
@@ -184,13 +183,8 @@
VALUE_CONSTRAINT_FIXED = 2
};
-private:
- // -----------------------------------------------------------------------
- // Unimplemented constructors and operators
- // -----------------------------------------------------------------------
- XSConstants();
-};
+}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSElementDeclaration.cpp b/src/xercesc/framework/psvi/XSElementDeclaration.cpp
index bd83bbf..98832c0 100644
--- a/src/xercesc/framework/psvi/XSElementDeclaration.cpp
+++ b/src/xercesc/framework/psvi/XSElementDeclaration.cpp
@@ -27,7 +27,7 @@
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
#include <xercesc/util/StringPool.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSElementDeclaration: Constructors and Destructor
@@ -160,4 +160,4 @@
return false;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSElementDeclaration.hpp b/src/xercesc/framework/psvi/XSElementDeclaration.hpp
index 4bb1000..9df80bd 100644
--- a/src/xercesc/framework/psvi/XSElementDeclaration.hpp
+++ b/src/xercesc/framework/psvi/XSElementDeclaration.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
#include <xercesc/framework/psvi/XSNamedMap.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Element Declaration
@@ -302,6 +302,6 @@
fEnclosingTypeDefinition = toSet;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSFacet.cpp b/src/xercesc/framework/psvi/XSFacet.cpp
index 9c45d04..58ea2e1 100644
--- a/src/xercesc/framework/psvi/XSFacet.cpp
+++ b/src/xercesc/framework/psvi/XSFacet.cpp
@@ -21,7 +21,7 @@
#include <xercesc/framework/psvi/XSFacet.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSFacet: Constructors and Destructor
@@ -44,6 +44,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSFacet.hpp b/src/xercesc/framework/psvi/XSFacet.hpp
index 51a6184..faa4b02 100644
--- a/src/xercesc/framework/psvi/XSFacet.hpp
+++ b/src/xercesc/framework/psvi/XSFacet.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This represents all Schema Facet components with the exception
@@ -146,6 +146,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSIDCDefinition.cpp b/src/xercesc/framework/psvi/XSIDCDefinition.cpp
index d2ccae1..b3f212d 100644
--- a/src/xercesc/framework/psvi/XSIDCDefinition.cpp
+++ b/src/xercesc/framework/psvi/XSIDCDefinition.cpp
@@ -27,7 +27,7 @@
#include <xercesc/framework/psvi/XSAnnotation.hpp>
#include <xercesc/util/StringPool.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSIDCDefinition: Constructors and Destructor
@@ -117,6 +117,6 @@
return fXSAnnotationList;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSIDCDefinition.hpp b/src/xercesc/framework/psvi/XSIDCDefinition.hpp
index ffeec1e..e5fdf93 100644
--- a/src/xercesc/framework/psvi/XSIDCDefinition.hpp
+++ b/src/xercesc/framework/psvi/XSIDCDefinition.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Identity Constraint
@@ -185,6 +185,6 @@
return fKey;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSModel.cpp b/src/xercesc/framework/psvi/XSModel.cpp
index fbb170b..7ae94cb 100644
--- a/src/xercesc/framework/psvi/XSModel.cpp
+++ b/src/xercesc/framework/psvi/XSModel.cpp
@@ -34,7 +34,7 @@
#include <xercesc/framework/psvi/XSComplexTypeDefinition.hpp>
#include <xercesc/framework/psvi/XSModelGroupDefinition.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSModel: Constructors and Destructor
@@ -796,4 +796,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSModel.hpp b/src/xercesc/framework/psvi/XSModel.hpp
index 35b818a..a68b35d 100644
--- a/src/xercesc/framework/psvi/XSModel.hpp
+++ b/src/xercesc/framework/psvi/XSModel.hpp
@@ -29,7 +29,7 @@
#include <xercesc/util/ValueVectorOf.hpp>
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class contains all properties of the Schema infoitem as determined
@@ -333,6 +333,6 @@
return fXSNamespaceItemList;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSModelGroup.cpp b/src/xercesc/framework/psvi/XSModelGroup.cpp
index 924f341..1ebef3d 100644
--- a/src/xercesc/framework/psvi/XSModelGroup.cpp
+++ b/src/xercesc/framework/psvi/XSModelGroup.cpp
@@ -22,7 +22,7 @@
#include <xercesc/framework/psvi/XSModelGroup.hpp>
#include <xercesc/framework/psvi/XSParticle.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSModelGroup: Constructors and Destructor
@@ -45,6 +45,6 @@
delete fParticleList;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSModelGroup.hpp b/src/xercesc/framework/psvi/XSModelGroup.hpp
index a7bce75..c025968 100644
--- a/src/xercesc/framework/psvi/XSModelGroup.hpp
+++ b/src/xercesc/framework/psvi/XSModelGroup.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Model Group
@@ -151,6 +151,6 @@
return fAnnotation;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSModelGroupDefinition.cpp b/src/xercesc/framework/psvi/XSModelGroupDefinition.cpp
index 8e1878d..73a308b 100644
--- a/src/xercesc/framework/psvi/XSModelGroupDefinition.cpp
+++ b/src/xercesc/framework/psvi/XSModelGroupDefinition.cpp
@@ -25,7 +25,7 @@
#include <xercesc/validators/schema/XercesGroupInfo.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSModelGroupDefinition: Constructors and Destructors
@@ -78,6 +78,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSModelGroupDefinition.hpp b/src/xercesc/framework/psvi/XSModelGroupDefinition.hpp
index 87b81b3..68a7ed3 100644
--- a/src/xercesc/framework/psvi/XSModelGroupDefinition.hpp
+++ b/src/xercesc/framework/psvi/XSModelGroupDefinition.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Model Group
@@ -145,6 +145,6 @@
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSMultiValueFacet.cpp b/src/xercesc/framework/psvi/XSMultiValueFacet.cpp
index 57cb093..c6e9c33 100644
--- a/src/xercesc/framework/psvi/XSMultiValueFacet.cpp
+++ b/src/xercesc/framework/psvi/XSMultiValueFacet.cpp
@@ -22,7 +22,7 @@
#include <xercesc/framework/psvi/XSMultiValueFacet.hpp>
#include <xercesc/framework/psvi/XSAnnotation.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSMultiValueFacet: Constructors and Destructors
@@ -59,6 +59,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSMultiValueFacet.hpp b/src/xercesc/framework/psvi/XSMultiValueFacet.hpp
index e22dc7a..127c12c 100644
--- a/src/xercesc/framework/psvi/XSMultiValueFacet.hpp
+++ b/src/xercesc/framework/psvi/XSMultiValueFacet.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
#include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class represents all Schema Facets which may possess multiple
@@ -147,6 +147,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSNamedMap.c b/src/xercesc/framework/psvi/XSNamedMap.c
index ad01e59..e2297ab 100644
--- a/src/xercesc/framework/psvi/XSNamedMap.c
+++ b/src/xercesc/framework/psvi/XSNamedMap.c
@@ -30,7 +30,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/util/StringPool.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSNamedMap: Constructors and Destructor
@@ -121,4 +121,4 @@
fHash->put((void*)key1, fURIStringPool->getId(key2), toAdd);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSNamedMap.hpp b/src/xercesc/framework/psvi/XSNamedMap.hpp
index 2fe5346..f523247 100644
--- a/src/xercesc/framework/psvi/XSNamedMap.hpp
+++ b/src/xercesc/framework/psvi/XSNamedMap.hpp
@@ -27,7 +27,7 @@
#include <xercesc/util/RefHash2KeysTableOf.hpp>
#include <xercesc/util/RefVectorOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLStringPool;
@@ -129,7 +129,7 @@
-XERCES_CPP_NAMESPACE_END
+}
#if !defined(XERCES_TMPLSINC)
#include <xercesc/framework/psvi/XSNamedMap.c>
diff --git a/src/xercesc/framework/psvi/XSNamespaceItem.cpp b/src/xercesc/framework/psvi/XSNamespaceItem.cpp
index 2816932..c1f57e3 100644
--- a/src/xercesc/framework/psvi/XSNamespaceItem.cpp
+++ b/src/xercesc/framework/psvi/XSNamespaceItem.cpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/psvi/XSAnnotation.hpp>
#include <xercesc/validators/schema/XMLSchemaDescriptionImpl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSNamespaceItem: Constructors and Destructors
@@ -215,4 +215,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSNamespaceItem.hpp b/src/xercesc/framework/psvi/XSNamespaceItem.hpp
index 8446cd0..1876c5f 100644
--- a/src/xercesc/framework/psvi/XSNamespaceItem.hpp
+++ b/src/xercesc/framework/psvi/XSNamespaceItem.hpp
@@ -26,7 +26,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
#include <xercesc/framework/psvi/XSNamedMap.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class contains all properties of the Schema Namespace Information infoitem.
@@ -240,6 +240,6 @@
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSNotationDeclaration.cpp b/src/xercesc/framework/psvi/XSNotationDeclaration.cpp
index af6525b..9295945 100644
--- a/src/xercesc/framework/psvi/XSNotationDeclaration.cpp
+++ b/src/xercesc/framework/psvi/XSNotationDeclaration.cpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/XMLNotationDecl.hpp>
#include <xercesc/framework/psvi/XSModel.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSNotationDeclaration: Constructors and Destructors
@@ -78,6 +78,6 @@
return fXMLNotationDecl->getPublicId();
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSNotationDeclaration.hpp b/src/xercesc/framework/psvi/XSNotationDeclaration.hpp
index 2e2cf74..8499a02 100644
--- a/src/xercesc/framework/psvi/XSNotationDeclaration.hpp
+++ b/src/xercesc/framework/psvi/XSNotationDeclaration.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Notation Declaration
@@ -149,6 +149,6 @@
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSObject.cpp b/src/xercesc/framework/psvi/XSObject.cpp
index d0e4154..af00d49 100644
--- a/src/xercesc/framework/psvi/XSObject.cpp
+++ b/src/xercesc/framework/psvi/XSObject.cpp
@@ -22,7 +22,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
#include <xercesc/framework/psvi/XSModel.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSObject: Constructors and Destructor
@@ -73,4 +73,4 @@
fId = id;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSObject.hpp b/src/xercesc/framework/psvi/XSObject.hpp
index b1e28a4..e1b0a6f 100644
--- a/src/xercesc/framework/psvi/XSObject.hpp
+++ b/src/xercesc/framework/psvi/XSObject.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/framework/psvi/XSConstants.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* The XSObject forms the base of the Schema Component Model. It contains
@@ -147,6 +147,6 @@
return fComponentType;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSParticle.cpp b/src/xercesc/framework/psvi/XSParticle.cpp
index 2a74275..56ff5f7 100644
--- a/src/xercesc/framework/psvi/XSParticle.cpp
+++ b/src/xercesc/framework/psvi/XSParticle.cpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSModelGroup.hpp>
#include <xercesc/framework/psvi/XSWildcard.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSParticle: Constructors and Destructor
@@ -78,4 +78,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSParticle.hpp b/src/xercesc/framework/psvi/XSParticle.hpp
index 8d3769b..479cd3e 100644
--- a/src/xercesc/framework/psvi/XSParticle.hpp
+++ b/src/xercesc/framework/psvi/XSParticle.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Particle
@@ -193,6 +193,6 @@
return fTermType;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSSimpleTypeDefinition.cpp b/src/xercesc/framework/psvi/XSSimpleTypeDefinition.cpp
index 0755c4f..b8a8185 100644
--- a/src/xercesc/framework/psvi/XSSimpleTypeDefinition.cpp
+++ b/src/xercesc/framework/psvi/XSSimpleTypeDefinition.cpp
@@ -29,7 +29,7 @@
#include <xercesc/util/XMLStringTokenizer.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Local, static functions
@@ -246,4 +246,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSSimpleTypeDefinition.hpp b/src/xercesc/framework/psvi/XSSimpleTypeDefinition.hpp
index 3c1f5e2..8c8e55d 100644
--- a/src/xercesc/framework/psvi/XSSimpleTypeDefinition.hpp
+++ b/src/xercesc/framework/psvi/XSSimpleTypeDefinition.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSTypeDefinition.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class represents a simpleType definition
@@ -453,6 +453,6 @@
return fDatatypeValidator;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSTypeDefinition.cpp b/src/xercesc/framework/psvi/XSTypeDefinition.cpp
index 3063999..1ea53c8 100644
--- a/src/xercesc/framework/psvi/XSTypeDefinition.cpp
+++ b/src/xercesc/framework/psvi/XSTypeDefinition.cpp
@@ -23,7 +23,7 @@
#include <xercesc/framework/psvi/XSModel.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSTypeDefinition: Constructors and Destructor
@@ -69,6 +69,6 @@
return derivedFromType(type);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSTypeDefinition.hpp b/src/xercesc/framework/psvi/XSTypeDefinition.hpp
index 9f8bf9c..1e89d8d 100644
--- a/src/xercesc/framework/psvi/XSTypeDefinition.hpp
+++ b/src/xercesc/framework/psvi/XSTypeDefinition.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// forward declarations
class XSNamespaceItem;
@@ -209,6 +209,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSValue.cpp b/src/xercesc/framework/psvi/XSValue.cpp
index caed61c..5581cb8 100644
--- a/src/xercesc/framework/psvi/XSValue.cpp
+++ b/src/xercesc/framework/psvi/XSValue.cpp
@@ -21,10 +21,11 @@
#include <limits.h>
#include <errno.h>
-#include <string.h>
+#include <cstring>
#include <ctype.h>
#include <math.h>
#include <float.h>
+#include <limits>
#include <xercesc/framework/psvi/XSValue.hpp>
@@ -48,7 +49,7 @@
#include <xercesc/util/TransService.hpp>
#include <xercesc/util/NumberFormatException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/*** issues
*
@@ -95,21 +96,21 @@
* dt_ENTITY str [4] NCName NA content
* ---------------------------------------------------------------------------------------------------------
* 30 dt_ENTITIES str ws seped ENTITY NA content
- * dt_integer num lexical yes long
- * dt_nonPositiveInteger num lexical yes long
- * dt_negativeInteger num lexical yes long
- * dt_long num lexical yes long
+ * dt_integer num lexical yes int64_t
+ * dt_nonPositiveInteger num lexical yes int64_t
+ * dt_negativeInteger num lexical yes int64_t
+ * dt_long num lexical yes int64_t
* ---------------------------------------------------------------------------------------------------------
- * 35 dt_int num lexical yes int
- * dt_short num lexical yes short
- * dt_byte num lexical yes char
- * dt_nonNegativeInteger num lexical yes unsigned long
- * dt_unsignedLong num lexical yes unsigned long
+ * 35 dt_int num lexical yes int32_t
+ * dt_short num lexical yes int16_t
+ * dt_byte num lexical yes int8_t
+ * dt_nonNegativeInteger num lexical yes uint64_t
+ * dt_unsignedLong num lexical yes uint64_t
* ---------------------------------------------------------------------------------------------------------
- * 40 dt_unsignedInt num lexical yes unsigned int
- * dt_unsignedShort num lexical yes unsigned short
- * dt_unsignedByte num lexical yes unsigned char
- * dt_positiveInteger num lexical yes unsigned long
+ * 40 dt_unsignedInt num lexical yes uint32_t
+ * dt_unsignedShort num lexical yes uint16_t
+ * dt_unsignedByte num lexical yes uint8_t
+ * dt_positiveInteger num lexical yes uint64_t
*
***/
@@ -1316,25 +1317,25 @@
retVal->fData.fValue.f_long = actVal.f_long;
break;
case XSValue::dt_int:
- retVal->fData.fValue.f_int = (int) actVal.f_long;
+ retVal->fData.fValue.f_int = static_cast<int32_t>(actVal.f_long);
break;
case XSValue::dt_short:
- retVal->fData.fValue.f_short = (short) actVal.f_long;
+ retVal->fData.fValue.f_short = static_cast<int16_t>(actVal.f_long);
break;
case XSValue::dt_byte:
- retVal->fData.fValue.f_char = (char) actVal.f_long;
+ retVal->fData.fValue.f_char = static_cast<int8_t>(actVal.f_long);
break;
case XSValue::dt_unsignedLong:
retVal->fData.fValue.f_ulong = actVal.f_ulong;
break;
case XSValue::dt_unsignedInt:
- retVal->fData.fValue.f_uint = (unsigned int) actVal.f_ulong;
+ retVal->fData.fValue.f_uint = static_cast<uint32_t>(actVal.f_ulong);
break;
case XSValue::dt_unsignedShort:
- retVal->fData.fValue.f_ushort = (unsigned short) actVal.f_ulong;
+ retVal->fData.fValue.f_ushort = static_cast<uint16_t>(actVal.f_ulong);
break;
case XSValue::dt_unsignedByte:
- retVal->fData.fValue.f_uchar = (unsigned char) actVal.f_ulong;
+ retVal->fData.fValue.f_uchar = static_cast<uint8_t>(actVal.f_ulong);
break;
default:
return 0;
@@ -1570,7 +1571,7 @@
if (XSValue::numericSign[datatype])
{
- retVal.f_long = strtol(nptr, &endptr, (int)10);
+ retVal.f_long = strtoll(nptr, &endptr, (int)10);
}
else
{
@@ -1580,7 +1581,7 @@
return false;
}
- retVal.f_ulong = strtoul(nptr, &endptr, (int)10);
+ retVal.f_ulong = strtoull(nptr, &endptr, (int)10);
}
// need to check out-of-bounds before checking erange...
@@ -1601,8 +1602,8 @@
break;
case XSValue::dt_int:
// strtol will set value to LONG_MIN/LONG_MAX if ERANGE error
- if ((retVal.f_long < INT_MIN) ||
- (retVal.f_long > INT_MAX) ||
+ if ((retVal.f_long < std::numeric_limits<int32_t>::min()) ||
+ (retVal.f_long > std::numeric_limits<int32_t>::max()) ||
(errno == ERANGE))
{
status = st_FOCA0002;
@@ -1610,16 +1611,16 @@
}
break;
case XSValue::dt_short:
- if ((retVal.f_long < SHRT_MIN) ||
- (retVal.f_long > SHRT_MAX))
+ if ((retVal.f_long < std::numeric_limits<int16_t>::min()) ||
+ (retVal.f_long > std::numeric_limits<int16_t>::max()))
{
status = st_FOCA0002;
return false;
}
break;
case XSValue::dt_byte:
- if ((retVal.f_long < SCHAR_MIN) ||
- (retVal.f_long > SCHAR_MAX))
+ if ((retVal.f_long < std::numeric_limits<int8_t>::min()) ||
+ (retVal.f_long > std::numeric_limits<int8_t>::max()))
{
status = st_FOCA0002;
return false;
@@ -1627,7 +1628,7 @@
break;
case XSValue::dt_unsignedInt:
// strtoul will set value to LONG_INT if ERANGE error
- if ((retVal.f_ulong > UINT_MAX) ||
+ if ((retVal.f_ulong > std::numeric_limits<uint32_t>::max()) ||
(errno == ERANGE))
{
status = st_FOCA0002;
@@ -1635,14 +1636,14 @@
}
break;
case XSValue::dt_unsignedShort:
- if (retVal.f_ulong > USHRT_MAX)
+ if (retVal.f_ulong > std::numeric_limits<uint16_t>::max())
{
status = st_FOCA0002;
return false;
}
break;
case XSValue::dt_unsignedByte:
- if (retVal.f_ulong > UCHAR_MAX)
+ if (retVal.f_ulong > std::numeric_limits<uint8_t>::max())
{
status = st_FOCA0002;
return false;
@@ -1686,4 +1687,4 @@
return true;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSValue.hpp b/src/xercesc/framework/psvi/XSValue.hpp
index 2f131b9..ee212a8 100644
--- a/src/xercesc/framework/psvi/XSValue.hpp
+++ b/src/xercesc/framework/psvi/XSValue.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/ValueHashTableOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class RegularExpression;
@@ -205,14 +205,14 @@
union {
bool f_bool;
- char f_char;
- unsigned char f_uchar;
- short f_short;
- unsigned short f_ushort;
- int f_int;
- unsigned int f_uint;
- long f_long;
- unsigned long f_ulong;
+ int8_t f_char;
+ uint8_t f_uchar;
+ int16_t f_short;
+ uint16_t f_ushort;
+ int32_t f_int;
+ uint32_t f_uint;
+ int64_t f_long;
+ uint64_t f_ulong;
float f_float;
double f_double;
XMLCh* f_strVal;
@@ -253,8 +253,8 @@
typedef union
{
- long f_long;
- unsigned long f_ulong;
+ int64_t f_long;
+ uint64_t f_ulong;
} t_value;
/** @name Constructors */
@@ -401,6 +401,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/framework/psvi/XSWildcard.cpp b/src/xercesc/framework/psvi/XSWildcard.cpp
index a417e64..331bcae 100644
--- a/src/xercesc/framework/psvi/XSWildcard.cpp
+++ b/src/xercesc/framework/psvi/XSWildcard.cpp
@@ -26,7 +26,7 @@
#include <xercesc/validators/common/ContentSpecNode.hpp>
#include <xercesc/validators/schema/SchemaAttDef.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSWildcard: Constructors and Destructor
@@ -178,4 +178,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/framework/psvi/XSWildcard.hpp b/src/xercesc/framework/psvi/XSWildcard.hpp
index f709058..eab8fe9 100644
--- a/src/xercesc/framework/psvi/XSWildcard.hpp
+++ b/src/xercesc/framework/psvi/XSWildcard.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/psvi/XSObject.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class describes all properties of a Schema Wildcard
@@ -196,6 +196,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/BinFileOutputStream.cpp b/src/xercesc/internal/BinFileOutputStream.cpp
index 7cbd7f3..4ab55ec 100644
--- a/src/xercesc/internal/BinFileOutputStream.cpp
+++ b/src/xercesc/internal/BinFileOutputStream.cpp
@@ -29,7 +29,7 @@
#include <xercesc/util/XMLExceptMsgs.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// BinFileOutputStream: Constructors and Destructor
@@ -101,4 +101,4 @@
XMLPlatformUtils::writeBufferToFile(fSource, maxToWrite, toGo, fMemoryManager);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/BinFileOutputStream.hpp b/src/xercesc/internal/BinFileOutputStream.hpp
index ba4cb85..aa092d4 100644
--- a/src/xercesc/internal/BinFileOutputStream.hpp
+++ b/src/xercesc/internal/BinFileOutputStream.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/BinOutputStream.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT BinFileOutputStream : public BinOutputStream
{
@@ -95,6 +95,6 @@
return (fSource != (FileHandle) XERCES_Invalid_File_Handle);
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/BinMemOutputStream.cpp b/src/xercesc/internal/BinMemOutputStream.cpp
index a59ecd8..27cf8c4 100644
--- a/src/xercesc/internal/BinMemOutputStream.cpp
+++ b/src/xercesc/internal/BinMemOutputStream.cpp
@@ -21,9 +21,9 @@
#include <xercesc/internal/BinMemOutputStream.hpp>
#include <xercesc/util/XMLString.hpp>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
BinMemOutputStream::BinMemOutputStream( XMLSize_t initCapacity
, MemoryManager* const manager)
@@ -116,5 +116,5 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/BinMemOutputStream.hpp b/src/xercesc/internal/BinMemOutputStream.hpp
index 13e9885..2a3a4af 100644
--- a/src/xercesc/internal/BinMemOutputStream.hpp
+++ b/src/xercesc/internal/BinMemOutputStream.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/BinOutputStream.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT BinMemOutputStream : public BinOutputStream
{
@@ -97,7 +97,7 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/CharTypeTables.hpp b/src/xercesc/internal/CharTypeTables.hpp
index fca46d8..be314ff 100644
--- a/src/xercesc/internal/CharTypeTables.hpp
+++ b/src/xercesc/internal/CharTypeTables.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// These are character type lookup tables. They are included into XMLReader
@@ -252,6 +252,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/DGXMLScanner.cpp b/src/xercesc/internal/DGXMLScanner.cpp
index 4334223..38e58f4 100644
--- a/src/xercesc/internal/DGXMLScanner.cpp
+++ b/src/xercesc/internal/DGXMLScanner.cpp
@@ -43,7 +43,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLResourceIdentifier.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
typedef JanitorMemFunCall<DGXMLScanner> CleanupType;
@@ -3575,4 +3575,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/DGXMLScanner.hpp b/src/xercesc/internal/DGXMLScanner.hpp
index 68e1463..f35f404 100644
--- a/src/xercesc/internal/DGXMLScanner.hpp
+++ b/src/xercesc/internal/DGXMLScanner.hpp
@@ -28,7 +28,7 @@
#include <xercesc/util/Hash2KeysSetOf.hpp>
#include <xercesc/validators/common/Grammar.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DTDElementDecl;
class DTDGrammar;
@@ -187,6 +187,6 @@
return Grammar::DTDGrammarType;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/ElemStack.cpp b/src/xercesc/internal/ElemStack.cpp
index baff845..1d8d9c1 100644
--- a/src/xercesc/internal/ElemStack.cpp
+++ b/src/xercesc/internal/ElemStack.cpp
@@ -22,14 +22,14 @@
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
-#include <string.h>
+#include <cstring>
#include <xercesc/util/EmptyStackException.hpp>
#include <xercesc/util/NoSuchElementException.hpp>
#include <xercesc/framework/XMLElementDecl.hpp>
#include <xercesc/internal/ElemStack.hpp>
#include <xercesc/validators/common/Grammar.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// ElemStack: Constructors and Destructor
@@ -888,4 +888,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/ElemStack.hpp b/src/xercesc/internal/ElemStack.hpp
index 4634ae0..4655871 100644
--- a/src/xercesc/internal/ElemStack.hpp
+++ b/src/xercesc/internal/ElemStack.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/QName.hpp>
#include <xercesc/util/ValueVectorOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLElementDecl;
class Grammar;
@@ -587,6 +587,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/EndOfEntityException.hpp b/src/xercesc/internal/EndOfEntityException.hpp
index 25039d5..93a6918 100644
--- a/src/xercesc/internal/EndOfEntityException.hpp
+++ b/src/xercesc/internal/EndOfEntityException.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLEntityDecl;
@@ -111,6 +111,6 @@
return fReaderNum;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/IANAEncodings.hpp b/src/xercesc/internal/IANAEncodings.hpp
index c8c546a..2764ce2 100644
--- a/src/xercesc/internal/IANAEncodings.hpp
+++ b/src/xercesc/internal/IANAEncodings.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ----------------------------------------------------------------
// This file was generated from the IANA charset source.
@@ -828,7 +828,7 @@
};
const unsigned int gEncodingArraySize = 791;
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/IGXMLScanner.cpp b/src/xercesc/internal/IGXMLScanner.cpp
index 0062400..4417d44 100644
--- a/src/xercesc/internal/IGXMLScanner.cpp
+++ b/src/xercesc/internal/IGXMLScanner.cpp
@@ -45,7 +45,7 @@
#include <xercesc/validators/schema/identity/IC_Selector.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
typedef JanitorMemFunCall<IGXMLScanner> CleanupType;
@@ -1374,7 +1374,14 @@
// Get copies of the ids we got
pubId = XMLString::replicate(bbPubId.getRawBuffer(), fMemoryManager);
sysId = XMLString::replicate(bbSysId.getRawBuffer(), fMemoryManager);
+ }
+ // Insure that the ids get cleaned up, if they got allocated
+ ArrayJanitor<XMLCh> janSysId(sysId, fMemoryManager);
+ ArrayJanitor<XMLCh> janPubId(pubId, fMemoryManager);
+
+ if (hasExtSubset)
+ {
// Skip spaces and check again for the opening of an internal subset
fReaderMgr.skipPastSpaces();
@@ -1384,10 +1391,6 @@
}
}
- // Insure that the ids get cleaned up, if they got allocated
- ArrayJanitor<XMLCh> janSysId(sysId, fMemoryManager);
- ArrayJanitor<XMLCh> janPubId(pubId, fMemoryManager);
-
// If we have a doc type handler and advanced callbacks are enabled,
// call the doctype event.
if (fDocTypeHandler)
@@ -3268,4 +3271,4 @@
fPSVIElemContext.fNormalizedValue = 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/IGXMLScanner.hpp b/src/xercesc/internal/IGXMLScanner.hpp
index d3e1046..7908854 100644
--- a/src/xercesc/internal/IGXMLScanner.hpp
+++ b/src/xercesc/internal/IGXMLScanner.hpp
@@ -32,7 +32,7 @@
#include <xercesc/validators/schema/SchemaInfo.hpp>
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DTDElementDecl;
class DTDGrammar;
@@ -303,6 +303,6 @@
return fGrammarType;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/IGXMLScanner2.cpp b/src/xercesc/internal/IGXMLScanner2.cpp
index 6498fea..4c043ef 100644
--- a/src/xercesc/internal/IGXMLScanner2.cpp
+++ b/src/xercesc/internal/IGXMLScanner2.cpp
@@ -56,7 +56,7 @@
#include <xercesc/validators/schema/identity/ValueStore.hpp>
#include <xercesc/util/XMLStringTokenizer.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
inline XMLAttDefList& getAttDefList(bool isSchemaGrammar
, ComplexTypeInfo* currType
@@ -3493,4 +3493,4 @@
return elemDecl->getAttDefList();
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/MemoryManagerImpl.cpp b/src/xercesc/internal/MemoryManagerImpl.cpp
index 2c2c928..81f6716 100644
--- a/src/xercesc/internal/MemoryManagerImpl.cpp
+++ b/src/xercesc/internal/MemoryManagerImpl.cpp
@@ -26,7 +26,7 @@
#include <xercesc/internal/MemoryManagerImpl.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
MemoryManager* MemoryManagerImpl::getExceptionMemoryManager()
{
@@ -53,4 +53,4 @@
::operator delete(p);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/MemoryManagerImpl.hpp b/src/xercesc/internal/MemoryManagerImpl.hpp
index 5aeb168..f91bcda 100644
--- a/src/xercesc/internal/MemoryManagerImpl.hpp
+++ b/src/xercesc/internal/MemoryManagerImpl.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/MemoryManager.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Configurable memory manager
@@ -101,6 +101,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/ReaderMgr.cpp b/src/xercesc/internal/ReaderMgr.cpp
index d14483e..4e59a4a 100644
--- a/src/xercesc/internal/ReaderMgr.cpp
+++ b/src/xercesc/internal/ReaderMgr.cpp
@@ -43,7 +43,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLResourceIdentifier.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// ReaderMgr: Constructors and Destructor
@@ -436,6 +436,12 @@
);
}
}
+ catch(const XMLPlatformUtilsException&)
+ {
+ streamJanitor.release();
+
+ throw;
+ }
catch(const OutOfMemoryException&)
{
streamJanitor.release();
@@ -1120,4 +1126,4 @@
return true;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/ReaderMgr.hpp b/src/xercesc/internal/ReaderMgr.hpp
index f63b219..d362af5 100644
--- a/src/xercesc/internal/ReaderMgr.hpp
+++ b/src/xercesc/internal/ReaderMgr.hpp
@@ -28,7 +28,7 @@
#include <xercesc/sax/Locator.hpp>
#include <xercesc/framework/XMLBuffer.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLEntityDecl;
class XMLEntityHandler;
@@ -442,6 +442,6 @@
ReaderMgr* fMgr;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/SGXMLScanner.cpp b/src/xercesc/internal/SGXMLScanner.cpp
index cde24fe..f43c693 100644
--- a/src/xercesc/internal/SGXMLScanner.cpp
+++ b/src/xercesc/internal/SGXMLScanner.cpp
@@ -51,7 +51,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLStringTokenizer.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
inline XMLAttDefList& getAttDefList(ComplexTypeInfo* currType, XMLElementDecl* elemDecl);
@@ -4961,4 +4961,4 @@
fPSVIElemContext.fNormalizedValue = 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/SGXMLScanner.hpp b/src/xercesc/internal/SGXMLScanner.hpp
index fe280b0..86659d3 100644
--- a/src/xercesc/internal/SGXMLScanner.hpp
+++ b/src/xercesc/internal/SGXMLScanner.hpp
@@ -33,7 +33,7 @@
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class SchemaGrammar;
class SchemaValidator;
@@ -302,6 +302,6 @@
return fGrammarType;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/ValidationContextImpl.cpp b/src/xercesc/internal/ValidationContextImpl.cpp
index 3a79f70..9fddb76 100644
--- a/src/xercesc/internal/ValidationContextImpl.cpp
+++ b/src/xercesc/internal/ValidationContextImpl.cpp
@@ -31,7 +31,7 @@
#include <xercesc/internal/ElemStack.hpp>
#include <xercesc/internal/XMLScanner.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Constructor and Destructor
@@ -214,4 +214,4 @@
return XMLUni::fgZeroLenString;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/ValidationContextImpl.hpp b/src/xercesc/internal/ValidationContextImpl.hpp
index 3cdc0d8..2086140 100644
--- a/src/xercesc/internal/ValidationContextImpl.hpp
+++ b/src/xercesc/internal/ValidationContextImpl.hpp
@@ -24,7 +24,7 @@
#include <xercesc/framework/ValidationContext.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class ElemStack;
class NamespaceScope;
@@ -167,7 +167,7 @@
fNamespaceScope = nsStack;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/VecAttrListImpl.cpp b/src/xercesc/internal/VecAttrListImpl.cpp
index 322a83a..bb7c869 100644
--- a/src/xercesc/internal/VecAttrListImpl.cpp
+++ b/src/xercesc/internal/VecAttrListImpl.cpp
@@ -26,7 +26,7 @@
#include <xercesc/util/Janitor.hpp>
#include <xercesc/internal/VecAttrListImpl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Constructors and Destructor
@@ -156,4 +156,4 @@
fVector = srcVec;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/VecAttrListImpl.hpp b/src/xercesc/internal/VecAttrListImpl.hpp
index 2d28a90..0f384f8 100644
--- a/src/xercesc/internal/VecAttrListImpl.hpp
+++ b/src/xercesc/internal/VecAttrListImpl.hpp
@@ -26,7 +26,7 @@
#include <xercesc/framework/XMLAttr.hpp>
#include <xercesc/util/RefVectorOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLPARSER_EXPORT VecAttrListImpl : public XMemory, public AttributeList
{
@@ -91,6 +91,6 @@
const RefVectorOf<XMLAttr>* fVector;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/VecAttributesImpl.cpp b/src/xercesc/internal/VecAttributesImpl.cpp
index fac84b9..b476101 100644
--- a/src/xercesc/internal/VecAttributesImpl.cpp
+++ b/src/xercesc/internal/VecAttributesImpl.cpp
@@ -26,7 +26,7 @@
#include <xercesc/util/Janitor.hpp>
#include <xercesc/internal/VecAttributesImpl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Constructors and Destructor
@@ -246,4 +246,4 @@
fScanner = scanner ;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/VecAttributesImpl.hpp b/src/xercesc/internal/VecAttributesImpl.hpp
index d0d412c..c891bb7 100644
--- a/src/xercesc/internal/VecAttributesImpl.hpp
+++ b/src/xercesc/internal/VecAttributesImpl.hpp
@@ -28,7 +28,7 @@
#include <xercesc/internal/XMLScanner.hpp>
#include <xercesc/framework/XMLBuffer.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLPARSER_EXPORT VecAttributesImpl : public Attributes
{
@@ -112,6 +112,6 @@
const XMLScanner * fScanner ;
};
-XERCES_CPP_NAMESPACE_END
+}
#endif // ! VECATTRIBUTESIMPL_HPP
diff --git a/src/xercesc/internal/WFXMLScanner.cpp b/src/xercesc/internal/WFXMLScanner.cpp
index dc83cc5..cc1e8a3 100644
--- a/src/xercesc/internal/WFXMLScanner.cpp
+++ b/src/xercesc/internal/WFXMLScanner.cpp
@@ -35,7 +35,7 @@
#include <xercesc/internal/EndOfEntityException.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// WFXMLScanner: Constructors and Destructor
@@ -2052,4 +2052,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/WFXMLScanner.hpp b/src/xercesc/internal/WFXMLScanner.hpp
index b88b034..47962fc 100644
--- a/src/xercesc/internal/WFXMLScanner.hpp
+++ b/src/xercesc/internal/WFXMLScanner.hpp
@@ -27,7 +27,7 @@
#include <xercesc/util/ValueVectorOf.hpp>
#include <xercesc/validators/DTD/DTDElementDecl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// This is a a non-validating scanner. No DOCTYPE or XML Schema processing
@@ -148,6 +148,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XMLInternalErrorHandler.hpp b/src/xercesc/internal/XMLInternalErrorHandler.hpp
index d56c229..38def8a 100644
--- a/src/xercesc/internal/XMLInternalErrorHandler.hpp
+++ b/src/xercesc/internal/XMLInternalErrorHandler.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/sax/ErrorHandler.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLInternalErrorHandler : public ErrorHandler
{
@@ -134,6 +134,6 @@
fSawFatal = false;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XMLReader.cpp b/src/xercesc/internal/XMLReader.cpp
index 405474a..bf43886 100644
--- a/src/xercesc/internal/XMLReader.cpp
+++ b/src/xercesc/internal/XMLReader.cpp
@@ -32,7 +32,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/Janitor.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XMLReader: Query Methods
@@ -124,8 +124,16 @@
{
setXMLVersion(version);
- // Do an initial load of raw bytes
- refreshRawBuffer();
+ try
+ {
+ // Do an initial load of raw bytes
+ refreshRawBuffer();
+ }
+ catch (const XMLPlatformUtilsException&)
+ {
+ cleanup();
+ throw;
+ }
// Ask the transcoding service if it supports src offset info
fSrcOfsSupported = XMLPlatformUtils::fgTransService->supportsSrcOfs();
@@ -207,8 +215,16 @@
{
setXMLVersion(version);
- // Do an initial load of raw bytes
- refreshRawBuffer();
+ try
+ {
+ // Do an initial load of raw bytes
+ refreshRawBuffer();
+ }
+ catch (const XMLPlatformUtilsException&)
+ {
+ cleanup();
+ throw;
+ }
// Copy the encoding string to our member
fEncodingStr = XMLString::replicate(encodingStr, fMemoryManager);
@@ -390,8 +406,16 @@
{
setXMLVersion(version);
- // Do an initial load of raw bytes
- refreshRawBuffer();
+ try
+ {
+ // Do an initial load of raw bytes
+ refreshRawBuffer();
+ }
+ catch (const XMLPlatformUtilsException&)
+ {
+ cleanup();
+ throw;
+ }
// Ask the transcoding service if it supports src offset info
fSrcOfsSupported = XMLPlatformUtils::fgTransService->supportsSrcOfs();
@@ -456,11 +480,22 @@
XMLReader::~XMLReader()
{
+ cleanup();
+}
+
+
+void XMLReader::cleanup()
+{
fMemoryManager->deallocate(fEncodingStr);
+ fEncodingStr = NULL;
fMemoryManager->deallocate(fPublicId);
+ fPublicId = NULL;
fMemoryManager->deallocate(fSystemId);
+ fSystemId = NULL;
delete fStream;
+ fStream = NULL;
delete fTranscoder;
+ fTranscoder = NULL;
}
@@ -2038,4 +2073,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XMLReader.hpp b/src/xercesc/internal/XMLReader.hpp
index 966ca22..2b0bc27 100644
--- a/src/xercesc/internal/XMLReader.hpp
+++ b/src/xercesc/internal/XMLReader.hpp
@@ -27,7 +27,7 @@
#include <xercesc/framework/XMLBuffer.hpp>
#include <xercesc/util/TranscodingException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class InputSource;
class BinInputStream;
@@ -253,6 +253,8 @@
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
+ void cleanup();
+
void checkForSwapped();
void doInitCharSizeChecks();
@@ -785,6 +787,6 @@
return true;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XMLScanner.cpp b/src/xercesc/internal/XMLScanner.cpp
index 72327e5..af10f4c 100644
--- a/src/xercesc/internal/XMLScanner.cpp
+++ b/src/xercesc/internal/XMLScanner.cpp
@@ -43,7 +43,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLResourceIdentifier.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// Local static data
@@ -964,8 +964,8 @@
, const unsigned int maxSysIdChars
, XMLCh* const pubIdToFill
, const unsigned int maxPubIdChars
- , XMLSSize_t& lineToFill
- , XMLSSize_t& colToFill) const
+ , XMLSize_t& lineToFill
+ , XMLSize_t& colToFill) const
{
// Create a local info object and get it filled in by the reader manager
ReaderMgr::LastExtEntityInfo lastInfo;
@@ -2411,4 +2411,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XMLScanner.hpp b/src/xercesc/internal/XMLScanner.hpp
index c8bdaf1..7a6849a 100644
--- a/src/xercesc/internal/XMLScanner.hpp
+++ b/src/xercesc/internal/XMLScanner.hpp
@@ -36,7 +36,7 @@
#include <xercesc/framework/ValidationContext.hpp>
#include <xercesc/validators/common/GrammarResolver.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class InputSource;
class XMLDocumentHandler;
@@ -245,8 +245,8 @@
, const unsigned int maxSysIdChars
, XMLCh* const pubIdToFill
, const unsigned int maxPubIdChars
- , XMLSSize_t& lineToFill
- , XMLSSize_t& colToFill
+ , XMLSize_t& lineToFill
+ , XMLSize_t& colToFill
) const;*/
const Locator* getLocator() const;
const ReaderMgr* getReaderMgr() const;
@@ -1443,6 +1443,6 @@
return Grammar::UnKnown;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XMLScannerResolver.cpp b/src/xercesc/internal/XMLScannerResolver.cpp
index d4711bc..b8db0e9 100644
--- a/src/xercesc/internal/XMLScannerResolver.cpp
+++ b/src/xercesc/internal/XMLScannerResolver.cpp
@@ -29,7 +29,7 @@
#include <xercesc/internal/SGXMLScanner.hpp>
#include <xercesc/internal/IGXMLScanner.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XMLScannerResolver: Public static methods
@@ -85,4 +85,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XMLScannerResolver.hpp b/src/xercesc/internal/XMLScannerResolver.hpp
index 26b7e39..56c48c3 100644
--- a/src/xercesc/internal/XMLScannerResolver.hpp
+++ b/src/xercesc/internal/XMLScannerResolver.hpp
@@ -24,7 +24,7 @@
#include <xercesc/internal/XMLScanner.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLValidator;
class XMLDocumentHandler;
@@ -74,6 +74,6 @@
~XMLScannerResolver();
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XProtoType.cpp b/src/xercesc/internal/XProtoType.cpp
index c0b85f1..8080690 100644
--- a/src/xercesc/internal/XProtoType.cpp
+++ b/src/xercesc/internal/XProtoType.cpp
@@ -26,7 +26,7 @@
#include <xercesc/internal/XSerializeEngine.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/***
*
@@ -104,5 +104,5 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XProtoType.hpp b/src/xercesc/internal/XProtoType.hpp
index 5af22a1..a652a75 100644
--- a/src/xercesc/internal/XProtoType.hpp
+++ b/src/xercesc/internal/XProtoType.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XSerializeEngine;
class XSerializable;
@@ -88,6 +88,6 @@
XProtoType class_name::class##class_name = \
{const_cast<XMLByte*>(reinterpret_cast<const XMLByte *>(#class_name)), class_name::createObject };
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XSAXMLScanner.cpp b/src/xercesc/internal/XSAXMLScanner.cpp
index 7a0c2cd..bb63c23 100644
--- a/src/xercesc/internal/XSAXMLScanner.cpp
+++ b/src/xercesc/internal/XSAXMLScanner.cpp
@@ -32,7 +32,7 @@
#include <xercesc/validators/schema/SchemaValidator.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// XSAXMLScanner: Constructors and Destructor
@@ -722,4 +722,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XSAXMLScanner.hpp b/src/xercesc/internal/XSAXMLScanner.hpp
index 4935e6c..26a2908 100644
--- a/src/xercesc/internal/XSAXMLScanner.hpp
+++ b/src/xercesc/internal/XSAXMLScanner.hpp
@@ -25,7 +25,7 @@
#include <xercesc/internal/SGXMLScanner.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
//
// This is a scanner class, which processes/validates contents of XML Schema
@@ -93,6 +93,6 @@
return XMLUni::fgXSAXMLScanner;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XSObjectFactory.cpp b/src/xercesc/internal/XSObjectFactory.cpp
index 3ac9a6e..8bbb630 100644
--- a/src/xercesc/internal/XSObjectFactory.cpp
+++ b/src/xercesc/internal/XSObjectFactory.cpp
@@ -52,7 +52,7 @@
#include <xercesc/validators/schema/identity/XercesXPath.hpp>
#include <xercesc/util/XMLStringTokenizer.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
static XMLCh regexSeparator[] = {chPipe, chNull};
@@ -1053,4 +1053,4 @@
return false;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XSObjectFactory.hpp b/src/xercesc/internal/XSObjectFactory.hpp
index e42d32e..a5d3036 100644
--- a/src/xercesc/internal/XSObjectFactory.hpp
+++ b/src/xercesc/internal/XSObjectFactory.hpp
@@ -25,7 +25,7 @@
#include <xercesc/framework/psvi/XSConstants.hpp>
#include <xercesc/util/RefHashTableOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XSObject;
class XSAttributeUse;
@@ -232,6 +232,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XSerializable.hpp b/src/xercesc/internal/XSerializable.hpp
index 1b0fb7a..c1e10e6 100644
--- a/src/xercesc/internal/XSerializable.hpp
+++ b/src/xercesc/internal/XSerializable.hpp
@@ -25,7 +25,7 @@
#include <xercesc/internal/XSerializeEngine.hpp>
#include <xercesc/internal/XProtoType.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT XSerializable
{
@@ -111,7 +111,7 @@
if (( lptr && !rptr) || (!lptr && rptr)) \
return false;
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XSerializationException.hpp b/src/xercesc/internal/XSerializationException.hpp
index 62dbc3d..12891e5 100644
--- a/src/xercesc/internal/XSerializationException.hpp
+++ b/src/xercesc/internal/XSerializationException.hpp
@@ -25,10 +25,10 @@
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/XMLException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
MakeXMLException(XSerializationException, XMLUTIL_EXPORT)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XSerializeEngine.cpp b/src/xercesc/internal/XSerializeEngine.cpp
index 5804bb0..a2ddb80 100644
--- a/src/xercesc/internal/XSerializeEngine.cpp
+++ b/src/xercesc/internal/XSerializeEngine.cpp
@@ -31,10 +31,10 @@
#include <xercesc/framework/BinOutputStream.hpp>
#include <xercesc/util/BinInputStream.hpp>
-#include <stdio.h>
+#include <cstdio>
#include <assert.h>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
const bool XSerializeEngine::toWriteBufferLen = true;
const bool XSerializeEngine::toReadBufferLen = true;
@@ -1155,4 +1155,4 @@
*/
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XSerializeEngine.hpp b/src/xercesc/internal/XSerializeEngine.hpp
index 025dc11..8ec9d69 100644
--- a/src/xercesc/internal/XSerializeEngine.hpp
+++ b/src/xercesc/internal/XSerializeEngine.hpp
@@ -28,7 +28,7 @@
#include <xercesc/internal/XSerializationException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XSerializable;
class XProtoType;
@@ -836,6 +836,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/internal/XTemplateSerializer.cpp b/src/xercesc/internal/XTemplateSerializer.cpp
index b07454c..14712fb 100644
--- a/src/xercesc/internal/XTemplateSerializer.cpp
+++ b/src/xercesc/internal/XTemplateSerializer.cpp
@@ -24,11 +24,11 @@
#include <xercesc/framework/XMLGrammarPool.hpp>
#include <xercesc/validators/common/Grammar.hpp>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include <assert.h>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/***
* internal class meant to be comsumed by XTemplateSerializer only
@@ -2319,4 +2319,4 @@
}
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/internal/XTemplateSerializer.hpp b/src/xercesc/internal/XTemplateSerializer.hpp
index 108d900..3882a2b 100644
--- a/src/xercesc/internal/XTemplateSerializer.hpp
+++ b/src/xercesc/internal/XTemplateSerializer.hpp
@@ -47,7 +47,7 @@
#include <xercesc/validators/schema/identity/XercesXPath.hpp>
#include <xercesc/framework/psvi/XSAnnotation.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT XTemplateSerializer
{
@@ -360,6 +360,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/parsers/AbstractDOMParser.cpp b/src/xercesc/parsers/AbstractDOMParser.cpp
index b721b53..4526e87 100644
--- a/src/xercesc/parsers/AbstractDOMParser.cpp
+++ b/src/xercesc/parsers/AbstractDOMParser.cpp
@@ -65,7 +65,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/xinclude/XIncludeUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
@@ -736,8 +736,8 @@
if(fCreateSchemaInfo)
{
for (XMLSize_t index=0; index < psviAttributes->getLength(); index++) {
- XERCES_CPP_NAMESPACE_QUALIFIER PSVIAttribute *attrInfo=psviAttributes->getAttributePSVIAtIndex(index);
- XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* pAttrNode=fCurrentNode->getAttributes()->getNamedItemNS(psviAttributes->getAttributeNamespaceAtIndex(index),
+ xercesc::PSVIAttribute *attrInfo=psviAttributes->getAttributePSVIAtIndex(index);
+ xercesc::DOMNode* pAttrNode=fCurrentNode->getAttributes()->getNamedItemNS(psviAttributes->getAttributeNamespaceAtIndex(index),
psviAttributes->getAttributeNameAtIndex(index));
if(pAttrNode!=NULL)
{
@@ -1781,4 +1781,4 @@
qName);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/parsers/AbstractDOMParser.hpp b/src/xercesc/parsers/AbstractDOMParser.hpp
index be4e0ea..664a887 100644
--- a/src/xercesc/parsers/AbstractDOMParser.hpp
+++ b/src/xercesc/parsers/AbstractDOMParser.hpp
@@ -34,7 +34,7 @@
#include <xercesc/framework/XMLBufferMgr.hpp>
#include <xercesc/framework/psvi/PSVIHandler.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLPScanToken;
class XMLScanner;
@@ -1895,6 +1895,6 @@
fParseInProgress = toSet;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/parsers/DOMLSParserImpl.cpp b/src/xercesc/parsers/DOMLSParserImpl.cpp
index 8f09387..a0dcfec 100644
--- a/src/xercesc/parsers/DOMLSParserImpl.cpp
+++ b/src/xercesc/parsers/DOMLSParserImpl.cpp
@@ -54,7 +54,7 @@
#include <xercesc/util/RuntimeException.hpp>
#include <xercesc/util/XMLDOMMsg.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
@@ -1375,4 +1375,4 @@
endElement(elemDecl, urlId, isRoot, elemPrefix);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/parsers/DOMLSParserImpl.hpp b/src/xercesc/parsers/DOMLSParserImpl.hpp
index 6e3bf0e..9c240cb 100644
--- a/src/xercesc/parsers/DOMLSParserImpl.hpp
+++ b/src/xercesc/parsers/DOMLSParserImpl.hpp
@@ -31,7 +31,7 @@
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/util/ValueHashTableOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLEntityResolver;
class XMLResourceIdentifier;
@@ -710,6 +710,6 @@
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/parsers/SAX2XMLFilterImpl.cpp b/src/xercesc/parsers/SAX2XMLFilterImpl.cpp
index 888e780..b2186a2 100644
--- a/src/xercesc/parsers/SAX2XMLFilterImpl.cpp
+++ b/src/xercesc/parsers/SAX2XMLFilterImpl.cpp
@@ -21,7 +21,7 @@
#include <xercesc/parsers/SAX2XMLFilterImpl.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
SAX2XMLFilterImpl::SAX2XMLFilterImpl(SAX2XMLReader* parent) :
fParentReader(0)
@@ -413,4 +413,4 @@
fErrorHandler->resetErrors();
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/parsers/SAX2XMLFilterImpl.hpp b/src/xercesc/parsers/SAX2XMLFilterImpl.hpp
index 008d78a..eac84e7 100644
--- a/src/xercesc/parsers/SAX2XMLFilterImpl.hpp
+++ b/src/xercesc/parsers/SAX2XMLFilterImpl.hpp
@@ -28,7 +28,7 @@
#include <xercesc/sax2/ContentHandler.hpp>
#include <xercesc/sax/ErrorHandler.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* This class implements the SAX2 'XMLFilterImpl' interface and should be
@@ -1440,6 +1440,6 @@
return false;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/parsers/SAX2XMLReaderImpl.cpp b/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
index fda4a8b..473fb66 100644
--- a/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
+++ b/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
@@ -39,9 +39,9 @@
#include <xercesc/framework/XMLSchemaDescription.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLEntityResolver.hpp>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
SAX2XMLReader * XMLReaderFactory::createXMLReader( MemoryManager* const manager
@@ -1229,7 +1229,7 @@
, systemId
, lineNum
, colNum
- , fMemoryManager
+ , fMemoryManager->getExceptionMemoryManager()
);
if (!fErrorHandler)
@@ -1622,4 +1622,4 @@
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/parsers/SAX2XMLReaderImpl.hpp b/src/xercesc/parsers/SAX2XMLReaderImpl.hpp
index dcac0b7..6bc3b07 100644
--- a/src/xercesc/parsers/SAX2XMLReaderImpl.hpp
+++ b/src/xercesc/parsers/SAX2XMLReaderImpl.hpp
@@ -31,7 +31,7 @@
#include <xercesc/util/SecurityManager.hpp>
#include <xercesc/util/ValueStackOf.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class ContentHandler;
@@ -1744,6 +1744,6 @@
return fScanner->getSrcOffset();
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/parsers/SAXParser.cpp b/src/xercesc/parsers/SAXParser.cpp
index 0c80a13..8a46ad3 100644
--- a/src/xercesc/parsers/SAXParser.cpp
+++ b/src/xercesc/parsers/SAXParser.cpp
@@ -38,9 +38,9 @@
#include <xercesc/util/Janitor.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLEntityResolver.hpp>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
@@ -1348,4 +1348,4 @@
fScanner->resetCachedGrammar();
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/parsers/SAXParser.hpp b/src/xercesc/parsers/SAXParser.hpp
index 5590f20..c0c903d 100644
--- a/src/xercesc/parsers/SAXParser.hpp
+++ b/src/xercesc/parsers/SAXParser.hpp
@@ -34,7 +34,7 @@
#include <xercesc/validators/DTD/DocTypeHandler.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DocumentHandler;
@@ -2199,6 +2199,6 @@
return fGrammarResolver;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/parsers/XercesDOMParser.cpp b/src/xercesc/parsers/XercesDOMParser.cpp
index 9ff0ac3..9c7f88b 100644
--- a/src/xercesc/parsers/XercesDOMParser.cpp
+++ b/src/xercesc/parsers/XercesDOMParser.cpp
@@ -42,7 +42,7 @@
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/XMLEntityResolver.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
@@ -346,4 +346,4 @@
getScanner()->resetCachedGrammar();
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/parsers/XercesDOMParser.hpp b/src/xercesc/parsers/XercesDOMParser.hpp
index f257d2e..541c0d5 100644
--- a/src/xercesc/parsers/XercesDOMParser.hpp
+++ b/src/xercesc/parsers/XercesDOMParser.hpp
@@ -26,7 +26,7 @@
#include <xercesc/parsers/AbstractDOMParser.hpp>
#include <xercesc/validators/common/Grammar.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class EntityResolver;
@@ -691,6 +691,6 @@
return fXMLEntityResolver;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/AttributeList.hpp b/src/xercesc/sax/AttributeList.hpp
index 34ccc81..57ebcfb 100644
--- a/src/xercesc/sax/AttributeList.hpp
+++ b/src/xercesc/sax/AttributeList.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Interface for an element's attribute specifications.
@@ -224,6 +224,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/DTDHandler.hpp b/src/xercesc/sax/DTDHandler.hpp
index 70eb79a..be86996 100644
--- a/src/xercesc/sax/DTDHandler.hpp
+++ b/src/xercesc/sax/DTDHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Receive notification of basic DTD-related events.
@@ -154,6 +154,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/DocumentHandler.hpp b/src/xercesc/sax/DocumentHandler.hpp
index 6aecddb..a7210df 100644
--- a/src/xercesc/sax/DocumentHandler.hpp
+++ b/src/xercesc/sax/DocumentHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class AttributeList;
class Locator;
@@ -278,6 +278,6 @@
DocumentHandler& operator=(const DocumentHandler&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/Dummy.cpp b/src/xercesc/sax/Dummy.cpp
index 75056a8..100855e 100644
--- a/src/xercesc/sax/Dummy.cpp
+++ b/src/xercesc/sax/Dummy.cpp
@@ -32,5 +32,5 @@
#include <xercesc/sax/SAXException.hpp>
#include <xercesc/sax/SAXParseException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
-XERCES_CPP_NAMESPACE_END
+namespace XERCES_CPP_NAMESPACE {
+}
diff --git a/src/xercesc/sax/EntityResolver.hpp b/src/xercesc/sax/EntityResolver.hpp
index 1b1a122..ddf5359 100644
--- a/src/xercesc/sax/EntityResolver.hpp
+++ b/src/xercesc/sax/EntityResolver.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class InputSource;
@@ -160,6 +160,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/ErrorHandler.hpp b/src/xercesc/sax/ErrorHandler.hpp
index eb517fc..9ed32d1 100644
--- a/src/xercesc/sax/ErrorHandler.hpp
+++ b/src/xercesc/sax/ErrorHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class SAXParseException;
@@ -163,6 +163,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/HandlerBase.hpp b/src/xercesc/sax/HandlerBase.hpp
index 12a5cbe..f2090c0 100644
--- a/src/xercesc/sax/HandlerBase.hpp
+++ b/src/xercesc/sax/HandlerBase.hpp
@@ -28,7 +28,7 @@
#include <xercesc/sax/ErrorHandler.hpp>
#include <xercesc/sax/SAXParseException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class Locator;
class AttributeList;
@@ -461,6 +461,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/InputSource.cpp b/src/xercesc/sax/InputSource.cpp
index 4a6452e..42f59e0 100644
--- a/src/xercesc/sax/InputSource.cpp
+++ b/src/xercesc/sax/InputSource.cpp
@@ -26,7 +26,7 @@
#include <xercesc/sax/InputSource.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// InputSource: Destructor
@@ -129,5 +129,5 @@
fSystemId = XMLString::transcode(systemId, fMemoryManager);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/sax/InputSource.hpp b/src/xercesc/sax/InputSource.hpp
index 58334b7..509a451 100644
--- a/src/xercesc/sax/InputSource.hpp
+++ b/src/xercesc/sax/InputSource.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class BinInputStream;
@@ -332,6 +332,6 @@
fFatalErrorIfNotFound = flag;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/Locator.hpp b/src/xercesc/sax/Locator.hpp
index 68eb188..a113ebf 100644
--- a/src/xercesc/sax/Locator.hpp
+++ b/src/xercesc/sax/Locator.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Interface for associating a SAX event with a document location.
@@ -120,6 +120,6 @@
Locator& operator=(const Locator&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/Parser.hpp b/src/xercesc/sax/Parser.hpp
index 16772eb..0b0e264 100644
--- a/src/xercesc/sax/Parser.hpp
+++ b/src/xercesc/sax/Parser.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class DTDHandler;
class EntityResolver;
@@ -240,6 +240,6 @@
Parser& operator=(const Parser&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/SAXException.cpp b/src/xercesc/sax/SAXException.cpp
index 418d16f..17fc540 100644
--- a/src/xercesc/sax/SAXException.cpp
+++ b/src/xercesc/sax/SAXException.cpp
@@ -21,7 +21,7 @@
#include "SAXException.hpp"
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// SAXNotSupportedException Constructors
@@ -70,5 +70,5 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/sax/SAXException.hpp b/src/xercesc/sax/SAXException.hpp
index 95098a3..a673dd5 100644
--- a/src/xercesc/sax/SAXException.hpp
+++ b/src/xercesc/sax/SAXException.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/XMLUni.hpp>
#include <xercesc/util/XMemory.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
@@ -225,6 +225,6 @@
SAXNotRecognizedException(const SAXException& toCopy);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax/SAXParseException.cpp b/src/xercesc/sax/SAXParseException.cpp
index fbe464b..8d01bf4 100644
--- a/src/xercesc/sax/SAXParseException.cpp
+++ b/src/xercesc/sax/SAXParseException.cpp
@@ -27,7 +27,7 @@
#include <xercesc/sax/Locator.hpp>
#include <xercesc/sax/SAXParseException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// SAXParseException: Constructors and Destructor
@@ -122,4 +122,4 @@
return fColumnNumber;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/sax/SAXParseException.hpp b/src/xercesc/sax/SAXParseException.hpp
index a9df449..f6bd512 100644
--- a/src/xercesc/sax/SAXParseException.hpp
+++ b/src/xercesc/sax/SAXParseException.hpp
@@ -24,7 +24,7 @@
#include <xercesc/sax/SAXException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class Locator;
@@ -180,6 +180,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/Attributes.hpp b/src/xercesc/sax2/Attributes.hpp
index 2c482a2..be80412 100644
--- a/src/xercesc/sax2/Attributes.hpp
+++ b/src/xercesc/sax2/Attributes.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Interface for an element's attribute specifications.
@@ -308,6 +308,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/ContentHandler.hpp b/src/xercesc/sax2/ContentHandler.hpp
index 4224fd5..432158f 100644
--- a/src/xercesc/sax2/ContentHandler.hpp
+++ b/src/xercesc/sax2/ContentHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class Attributes;
class Locator;
@@ -335,6 +335,6 @@
ContentHandler& operator=(const ContentHandler&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/DeclHandler.hpp b/src/xercesc/sax2/DeclHandler.hpp
index 5ed0105..349ff47 100644
--- a/src/xercesc/sax2/DeclHandler.hpp
+++ b/src/xercesc/sax2/DeclHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Receive notification of DTD declaration events.
@@ -158,6 +158,6 @@
DeclHandler& operator=(const DeclHandler&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/DefaultHandler.hpp b/src/xercesc/sax2/DefaultHandler.hpp
index 528d44e..fb1087d 100644
--- a/src/xercesc/sax2/DefaultHandler.hpp
+++ b/src/xercesc/sax2/DefaultHandler.hpp
@@ -30,7 +30,7 @@
#include <xercesc/sax/ErrorHandler.hpp>
#include <xercesc/sax/SAXParseException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class Locator;
class Attributes;
@@ -801,6 +801,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
#endif // ! DEFAULTHANDLER_HPP
diff --git a/src/xercesc/sax2/LexicalHandler.hpp b/src/xercesc/sax2/LexicalHandler.hpp
index e6ac3e4..5d7c12b 100644
--- a/src/xercesc/sax2/LexicalHandler.hpp
+++ b/src/xercesc/sax2/LexicalHandler.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Receive notification of lexical events.
@@ -167,6 +167,6 @@
LexicalHandler& operator=(const LexicalHandler&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/SAX2XMLFilter.hpp b/src/xercesc/sax2/SAX2XMLFilter.hpp
index 1ea2212..874e1d6 100644
--- a/src/xercesc/sax2/SAX2XMLFilter.hpp
+++ b/src/xercesc/sax2/SAX2XMLFilter.hpp
@@ -24,7 +24,7 @@
#include <xercesc/sax2/SAX2XMLReader.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class SAX2_EXPORT SAX2XMLFilter : public SAX2XMLReader
{
@@ -77,6 +77,6 @@
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/SAX2XMLReader.hpp b/src/xercesc/sax2/SAX2XMLReader.hpp
index b50fadb..9ba9c66 100644
--- a/src/xercesc/sax2/SAX2XMLReader.hpp
+++ b/src/xercesc/sax2/SAX2XMLReader.hpp
@@ -28,7 +28,7 @@
#include <xercesc/framework/XMLPScanToken.hpp>
#include <xercesc/validators/common/Grammar.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class ContentHandler ;
class DTDHandler;
@@ -891,6 +891,6 @@
{
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/XMLReaderFactory.hpp b/src/xercesc/sax2/XMLReaderFactory.hpp
index a63bcac..be52576 100644
--- a/src/xercesc/sax2/XMLReaderFactory.hpp
+++ b/src/xercesc/sax2/XMLReaderFactory.hpp
@@ -25,7 +25,7 @@
#include <xercesc/sax2/SAX2XMLReader.hpp>
#include <xercesc/sax/SAXException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class MemoryManager;
class XMLGrammarPool;
@@ -66,6 +66,6 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/sax2/sax2Dummy.cpp b/src/xercesc/sax2/sax2Dummy.cpp
index 9f35bb9..72db48e 100644
--- a/src/xercesc/sax2/sax2Dummy.cpp
+++ b/src/xercesc/sax2/sax2Dummy.cpp
@@ -26,5 +26,5 @@
#include <xercesc/sax2/DefaultHandler.hpp>
#include <xercesc/sax2/Attributes.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
-XERCES_CPP_NAMESPACE_END
+namespace XERCES_CPP_NAMESPACE {
+}
diff --git a/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp b/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp
index 4fc2e38..0e3fec4 100644
--- a/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp
+++ b/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp
@@ -24,10 +24,10 @@
#include <xercesc/util/XMLException.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
MakeXMLException(ArrayIndexOutOfBoundsException, XMLUTIL_EXPORT)
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/util/Base64.cpp b/src/xercesc/util/Base64.cpp
index 9bba500..747af86 100644
--- a/src/xercesc/util/Base64.cpp
+++ b/src/xercesc/util/Base64.cpp
@@ -23,8 +23,9 @@
#include <xercesc/util/Janitor.hpp>
#include <xercesc/internal/XMLReader.hpp>
#include <xercesc/framework/MemoryManager.hpp>
+#include <limits>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// constants
@@ -146,7 +147,7 @@
if (!inputData || !outputLength) {
return 0;
}
- else if (XERCES_SIZE_MAX - inputLength < 2) {
+ else if (std::numeric_limits<size_t>::max() - inputLength < 2) {
return 0;
}
@@ -638,4 +639,4 @@
return (base64Inverse[octet]!=(XMLByte)-1);
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/util/Base64.hpp b/src/xercesc/util/Base64.hpp
index 4104de7..f4d1295 100644
--- a/src/xercesc/util/Base64.hpp
+++ b/src/xercesc/util/Base64.hpp
@@ -26,7 +26,7 @@
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/framework/MemoryManager.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
//
// This class provides encode/decode for RFC 2045 Base64 as
@@ -261,6 +261,6 @@
b4 = ( ch & 0x3f );
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/util/BaseRefVectorOf.c b/src/xercesc/util/BaseRefVectorOf.c
index 31e03bf..be120cd 100644
--- a/src/xercesc/util/BaseRefVectorOf.c
+++ b/src/xercesc/util/BaseRefVectorOf.c
@@ -21,7 +21,7 @@
#include <xercesc/util/BaseRefVectorOf.hpp>
#endif
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// BaseRefVectorOf: Constructors and Destructor
@@ -341,4 +341,4 @@
fCurIndex = 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/util/BaseRefVectorOf.hpp b/src/xercesc/util/BaseRefVectorOf.hpp
index 360b99c..ba3e278 100644
--- a/src/xercesc/util/BaseRefVectorOf.hpp
+++ b/src/xercesc/util/BaseRefVectorOf.hpp
@@ -27,7 +27,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/framework/MemoryManager.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
/**
* Abstract base class for the xerces internal representation of Vector.
@@ -149,7 +149,7 @@
BaseRefVectorOf<TElem>* fToEnum;
};
-XERCES_CPP_NAMESPACE_END
+}
#if !defined(XERCES_TMPLSINC)
#include <xercesc/util/BaseRefVectorOf.c>
diff --git a/src/xercesc/util/BinFileInputStream.cpp b/src/xercesc/util/BinFileInputStream.cpp
index 0cea34a..b6c7626 100644
--- a/src/xercesc/util/BinFileInputStream.cpp
+++ b/src/xercesc/util/BinFileInputStream.cpp
@@ -29,7 +29,7 @@
#include <xercesc/util/XMLExceptMsgs.hpp>
#include <xercesc/util/XMLString.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// BinFileInputStream: Constructors and Destructor
@@ -116,4 +116,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/util/BinFileInputStream.hpp b/src/xercesc/util/BinFileInputStream.hpp
index 3b4ba03..6718bbc 100644
--- a/src/xercesc/util/BinFileInputStream.hpp
+++ b/src/xercesc/util/BinFileInputStream.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/BinInputStream.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT BinFileInputStream : public BinInputStream
{
@@ -102,6 +102,6 @@
return (fSource != (FileHandle) XERCES_Invalid_File_Handle);
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/util/BinInputStream.cpp b/src/xercesc/util/BinInputStream.cpp
index addcb92..50e11d1 100644
--- a/src/xercesc/util/BinInputStream.cpp
+++ b/src/xercesc/util/BinInputStream.cpp
@@ -25,7 +25,7 @@
// ---------------------------------------------------------------------------
#include <xercesc/util/BinInputStream.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// BinInputStream: Virtual destructor!
@@ -50,4 +50,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/util/BinInputStream.hpp b/src/xercesc/util/BinInputStream.hpp
index 6023f48..d8ea39e 100644
--- a/src/xercesc/util/BinInputStream.hpp
+++ b/src/xercesc/util/BinInputStream.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XMemory.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT BinInputStream : public XMemory
{
@@ -99,6 +99,6 @@
BinInputStream& operator=(const BinInputStream&);
};
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/util/BinMemInputStream.cpp b/src/xercesc/util/BinMemInputStream.cpp
index 5ebdf99..bc01d1c 100644
--- a/src/xercesc/util/BinMemInputStream.cpp
+++ b/src/xercesc/util/BinMemInputStream.cpp
@@ -25,9 +25,9 @@
// ---------------------------------------------------------------------------
#include <xercesc/util/BinMemInputStream.hpp>
#include <xercesc/framework/MemoryManager.hpp>
-#include <string.h>
+#include <cstring>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
// ---------------------------------------------------------------------------
// BinMemInputStream: Constructors and Destructor
@@ -95,4 +95,4 @@
return 0;
}
-XERCES_CPP_NAMESPACE_END
+}
diff --git a/src/xercesc/util/BinMemInputStream.hpp b/src/xercesc/util/BinMemInputStream.hpp
index 1617b65..9f52f68 100644
--- a/src/xercesc/util/BinMemInputStream.hpp
+++ b/src/xercesc/util/BinMemInputStream.hpp
@@ -25,7 +25,7 @@
#include <xercesc/util/BinInputStream.hpp>
#include <xercesc/util/PlatformUtils.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT BinMemInputStream : public BinInputStream
{
@@ -129,6 +129,6 @@
return fCapacity;
}
-XERCES_CPP_NAMESPACE_END
+}
#endif
diff --git a/src/xercesc/util/BitOps.hpp b/src/xercesc/util/BitOps.hpp
index 1b3d420..dacda1f 100644
--- a/src/xercesc/util/BitOps.hpp
+++ b/src/xercesc/util/BitOps.hpp
@@ -24,7 +24,7 @@
#include <xercesc/util/XercesDefs.hpp>
-XERCES_CPP_NAMESPACE_BEGIN
+namespace XERCES_CPP_NAMESPACE {
class XMLUTIL_EXPORT BitOps
{
@@ -38,6 +38,12 @@
return XMLCh(((toSwap >> 8) | (toSwap << 8)) & 0xFFFF);
}
+ static inline UTF16Ch swapBytes(const UTF16Ch toSwap)
+ {
+ //The mask is required to overcome a compiler error on solaris
+ return XMLCh(((toSwap >> 8) | (toSwap << 8)) & 0xFFFF);
+ }
+
static inline unsigned int swapBytes(const XMLUInt32 toSwap)
{