Merged PR 1303562: Remove C++ runtime static dependency on Android

This change removes the size of the Android binary by around 5MB and decreases our build time for all platforms.

- Remove C++ runtime static dependency on Android by changing Xerces to be a subtree instead of a submodule.
- Subtree made from Xerces repo tag Xerces-C_3_2_0  commit dffc3028df8ea44985c92f2df28115860e39e344
- Changes to Xerces to avoid using mblen and use mbrlen to be able to compile for Android API level 19
- Adds switch to build Xerces tests and samples (OFF by default)
- Changes AOSP scripts to build for level 19

Related work items: #15424024
This commit is contained in:
Ruben Guerrero Samaniego 2018-01-11 23:31:31 +00:00
Родитель 884fb0cca6
Коммит 422004ec30
1535 изменённых файлов: 361050 добавлений и 13 удалений

3
.gitmodules поставляемый
Просмотреть файл

@ -1,9 +1,6 @@
[submodule "lib/openssl"]
path = lib/openssl
url = https://github.com/openssl/openssl.git
[submodule "lib/xerces"]
path = lib/xerces
url = https://github.com/apache/xerces-c.git
[submodule "lib/xalan"]
path = lib/xalan
url = https://github.com/apache/xalan-c.git

Просмотреть файл

@ -16,6 +16,7 @@ add_subdirectory(zlib)
# Xerces
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Only build static lib" FORCE)
set(network OFF CACHE BOOL "Disable network support" FORCE)
set(XERCES_TESTS OFF CACHE BOOL "Don't build test or samples" FORCE)
add_subdirectory(xerces)
# OpenSSL

@ -1 +0,0 @@
Subproject commit dffc3028df8ea44985c92f2df28115860e39e344

156
lib/xerces/.appveyor.yml Normal file
Просмотреть файл

@ -0,0 +1,156 @@
# Possible test configurations for comprehensive feature coverage:
#
# Cygwin
# ------
# 1) -Dnetwork:BOOL=ON -Dnetwork-accessor=curl -Dmessage-loader=icu -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dnetwork-accessor=socket -Dmessage-loader=inmemory -Dtranscoder=icu
# 3) -Dnetwork:BOOL=OFF"
# 4) (none)
#
# MinGW
# -----
# 1) -Dnetwork:BOOL=ON -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dtranscoder=windows
# 3) -Dnetwork:BOOL=OFF
# 4) (none)
#
# MSVC
# ----
# 1) -Dnetwork:BOOL=ON -Dmessage-loader=icu -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dnetwork-accessor=winsock -Dmessage-loader=inmemory -Dtranscoder=icu
# 3) -Dnetwork:BOOL=ON -Dtranscoder=windows
# 4) -Dnetwork:BOOL=OFF
# 5) (none)
#
# To keep the test matrix size manageable, only a subset of these are
# used, to test each settable option, but not in every possible
# combination.
environment:
AV_PROJECTS: 'c:\projects'
AV_XERCES_DOWNLOAD: 'c:\projects\download'
AV_XERCES_TOOLS: 'c:\projects\tools'
AV_XERCES_SOURCE: 'c:\projects\xerces-c'
AV_XERCES_BUILD: 'c:\projects\build'
AV_XERCES_INSTALL: 'c:/projects/libs'
matrix:
- compiler: cygwin
configuration: Release
generator: Unix Makefiles
shared: ON
network: ON
netaccessor: curl
msgloader: inmemory
transcoder: iconv
- compiler: cygwin
configuration: Debug
generator: Unix Makefiles
shared: OFF
network: OFF
netaccessor:
msgloader:
transcoder:
- compiler: mingw
configuration: Release
generator: Ninja
shared: ON
network: ON
netaccessor:
msgloader:
transcoder: windows
- compiler: mingw
configuration: Debug
generator: Ninja
shared: OFF
network:
netaccessor:
msgloader:
transcoder: iconv
- compiler: vc14
configuration: Release
generator: Visual Studio 14 2015 Win64
shared: ON
network: ON
netaccessor:
msgloader: icu
transcoder: windows
- compiler: vc14
configuration: Debug
generator: Visual Studio 14 2015 Win64
shared: OFF
network: OFF
netaccessor: winsock
msgloader: inmemory
transcoder: icu
cache:
- 'c:\projects\download -> scripts/ci-appveyor-setup'
- 'c:\projects\icu -> scripts/ci-appveyor-setup'
# Operating system (build VM template)
os: 'Visual Studio 2015'
# clone directory
clone_folder: 'c:\projects\xerces-c'
clone_depth: 5
platform: x64
init:
- git config --global core.autocrlf input
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_DOWNLOAD%`) DO SET AV_XERCES_CYG_DOWNLOAD=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_TOOLS%`) DO SET AV_XERCES_CYG_TOOLS=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_SOURCE%`) DO SET AV_XERCES_CYG_SOURCE=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_INSTALL%`) DO SET AV_XERCES_CYG_INSTALL=%%F'
- 'if NOT EXIST "%AV_XERCES_DOWNLOAD%\" mkdir %AV_XERCES_DOWNLOAD%'
- 'if NOT EXIST "%AV_XERCES_TOOLS%\" mkdir %AV_XERCES_TOOLS%'
- 'if %compiler%==cygwin C:\Cygwin64\setup-x86_64 -q -R C:\Cygwin64 -s http://cygwin.mirror.constant.com -l %AV_XERCES_DOWNLOAD%\cygwin -P libcurl-devel,cmake'
- if [%msgloader%] == [icu] set AV_ICU_BUILD=true
- if [%transcoder%] == [icu] set AV_ICU_BUILD=true
- 'if EXIST "%AV_PROJECTS%\icu" AV_ICU_BUILD=false'
- 'set "PATH=C:\Program Files (x86)\cmake\bin;%AV_XERCES_TOOLS%;%PATH%"'
- 'if %compiler%==cygwin set "PATH=C:\Cygwin64\bin;%PATH%"'
- 'if %compiler%==mingw set "PATH=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%"'
- set "AV_CMAKE_ARGS=-DBUILD_SHARED_LIBS:BOOL=%shared%"
- set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dnetwork:BOOL=%network%"
- if NOT [%netaccessor%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dnetwork-accessor=%netaccessor%"
- if NOT [%msgloader%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dmessage-loader=%msgloader%"
- if NOT [%transcoder%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dtranscoder=%transcoder%"
- set "AV_XERCES_CMAKE_SOURCE=%AV_XERCES_SOURCE%"
- set "AV_XERCES_CMAKE_INSTALL=%AV_XERCES_INSTALL%"
- 'if %compiler%==cygwin set "AV_XERCES_CMAKE_SOURCE=%AV_XERCES_CYG_SOURCE%'
- 'if %compiler%==cygwin set "AV_XERCES_CMAKE_INSTALL=%AV_XERCES_CYG_INSTALL%'
before_build:
- 'C:\cygwin64\bin\bash %AV_XERCES_CYG_SOURCE%/scripts/ci-appveyor-setup'
- set ICU_PLATFORM=x64
- if [%platform%] == [x86] set ICU_PLATFORM=Win32
- 'if [%AV_ICU_BUILD%] == [true] cd "%AV_PROJECTS%\icu"'
- 'if [%AV_ICU_BUILD%] == [true] echo "Running msbuild to build ICU"'
- 'if [%AV_ICU_BUILD%] == [true] call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %platform%'
- 'if [%AV_ICU_BUILD%] == [true] msbuild source\allinone\allinone.sln /p:Configuration=%configuration% /p:Platform=%ICU_PLATFORM% /m'
- 'if [%AV_ICU_BUILD%] == [true] set "PATH=%AV_PROJECTS%\icu\bin;%AV_PROJECTS%\icu\bin64;%PATH%"'
- 'if [%AV_ICU_BUILD%] == [true] set "CMAKE_PREFIX_PATH=%AV_PROJECTS%\icu"'
- mkdir %AV_XERCES_BUILD%
- cd %AV_XERCES_BUILD%
- echo Running cmake -G "%generator%" -DCMAKE_INSTALL_PREFIX=%AV_XERCES_CMAKE_INSTALL% -DCMAKE_BUILD_TYPE=%configuration% %AV_XERCES_CMAKE_SOURCE%
- cmake -G "%generator%" -DCMAKE_INSTALL_PREFIX=%AV_XERCES_CMAKE_INSTALL% -DCMAKE_BUILD_TYPE=%configuration% %AV_CMAKE_ARGS% %AV_XERCES_CMAKE_SOURCE%
build_script:
- cd %AV_XERCES_BUILD%
- cmake --build . --config %configuration%
- cmake --build . --config %configuration% --target install
after_build:
- cd %AV_XERCES_INSTALL%
- '7z a %AV_XERCES_SOURCE%\xerces-c.zip * -tzip'
before_test:
- cd %AV_XERCES_BUILD%
- ctest -V -C %configuration%
artifacts:
- path: xerces-c.zip
name: xerces-c.zip

59
lib/xerces/.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,59 @@
# Possible test configurations for comprehensive feature coverage:
#
# Unix
# ----
# 1) -Dnetwork:BOOL=ON -Dnetwork-accessor=curl -Dmessage-loader=icu -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dnetwork-accessor=socket -Dmessage-loader=inmemory -Dtranscoder=icu
# 3) -Dnetwork:BOOL=ON -Dmessage-loader=iconv
# 4) -Dnetwork:BOOL=OFF
# 5) (none)
language: c
sudo: false
dist: trusty
cache:
directories:
- download
addons:
apt_packages:
- libicu-dev
- libcurl4-openssl-dev
- autoconf
- automake
- libtool
os:
- linux
- osx
env:
matrix:
- BUILD=autoconf TYPE=Release NETWORK=ON NETACCESSOR=curl MSGLOADER=inmemory TRANSCODER=iconv
- BUILD=cmake TOOL="Unix Makefiles" TYPE=Debug NETWORK=ON NETACCESSOR=curl MSGLOADER=icu TRANSCODER=iconv
- BUILD=cmake TOOL="Ninja" TYPE=Release NETWORK=ON NETACCESSOR=socket MSGLOADER=inmemory TRANSCODER=icu
- BUILD=autoconf TYPE=Debug NETWORK=ON MSGLOADER=iconv
- BUILD=cmake TOOL="Unix Makefiles" TYPE=Release NETWORK=ON
- BUILD=cmake TOOL="Ninja" TYPE=Debug
- BUILD=cmake TOOL="Ninja" TYPE=Debug NETACCESSOR=cfurl TRANSCODER=macosunicodeconverter
matrix:
fast_finish: true
exclude:
- os: linux
env: BUILD=cmake TOOL="Ninja" TYPE=Debug NETACCESSOR=cfurl TRANSCODER=macosunicodeconverter
- os: osx
env: BUILD=cmake TOOL="Unix Makefiles" TYPE=Debug NETWORK=ON NETACCESSOR=curl MSGLOADER=icu TRANSCODER=iconv
- os: osx
env: BUILD=cmake TOOL="Ninja" TYPE=Release NETWORK=ON NETACCESSOR=socket MSGLOADER=inmemory TRANSCODER=icu
- os: osx
env: BUILD=autoconf TYPE=Debug NETWORK=ON MSGLOADER=iconv
- os: osx
env: BUILD=cmake TOOL="Unix Makefiles" TYPE=Release NETWORK=ON
- os: osx
env: BUILD=cmake TOOL="Ninja" TYPE=Debug
script:
- ./scripts/ci-travis "$BUILD" "$TOOL" "$TYPE" "$NETWORK" "$NETACCESSOR" "$MSGLOADER" "$TRANSCODER"

172
lib/xerces/CMakeLists.txt Normal file
Просмотреть файл

@ -0,0 +1,172 @@
# 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.
# Run "cmake" to generate the build files for your platform
cmake_minimum_required(VERSION 3.2.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
# for optional features.
set(CMAKE_CXX_STANDARD 14)
# Use folders (for IDE project grouping)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Source additional modules from the "cmake" directory
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_LIST_DIR}/cmake")
# Read version information from configure.ac.
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/configure.ac" configure
REGEX "^AC_INIT\\(\\[xerces-c\\],\\[(.*)\\]\\)")
foreach(line IN LISTS configure)
string(REGEX REPLACE "^AC_INIT\\(\\[xerces-c\\],\\[(.*)\\]\\)" "\\1" xerces_c_version "${line}")
break()
endforeach()
message(STATUS "Configuring Apache Xerces-C++ version ${xerces_c_version}")
# Project version
project(xerces-c
VERSION "${xerces_c_version}"
LANGUAGES C CXX)
enable_testing()
# For autotools header compatibility
set(PACKAGE "${PROJECT_NAME}")
set(PACKAGE_NAME "${PROJECT_NAME}")
set(PACKAGE_TARNAME "${PROJECT_NAME}")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "c-dev@xerces.apache.org")
set(PACKAGE_URL "https://xerces.apache.org/xerces-c/")
set(EXTRA_DIST
version.incl
xerces-c.spec
xerces-c.pc.in
CREDITS
INSTALL
KEYS
LICENSE
NOTICE
README
config/pretty-make
doc
projects
reconf
scripts/createBindingsFormatFromHPP.pl
scripts/makeStringDefinition.pl
tools
)
include(GNUInstallDirs)
include(XercesWarnings)
include(XercesIncludes)
include(XercesFunctions)
include(XercesDLL)
include(XercesIntTypes)
include(XercesPathDelimiters)
include(XercesICU)
include(XercesMutexMgrSelection)
include(XercesNetAccessorSelection)
include(XercesMsgLoaderSelection)
include(XercesTranscoderSelection)
include(XercesFileMgrSelection)
include(XercesXMLCh)
include(XercesOperatorDelete)
include(XercesBool)
include(XercesConst)
include(XercesInline)
include(XercesVolatile)
include(XercesLString)
include(XercesNamespaces)
include(XercesStdLibs)
include(XercesStdNamespace)
include(XercesSSE2)
include(XercesPathMax)
include(XercesWChar)
include(XercesIconvConst)
include(XercesLFS)
# Generate headers
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/config.h
@ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/Xerces_autoconf_config.hpp
@ONLY)
# Generate pkg-config file
set(pkgconfig-dir "${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE STRING "pkg-config installation directory (default ${CMAKE_INSTALL_LIBDIR}/pkgconfig)")
set(PKGCONFIGDIR "${pkgconfig-dir}")
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/xerces-c.pc.in
${CMAKE_CURRENT_BINARY_DIR}/xerces-c.pc)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/xerces-c.pc
DESTINATION "${PKGCONFIGDIR}"
COMPONENT "development")
# Process subdirectories
add_subdirectory(src)
if(XERCES_TESTS)
add_subdirectory(doc)
add_subdirectory(tests)
add_subdirectory(samples)
endif()
# Display configuration summary
message(STATUS "")
message(STATUS "Xerces-C++ configuration summary")
message(STATUS "--------------------------------")
message(STATUS "")
message(STATUS " Version: ${xerces-c_VERSION}")
message(STATUS " Library version: ${LIB_VER}")
message(STATUS " Library interface version D: ${LIB_INTERFACE_VER_D}")
message(STATUS " Library interface version U: ${LIB_INTERFACE_VER_U}")
message(STATUS "")
message(STATUS " Installation directory: ${prefix}")
message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS "")
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
message(STATUS " Path delimiters: \"${path_delims}\"")
message(STATUS " File Manager: ${filemgr}")
message(STATUS " Mutex Manager: ${mutexmgr}")
message(STATUS " Transcoder: ${transcoder}")
message(STATUS " NetAccessor: ${netaccessor}")
message(STATUS " Message Loader: ${msgloader}")

144
lib/xerces/CREDITS Normal file
Просмотреть файл

@ -0,0 +1,144 @@
The following people (in no particular order) have contributed to the
development of the Xerces-C++ source code.
Nadav Aharoni
Curt Arnold
Edward Avis
Anupam Bagchi
Torbjörn Bäckström
Abe Backus
Frank Balluffi
Matthew Baker
Devin Barnhart
James Berry
David Bertoni
John Bellardo
Arundhati Bhowmick
Joanne Bogart
Michael Boos
Edward Bortner
Sean Bright
Phil Brown
Robert Buck
Scott Cantor
David Cargill
Chris Cates
Sumit Chawla
Nick Chiang
Chih Hsiang Chou
Radovan Chytracek
Hiram Clawson
John Clayton
Todd Collins
Nathan Codding
Michael Crawford
Murray Cumming
Zeid Derhally
James Devries
Ailian Ding
Steve Dulin
David Earlam
Helmut Eiken
Mark Everline
Andrew Fang
Simon Fell
Paul Ferguson
Greg Franks
Pierpaolo Fumagalli
Syam Gadde
Guido Gagliardi
Gary Gale
Michael Glavassevich
Natalie Gorden
Max Gotlib
Petr Gotthard
Neil Graham
Matthew Hall
Jay Hansen
Susan Hardenbrook
Jeff Harrell
Andrew Hefford
Adam Heinz
Andy Heninger
John Hibbert
William L. Hopper
Michael Huedepohl
Anders Hybertz
Rahul Jain
Tom Jordahl
Christopher Just
Martin Kalen
Joe Kesselman
Artur Klauser
Bob Kline
Richard Ko
Paul Kramer
Volker Krause
Berin Lautenbach
Arnaud LeHors
Andy Levine
Jeff Lewis
James Littlejohn
Ray Logel
Pedro Lopes
Matt Lovett
Sean MacRoibeaird
Alberto Massari
Don Mastrovito
David McCreedy
Shin'ya MORINO
Urs Muff
Jordan Naftolin
Tinny Ng
David Nickerson
Khaled Noaman
Michael Ottati
Anthony O'Dowd
Mike Pawlowski
Kevin Philips
Mike Pogue
Joe Polastre
John Ponzo
Vitaly Prapirny
Shengkai Qu
Gareth Reakes
Jim Reitz
Caroline Rioux
Dean Roddey
John Roper
Dan Rosen
Steven Rosenthal
Erik Rydgren
Markus Scherer
Bill Schindler
Erik Schroeder
Christian Schuhegger
John Smirl
Andrei Smirnov
John Snelson
Gereon Steffens
Jason Stewart
Rick J. Stevens
Roman Sulzhyk
Linda M. Swan
Vasily Tchekalkin
Pieter Van-Dyck
Curtis Walker
John Warrier
Tom Watson
Mark Weaver
Roger Webster
Robert Weir
Axel Weiss
Carolyn Weiss
Kari Whitcomb
Christian Will
Dietrich Wolf
Kirk Wylie
Peter A. Volchek
Grace Yan
Hiramatsu Yoshifumi
PeiYong Zhang
Henry Zongaro
Boris Kolpackov

2
lib/xerces/INSTALL Normal file
Просмотреть файл

@ -0,0 +1,2 @@
See the xerces.apache.org web site for installation instructions and other
relevant documentation.

226
lib/xerces/KEYS Normal file
Просмотреть файл

@ -0,0 +1,226 @@
This file contains the PGP keys of various Xerces-C++ developers.
Please don't use them for email unless you have to. Their main
purpose is code signing.
Xerces-C++ users:
If you use PGP: pgp < KEYS
If you use gpg: gpg --import < KEYS
Xerces-C++ developers:
If you use pgp: pgp -kxa <your name> and append it to this file.
If you use gpg: gpg --export -a <your_name> >>KEYS should do the trick
Name User ID
Boris Kolpackov boris@kolpackov.net
Tinny Ng tng@apache.org
Gareth Reakes gareth@apache.org
Neil Graham neilg@apache.org
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.5 (GNU/Linux)
mQGLBD7gyjQBDADjboRuWsUo7JXgicFS5DGpqIhhHqmzifDxI1Sb/xHk7WZfxsNG
YFp1c5NXCsMKx801UUCeiezam9iiWILSl7SOnTvE4LUPkMJSSB9gsekt8YCDnUFr
cYdohOKSZvZi5l9KGLwAmF7CXhRItVWzbEHPcFQvWpBqtl7UXbWu+j3RPMHocNH8
I6ujnPCGhuaYYCsbUQzzlzVMw0mROm6vFKP2PcYmthXqS5eBLE2oNmUX06tn7U0i
5RjH34yLsaneXCwFJDeDc8RoYGvN8W4KR0uJp0i2BSop3dfkgYlxeB3NoqCh58Rk
jMrzJrhG3aetT2OIASNhsD80GT6phBvKLhPnBI/ifHxvUbKBkes5MlfMe/2TuHAq
op8iby2Kh54aW7TtUn8aWCZE0kWkOjYYXTH8wBPiTr/RBcdPNXkwofpLIDbV+JL4
qxebeZ8/HxPYoE2yN4mAM765sIWiZyKQhf4VurOXjOO/zsaGiP54vdnDO2ZlwVuS
RaglWAZ2+SR79YUABim0KUJvcmlzIEtvbHBhY2tvdiA8Ym9yaXNAY29kZXN5bnRo
ZXNpcy5jb20+iQG0BBMBAgAeBQJC1WiIAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheA
AAoJEMiAKQuuCE8dkCAMAJqV/8EzQphusvSblnI2LZFaFFLKlot8PUNrqZGEq4D2
mrTQkrkOBVHzSSm/MGOuhSeknzSS6hgEb+L647oxPSQ/YVJ6C7JFkQqcp6gfrYj/
AaCIhJkBccLIxkoNE5gaEZJvhd0WhDg0O0Xy7Jfsl0OQS9mvS5Prw69+ZRE0gFj/
H6XCm7zxpoXtQhFT1QZL/WJEyUIbDQeGppwueHAockV30f6VU+Q+t5PPYDd2+9hf
i6hOrHo6Ldne0or1xid+b27uqCid2mCHZM6Q00cMlbupiDiFw0Pjd3pcK7bgFS6o
kiHpFieMNgwhVEzz+nqOLoxO8dWz190MPbiW7k2zH+4PWVW3+Qwjq5QAtl18PNRE
Lt7XgIT/5AI/ov5CoyVLA0w9I3iL1ChcbzPlHGz0eQgOKM79PikSjkvfAns757te
yyWtnfwJcajph2fmz2GTmBAdwVELskmZCqntxIpM3vVZqDl+Sn3JtPl5uNl7zgIl
JCjYv/trdjqRIHW9ty7s1rQlQm9yaXMgS29scGFja292IDxib3Jpc0Brb2xwYWNr
b3YubmV0PokBtwQTAQIAIQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAUCQtVpVQIZ
AQAKCRDIgCkLrghPHWNODACJkRxgIhj6sbLk10nfC4c7DDLhO96HzaWl4W/f34RT
2ZcT9QMlT0rGim93HadI5160aTb3I8uxdsNKUpjZbFMl/6W6jb/rU5qVWPLIKgHG
THvskJchTylklhZWhc2/QTHMWZPF2ipr0v6djkIMtEkH1os6cevPvPNkXxFcQmBk
GxUgINYe+F5snRmXnR2Fbm56Xam9TWKNfrpNLY03s/S7iHmonLSw7qW5Ixjmrdeh
Snil6TxGhDU/AiRX/EEa5O/pqUwlm2E/6TvgQoeX1fEx0YjLevVWjoqASFg75INk
N8D6P10mT0LvgIAuK3Ppcd69No3RLufsJGgXjb8NIQyzltqH/S0qPeSBrrpisf/y
lV51RuIZBgYHRHl7xVG+KEJ5JLyLzfwebPmRyXiHkM1yz749tiyhV5JMcKsO3hOy
6nZtQRt1as5Dmm0dzhFHYLImqP8nQAblu6q7FRLJLcXLJl8NlOWVPttPcmuGaXc2
NeYuUdtFi+hquk268CtpCJW5Aw0EPuDNnBAMAPa+/MHQ5JBkR+VoVU+9bVLb+RFq
lORX9Mtl7MwYBSQwOOv0KTMXVv/ucqh7A4cLQkK7QVD878C1kTYjupDdrAp7GDlN
vhzoE+ltuJaUYFDbviwH++vOMMR3DqkPvfcWxUbCGIFDWyHIqVUmGkOzzTIk62IT
gYNBvIhxqSh+r5LG0dNFYO+W5bd0FzftmP4AnfhMPDKM6OJsZ2ZrHR0t8EJnn4Pn
6/D1e02/1CUdlMM8gTSAXk4wF69TCsE9fvDq5jgLoud1I2RKLmhRDDxxmQUAjBir
aab32oeRzNgbU5RbtolHxfvDiRmHUDDqQavNT3HpElbeXj/J5/Jkh0LcpF1QsDUJ
pewVVX4ltMCnCATqUqqgx5UpnfEY1Dt5N3uuO5znQ5oznZHsLWx3qWegTJn7acta
/HlFUpSMaxteuXT/6EiE7lAzsGSWTcX8BpCHviDVPhQMy2AFzWSQlUItXyfkfX0B
SOgFypLjffx4+bms/DXJPYgwEhjFiTaATBeUOwADBQwAuPTkktfoMsI4lL4UYBr5
afW1R6lHwMZeoH7Mspb82bC9Lqi5gU3wBu3RJwm1CswGMBys+o9J0eA7EDRPw8wM
e0THds93rhlABnvhkElbSD/ypsUsX+DRbjiVrV5gTwVRg+5Qmu754BUPrbt14awO
4yLWqV7NN2oOglZy2BTN1WTECOzODRVyxlb3AAL+KWoc0L2QzfRErY5t6ZbIYf2C
+8jXgf6iFl6eLDlecWcrHds/rl1A5w+MP1I+EjozMnjejEjUOuVyq4B80YmAquPL
6BB76CyjZnpJjvGLijVU4RrD1vduKlMsy4dh7gQaVTQ+SvrQktrFbEcTy2Gj/Jir
LVQagYPSqpcRwLvd0sOGxkipKqIjDi7v8huc+jGmUCFpBcMwJPndzNwuBmJUEGhp
QM0VeYHDugZ1+GWVrxDcjAsYKjwjm/qdjP/1el3a9rgMVYrmxHKobiuqYklIWtw6
mp7gzdzwMwUNOX8hHCL21ojStlUs5BbzZQ8X8h8a7sX9iQGcBBgBAgAGBQI+4M2c
AAoJEMiAKQuuCE8d4LYL/iUOcqAT3enonrSOu9v8SGKqEc6z7H/5f0t7vZxREVqJ
PIEL/Lj5787NouhtZ+k7KBz4Ssu2lmOA63PUXtSllQx8mg/Jb2PUrjUVLCr22WqA
mr3zAQQ/14B5cLkhnpSID0oQL5UyP7dZ4beUWB3wYydp/hbOLl7+OrP+2EpIopYB
Mdk383GsnN2wWP9pEEDhJ1Lt7DsWuNV/ATZ9yWIvs82s8QiGvWfKbYSHvvzIKAET
UkPD7uWU3IdXgm9kuQQ7TNqX6q857PAC3SK+b+qepmyGDJtoeYS19WsxfqZr2Iot
i75/zy43w9bhbX17JNQynaMsAP4nG+HHzvnSEp8p0s38Cz5xi6xVb8fig6g3WFwn
6OdZakQ8sI+DyhsrdwlgSCNQTsi85X7Opv8Q+8EQwt+QBTF85O5RjO1Szacsedvl
RXSIWXj8vl8TJZ1VsEOBehdSjAjpUJMUHAoq9c69H5ynXzFrVwOWCwfAYcrFNsmX
hN0wyp3I8BVY5rjH33DQTA==
=ehLR
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org
mQGiBDyHxtYRBACZ0tjwBxGJZgu/xVMwgCCUdzXcwMlt4xym2Vx0ZZ6bDJWDVlfa
U/BvSVrrGGgkuYt2fFOeboYIVqW5OsQKJX5a6eZbywkhiK9CehDoh0Ask0hTgyzf
C+kBldozpSv2adBeD4shv8E6mPFsAaA1N7wOIYE6dOuRJBAPIjeZ/ziFxwCg8kaX
r59ZEWL2dD4RISap5mGwyA0D/02DYwBN0V8iSqAi6gu1yYAccsz8kw573DRre0Rh
h8rgNUh5FA63MMDoifYKW1bcKWZkp9BfAE0Q6qwi7bfs/FOBHBCZpI47FYJ1n8yh
VRHA3MxayIqZQlETTNbLMPDJ2rtRs8NJZ7brXnJ2zOuDexzlS2vhKdeJP9gsrfXF
LYDeBACBYd6a1WRm5aZMvMpO16C925UbRmDBZ+TfWRtxPqRYSfVM+hkPKw5GObWJ
gL1GbF5bIS0C/Ddi7oegB77lGn8XNDTQT5e47SWkeboU+6fuSgsLLSgMfKivh++S
29kngiFIUsKnB4F102GwoAkpsO12Vhnsi9INaXVYLkZmhR3x07QwVGlubnkgTmcg
KFhlcmNlcy1DKysgY29tbWl0dGVyKSA8dG5nQGFwYWNoZS5vcmc+iFcEExECABcF
AjyHxtYFCwcKAwQDFQMCAxYCAQIXgAAKCRA+PBlAJOh0GSTcAJ9hqoz+wf70Dw84
H2RX7ZEo1jhvggCg1QA//1Ur9XFxLUlFVnbppAMPl5S5AQ0EPIfG1xAEAOjBKfzF
4aZaY1biEUxZCk6PMofuXVE32XFrsm1Pn3AcYThtSEBQM76yXOx7d30IdA6yPSkF
rsd9gfB379KfQHAc5VnNZU1xE3rmmT7+s5rRPr0zoBCRtI/qCajFV1IczqmvlAHq
QJunztZNB3D2Uu4GGZ2sAQMFyPzBzNk3UODLAAMFBAC1KB5yJkbDhMPeT4ewFhow
Yy/VbQSPfYcbTjY/+JXZ6XKZUvZSq75S1id/9vgxMBljfruQKlYQ54P6yQqreWTt
IXtR9yQt0C5FVzl7lZKXZYZLJjKmEavqG7dtDNXtmVUWIx7JJwzSv/h6HyXlJZuw
Sj5q9RAV/QoRf6bHiNZzgYhGBBgRAgAGBQI8h8bXAAoJED48GUAk6HQZd54An1tZ
V9tsv1XZSRmh6SKUHkUn8ZNiAJwOO/uRRPfoeyAUbP+qfro53b+UQpkBogQ8h8bW
EQQAmdLY8AcRiWYLv8VTMIAglHc13MDJbeMcptlcdGWemwyVg1ZX2lPwb0la6xho
JLmLdnxTnm6GCFaluTrECiV+WunmW8sJIYivQnoQ6IdALJNIU4Ms3wvpAZXaM6Ur
9mnQXg+LIb/BOpjxbAGgNTe8DiGBOnTrkSQQDyI3mf84hccAoPJGl6+fWRFi9nQ+
ESEmqeZhsMgNA/9Ng2MATdFfIkqgIuoLtcmAHHLM/JMOe9w0a3tEYYfK4DVIeRQO
tzDA6In2CltW3ClmZKfQXwBNEOqsIu237PxTgRwQmaSOOxWCdZ/MoVURwNzMWsiK
mUJRE0zWyzDwydq7UbPDSWe2615ydszrg3sc5Utr4SnXiT/YLK31xS2A3gQAgWHe
mtVkZuWmTLzKTtegvduVG0ZgwWfk31kbcT6kWEn1TPoZDysORjm1iYC9RmxeWyEt
Avw3Yu6HoAe+5Rp/FzQ00E+XuO0lpHm6FPun7koLCy0oDHyor4fvktvZJ4IhSFLC
pweBddNhsKAJKbDtdlYZ7IvSDWl1WC5GZoUd8dO0MFRpbm55IE5nIChYZXJjZXMt
QysrIGNvbW1pdHRlcikgPHRuZ0BhcGFjaGUub3JnPohXBBMRAgAXBQI8h8bWBQsH
CgMEAxUDAgMWAgECF4AACgkQPjwZQCTodBkk3ACfYaqM/sH+9A8POB9kV+2RKNY4
b4IAoNUAP/9VK/VxcS1JRVZ26aQDD5eUuQENBDyHxtcQBADowSn8xeGmWmNW4hFM
WQpOjzKH7l1RN9lxa7JtT59wHGE4bUhAUDO+slzse3d9CHQOsj0pBa7HfYHwd+/S
n0BwHOVZzWVNcRN65pk+/rOa0T69M6AQkbSP6gmoxVdSHM6pr5QB6kCbp87WTQdw
9lLuBhmdrAEDBcj8wczZN1DgywADBQQAtSgeciZGw4TD3k+HsBYaMGMv1W0Ej32H
G042P/iV2elymVL2Uqu+UtYnf/b4MTAZY367kCpWEOeD+skKq3lk7SF7UfckLdAu
RVc5e5WSl2WGSyYyphGr6hu3bQzV7ZlVFiMeyScM0r/4eh8l5SWbsEo+avUQFf0K
EX+mx4jWc4GIRgQYEQIABgUCPIfG1wAKCRA+PBlAJOh0GXeeAJ9bWVfbbL9V2UkZ
oekilB5FJ/GTYgCcDjv7kUT36HsgFGz/qn66Od2/lEI=
=8B+D
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
mQGiBD6IPYoRBADdZZVTi5dsdtKm9tbJu2PRTMnkgP61zYxT41O9oVoUDhkqKUd3
Kv9Jm+0Kr5RWdega+m9Ew1zEIilywu08xf1Ne6YsXViZB0E+8D+ObLDSGVjm4fBW
G5HLeYnPnuivqsXNy71MVOiaM9IGLemvUPkIgteMBBP7dcNko8Ykea2I8wCg2O6J
tx2Uj3ZqtSyyC1GOiIBq81UEAM8XTQQm7k+Q2BjommfTHli97WdJrPD/BMCc9MOx
wFia80g3nGfrp9F9L2U5jBzOTHmthBSjeCTmIybh4iHz7TfLcj1zqtG+Q4BqrOV6
/N6gKJivAJSLaqEECxyi8VmMnayg/WEe8eaF1QtPh7b3mO9QhZj839GPpHEpNlti
noqEA/wM+dx6cy/IcOuKVefon6KMsjJ0oWzBtUE+zWrmWN4oXUWY1C8zHBugqvKf
w3Yrse5IHRtvraqrc+37DfVKEP2DheL526zuTMLBNwQc36UeDcL8n1V+0K/Ay7Zs
O5/9lxwd9PhmL9E5n2tHbrXKCsMx1HaW1pjMj4BzL1cNo0LS0rQhR2FyZXRoIFJl
YWtlcyA8Z2FyZXRoQGFwYWNoZS5vcmc+iFcEExECABcFAj6IPYoFCwcKAwQDFQMC
AxYCAQIXgAAKCRAe3w93r4d3pnlSAJwPfmNsaTTRtTLXuhll1FG4kFtTvgCggYB0
YhTzmMtD59n/ymg09SCHKC+IRgQQEQIABgUCPog+iwAKCRA7Ok8Kx55bak8bAJ9Y
73xLuFKBxlkqASo4j9GtRjFW0gCfcZhJzZAApR6Mixy9ei7ykb3adguIRgQQEQIA
BgUCPog/jAAKCRBqo+AVTsqIBUSGAJ4jfdTVDT0lhD9DfsZDX9pXPWKNBwCfaaWb
YXZ6aSHV0kaZDK7uj3kKQ7m5Ag0EPog9khAIAK5cD5+GcY2bZTfCeHzdbaOGXatl
IWr3z8A56L4xA1Mp2D/tpF1Cky1hpFu8SMmNiO4+OqbNF08iJK7p+0HIb7KU2+Fk
4rNumfVkAi+QMvfKyr78pvq2DCqsgyQdFmkFhEYOkgZvas52CRLKW/GGXh+xnQI7
NvJuXu0+z130QcS9Q+f90NSrZWOzcHiz08LzvLnt5miLF0AxJGWwQj/4TzB+Xnwu
CS8QV2k81LiHH+qbbPi2+VyMD/dimYZE6Fti/ZziO1KJXcMxfN62/QiYw+ui7K9F
YXqiWY+RfXsX3QCfJdMhUtHXArVzMDF6UcDU76lMG1PBcD12zGfRL8iLoBcAAwUH
/3ro3uF9Mix2URdXxTfJn4vfDJ/hiAbhENTtCDU5M30lSI9JG5HamVsSMo0hrtJd
RaU7fLhbw/1IXn0tvbbeWmWZhDV5fYwuMKywwTvMWBmNZ7eBbZUlFlRyKYQqmrH7
cMBUGbA2ePHpDwvAvgU/zIayvhx87cq3RcbcfJaGvPB8v1thPMek1QK/xyFZowO3
SGSjS7yf1DoTR7cKAatE0bxfL4A6lRa7iWk6ZMgQ5XgQryPoSwqsAAdcjW7wZj+J
7wlDdkWaY5MMPLbmNgRCpbcw/L77x4Wp7u7Nc0vcy/Qc8bYiBmyaavIBwn5BEHWN
85SNootv8flkreqsEKJy8KCIRgQYEQIABgUCPog9kgAKCRAe3w93r4d3ptC8AJ9D
O5xVcnBvZRCv2nN6pr9Erm1NZgCgjWXqDC0aQj7rtZq0i9UUCn+/PFA=
=QJwD
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.2 (Cygwin)
mQGiBDp4qeoRBAC0LNU4DKxiGD4WlaCZytDOlzEpUEJ2osubqdUSnexv/NzOA3Jy
ZaAsITi1kj8dQR/pqpFHEMeWsb1Xua33TtlPcCN3kFicjbTOo3jbilx4gUFeO9Oy
mcMeu/scYGan4erT++vXEAVd+qKCUzOymFqpDCa3xpqmeDuWxBUjqbCRFwCgt6w/
dvC1VRG2bh7Ja09zfCPr4hkEAIYdq/2k3YYc0T1Fh8fKDRzsRsDYj+8BAGg8YmDy
wx04Nh6l3XmKt1DmR0U3ciH6rY3oWXB9oCzGoyr/ZvkakfknGsptBpVK0m9vVHVw
uHvIEZDdsX2l4Eplc/FovueZQadCj1R6zwTNvri7h0vTDg9Pk0+dRUcWHuoBhWvN
+hv3A/4mWImGrPsx6nq85TJWRJxqFeAnYiEqB69ns69S//+lqBRFWecTYu60dde/
sHJ0mHDTP0u5FRUSj5BVufR5wLZH8+ieGNHl4Jei3VnN3voGhuGNpwGxLDTdXD3W
bMlOVx0H2R9+yqlDANLAfRS8GZb93I+riE0H1yMG5YgQC58+VLRUTmVpbCBHcmFo
YW0gKHRoaXMga2V5IGlzIHByaW1hcmlseSBmb3Igc2lnbmluZyBYZXJjZXMtSiBy
ZWxlYXNlcykgPG5laWxnQGNhLmlibS5jb20+iFcEExECABcFAjp4qeoFCwcKAwQD
FQMCAxYCAQIXgAAKCRCL9vl1lVl7BQNhAJ9nucE0TtlFxStFCepoV638ma/jQQCe
ILRbfFIo/pef/k551p2+wNqI/DyIRgQQEQIABgUCP6HMvgAKCRABBWa85BNjkiWe
AJ9Q0r6at4PhTAukVTIT1jFaIzJaoQCfQwzCjO54eu+zYLJyF4bOJ+i0eSOIRgQT
EQIABgUCP6K/ewAKCRCAzn5dyXJfO6jWAKCgr5/0+YchPX1LP975eEhAamZVGQCg
qnGt3A7/7LuKF18MjlpZWQOWvuOIRgQQEQIABgUCP61QjwAKCRCl/zLuaIOFDbEQ
AJ9CMksH+ujhz2QxiBSd81QtObxotgCgtwqHcr4sYZIhCYCcWp+LkihXgtS5BA0E
OnirwBAQAJDuhNBw4SXWZwW84XJclbDzrsftmuI7GeXVYtYQyJCWk4OX+fqR1xpq
td6IDLJl/Q/lvde42jxVMSTH2k0NfYsCh+5lIDQ54pYOiHZYQYx6ZhochZJTXxy9
R+gs/vK/UT9f8SqdwY5BlOBTh14hJV33lxk5Ptk9li92NSiiLI3+9GB0bl6dLWnQ
PqFeaSvY962i7zgIhnaDOC43cDzwRlTA9zJsI92wYs+QC3LSm5e5falQ7GtQf4dZ
4oid+ayTOE4B9jMumLHn/YQPMzyNFWYQJkyohfninxm8+aPOAOmveF+K8FE0dQsX
agIjHSX/4cJFoWGnOdq8emkhlNQaoPIldpSQcNLIB0Psnc4RhKQ30tK5a1unTgex
mYLfFO8oLd439SKSaU1D00V0blf/e5cfFaJsRoQnPjG+jLu9l5cj7wkYH1XC7efy
QJ2tW8br+0ENn2Ap30Uy6C7fQshyATFPk0rSonfIpH0Gd7//b8DutYpY6/ySHoWM
muoqeqc1RdJc6qiJPj6OLrfzgLJrVt3Mj6GgCltsHXreRqMtwhRZ1xx5EZIDXGQ7
/wnbDYgTU1NsY6VmBgZdkNOoCySg7Tf7NuJzLJ1Mlc2HBWhRBcrkwYhjGMsPIzK/
2jVY9qTDecPNMZcscWTPQp6t7VzgzxEe8UJlDDtVMUY02QKw+0ELAAMFD/9mdmU/
mEgwv9IxfNwisRW7jRQJjo4weUU6K9zkKZvRSg0tPLlyjTGtYKV4JTkeY++O38ie
cLJQOtBc5OikPbfhF2EMF7U+ATsd0hVvEVpCzsxcBr76Nt607Hcq7EeyL7GrvpaS
o5pTG89DFktB1xVji3X4ko+JI+uP5rva29y0o0KbjTReRqvdVUHHvnGgKu7UVmxW
AEAikEd2mQ5OYwqgO53VfL49akWR6Br30mymNw4oof1VqnPu0ZwN2WJkhM6fXA0N
k1+MsG8XZUe1hOX4pwFEmiv4R9htUhv3Hvl/HxY3oMRedHrkwLwEQQkW8UVJkS/u
6QZzeOplEG4s7ArmxEWqr3pBxXehvDvcpeWn8P+yhd8NgeZ7zDT1W+RT9iqIYvVv
UOYvEop32HJeJKeaZR1WUhTOxrHggCFQ8G6VEVeVmcJrcrvHI+9mbM+5oxt2NeGX
pf4eOErDxaFglvYSvXeX+IW3u7XQaxHs/D8v1fADzMi0xOIF7lxA7iyfNmfmb8NN
vej/F/Wj99od18agGy566pNYquu0VSV1nU4v2JRyZFkvtxjqZK+WVjZlMvbjaZPN
9IPWCtC7nKPOkpLdr1XoDrcIIZBldcOcGf/MdIaG5idzwIl3264vtCeIIDrGjxol
nQtO/wBr3R4e1BEksCNsHok+HoGfDvaKNTCWU4hGBBgRAgAGBQI6eKvAAAoJEIv2
+XWVWXsFH1cAn3k4YjXAjj+xOnPXTckz7jMXwkZoAJ9+F70Jxv1uoUGzpBnFs4Cu
H39QDg==
=cl3K
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (MingW32)
mQGiBEAxJWARBACJ4GAREpL61NDClbabHkC6iPIQgX5B8uYkupPT7aKW0bdkB10z
M6mu6HSLHKm8mzpWK+Uzsvm+PLVWpumKh2CtdhqPskbnsn+kqL/bnYQcMMPG6ddC
WR8DwqT0NEIzHa6KhCom1WnSfwQxIP7mi+xGr+GHFbT17dXJM+eVSnlkqwCgqsoq
ZNMbMzJRJe0yAVp8khG0bgED/2Azm+oj88WMRIKSfuYvmCzOPHql6j94gCVUYsfu
Ygg37Y+ajPiLEL0YSn/fVlTdqQ6rNXPPwFnbxJpQeAKu7arppHmsRv0RrfbG4wpW
tmbLASrqYI3MpjcH8uHKSszv4Pdx81sk27O0VHtrtWowhk1Cale/IPUXe+a/9KXE
GQfOA/9THDQh+wj1JYx35rBideVcCgKwU83F4lcIKD0yaYH2zFlk3X6YmXEiglaP
CkYOcrJiJiNmbnXTwbASmed/xKy3d8ltvR0yJIctveZlZ2Qn4PAJbbSkBOpQ2uSF
39t0Ucu/9411JjkEGlR28pOxo83EKNOqs3NO0RTKxS+OA9IX0LQjUGVpWW9uZyBa
aGFuZyA8cGVpeW9uZ3pAY2EuaWJtLmNvbT6IXgQTEQIAHgUCQDElYAIbAwYLCQgH
AwIDFQIDAxYCAQIeAQIXgAAKCRDs6whVcdsjNe3qAJwKTZzF0Pi4gpEaYG8ejeFk
fd8uqACglgUrALCA7T0DENQrIfg37gX+ovu5AQ0EQDElYxAEANsUYxWjFKamG1A0
K2ASNgp29IevQdk+YTRkqax8Zxv7tHWB6SOg65GJt6Oc2iwvJ+zV4d/B4KGEpL87
GpbpeJTeT4HIRfaKrtO4T6bJ1Wr4gf/EhWi1NVXK0oOVAxyfSaIbkl+2Y8u0jfVO
Vgw//xuFGdx3IOjLNQSTbQ/w49V3AAMFA/4r8qJmfnerpK8xVQFDd/f9+j44rxQh
1RaXVKka1AxXTKdjyaDTze73RFX1AX3++FS9bMoqv0KamGFj/HMcGJP65ominoyu
Hmea9zMJSXLF/KlhQ2ZIF8sG/kci2RthmZVxvJ6oWH1wXscfjCIjFgWLqY29/sGF
smUlVt+wRiRQmIhJBBgRAgAJBQJAMSVjAhsMAAoJEOzrCFVx2yM1QjkAnjJl6YHS
HnUmiKj1nzOTMG+DlKq0AJ42j+nRdCDjdX6tK5/7cy5JnUe7bg==
=jqXV
-----END PGP PUBLIC KEY BLOCK-----

202
lib/xerces/LICENSE Normal file
Просмотреть файл

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.

26
lib/xerces/Makefile.am Normal file
Просмотреть файл

@ -0,0 +1,26 @@
SUBDIRS = src tests samples
EXTRA_DIST = version.incl \
CMakeLists.txt \
cmake \
config.h.cmake.in \
xerces-c.spec \
xerces-c.pc.in \
CREDITS \
INSTALL \
KEYS \
LICENSE \
NOTICE \
README \
config/pretty-make \
doc \
reconf \
scripts/createBindingsFormatFromHPP.pl \
scripts/makeStringDefinition.pl \
tools
AUTOMAKE_OPTIONS = foreign dist-bzip2 dist-zip dist-xz
ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA= xerces-c.pc

10
lib/xerces/NOTICE Normal file
Просмотреть файл

@ -0,0 +1,10 @@
=========================================================================
== NOTICE file corresponding to section 4(d) of the Apache License, ==
== Version 2.0, in this case for the Apache Xerces distribution. ==
=========================================================================
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Portions of this software were originally based on the following:
- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.

2
lib/xerces/README Normal file
Просмотреть файл

@ -0,0 +1,2 @@
See the doc/html/index.html for the description of the Xerces-C++
project and other documentation.

Просмотреть файл

@ -0,0 +1,359 @@
#.rst:
# FindICU
# -------
#
# Find the International Components for Unicode (ICU) libraries and
# programs.
#
# This module supports multiple components.
# Components can include any of: ``data``, ``i18n``, ``io``, ``le``,
# ``lx``, ``test``, ``tu`` and ``uc``.
#
# Note that on Windows ``data`` is named ``dt`` and ``i18n`` is named
# ``in`; any of the names may be used, and the appropriate
# platform-specific library name will be automatically selected.
#
# This module reports information about the ICU installation in
# several variables. General variables::
#
# ICU_VERSION - ICU release version
# ICU_FOUND - true if the main programs and libraries were found
# ICU_LIBRARIES - component libraries to be linked
# ICU_INCLUDE_DIRS - the directories containing the ICU headers
#
# Imported targets::
#
# ICU::<C>
#
# Where ``<C>`` is the name of an ICU component, for example
# ``ICU::i18n``.
#
# ICU programs are reported in::
#
# ICU_GENCNVAL_EXECUTABLE - path to gencnval executable
# ICU_ICUINFO_EXECUTABLE - path to icuinfo executable
# ICU_GENBRK_EXECUTABLE - path to genbrk executable
# ICU_ICU-CONFIG_EXECUTABLE - path to icu-config executable
# ICU_GENRB_EXECUTABLE - path to genrb executable
# ICU_GENDICT_EXECUTABLE - path to gendict executable
# ICU_DERB_EXECUTABLE - path to derb executable
# ICU_PKGDATA_EXECUTABLE - path to pkgdata executable
# ICU_UCONV_EXECUTABLE - path to uconv executable
# ICU_GENCFU_EXECUTABLE - path to gencfu executable
# ICU_MAKECONV_EXECUTABLE - path to makeconv executable
# ICU_GENNORM2_EXECUTABLE - path to gennorm2 executable
# ICU_GENCCODE_EXECUTABLE - path to genccode executable
# ICU_GENSPREP_EXECUTABLE - path to gensprep executable
# ICU_ICUPKG_EXECUTABLE - path to icupkg executable
# ICU_GENCMN_EXECUTABLE - path to gencmn executable
#
# ICU component libraries are reported in::
#
# ICU_<C>_FOUND - ON if component was found
# ICU_<C>_LIBRARIES - libraries for component
#
# Note that ``<C>`` is the uppercased name of the component.
#
# This module reads hints about search results from::
#
# ICU_ROOT - the root of the ICU installation
#
# The environment variable ``ICU_ROOT`` may also be used; the
# ICU_ROOT variable takes precedence.
#
# The following cache variables may also be set::
#
# ICU_<P>_EXECUTABLE - the path to executable <P>
# ICU_INCLUDE_DIR - the directory containing the ICU headers
# ICU_<C>_LIBRARY - the library for component <C>
#
# .. note::
#
# In most cases none of the above variables will require setting,
# unless multiple ICU versions are available and a specific version
# is required.
#
# Other variables one may set to control this module are::
#
# ICU_DEBUG - Set to ON to enable debug output from FindICU.
# Written by Roger Leigh <rleigh@codelibre.net>
#=============================================================================
# Copyright 2014-2016 University of Dundee
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
set(icu_programs
gencnval
icuinfo
genbrk
icu-config
genrb
gendict
derb
pkgdata
uconv
gencfu
makeconv
gennorm2
genccode
gensprep
icupkg
gencmn)
# The ICU checks are contained in a function due to the large number
# of temporary variables needed.
function(_ICU_FIND)
# Set up search paths, taking compiler into account. Search ICU_ROOT,
# with ICU_ROOT in the environment as a fallback if unset.
if(ICU_ROOT)
list(APPEND icu_roots "${ICU_ROOT}")
else()
if(NOT "$ENV{ICU_ROOT}" STREQUAL "")
file(TO_CMAKE_PATH "$ENV{ICU_ROOT}" NATIVE_PATH)
list(APPEND icu_roots "${NATIVE_PATH}")
set(ICU_ROOT "${NATIVE_PATH}"
CACHE PATH "Location of the ICU installation" FORCE)
endif()
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
# 64-bit binary directory
set(_bin64 "bin64")
# 64-bit library directory
set(_lib64 "lib64")
endif()
# Generic 64-bit and 32-bit directories
list(APPEND icu_binary_suffixes "${_bin64}" "bin")
list(APPEND icu_library_suffixes "${_lib64}" "lib")
# Find all ICU programs
foreach(program ${icu_programs})
string(TOUPPER "${program}" program_upcase)
set(cache_var "ICU_${program_upcase}_EXECUTABLE")
set(program_var "ICU_${program_upcase}_EXECUTABLE")
find_program("${cache_var}" "${program}"
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_binary_suffixes}
DOC "ICU ${program} executable")
mark_as_advanced(cache_var)
set("${program_var}" "${${cache_var}}" PARENT_SCOPE)
endforeach()
# Find include directory
find_path(ICU_INCLUDE_DIR
NAMES "unicode/utypes.h"
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_include_suffixes}
DOC "ICU include directory")
set(ICU_INCLUDE_DIR "${ICU_INCLUDE_DIR}" PARENT_SCOPE)
# Get version
if(ICU_INCLUDE_DIR AND EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h")
file(STRINGS "${ICU_INCLUDE_DIR}/unicode/uvernum.h" icu_header_str
REGEX "^#define[\t ]+U_ICU_VERSION[\t ]+\".*\".*")
string(REGEX REPLACE "^#define[\t ]+U_ICU_VERSION[\t ]+\"([^ \\n]*)\".*"
"\\1" icu_version_string "${icu_header_str}")
set(ICU_VERSION "${icu_version_string}" PARENT_SCOPE)
unset(icu_header_str)
unset(icu_version_string)
endif()
# Find all ICU libraries
set(ICU_REQUIRED_LIBS_FOUND ON)
foreach(component ${ICU_FIND_COMPONENTS})
string(TOUPPER "${component}" component_upcase)
set(component_cache "ICU_${component_upcase}_LIBRARY")
set(component_cache_release "${component_cache}_RELEASE")
set(component_cache_debug "${component_cache}_DEBUG")
set(component_found "${component_upcase}_FOUND")
set(component_libnames "icu${component}")
set(component_debug_libnames "icu${component}d")
# Special case deliberate library naming mismatches between Unix
# and Windows builds
unset(component_libnames)
unset(component_debug_libnames)
list(APPEND component_libnames "icu${component}")
list(APPEND component_debug_libnames "icu${component}d")
if(component STREQUAL "data")
list(APPEND component_libnames "icudt")
# Note there is no debug variant at present
list(APPEND component_debug_libnames "icudtd")
endif()
if(component STREQUAL "dt")
list(APPEND component_libnames "icudata")
# Note there is no debug variant at present
list(APPEND component_debug_libnames "icudatad")
endif()
if(component STREQUAL "i18n")
list(APPEND component_libnames "icuin")
list(APPEND component_debug_libnames "icuind")
endif()
if(component STREQUAL "in")
list(APPEND component_libnames "icui18n")
list(APPEND component_debug_libnames "icui18nd")
endif()
find_library("${component_cache_release}" ${component_libnames}
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_library_suffixes}
DOC "ICU ${component} library (release)")
find_library("${component_cache_debug}" ${component_debug_libnames}
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_library_suffixes}
DOC "ICU ${component} library (debug)")
include(SelectLibraryConfigurations)
select_library_configurations(ICU_${component_upcase})
mark_as_advanced("${component_cache_release}" "${component_cache_debug}")
if(${component_cache})
set("${component_found}" ON)
list(APPEND ICU_LIBRARY "${${component_cache}}")
endif()
mark_as_advanced("${component_found}")
set("${component_cache}" "${${component_cache}}" PARENT_SCOPE)
set("${component_found}" "${${component_found}}" PARENT_SCOPE)
if(${component_found})
if (ICU_FIND_REQUIRED_${component})
list(APPEND ICU_LIBS_FOUND "${component} (required)")
else()
list(APPEND ICU_LIBS_FOUND "${component} (optional)")
endif()
else()
if (ICU_FIND_REQUIRED_${component})
set(ICU_REQUIRED_LIBS_FOUND OFF)
list(APPEND ICU_LIBS_NOTFOUND "${component} (required)")
else()
list(APPEND ICU_LIBS_NOTFOUND "${component} (optional)")
endif()
endif()
endforeach()
set(_ICU_REQUIRED_LIBS_FOUND "${ICU_REQUIRED_LIBS_FOUND}" PARENT_SCOPE)
set(ICU_LIBRARY "${ICU_LIBRARY}" PARENT_SCOPE)
if(NOT ICU_FIND_QUIETLY)
if(ICU_LIBS_FOUND)
message(STATUS "Found the following ICU libraries:")
foreach(found ${ICU_LIBS_FOUND})
message(STATUS " ${found}")
endforeach()
endif()
if(ICU_LIBS_NOTFOUND)
message(STATUS "The following ICU libraries were not found:")
foreach(notfound ${ICU_LIBS_NOTFOUND})
message(STATUS " ${notfound}")
endforeach()
endif()
endif()
if(ICU_DEBUG)
message(STATUS "--------FindICU.cmake search debug--------")
message(STATUS "ICU binary path search order: ${icu_roots}")
message(STATUS "ICU include path search order: ${icu_roots}")
message(STATUS "ICU library path search order: ${icu_roots}")
message(STATUS "----------------")
endif()
endfunction()
_ICU_FIND()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ICU
FOUND_VAR ICU_FOUND
REQUIRED_VARS ICU_INCLUDE_DIR
ICU_LIBRARY
_ICU_REQUIRED_LIBS_FOUND
VERSION_VAR ICU_VERSION
FAIL_MESSAGE "Failed to find all ICU components")
unset(_ICU_REQUIRED_LIBS_FOUND)
if(ICU_FOUND)
set(ICU_INCLUDE_DIRS "${ICU_INCLUDE_DIR}")
set(ICU_LIBRARIES "${ICU_LIBRARY}")
foreach(_ICU_component ${ICU_FIND_COMPONENTS})
string(TOUPPER "${_ICU_component}" _ICU_component_upcase)
set(_ICU_component_cache "ICU_${_ICU_component_upcase}_LIBRARY")
set(_ICU_component_cache_release "ICU_${_ICU_component_upcase}_LIBRARY_RELEASE")
set(_ICU_component_cache_debug "ICU_${_ICU_component_upcase}_LIBRARY_DEBUG")
set(_ICU_component_lib "ICU_${_ICU_component_upcase}_LIBRARIES")
set(_ICU_component_found "${_ICU_component_upcase}_FOUND")
set(_ICU_imported_target "ICU::${_ICU_component}")
if(${_ICU_component_found})
set("${_ICU_component_lib}" "${${_ICU_component_cache}}")
if(NOT TARGET ${_ICU_imported_target})
add_library(${_ICU_imported_target} UNKNOWN IMPORTED)
if(ICU_INCLUDE_DIR)
set_target_properties(${_ICU_imported_target} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}")
endif()
if(EXISTS "${${_ICU_component_cache}}")
set_target_properties(${_ICU_imported_target} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${${_ICU_component_cache}}")
endif()
if(EXISTS "${${_ICU_component_cache_release}}")
set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(${_ICU_imported_target} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${${_ICU_component_cache_release}}")
endif()
if(EXISTS "${${_ICU_component_cache_debug}}")
set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(${_ICU_imported_target} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
IMPORTED_LOCATION_DEBUG "${${_ICU_component_cache_debug}}")
endif()
endif()
endif()
unset(_ICU_component_upcase)
unset(_ICU_component_cache)
unset(_ICU_component_lib)
unset(_ICU_component_found)
unset(_ICU_imported_target)
endforeach()
endif()
if(ICU_DEBUG)
message(STATUS "--------FindICU.cmake results debug--------")
message(STATUS "ICU found: ${ICU_FOUND}")
message(STATUS "ICU_VERSION number: ${ICU_VERSION}")
message(STATUS "ICU_ROOT directory: ${ICU_ROOT}")
message(STATUS "ICU_INCLUDE_DIR directory: ${ICU_INCLUDE_DIR}")
message(STATUS "ICU_LIBRARIES: ${ICU_LIBRARIES}")
foreach(program IN LISTS icu_programs)
string(TOUPPER "${program}" program_upcase)
set(program_lib "ICU_${program_upcase}_EXECUTABLE")
message(STATUS "${program} program: ${${program_lib}}")
unset(program_upcase)
unset(program_lib)
endforeach()
foreach(component IN LISTS ICU_FIND_COMPONENTS)
string(TOUPPER "${component}" component_upcase)
set(component_lib "ICU_${component_upcase}_LIBRARIES")
set(component_found "${component_upcase}_FOUND")
message(STATUS "${component} library found: ${${component_found}}")
message(STATUS "${component} library: ${${component_lib}}")
unset(component_upcase)
unset(component_lib)
unset(component_found)
endforeach()
message(STATUS "----------------")
endif()
unset(icu_programs)

Просмотреть файл

@ -0,0 +1,88 @@
# CMake tests for libtiff (common functionality)
#
# Copyright © 2015 Open Microscopy Environment / University of Dundee
# Written by Roger Leigh <rleigh@codelibre.net>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Run a test command, and print out any observed output discrepancies
macro(test_command command)
file(MAKE_DIRECTORY "${OBSERVED_DIR}")
if(STDIN)
set(input INPUT_FILE "${STDIN}")
endif()
string(REGEX REPLACE ";" " " display_args "${ARGN}")
message(STATUS "Running ${command} ${display_args}")
set(ENV{XERCESC_NLS_HOME} "${NLS_HOME}")
execute_process(
COMMAND "${command}" ${ARGN}
RESULT_VARIABLE TEST_STATUS
${input}
OUTPUT_FILE "${OBSERVED_DIR}/${NAME}.log"
ERROR_FILE "${OBSERVED_DIR}/${NAME}.log"
WORKING_DIRECTORY "${WORKDIR}")
if(TEST_STATUS AND NOT EXPECT_FAIL)
message(FATAL_ERROR "Returned failed status ${TEST_STATUS}")
endif()
if(NOT TEST_STATUS AND EXPECT_FAIL)
message(FATAL_ERROR "Unexpected success")
endif()
# Replace timings in output, and convert newlines for safe comparison
file(READ "${OBSERVED_DIR}/${NAME}.log" output)
string(REGEX REPLACE " *[0-9]+ *ms *" "{timing removed}" output "${output}")
file(WRITE "${OBSERVED_DIR}/${NAME}-mod.log" "${output}")
configure_file("${OBSERVED_DIR}/${NAME}-mod.log" "${OBSERVED_DIR}/${NAME}.log"
@ONLY NEWLINE_STYLE UNIX)
configure_file("${EXPECTED_DIR}/${NAME}.log" "${OBSERVED_DIR}/${NAME}-exp.log"
@ONLY NEWLINE_STYLE UNIX)
file(REMOVE "${OBSERVED_DIR}/${NAME}-mod.log")
file(READ "${OBSERVED_DIR}/${NAME}.log" observed)
file(READ "${OBSERVED_DIR}/${NAME}-exp.log" expected)
# If the observed and expected logs differ, output a diff and fail
if(NOT observed STREQUAL expected)
if(DIFF)
execute_process(COMMAND ${DIFF} -u "${OBSERVED_DIR}/${NAME}-exp.log" "${OBSERVED_DIR}/${NAME}.log")
endif()
file(REMOVE "${OBSERVED_DIR}/${NAME}-exp.log")
message(FATAL_ERROR "Observed output does not match expected output")
endif()
file(REMOVE "${OBSERVED_DIR}/${NAME}-exp.log")
endmacro()
# Add the directory containing libxerces-c to the PATH (Windows only)
if(WIN32)
get_filename_component(LIBXERCES_C_DIR "${LIBXERCES_C}" DIRECTORY)
file(TO_NATIVE_PATH "${LIBXERCES_C_DIR}" LIBXERCES_C_DIR)
set(ENV{PATH} "${LIBXERCES_C_DIR};$ENV{PATH}")
endif()
if(CYGWIN)
get_filename_component(LIBXERCES_C_DIR "${LIBXERCES_C}" DIRECTORY)
file(TO_NATIVE_PATH "${LIBXERCES_C_DIR}" LIBXERCES_C_DIR)
set(ENV{PATH} "${LIBXERCES_C_DIR}:$ENV{PATH}")
endif()
test_command("${PROGRAM}" ${ARGS})

Просмотреть файл

@ -0,0 +1,38 @@
# 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()

Просмотреть файл

@ -0,0 +1,29 @@
# 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)

Просмотреть файл

@ -0,0 +1,63 @@
# 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.
# Option for selection of shared or static libraries, exported as
# cache variable
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
# Add a d postfix to Debug libraries on Windows
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
# DLL export and import macros
set(XERCES_PLATFORM_EXPORT)
set(XERCES_PLATFORM_IMPORT)
set(XERCES_DLL_EXPORT)
set(XERCES_STATIC_LIBRARY)
if(NOT BUILD_SHARED_LIBS)
set(XERCES_STATIC_LIBRARY 1)
else()
if(WIN32)
set(XERCES_PLATFORM_EXPORT "__declspec(dllexport)")
set(XERCES_PLATFORM_IMPORT "__declspec(dllimport)")
set(XERCES_DLL_EXPORT 1)
endif()
endif()
# Versioning information
file(STRINGS "${PROJECT_SOURCE_DIR}/version.incl" icu_verinfo
REGEX "^[^#].*=.*")
foreach(item IN LISTS icu_verinfo)
string(REGEX REPLACE "^([^=]+)=(.*)"
"\\1" lib_key "${item}")
string(REGEX REPLACE "^([^=]+)=(.*)"
"\\2" lib_value "${item}")
set(LIB_${lib_key} "${lib_value}")
endforeach()
string(REGEX REPLACE "^([0-9]+)_.*"
"\\1"
LIB_INTERFACE_VER_U_MAJOR
"${LIB_INTERFACE_VER_U}")

Просмотреть файл

@ -0,0 +1,42 @@
# 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.
# file manager
set(xerces_filemgr_default "POSIX")
if(WIN32)
set(xerces_filemgr_default "windows")
endif()
set(file-manager "${xerces_filemgr_default}" CACHE STRING "File manager")
set(filemgr "${file-manager}")
if(NOT file-manager STREQUAL "POSIX" AND NOT file-manager STREQUAL "windows")
message(FATAL_ERROR "Invalid file manager type \"${file-manager}\"")
endif()
set(XERCES_USE_FILEMGR_POSIX 0)
set(XERCES_USE_FILEMGR_WINDOWS 0)
if(file-manager STREQUAL "POSIX")
set(XERCES_USE_FILEMGR_POSIX 1)
endif()
if(file-manager STREQUAL "windows")
set(XERCES_USE_FILEMGR_WINDOWS 1)
endif()

Просмотреть файл

@ -0,0 +1,59 @@
# 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.
# function checks
include(CheckFunctionExists)
check_function_exists(getcwd HAVE_GETCWD)
check_function_exists(pathconf HAVE_PATHCONF)
check_function_exists(realpath HAVE_REALPATH)
check_function_exists(getaddrinfo HAVE_GETADDRINFO)
check_function_exists(gethostbyaddr HAVE_GETHOSTBYADDR)
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
check_function_exists(socket HAVE_SOCKET)
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
check_function_exists(ftime HAVE_FTIME)
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(gmtime_r HAVE_GMTIME_R)
check_function_exists(timegm HAVE_TIMEGM)
check_function_exists(memmove HAVE_MEMMOVE)
check_function_exists(memset HAVE_MEMSET)
check_function_exists(nl_langinfo HAVE_NL_LANGINFO)
check_function_exists(setlocale HAVE_SETLOCALE)
check_function_exists(localeconv HAVE_LOCALECONV)
check_function_exists(snprintf HAVE_SNPRINTF)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(strncasecmp HAVE_STRNCASECMP)
check_function_exists(stricmp HAVE_STRICMP)
check_function_exists(strnicmp HAVE_STRNICMP)
check_function_exists(strchr HAVE_STRCHR)
check_function_exists(strdup HAVE_STRDUP)
check_function_exists(strrchr HAVE_STRRCHR)
check_function_exists(strstr HAVE_STRSTR)
check_function_exists(strtol HAVE_STRTOL)
check_function_exists(strtoul HAVE_STRTOUL)
check_function_exists(timegm HAVE_TIMEGM)
check_function_exists(towupper HAVE_TOWUPPER)
check_function_exists(towlower HAVE_TOWLOWER)
check_function_exists(mblen HAVE_MBLEN)
check_function_exists(wcsupr HAVE_WCSUPR)
check_function_exists(wcslwr HAVE_WCSLWR)
check_function_exists(wcsnicmp HAVE_WCSNICMP)
check_function_exists(wcsicmp HAVE_WCSICMP)

Просмотреть файл

@ -0,0 +1,22 @@
# 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.
# Determine if ICU is available
find_package(ICU COMPONENTS uc data)

Просмотреть файл

@ -0,0 +1,42 @@
# 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.
# iconv const pointer
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <iconv.h>
int main(void) {
const char *fromPtr=0;
size_t fromLen=0;
char *toPtr=0;
size_t toLen=0;
iconv_t cv=0;
iconv(cv, &fromPtr, &fromLen, &toPtr, &toLen);
return 0;
}"
ICONV_USES_CONST_POINTER)
if(ICONV_USES_CONST_POINTER)
set(ICONV_USES_CONST_POINTER 1)
else()
set(ICONV_USES_CONST_POINTER 0)
endif()

Просмотреть файл

@ -0,0 +1,53 @@
# 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.
# include checks
include(CheckIncludeFileCXX)
check_include_file_cxx(arpa/inet.h HAVE_ARPA_INET_H)
check_include_file_cxx(dlfcn.h HAVE_DLFCN_H)
check_include_file_cxx(fcntl.h HAVE_FCNTL_H)
check_include_file_cxx(float.h HAVE_FLOAT_H)
check_include_file_cxx(langinfo.h HAVE_LANGINFO_H)
check_include_file_cxx(limits.h HAVE_LIMITS_H)
check_include_file_cxx(locale.h HAVE_LOCALE_H)
check_include_file_cxx(memory.h HAVE_MEMORY_H)
check_include_file_cxx(netdb.h HAVE_NETDB_H)
check_include_file_cxx(netinet/in.h HAVE_NETINET_IN_H)
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)
check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H)
check_include_file_cxx(sys/timeb.h HAVE_SYS_TIMEB_H)
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
check_include_file_cxx(unistd.h HAVE_UNISTD_H)
check_include_file_cxx(wchar.h HAVE_WCHAR_H)
check_include_file_cxx(wctype.h HAVE_WCTYPE_H)
check_include_file_cxx(endian.h HAVE_ENDIAN_H)
check_include_file_cxx(machine/endian.h HAVE_MACHINE_ENDIAN_H)
check_include_file_cxx(arpa/nameser_compat.h HAVE_ARPA_NAMESER_COMPAT_H)
set(XERCES_HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H})

Просмотреть файл

@ -0,0 +1,48 @@
# 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()

Просмотреть файл

@ -0,0 +1,162 @@
# 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()

Просмотреть файл

@ -0,0 +1,27 @@
# 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.
# Large file support
if (UNIX)
# This might not catch every possibility catered for by
# AC_SYS_LARGEFILE.
add_definitions(-D_FILE_OFFSET_BITS=64)
set(FILE_OFFSET_BITS 64)
endif()

Просмотреть файл

@ -0,0 +1,31 @@
# 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})

Просмотреть файл

@ -0,0 +1,63 @@
# 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.
# message loader selection
# message loaders in order of preference
list(APPEND msgloaders inmemory)
if(ICU_FOUND)
list(APPEND msgloaders icu)
endif()
include(CheckIncludeFileCXX)
include(CheckFunctionExists)
check_include_file_cxx(nl_types.h HAVE_NLTYPES_H)
check_function_exists(catopen HAVE_CATOPEN)
check_function_exists(catclose HAVE_CATCLOSE)
check_function_exists(catgets HAVE_CATGETS)
if(HAVE_NLTYPES_H AND HAVE_CATOPEN AND HAVE_CATCLOSE AND HAVE_CATGETS)
set(iconv_available 1)
endif()
if(iconv_available)
list(APPEND msgloaders iconv)
endif()
string(REPLACE ";" "|" msgloader_help "${msgloaders}")
list(GET msgloaders 0 xerces_msgloader_default)
set(message-loader "${xerces_msgloader_default}" CACHE STRING "Message loader (${msgloader_help})")
set(msgloader "${message-loader}")
list(FIND msgloaders "${msgloader}" msgloader_found)
if(msgloader_found EQUAL -1)
message(FATAL_ERROR "${msgloader} message loader unavailable")
endif()
set(XERCES_USE_MSGLOADER_ICU 0)
set(XERCES_USE_MSGLOADER_ICONV 0)
set(XERCES_USE_MSGLOADER_INMEMORY 0)
if(msgloader STREQUAL "icu")
set(XERCES_USE_MSGLOADER_ICU 1)
elseif(msgloader STREQUAL "iconv")
set(XERCES_USE_MSGLOADER_ICONV 1)
elseif(msgloader STREQUAL "inmemory")
set(XERCES_USE_MSGLOADER_INMEMORY 1)
else()
message(FATAL_ERROR "Invalid message loader: \"${msgloader}\"")
endif()

Просмотреть файл

@ -0,0 +1,63 @@
# 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.
# mutexmgr selection
option(threads "Threading support" ON)
if(threads)
set(THREADS_PREFER_PTHREAD_FLAG ON)
add_definitions(-D_THREAD_SAFE=1)
find_package(Threads)
if(TARGET Threads::Threads)
if(WIN32)
list(APPEND mutexmgrs windows)
else()
list(APPEND mutexmgrs POSIX)
set(HAVE_PTHREAD 1)
endif()
endif()
else()
set(mutexmgr nothreads)
endif(threads)
list(APPEND mutexmgrs nothreads)
string(REPLACE ";" "|" mutexmgr_help "${mutexmgrs}")
list(GET mutexmgrs 0 xerces_mutexmgr_default)
set(mutex-manager "${xerces_mutexmgr_default}" CACHE STRING "Mutex manager (${mutexmgr_help})")
set(mutexmgr "${mutex-manager}")
list(FIND mutexmgrs "${mutexmgr}" mutexmgr_found)
if(mutexmgr_found EQUAL -1)
message(FATAL_ERROR "${mutexmgr} mutexmgr unavailable")
endif()
set(XERCES_USE_MUTEXMGR_POSIX 0)
set(XERCES_USE_MUTEXMGR_WINDOWS 0)
set(XERCES_USE_MUTEXMGR_NOTHREADS 0)
if(mutexmgr STREQUAL "POSIX")
set(XERCES_USE_MUTEXMGR_POSIX 1)
elseif(mutexmgr STREQUAL "windows")
set(XERCES_USE_MUTEXMGR_WINDOWS 1)
elseif(mutexmgr STREQUAL "nothreads")
set(XERCES_USE_MUTEXMGR_NOTHREADS 1)
else()
message(FATAL_ERROR "Invalid mutex manager: \"${mutexmgr}\"")
endif()

Просмотреть файл

@ -0,0 +1,37 @@
# 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})

Просмотреть файл

@ -0,0 +1,96 @@
# 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.
# netaccessor selection
option(network "Network support" ON)
if(network)
find_library(SOCKET_LIBRARY socket)
find_library(NSL_LIBRARY nsl)
# netaccessors in order of preference
# CURL
# Requires select() which is UNIX only
if(UNIX)
find_package(CURL COMPONENTS uc data)
if(CURL_FOUND)
list(APPEND netaccessors curl)
endif()
endif()
# Windows
if(WIN32)
check_include_file_cxx(winsock2.h HAVE_WINSOCK2_H)
if(HAVE_WINSOCK2_H)
set(winsock_available 1)
list(APPEND netaccessors winsock)
endif()
endif()
# socket
check_include_file_cxx(sys/socket.h HAVE_SYS_SOCKET_H)
if(HAVE_SYS_SOCKET_H)
list(APPEND netaccessors socket)
endif()
# MacOS X CFURL
set(cfurl_available 0)
if(CMAKE_HOST_APPLE)
check_include_file_cxx(CoreServices/CoreServices.h HAVE_CORESERVICES_CORESERVICES_H)
find_library(CORE_SERVICES_LIBRARY CoreServices )
if (HAVE_CORESERVICES_CORESERVICES_H AND CORE_SERVICES_LIBRARY)
list(APPEND netaccessors cfurl)
set(cfurl 1)
endif()
endif()
string(REPLACE ";" "|" netaccessor_help "${netaccessors}")
list(GET netaccessors 0 xerces_netaccessor_default)
set(network-accessor "${xerces_netaccessor_default}" CACHE STRING "Network accessor (${netaccessor_help})")
set(netaccessor "${network-accessor}")
list(FIND netaccessors "${netaccessor}" netaccessor_found)
if(netaccessor_found EQUAL -1)
message(FATAL_ERROR "${netaccessor} netaccessor unavailable")
endif()
set(XERCES_USE_NETACCESSOR_CURL 0)
set(XERCES_USE_NETACCESSOR_SOCKET 0)
set(XERCES_USE_NETACCESSOR_CFURL 0)
set(XERCES_USE_NETACCESSOR_WINSOCK 0)
if(netaccessor STREQUAL "curl")
set(XERCES_USE_NETACCESSOR_CURL 1)
elseif(netaccessor STREQUAL "socket")
set(XERCES_USE_NETACCESSOR_SOCKET 1)
elseif(netaccessor STREQUAL "cfurl")
set(XERCES_USE_NETACCESSOR_CFURL 1)
elseif(netaccessor STREQUAL "winsock")
set(XERCES_USE_NETACCESSOR_WINSOCK 1)
else()
message(FATAL_ERROR "Invalid netaccessor: \"${netaccessor}\"")
endif()
else()
set(netaccessor OFF)
endif(network)

Просмотреть файл

@ -0,0 +1,43 @@
# 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()

Просмотреть файл

@ -0,0 +1,35 @@
# 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.
# path delimiters
set(path_delims /)
set(xerces_path_delimiter_backslash_default OFF)
if(WIN32)
set(xerces_path_delimiter_backslash_default ON)
endif()
option(path-delimiter-backslash "Accept backslash as a path delimiter" ${xerces_path_delimiter_backslash_default})
set(XERCES_PATH_DELIMITER_BACKSLASH 0)
if(path-delimiter-backslash)
set(path_delims "${path_delims}\\")
set(XERCES_PATH_DELIMITER_BACKSLASH 1)
endif()

Просмотреть файл

@ -0,0 +1,30 @@
# 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.
# PATH_MAX
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <limits.h>
int main(void) {
char dummy[PATH_MAX];
return 0;
}"
HAVE_PATH_MAX)

Просмотреть файл

@ -0,0 +1,103 @@
# 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.
# SSE2 support
include(CheckCXXSourceCompiles)
option(sse2 "SSE2 support" ON)
if(sse2)
set(CMAKE_CXX_FLAGS_SAVE "${CMAKE_CXX_FLAGS}")
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS_SAVE "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
check_cxx_source_compiles("
#include <emmintrin.h>
int main() {
__m128i one;
return 0;
}"
CXX_NEEDS_msse2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
if(CXX_NEEDS_msse2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
endif()
endif()
check_cxx_source_compiles("
#include <intrin.h>
int main() {
return 0;
}"
XERCES_HAVE_INTRIN_H)
check_cxx_source_compiles("
#include <emmintrin.h>
int main() {
return 0;
}"
XERCES_HAVE_EMMINTRIN_H)
check_cxx_source_compiles("
#include <cpuid.h>
int main() {
return 0;
}"
HAVE_CPUID_H)
check_cxx_source_compiles("
#include <intrin.h>
int main() {
int CPUInfo[4];
__cpuid(CPUInfo, 1);
return 0;
}"
XERCES_HAVE_CPUID_INTRINSIC)
check_cxx_source_compiles("
#include <cpuid.h>
int main() {
unsigned int eax, ebx, ecx, edx;
__get_cpuid (1, &eax, &ebx, &ecx, &edx);
return 0;
}"
XERCES_HAVE_GETCPUID)
check_cxx_source_compiles("
#include <emmintrin.h>
int main() {
__m128i* one=(__m128i*)_mm_malloc(4, 16);
__m128i* two=(__m128i*)_mm_malloc(4, 16);
__m128i xmm1 = _mm_load_si128(one);
__m128i xmm2 = _mm_load_si128(two);
__m128i xmm3 = _mm_or_si128(xmm1, xmm2);
_mm_store_si128(one, xmm3);
_mm_free(one);
_mm_free(two);
return 0;
}"
XERCES_HAVE_SSE2_INTRINSIC)
# SSE2 not functional; restore flags
if(NOT XERCES_HAVE_SSE2_INTRINSIC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
endif()
endif()

Просмотреть файл

@ -0,0 +1,45 @@
# 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})

Просмотреть файл

@ -0,0 +1,33 @@
# 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})

Просмотреть файл

@ -0,0 +1,80 @@
# 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.
# test macros
find_program(DIFF_EXECUTABLE diff)
set(xerces_test_dir "${CMAKE_CURRENT_LIST_DIR}")
macro(add_generic_xerces_test name)
set(options EXPECT_FAIL)
set(oneValueArgs WORKING_DIRECTORY OBSERVED_DIR EXPECTED_DIR STDIN)
set(multiValueArgs COMMAND)
cmake_parse_arguments(AXT "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
list(GET AXT_COMMAND 0 command)
list(REMOVE_AT AXT_COMMAND 0)
if(NOT AXT_WORKING_DIRECTORY)
set(AXT_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/samples/data")
endif()
unset(xerces_test_extra_args)
if(WIN32)
list(APPEND xerces_test_extra_args "-DWIN32=${WIN32}")
endif()
if(CYGWIN)
list(APPEND xerces_test_extra_args "-DCYGWIN=${CYGWIN}")
endif()
add_test(NAME "${name}"
COMMAND "${CMAKE_COMMAND}"
"-DNAME=${name}"
"-DPROGRAM=$<TARGET_FILE:${command}>"
"-DARGS=${AXT_COMMAND}"
"-DLIBXERCES_C=$<TARGET_FILE:xerces-c>"
"-DWORKDIR=${AXT_WORKING_DIRECTORY}"
"-DSTDIN=${AXT_STDIN}"
"-DEXPECT_FAIL=${AXT_EXPECT_FAIL}"
"-DOBSERVED_DIR=${CMAKE_CURRENT_BINARY_DIR}/observed"
"-DEXPECTED_DIR=${CMAKE_CURRENT_SOURCE_DIR}/expected"
"-DDIFF=${DIFF_EXECUTABLE}"
"-DNLS_HOME=${PROJECT_BINARY_DIR}/src"
${xerces_test_extra_args}
-P "${xerces_test_dir}/RunTest.cmake"
)
endmacro()
macro(add_xerces_test name)
add_generic_xerces_test(
${name}
OBSERVED_DIR "${PROJECT_BINARY_DIR}/tests/observed"
EXPECTED_DIR "${PROJECT_SOURCE_DIR}/tests/expected"
${ARGN})
endmacro()
macro(add_xerces_sample_test name)
add_generic_xerces_test(
${name}
OBSERVED_DIR "${PROJECT_BINARY_DIR}/samples/observed"
EXPECTED_DIR "${PROJECT_SOURCE_DIR}/samples/expected"
${ARGN})
endmacro()

Просмотреть файл

@ -0,0 +1,118 @@
# 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.
# transcoder selection
# transcoders in order of preference
# ICU
if(ICU_FOUND)
list(APPEND transcoders icu)
endif()
# MacOS
set(macosunicodeconverter_available 0)
if(CMAKE_HOST_APPLE)
check_include_file_cxx(CoreServices/CoreServices.h HAVE_CORESERVICES_CORESERVICES_H)
find_library(CORE_SERVICES_LIBRARY CoreServices )
if (HAVE_CORESERVICES_CORESERVICES_H AND CORE_SERVICES_LIBRARY)
list(APPEND transcoders macosunicodeconverter)
set(macosunicodeconverter_available 1)
endif()
endif()
# GNU iconv
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)
check_include_file_cxx(endian.h HAVE_ENDIAN_H)
check_include_file_cxx(machine/endian.h HAVE_MACHINE_ENDIAN_H)
check_include_file_cxx(arpa/nameser_compat.h HAVE_ARPA_NAMESER_COMPAT_H)
check_function_exists(iconv_open HAVE_ICONV_OPEN)
check_function_exists(iconv_close HAVE_ICONV_CLOSE)
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_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)
list(APPEND transcoders gnuiconv)
endif()
endif()
endif()
# Windows
if(WIN32)
set(windows_available 1)
list(APPEND transcoders windows)
endif()
# iconv
check_include_file_cxx(wchar.h HAVE_WCHAR_H)
check_function_exists(mblen HAVE_MBLEN)
check_function_exists(mbrlen HAVE_MBRLEN)
check_function_exists(wcstombs HAVE_WCSTOMBS)
check_function_exists(mbstowcs HAVE_MBSTOWCS)
set(iconv_available 0)
if(HAVE_WCHAR_H AND (HAVE_MBLEN OR HAVE_MBRLEN) AND HAVE_WCSTOMBS AND HAVE_MBSTOWCS)
set(iconv_available 1)
list(APPEND transcoders iconv)
endif()
string(REPLACE ";" "|" transcoder_help "${transcoders}")
list(GET transcoders 0 xerces_transcoder_default)
set(transcoder "${xerces_transcoder_default}" CACHE STRING "Transcoder (${transcoder_help})")
set(transcoder "${transcoder}")
list(FIND transcoders "${transcoder}" transcoder_found)
if(transcoder_found EQUAL -1)
message(FATAL_ERROR "${transcoder} transcoder unavailable")
endif()
set(XERCES_USE_TRANSCODER_ICU 0)
set(XERCES_USE_TRANSCODER_ICONV 0)
set(XERCES_USE_TRANSCODER_GNUICONV 0)
set(XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER 0)
set(XERCES_USE_TRANSCODER_WINDOWS 0)
if(transcoder STREQUAL "icu")
set(XERCES_USE_TRANSCODER_ICU 1)
elseif(transcoder STREQUAL "iconv")
set(XERCES_USE_TRANSCODER_ICONV 1)
elseif(transcoder STREQUAL "gnuiconv")
set(XERCES_USE_TRANSCODER_GNUICONV 1)
elseif(transcoder STREQUAL "macosunicodeconverter")
set(XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER 1)
elseif(transcoder STREQUAL "windows")
set(XERCES_USE_TRANSCODER_WINDOWS 1)
else()
message(FATAL_ERROR "Invalid transcoder: \"${transcoder}\"")
endif()

Просмотреть файл

@ -0,0 +1,29 @@
# 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)

Просмотреть файл

@ -0,0 +1,53 @@
# 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 character functions
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <wchar.h>
int main(void) {
mbstate_t st;
mbrlen( \"t\", 5, &st );
return 0;
}"
HAVE_MBRLEN)
check_cxx_source_compiles("
#include <wchar.h>
int main(void) {
mbstate_t st;
char buffer[2];
const wchar_t* src=0;
wcsrtombs(buffer, &src, 2, &st);
return 0;
}"
HAVE_WCSRTOMBS)
check_cxx_source_compiles("
#include <wchar.h>
int main(void) {
mbstate_t st;
wchar_t buffer[2];
const char* src=0;
mbsrtowcs(buffer, &src, 2, &st);
return 0;
}"
HAVE_MBSRTOWCS)

Просмотреть файл

@ -0,0 +1,89 @@
# 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.
# compiler warnings
# These are annoyingly verbose, produce false positives or don't work
# nicely with all supported compiler versions, so are disabled unless
# explicitly enabled.
option(extra-warnings "Enable extra compiler warnings" OFF)
# This will cause the compiler to fail when an error occurs.
option(fatal-warnings "Compiler warnings are errors" OFF)
# Check if the compiler supports each of the following additional
# flags, and enable them if supported. This greatly improves the
# quality of the build by checking for a number of common problems,
# some of which are quite serious.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(test_flags
-Wall
-Wcast-align
-Wcast-qual
-Wctor-dtor-privacy
-Wextra
-Wformat=2
-Wimplicit-atomic-properties
-Wmissing-declarations
-Wno-long-long
-Woverlength-strings
-Woverloaded-virtual
-Wredundant-decls
-Wreorder
-Wswitch-default
-Wunused-variable
-Wwrite-strings
-Wno-variadic-macros
-fstrict-aliasing)
if(extra-warnings)
list(APPEND test_flags
-Wfloat-equal
-Wmissing-prototypes
-Wunreachable-code)
endif()
if(fatal-warnings)
list(APPEND test_flags
-Werror)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(test_flags)
if(extra-warnings)
list(APPEND test_flags
/W4)
else()
list(APPEND test_flags
/W3)
endif()
if (fatal-warnings)
list(APPEND test_flags
/WX)
endif()
endif()
include(CheckCXXCompilerFlag)
foreach(flag ${test_flags})
string(REGEX REPLACE "[^A-Za-z0-9]" "_" flag_var "${flag}")
set(test_c_flag "CXX_FLAG${flag_var}")
CHECK_CXX_COMPILER_FLAG(${flag} "${test_c_flag}")
if (${test_c_flag})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
endif (${test_c_flag})
endforeach(flag ${test_flags})

Просмотреть файл

@ -0,0 +1,72 @@
# 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 if the Windows API is defined as using wchar_t or unsigned
# short; if it's wchar_t, we need to map XMLCh to be wchar_t (this is
# safe because on Windows wchar_t is used to store UTF-16 codepoints,
# while it is not true on Unix)
include(CheckCXXSourceCompiles)
include(CheckTypeSize)
include(XercesIntTypes)
set(XERCES_XMLCH_T ${XERCES_U16BIT_INT})
set(XERCES_USE_CHAR16_T 0)
set(XERCES_INCLUDE_WCHAR_H 0)
check_cxx_source_compiles("
int main() {
const char16_t *unicode = u\"Test ünícodè ©\";
return 0;
}" HAVE_STD_char16_t)
if(HAVE_STD_char16_t)
check_type_size("char16_t" SIZEOF_CHAR16_T LANGUAGE CXX)
check_type_size("wchar_t" SIZEOF_WCHAR_T LANGUAGE CXX)
if(NOT SIZEOF_CHAR16_T EQUAL 2)
message(FATAL_ERROR "char16_t is not a 16-bit type")
endif()
if(WIN32)
if(NOT SIZEOF_WCHAR_T EQUAL 2)
message(FATAL_ERROR "wchar_t is not a 16-bit type, and size differs from char16_t")
endif()
endif()
set(XERCES_XMLCH_T char16_t)
set(XERCES_USE_CHAR16_T 1)
else()
if(WIN32)
check_cxx_source_compiles("
#include <windows.h>
wchar_t file[] = L\"dummy.file\";
int main() {
DeleteFileW(file);
return 0;
}"
WINDOWS_wchar)
if(WINDOWS_wchar)
set(XERCES_XMLCH_T wchar_t)
set(XERCES_INCLUDE_WCHAR_H 1)
endif()
endif()
endif()

Просмотреть файл

@ -0,0 +1,511 @@
/* 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
/* Define to 1 if you have the <arpa/inet.h> header file. */
#cmakedefine HAVE_ARPA_INET_H 1
/* 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
/* Define to 1 if you have the `catgets' function. */
#cmakedefine HAVE_CATGETS 1
/* Define to 1 if you have the `catopen' function. */
#cmakedefine HAVE_CATOPEN 1
/* Define to 1 if you have the `clock_gettime' function. */
#cmakedefine HAVE_CLOCK_GETTIME 1
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
#cmakedefine HAVE_CORESERVICES_CORESERVICES_H 1
/* Define to 1 if you have cpuid.h */
#cmakedefine HAVE_CPUID_H 1
/* Define to 1 if you have the <ctype.h> header file. */
#cmakedefine HAVE_CTYPE_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H 1
/* Define to 1 if you have the <endian.h> header file. */
#cmakedefine HAVE_ENDIAN_H 1
/* Define to 1 if you have the <errno.h> header file. */
#cmakedefine HAVE_ERRNO_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H 1
/* Define to 1 if you have the <float.h> header file. */
#cmakedefine HAVE_FLOAT_H 1
/* Define to 1 if you have the `ftime' function. */
#cmakedefine HAVE_FTIME 1
/* Define to 1 if you have the `getaddrinfo' function. */
#cmakedefine HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getcwd' function. */
#cmakedefine HAVE_GETCWD 1
/* Define to 1 if you have the `gethostbyaddr' function. */
#cmakedefine HAVE_GETHOSTBYADDR 1
/* Define to 1 if you have the `gethostbyname' function. */
#cmakedefine HAVE_GETHOSTBYNAME 1
/* Define to 1 if you have the `gettimeofday' function. */
#cmakedefine HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `gmtime_r' function. */
#cmakedefine HAVE_GMTIME_R 1
/* Define to 1 if you have the `iconv' function. */
#cmakedefine HAVE_ICONV 1
/* Define to 1 if you have the `iconv_close' function. */
#cmakedefine HAVE_ICONV_CLOSE 1
/* Define to 1 if you have the <iconv.h> header file. */
#cmakedefine HAVE_ICONV_H 1
/* 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
/* Define to 1 if you have the `nsl' library (-lnsl). */
#cmakedefine HAVE_LIBNSL 1
/* Define to 1 if you have the `socket' library (-lsocket). */
#cmakedefine HAVE_LIBSOCKET 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
/* Define to 1 if you have the `localeconv' function. */
#cmakedefine HAVE_LOCALECONV 1
/* 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
/* Define to 1 if you have the `mblen' function. */
#cmakedefine HAVE_MBLEN 1
/* Define to 1 if you have the `mbrlen' function. */
#cmakedefine HAVE_MBRLEN 1
/* Define to 1 if you have the `mbsrtowcs' function. */
#cmakedefine HAVE_MBSRTOWCS 1
/* Define to 1 if you have the `mbstowcs' function. */
#cmakedefine HAVE_MBSTOWCS 1
/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
/* 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
/* Define to 1 if you have the <netinet/in.h> header file. */
#cmakedefine HAVE_NETINET_IN_H 1
/* Define to 1 if you have the `nl_langinfo' function. */
#cmakedefine HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <nl_types.h> header file. */
#cmakedefine HAVE_NL_TYPES_H 1
/* Define to 1 if you have the `pathconf' function. */
#cmakedefine HAVE_PATHCONF 1
/* Define to 1 if you have the PATH_MAX macro. */
#cmakedefine HAVE_PATH_MAX 1
/* Define if you have POSIX threads libraries and header files. */
#cmakedefine HAVE_PTHREAD 1
/* Define to 1 if you have the `realpath' function. */
#cmakedefine HAVE_REALPATH 1
/* Define to 1 if you have the `setlocale' function. */
#cmakedefine HAVE_SETLOCALE 1
/* Define to 1 if you have the `snprintf' function. */
#cmakedefine HAVE_SNPRINTF 1
/* Define to 1 if you have the `socket' function. */
#cmakedefine HAVE_SOCKET 1
/* Define to 1 if stdbool.h conforms to C99. */
#cmakedefine HAVE_STDBOOL_H 1
/* 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
/* Define to 1 if you have the `strchr' function. */
#cmakedefine HAVE_STRCHR 1
/* Define to 1 if you have the `strdup' function. */
#cmakedefine HAVE_STRDUP 1
/* 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
/* Define to 1 if you have the `strnicmp' function. */
#cmakedefine HAVE_STRNICMP 1
/* Define to 1 if you have the `strrchr' function. */
#cmakedefine HAVE_STRRCHR 1
/* Define to 1 if you have the `strstr' function. */
#cmakedefine HAVE_STRSTR 1
/* Define to 1 if you have the `strtol' function. */
#cmakedefine HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#cmakedefine HAVE_STRTOUL 1
/* Define to 1 if you have the <sys/param.h> header file. */
#cmakedefine HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/timeb.h> header file. */
#cmakedefine HAVE_SYS_TIMEB_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `timegm' function. */
#cmakedefine HAVE_TIMEGM 1
/* Define to 1 if you have the `towlower' function. */
#cmakedefine HAVE_TOWLOWER 1
/* Define to 1 if you have the `towupper' function. */
#cmakedefine HAVE_TOWUPPER 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the <wchar.h> header file. */
#cmakedefine HAVE_WCHAR_H 1
/* Define to 1 if you have the `wcsicmp' function. */
#cmakedefine HAVE_WCSICMP 1
/* Define to 1 if you have the `wcslwr' function. */
#cmakedefine HAVE_WCSLWR 1
/* Define to 1 if you have the `wcsnicmp' function. */
#cmakedefine HAVE_WCSNICMP 1
/* Define to 1 if you have the `wcsrtombs' function. */
#cmakedefine HAVE_WCSRTOMBS 1
/* Define to 1 if you have the `wcstombs' function. */
#cmakedefine HAVE_WCSTOMBS 1
/* Define to 1 if you have the `wcsupr' function. */
#cmakedefine HAVE_WCSUPR 1
/* Define to 1 if you have the <wctype.h> header file. */
#cmakedefine HAVE_WCTYPE_H 1
/* Define to 1 if you have the <winsock2.h> header file. */
#cmakedefine HAVE_WINSOCK2_H 1
/* Define to 1 if you have to use const char* with iconv, to 0 if you must use
char*. */
#define ICONV_USES_CONST_POINTER @ICONV_USES_CONST_POINTER@
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#cmakedefine NO_MINUS_C_MINUS_O 1
/* Name of package */
#define PACKAGE "@PACKAGE@"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#define PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL "@PACKAGE_URL@"
/* 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
/* Define to 1 if you have emmintrin.h */
#cmakedefine XERCES_HAVE_EMMINTRIN_H 1
/* Define to have SSE2 instruction support detected at runtime using
__get_cpuid */
#cmakedefine XERCES_HAVE_GETCPUID 1
/* 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
/* Define to 1 if we have sys/types.h */
#cmakedefine XERCES_HAVE_SYS_TYPES_H 1
/* Define to have Xerces_autoconf_config.hpp include wchar.h */
#cmakedefine XERCES_INCLUDE_WCHAR_H 1
/* 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
/* Define as the platform's export attribute */
#define XERCES_PLATFORM_EXPORT @XERCES_PLATFORM_EXPORT@
/* 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
/* Define to use the Windows file mgr */
#cmakedefine XERCES_USE_FILEMGR_WINDOWS 1
/* Define to use the iconv-based MsgLoader */
#cmakedefine XERCES_USE_MSGLOADER_ICONV 1
/* Define to use the ICU-based MsgLoader */
#cmakedefine XERCES_USE_MSGLOADER_ICU 1
/* Define to use the InMemory MsgLoader */
#cmakedefine XERCES_USE_MSGLOADER_INMEMORY 1
/* Define to use the NoThread mutex mgr */
#cmakedefine XERCES_USE_MUTEXMGR_NOTHREAD 1
/* Define to use the POSIX mutex mgr */
#cmakedefine XERCES_USE_MUTEXMGR_POSIX 1
/* Define to use the Windows mutex mgr */
#cmakedefine XERCES_USE_MUTEXMGR_WINDOWS 1
/* Define to use the Mac OS X CFURL NetAccessor */
#cmakedefine XERCES_USE_NETACCESSOR_CFURL 1
/* Define to use the CURL NetAccessor */
#cmakedefine XERCES_USE_NETACCESSOR_CURL 1
/* Define to use the Sockets-based NetAccessor */
#cmakedefine XERCES_USE_NETACCESSOR_SOCKET 1
/* Define to use the WinSock NetAccessor */
#cmakedefine XERCES_USE_NETACCESSOR_WINSOCK 1
/* Define to use the GNU iconv transcoder */
#cmakedefine XERCES_USE_TRANSCODER_GNUICONV 1
/* Define to use the iconv transcoder */
#cmakedefine XERCES_USE_TRANSCODER_ICONV 1
/* Define to use the ICU-based transcoder */
#cmakedefine XERCES_USE_TRANSCODER_ICU 1
/* Define to use the Mac OS UnicodeConverter-based transcoder */
#cmakedefine XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER 1
/* Define to use the Windows transcoder */
#cmakedefine XERCES_USE_TRANSCODER_WINDOWS 1
/* Define to use the Windows transcode */
#cmakedefine XERCES_USE_CHAR16_T 1
/* 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

60
lib/xerces/config/pretty-make Executable file
Просмотреть файл

@ -0,0 +1,60 @@
#!/bin/sh
#
# 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.
#
#
# pretty-make
#
# This script helps in pretty-printing of build commands.
# We invoke it via overridden rules in Makefile.am
#
# $Id$
#
# Grab the action (what we're doing)
action=$1
shift
# Grab the original command
cmd=$@
# Try to find the name of the file we're building. This is fraught with
# problems, and may not be reliable across all compilers. Given the
# dependencies, this is usually the last argument, but sometimes libtool
# adds additional flags, which throws this off. So we look
# for the last arg that doesn't start with - or + (HP aCC style).
while [ $# -gt 0 ]; do
case ${1} in
-*)
;;
+*)
;;
*)
target=$1
;;
esac
shift
done
# Notify user of the action, and what it's operating on
echo $action $target
# Be verbose if requested
[ ${VERBOSE} ] && echo $cmd
# Execute the original command
$cmd

546
lib/xerces/configure.ac Normal file
Просмотреть файл

@ -0,0 +1,546 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
#
# 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.
#
#
# $Id$
#
AC_PREREQ(2.60)
AC_INIT([xerces-c],[3.2.0])
AC_CONFIG_SRCDIR([src/Makefile.am])
AC_CONFIG_LIBOBJ_DIR([src])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h src/xercesc/util/Xerces_autoconf_config.hpp])
AC_CONFIG_FILES([Makefile \
src/Makefile \
tests/Makefile \
samples/Makefile \
xerces-c.pc
scripts/run-test])
# Check the target system
AC_CANONICAL_HOST
# Initialize automake
AM_SILENT_RULES([yes])
AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 tar-ustar])
AM_MAINTAINER_MODE
# Check if rpath is disabled
AC_MSG_CHECKING(whether to use rpath)
AC_ARG_ENABLE(rpath,
[AC_HELP_STRING([--disable-rpath],
[Patches libtool to not use rpath in the libraries produced.])],
[xerces_cv_rpath="$enable_rpath"], [xerces_cv_rpath="yes"])
AC_MSG_RESULT($xerces_cv_rpath)
# Checks for programs.
AC_PROG_CXX
# Use the C++ compiler for the compile tests
AC_LANG(C++)
# used by "make check"
AC_PROG_SED
#it would be nice to also check for PERL...
#AC_PROG_PERL
#skip detection of Fortran
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
AC_PROG_LN_S
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
AS_IF([test x$AR = xfalse],
AC_MSG_ERROR([Cannot find a valid 'ar' tool]))
# Patch libtool to not use rpath if requested.
#
AC_CONFIG_COMMANDS([libtool-rpath-patch],
[if test "$libtool_patch_use_rpath" = "no"; then
echo config.status: patching libtool to not use rpath
sed < libtool > libtool-2 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_NO_RPATH__ "/'
mv libtool-2 libtool
chmod 755 libtool
fi],
[libtool_patch_use_rpath=$xerces_cv_rpath])
# Export information on whether we are building static/shared libraries.
# enable_shared and enable_static are defined by AC_PROG_LIBTOOL.
#
AC_SUBST([BUILD_SHARED], [$enable_shared])
AC_SUBST([BUILD_STATIC], [$enable_static])
# 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 \
sys/param.h sys/socket.h sys/time.h sys/timeb.h \
unistd.h wchar.h wctype.h \
CoreServices/CoreServices.h \
endian.h machine/endian.h arpa/nameser_compat.h \
])
# 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
# Checks for library functions.
#AC_FUNC_ERROR_AT_LINE
#AC_FUNC_MALLOC
#AC_FUNC_MEMCMP
#AC_FUNC_STRCOLL
#AC_FUNC_STRTOD
AC_CHECK_FUNCS([getcwd pathconf realpath \
getaddrinfo gethostbyaddr gethostbyname socket \
clock_gettime ftime gettimeofday timegm gmtime_r \
memmove memset nl_langinfo setlocale localeconv \
strcasecmp strncasecmp stricmp strnicmp strchr strdup \
strrchr strstr strtol strtoul snprintf \
towupper towlower mblen \
wcsupr wcslwr wcsnicmp wcsicmp \
])
# Some Unix systems, like Gnu Hurd, don't define PATH_MAX
AC_MSG_CHECKING([for PATH_MAX])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <limits.h>]],
[[char dummy[PATH_MAX];]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([HAVE_PATH_MAX], 1, [Define to 1 if you have the PATH_MAX macro.])
],
[
AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_PATH_MAX], 0, [Define to 1 if you have the PATH_MAX macro.])
]
)
# 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
# Furthermore, OpenBSD 5.1 doesn't follow the standard that states
# that the "src" pointer must be set to NULL when a \0 has been
# converted in the source data, a behaviour that we rely on
# So we also check for this scenario before using these functions
AC_MSG_CHECKING([for mbrlen])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>]],
[[mbstate_t st; mbrlen( "t", 5, &st );]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([HAVE_MBRLEN], 1, [Define to 1 if you have the `mbrlen' function.])
],
[
AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_MBRLEN], 0, [Define to 1 if you have the `mbrlen' function.])
]
)
AC_MSG_CHECKING([for wcsrtombs])
AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
#include <string.h>]],
[[
mbstate_t st;
memset(&st, 0, sizeof(st));
char buffer[32];
const wchar_t* src=L"help";
wcsrtombs(buffer, &src, 32, &st);
if(src==0)
return 0;
else
return 1;]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 1, [Define to 1 if you have the `wcsrtombs' function.])
],
[
AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 0, [Define to 1 if you have the `wcsrtombs' function.])
]
)
AC_MSG_CHECKING([for mbsrtowcs])
AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
#include <string.h>]],
[[
mbstate_t st;
memset(&st, 0, sizeof(st));
wchar_t buffer[32];
const char* src="help";
mbsrtowcs(buffer, &src, 32, &st);
if(src==0)
return 0;
else
return 1;]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 1, [Define to 1 if you have the `mbsrtowcs' function.])
],
[
AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 0, [Define to 1 if you have the `mbsrtowcs' function.])
]
)
AC_MSG_CHECKING([if iconv uses const pointers])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <iconv.h>]],
[[
const char *fromPtr=0;
size_t fromLen=0;
char *toPtr=0;
size_t toLen=0;
iconv_t cv=0;
iconv(cv, &fromPtr, &fromLen, &toPtr, &toLen);
]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([ICONV_USES_CONST_POINTER], 1, [Define to 1 if you have to use const char* with iconv, to 0 if you must use char*.])
],
[
AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([ICONV_USES_CONST_POINTER], 0, [Define to 1 if you have to use const char* with iconv, to 0 if you must use char*.])
]
)
AC_SUBST([SHREXT], [$shrext_cmds])
#
# Orchestrate the replacement of missing functions
#
AC_REPLACE_FUNCS([stricmp strnicmp towlower towupper])
abs_top_srcdir=`cd $srcdir; pwd`
AC_SUBST(abs_top_srcdir)
abs_top_builddir=`pwd`
AC_SUBST(abs_top_builddir)
######################################################
# Look for availability of available packages
######################################################
XERCES_PATH_DELIMITERS
XERCES_MUTEXMGR_SELECTION
XERCES_NETACCESSOR_SELECTION
XERCES_TRANSCODER_SELECTION
XERCES_MSGLOADER_SELECTION
XERCES_FILEMGR_SELECTION
# Allow the user to specify the pkgconfig directory.
#
AC_ARG_WITH(pkgconfigdir,
AC_HELP_STRING([--with-pkgconfigdir=DIR],[Specify location of pkgconfig dir (default is libdir/pkgconfig)]),
[pkgconfigdir=${withval}],
[pkgconfigdir='${libdir}/pkgconfig'])
AC_SUBST([pkgconfigdir])
# Allow the user to disable the SSE2 support
#
AC_ARG_ENABLE(sse2,
AC_HELP_STRING([--disable-sse2],[disable SSE2 optimizations]),
[have_sse2=${enableval}],
[have_sse2=yes])
######################################################
# Define some namespace-protected macros for use in the
# 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* )
platform_export="__declspec(dllexport)"
platform_import="__declspec(dllimport)"
;;
* )
platform_export=""
platform_import=""
;;
esac
AC_DEFINE_UNQUOTED([XERCES_PLATFORM_EXPORT], [$platform_export], [Define as the platform's export attribute])
AC_DEFINE_UNQUOTED([XERCES_PLATFORM_IMPORT], [$platform_import], [Define as the platform's import 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]))
AS_IF([test $ac_cv_cxx_have_lstring],
AC_DEFINE([XERCES_LSTRSUPPORT], 1, [Define if there is support for L"widestring"]))
AC_MSG_CHECKING([whether C++11 char16_t is available])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]],
[[const char16_t *unicode = u"Test ünícodè → ©";]])],
[
xerces_cv_type_xmlch=char16_t
AC_DEFINE_UNQUOTED([XERCES_USE_CHAR16_T], [1], [Define if the C++11 char16_t type is to be used])
AC_MSG_RESULT([yes])
],
[
xerces_cv_type_xmlch=$xerces_cv_type_u16bit_int
AC_MSG_RESULT([no])
]
)
AM_CONDITIONAL([XERCES_USE_CHAR16], [test "x$xerces_cv_type_xmlch" = "xchar16_t"])
if test "$xerces_cv_type_xmlch" != "char16_t"; then
# fallback to check if the Windows API is defined as using wchar_t or
# unsigned short; if it's wchar_t, we need to map XMLCh to be wchar_t
# (this is safe because on Windows wchar_t is used to store UTF-16
# codepoints, while it is not true on Unix)
AC_MSG_CHECKING([whether the Windows SDK is available and using wchar_t as wide string])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <windows.h>
wchar_t file[] = L"dummy.file";]],
[[DeleteFileW(file);]])],
[
xerces_cv_type_xmlch=wchar_t
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([XERCES_INCLUDE_WCHAR_H], 1, [Define to have Xerces_autoconf_config.hpp include wchar.h])
],
[
xerces_cv_type_xmlch=$xerces_cv_type_u16bit_int
AC_MSG_RESULT([no])
]
)
fi
AC_DEFINE_UNQUOTED([XERCES_XMLCH_T], [$xerces_cv_type_xmlch], [Define to the 16 bit type used to represent Xerces UTF-16 characters])
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"
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -msse2"
AC_MSG_CHECKING([whether we need to add -msse2])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <emmintrin.h>]], [[__m128i one;]])],
[msse2_ok=yes],
[msse2_ok=no]
)
AC_MSG_RESULT($msse2_ok)
if test x"$msse2_ok" = xno; then
CXXFLAGS="$save_CXXFLAGS"
fi
# Sun CC option test. Currently disabled since it doesn't work. Also note
# that Sun CC will accept -msse2 (i.e., it won't fail) but will keep issuing
# warnings. So if enabled this test needs to be moved before -msse2 and if
# it passes, then -msse2 should be skipped.
#
# save_CXXFLAGS="$CXXFLAGS"
# CXXFLAGS="$CXXFLAGS -xarch=sse2"
# AC_MSG_CHECKING([whether we need to add -xarch=sse2])
# AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <emmintrin.h>]], [[__m128i one;]])],
# [xarchsse2_ok=yes],
# [xarchsse2_ok=no]
# )
# AC_MSG_RESULT($xarchsse2_ok)
# if test x"$xarchsse2_ok" = xno; then
# CXXFLAGS="$save_CXXFLAGS"
# fi
AC_MSG_CHECKING([for intrin.h usability])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <intrin.h>]],
[[]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([XERCES_HAVE_INTRIN_H], 1, [Define to 1 if you have intrin.h])
],
[
AC_MSG_RESULT([no])
]
)
AC_MSG_CHECKING([for emmintrin.h usability])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <emmintrin.h>]],
[[]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([XERCES_HAVE_EMMINTRIN_H], 1, [Define to 1 if you have emmintrin.h])
],
[
AC_MSG_RESULT([no])
]
)
AC_MSG_CHECKING([for cpuid.h usability])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <cpuid.h>]],
[[]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([HAVE_CPUID_H], 1, [Define to 1 if you have cpuid.h])
],
[
AC_MSG_RESULT([no])
]
)
AC_MSG_CHECKING([whether the compiler has the CPUID intrinsic])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <intrin.h>]],
[[int CPUInfo[4];
__cpuid(CPUInfo, 1);
]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([XERCES_HAVE_CPUID_INTRINSIC], 1, [Define to have SSE2 instruction support detected at runtime using __cpuid])
],
[
AC_MSG_RESULT([no])
]
)
AC_MSG_CHECKING([whether the compiler has the _get_cpuid intrinsic])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <cpuid.h>]],
[[unsigned int eax, ebx, ecx, edx;
__get_cpuid (1, &eax, &ebx, &ecx, &edx);
]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([XERCES_HAVE_GETCPUID], 1, [Define to have SSE2 instruction support detected at runtime using __get_cpuid])
],
[
AC_MSG_RESULT([no])
]
)
AC_MSG_CHECKING([whether the compiler has the SSE2 intrinsic])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <emmintrin.h>]],
[[__m128i* one=(__m128i*)_mm_malloc(4, 16);
__m128i* two=(__m128i*)_mm_malloc(4, 16);
__m128i xmm1 = _mm_load_si128(one);
__m128i xmm2 = _mm_load_si128(two);
__m128i xmm3 = _mm_or_si128(xmm1, xmm2);
_mm_store_si128(one, xmm3);
_mm_free(one);
_mm_free(two);
]])],
[
AC_MSG_RESULT([yes])
sse2_usable=yes
AC_DEFINE_UNQUOTED([XERCES_HAVE_SSE2_INTRINSIC], 1, [Define to have SSE2 instruction used at runtime])
],
[
AC_MSG_RESULT([no])
sse2_usable=no
]
)
# Restore original CXXFLAGS if SSE2 is not usable.
#
if test "$sse2_usable" = "no"; then
CXXFLAGS="$no_sse2_CXXFLAGS"
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
AC_MSG_NOTICE([Report:])
AC_MSG_NOTICE([ File Manager: $filemgr])
AC_MSG_NOTICE([ Mutex Manager: $mutexmgr])
AC_MSG_NOTICE([ Transcoder: $transcoder])
AC_MSG_NOTICE([ NetAccessor: $netaccessor])
AC_MSG_NOTICE([ Message Loader: $msgloader])

Просмотреть файл

@ -0,0 +1,95 @@
# 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.
# Install docs
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT "development")
# Add createdocs target (if Java is available, plus the needed jars)
find_package(Java COMPONENTS Runtime)
if(Java_FOUND
AND EXISTS "${PROJECT_SOURCE_DIR}/tools/jars/stylebook-1.0-b2.jar"
AND EXISTS "${PROJECT_SOURCE_DIR}/tools/jars/xalan.jar"
AND EXISTS "${PROJECT_SOURCE_DIR}/tools/jars/xerces.jar")
if(UNIX)
set(cpsep ":")
else()
set(cpsep ";")
endif()
set(classpath "${PROJECT_SOURCE_DIR}/tools/jars/stylebook-1.0-b2.jar${cpsep}${PROJECT_SOURCE_DIR}/tools/jars/xalan.jar${cpsep}${PROJECT_SOURCE_DIR}/tools/jars/xerces.jar")
add_custom_target(createdocs
COMMAND "${Java_JAVA_EXECUTABLE}" -Djava.awt.headless=true
-classpath "${classpath}"
org.apache.stylebook.StyleBook
"targetDirectory=${CMAKE_CURRENT_SOURCE_DIR}/html"
${CMAKE_CURRENT_SOURCE_DIR}/xerces-c_book.xml
${CMAKE_CURRENT_SOURCE_DIR}/style
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
set_target_properties(createdocs PROPERTIES FOLDER "Documentation")
endif()
# Add createapidocs target (if doxygen is available)
find_program(DOXYGEN_EXECUTABLE doxygen)
if(DOXYGEN_EXECUTABLE)
add_custom_target(createapidocs
COMMAND "${DOXYGEN_EXECUTABLE}" Doxyfile
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
set_target_properties(createapidocs PROPERTIES FOLDER "Documentation")
endif()
# Add docs to IDE
file(GLOB doc_xml
"${CMAKE_CURRENT_SOURCE_DIR}/*.xml")
file(GLOB doc_style
"${CMAKE_CURRENT_SOURCE_DIR}/style/dtd/*.ent"
"${CMAKE_CURRENT_SOURCE_DIR}/style/graphics/*.gif"
"${CMAKE_CURRENT_SOURCE_DIR}/style/*.xml"
"${CMAKE_CURRENT_SOURCE_DIR}/style/resources/*.gif"
"${CMAKE_CURRENT_SOURCE_DIR}/style/stylesheets/*.xsl")
add_custom_target(doc-xml SOURCES ${doc_xml})
set_target_properties(doc-xml PROPERTIES FOLDER "Documentation")
add_custom_target(doc-style SOURCES ${doc_style})
set_target_properties(doc-style PROPERTIES FOLDER "Documentation")
# Source file grouping (for IDE project layout)
set(source_files ${doc_style})
list(SORT source_files)
unset(group_dir)
unset(group_files)
foreach(file IN LISTS source_files)
get_filename_component(dir "${file}" PATH)
file(RELATIVE_PATH dir "${CMAKE_CURRENT_SOURCE_DIR}" "${dir}")
if(group_dir AND NOT dir STREQUAL group_dir)
if(group_files)
source_group("${group_dir}" FILES ${group_files})
endif()
unset(group_files)
endif()
list(APPEND group_files "${file}")
set(group_dir "${dir}")
endforeach()
if(group_files)
source_group("${group_dir}" FILES ${group_files})
endif()
unset(group_dir)
unset(group_files)

1150
lib/xerces/doc/Doxyfile Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,56 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="API Documentation">
<s2 title="API Docs for &XercesCName;">
<p>&XercesCName; is packaged with the API documentation for SAX and DOM, the two
most common programming interfaces for XML. The most common
framework classes have also been documented.</p>
<p>&XercesCName; SAX is an implementation of the
<jump href="http://sax.sourceforge.net/">SAX 1.0/2.0</jump> specification.</p>
<p>&XercesCName; DOM is an implementation of the following specifications:</p>
<ul>
<li><jump href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/">
DOM Level 1 Specification</jump>, a W3C Recommendation of October 1, 1998</li>
<li><jump href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/">
DOM Level 2 Core Specification</jump>, a W3C Recommendation of November 13, 2000</li>
<li><jump href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/">
DOM Level 2 Traversal and Range Specification</jump>, a W3C Recommendation of November 13, 2000</li>
<li><jump href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/">
DOM Level 3.0 Core Specification</jump>, and
<jump href="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/">
DOM Level 3.0 Load and Save Specification</jump>, a W3C Recommendation of April 7, 2004
See <jump href="program-dom-&XercesC3Series;.html#DOM3">DOM Level 3 Support</jump> for details.</li>
</ul>
<p>For a complete understanding of how the &XercesCName; APIs work,
we recommend that you read these specifications.</p>
<p>See the <em><jump href="apiDocs-&XercesC3Series;/index.html">&XercesCName; API Reference</jump></em>
for the detailed documentation of &XercesCName; interfaces.</p>
<note>The API Reference is automatically generated using
<jump href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</jump>.</note>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Applications">
<s2 title="Overview">
<p>This page lists popular application and libraries that
are based on or provide an additional functionality on
top of &XercesCName;. If you know of an application that
you feel should be listed here, send an email with all the
relevant information to one of the <jump href="mailing-lists.html">
&XercesCName; mailing lists</jump>.</p>
<s3 title="CodeSynthesis XSD">
<p><jump href="http://www.codesynthesis.com/products/xsd/">CodeSynthesis
XSD</jump> is an open-source XML Schema to C++ data
binding compiler that uses &XercesCName; as the underlying XML
parser. Provided with an XML instance specification (XML Schema), XSD
generates C++ classes that represent the given vocabulary as well
as parsing and serialization code. You can then access the data
stored in XML using types and functions that semantically
correspond to your application domain rather than dealing with
direct representations of XML such as DOM and SAX.</p>
</s3>
<s3 title="Xalan-C++">
<p><jump href="http://xml.apache.org/xalan-c/">Xalan-C++</jump>
is an open-source XSLT processor for transforming XML documents
into HTML, text, or other XML document types. It implementes the W3C
recommendations for XSL Transformations (XSLT) and the XML Path
Language (XPath) and is based on &XercesCName;.</p>
</s3>
<s3 title="XQilla">
<p><jump href="http://xqilla.sourceforge.net">XQilla</jump>
is an open-source XQuery and XPath 2.0 implementation based
on &XercesCName;. It implements the DOM 3 XPath API and conforms
to the W3C proposed recommendation of XQuery and XPath 2.0.</p>
</s3>
<s3 title="XML Security for C++">
<p><jump href="http://santuario.apache.org/">XML Security
for C++</jump> is an open-source implementation of the XML
Digital Signature and Encryption specifications and is based
on &XercesCName;. The library also provides support for
serializing XML in the canonical form.</p>
</s3>
<s3 title="Shibboleth and OpenSAML">
<p><jump href="http://www.shibboleth.net/">Shibboleth</jump> is
an open source Web Single Sign-On and Federation implementation
that supports the SAML 2.0 and SAML 1.1 standards, among other
capabilities. The Service Provider and underlying OpenSAML
library use &XercesCName;.</p>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,82 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Bug Reporting">
<s2 title="How to report bugs">
<p> Please report bugs to <jump href="&JiraURL;">Jira</jump>,
the Apache bug database. Pick the product "Xerces-C++"
using the following components&colon;
</p>
<table>
<tr><th><em>Component</em></th><th><em>Description</em></th></tr>
<tr><td>DOM</td><td>Items specific to DOM</td></tr>
<tr><td>SAX/SAX2</td><td>Items specific to SAX or SAX2</td></tr>
<tr><td>Non-Validating Parser</td><td>General Parsing Problem</td></tr>
<tr><td>Validating Parser (DTD)</td><td>DTD related parser issue</td></tr>
<tr><td>Validating Parser (Schema)</td><td>Schema related parser issue</td></tr>
<tr><td>Utilities</td><td>Items related to utilities like MessageLoader, Transcoder, NetAccessors, Platform specific utilities</td></tr>
<tr><td>Build</td><td>Problem with build, makefile, project files</td></tr>
<tr><td>Documentation</td><td>Documentation bugs such as FAQ, Programming Guide</td></tr>
<tr><td>Samples/Tests</td><td>Samples or test cases related issues</td></tr>
<tr><td>Miscellaneous</td><td>Items not covered in other categories</td></tr>
</table>
<p>A copy of your bug report is sent automatically to the
<jump href="mailing-lists.html">&XercesCName; development mailing list</jump>.
</p>
</s2>
<s2 title="Search first">
<p> Check the <jump href="&JiraURL;">Jira</jump> database
before submitting your bug report to avoid creating a duplicate report.
Even the bug has been reported already, you may add a comment to the existing report
since your contribution may lead to a quicker identification/resolution to the bug reported.
</p>
<p> Here is the list of
<jump href=
"http&colon;//issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=10510&amp;statusIds=1">
outstanding bugs</jump> that are currently reported in Jira.
</p>
</s2>
<s2 title="Write a good bug report">
<p> Writing a useful bug report, which makes the bug reproducible, is the first step
towards the resolution of the bug. Specifics about the bug, like
</p>
<ul>
<li>&XercesCName; version number</li>
<li>Platform</li>
<li>Operating system and version number</li>
<li>Compiler and version number</li>
<li>The XML document (or excerpt) that failed</li>
<li>The C++ application code that failed</li>
<li>Whether you built the &XercesCName; library yourself or used the
binary distribution</li>
<li>What happened</li>
</ul>
<p>
are all necessary information to allow developer to reproduce,
identify, evaluate and eventually, fix the bug, which is the very
purpose of your reporting of the bug.
</p>
<p>If you are providing a patch please review the information in
<jump href="faq-contributing-&XercesC3Series;.html#Submitting Patches">Submitting Patches</jump>.
</p>
</s2>
</s1>

526
lib/xerces/doc/build.xml Normal file
Просмотреть файл

@ -0,0 +1,526 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Build Instructions">
<s2 title="Build Instructions">
<p>Build instructions are provided for the following platforms and
compilers:</p>
<ul>
<li><link anchor="CMake">All platforms</link></li>
<li><link anchor="UNIX">UNIX/Linux/Mac OS X/Cygwin/MinGW</link></li>
</ul>
<anchor name="CMake"/>
<s3 title="Building on all platforms with CMake">
<p>For building on any platform with any supported build
system &XercesCName; uses the CMake build generator and
requires that you have <jump
href="https://cmake.org/">CMake</jump> installed.
Additionally, a build tool such as <jump
href="http://www.gnu.org/software/make/make.html">GNU
make</jump> or <jump
href="https://ninja-build.org/">Ninja</jump> is required for
building. CMake supports a wide range of generators for
several different compilers, build tools and popular IDEs,
including Eclipse, Kate, Visual Studio, Sublime Text and more.
Any of these may be used to build &XercesCName;. Run
<code>cmake --help</code> to display the full list of
supported generators for your platform.</p>
<p>As with all CMake projects, the build process is divided
into several parts: configuration and building, followed by
(optional) testing and installation. The configuration part is
performed by running the <code>cmake</code> command. The
build part is performed by invoking the chosen build tool
such as <code>make</code> or <code>ninja</code>, or by opening
the generated project files in your IDE, and building from
within the IDE.</p>
<p>Besides the standard <code>cmake</code> <jump
href="https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html">variables</jump>,
&XercesCName; provides a number of project-specific options
that are worth mentioning. You can specify one option for each
category outlined below. If you do not specify anything for a
particular category then <code>cmake</code> will select the
most appropriate default, based upon the available options for
your system. At the end of its execution <code>cmake</code>
prints the selected values for each category.</p>
<p>Net Accessor (used to access network resources):</p>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td><code>-Dnetwork-accessor=curl</code></td>
<td>use the libcurl library (only on UNIX)</td>
</tr>
<tr>
<td><code>-Dnetwork-accessor=socket</code></td>
<td>use plain sockets (only on UNIX)</td>
</tr>
<tr>
<td><code>-Dnetwork-accessor=cfurl</code></td>
<td>use the CFURL API (only on Mac OS X)</td>
</tr>
<tr>
<td><code>-Dnetwork-accessor=winsock</code></td>
<td>use WinSock (only on Windows, Cygwin, MinGW)</td>
</tr>
<tr>
<td><code>-Dnetwork:BOOL=OFF</code></td>
<td>disable network support</td>
</tr>
</table>
<p>Transcoder (used to convert between internal UTF-16 and other encodings):</p>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td><code>-Dtranscoder=gnuiconv</code></td>
<td>use the GNU iconv library</td>
</tr>
<tr>
<td><code>-Dtranscoder=iconv</code></td>
<td>use the iconv library</td>
</tr>
<tr>
<td><code>-Dtranscoder=icu</code></td>
<td>use the ICU library</td>
</tr>
<tr>
<td><code>-Dtranscoder=macosunicodeconverter</code></td>
<td>use Mac OS X APIs (only on Mac OS X)</td>
</tr>
<tr>
<td><code>-Dtranscoder=windows</code></td>
<td>use Windows APIs (only on Windows and MinGW)</td>
</tr>
</table>
<p>Message Loader (used to access diagnostics messages):</p>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td><code>-Dmessage-loader=inmemory</code></td>
<td>store the messages in memory</td>
</tr>
<tr>
<td><code>-Dmessage-loader=icu</code></td>
<td>store the messages using the ICU resource bundles</td>
</tr>
<tr>
<td><code>-Dmessage-loader=iconv</code></td>
<td>store the messages in the iconv message catalog</td>
</tr>
</table>
<p>Thread support is enabled by default and can be disabled
with the <code>-Dthreads:BOOL=OFF</code> option. If disabled,
it will not be possible to select a mutex manager other than
<code>nothreads</code>.</p>
<p>Shared libraries are built by default. You can use the
<code>-DBUILD_SHARED_LIBS:BOOL=OFF</code> option to build
static libraries.</p>
<p>If you need to specify compiler executables that should be
used to build &XercesCName;, you can set the CC and CXX
environment variables when invoking
<code>cmake</code>. Similarly, if you need to specify
additional compiler or linker options, you can set the
CFLAGS, CXXFLAGS, and LDFLAGS environment variables. For
example:</p>
<source>CC=gcc-5.3 CXX=g++-5.3 CFLAGS=-O3 CXXFLAGS=-O3 cmake ...</source>
<note>
If building on Windows, the specific Visual Studio version
may be selected with some generators, and this may be run
from a normal command prompt. If using a generic generator
such as <code>Ninja</code>, then <code>cmake</code> should
be run from a Visual Studio command prompt, or in a
suitably configured environment, so that the correct
compiler will be detected.
</note>
<p>Once the configuration part is complete you can run the
build tool of choice. This may be done generically using
<code>cmake --build . [--config=Debug|Release]</code>.
Alternatively, a specific build tool, e.g. <code>make</code>,
<code>gmake</code>, <code>ninja</code> or
<code>msbuild</code> corresponding to the chosen generator
may be used directly. When invoked without a specific
target, it will build the &XercesCName; library, all examples
and all unit tests.</p>
<p>If you would like to run the automated test suite, run
<code>ctest [-V] [-C Debug|Release]</code>. This will run
all tests. Additional <jump
href="https://cmake.org/cmake/help/latest/manual/ctest.1.html">options</jump>
are available, such as running a subset of the tests and
running the tests in parallel. If any discrepancies in the
output are detected, the differences will be displayed if a
<code>diff</code> program is available.</p>
<p>Finally, install the library and examples. This may be
done generically using <code>cmake --build . --target
install</code>. Alternatively, a specific build tool may be
used, e.g. <code>make install</code>. To change the
installation directory, use the
<code>-DCMAKE_INSTALL_PREFIX=prefix</code> <code>cmake</code>
option.</p>
<p>Some platforms and configurations may require extra
<code>cmake</code> options. Run <code>cmake -LH</code> to
list the additional options, along with a short description
for each. For each of the selection categories mentioned
above, the help text will list the valid choices detected for
your platform. Run <code>cmake -LAH</code> for all the
additional advanced settings.</p>
<p>Several examples of configuring, building, testing and
installing with CMake using different platforms, generators,
and installation options are shown below:</p>
<table>
<tr>
<th>Platform</th>
<th>Generator</th>
<th>Example</th>
</tr>
<tr>
<td>Any</td>
<td>Ninja</td>
<td><code>mkdir build</code><br/>
<code>cd build</code><br/>
<code>cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/xerces-c -DCMAKE_BUILD_TYPE=Release -Dnetwork-accessor=curl /path/to/xerces-c/source</code><br/>
<code>ninja</code><br/>
<code>ctest -V -j 8</code><br/>
<code>ninja install</code></td>
</tr>
<tr>
<td>Unix</td>
<td>Unix Makefiles</td>
<td><code>mkdir build</code><br/>
<code>cd build</code><br/>
<code>cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/xerces-c -DCMAKE_BUILD_TYPE=Debug -Dmessage-loader=icu /path/to/xerces-c/source</code><br/>
<code>make -j8</code><br/>
<code>make test</code><br/>
<code>make install</code></td>
</tr>
<tr>
<td>Windows</td>
<td>msbuild with VS2015 x64</td>
<td><code>mkdir build</code><br/>
<code>cd build</code><br/>
<code>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=D:\libs &nbsp;&nbsp; \path\to\xerces-c\source</code><br/>
<code>cmake --build . --config Debug</code><br/>
<code>ctest -V -C Debug -j 4</code><br/>
<code>cmake --build . --config Debug --target install</code></td>
</tr>
</table>
<p/>
<note>
Note that different UNIX platforms use different system
environment variables for finding shared libraries. On Linux
and Solaris, the environment variable name is
<code>LD_LIBRARY_PATH</code>, on AIX it is
<code>LIBPATH</code>, on Mac OS X it is
<code>DYLD_FALLBACK_LIBRARY_PATH</code>, and on HP-UX it is
<code>SHLIB_PATH</code>.
</note>
<note>
Note that Windows is different from the UNIX platforms in
the way it finds shared libraries at run time. While UNIX
platforms may use the <code>LD_LIBRARY_PATH</code>
environment variable, Windows uses the <code>PATH</code>
environment variable if the library is not in the same
directory as the executable.
</note>
</s3>
<anchor name="UNIX"/>
<s3 title="Building on UNIX/Linux/Mac OS X/Cygwin/MinGW platforms">
<p>For building on UNIX and UNIX-like (GNU/Linux, Max OS X,
Cygwin, MinGW-MSYS) platforms &XercesCName; uses the
GNU automake-based build systems and requires that you
have <jump href="http://www.gnu.org/software/make/make.html">GNU
make</jump> installed. On some platforms GNU make is called gmake
instead of make.</p>
<p>As with all automake-based projects the build process is divided
into two parts: configuration and building. The configuration
part is performed using the <code>configure</code> script that
can be found in the <code>&XercesC3SrcInstallDir;</code> directory.
The build part is performed by invoking <code>make</code>.</p>
<p>Besides the standard <code>configure</code> options which
you can view by running <code>configure --help</code>,
&XercesCName; provides a number of project-specific options
that are worth mentioning. You can specify one option for
each category outlined below. If you do not specify anything
for a particular category then <code>configure</code> will
select the most appropriate default. At the end of its
execution <code>configure</code> prints the selected
values for each category.</p>
<p>Net Accessor (used to access network resources):</p>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td><code>--enable-netaccessor-curl</code></td>
<td>use the libcurl library</td>
</tr>
<tr>
<td><code>--enable-netaccessor-socket</code></td>
<td>use plain sockets</td>
</tr>
<tr>
<td><code>--enable-netaccessor-cfurl</code></td>
<td>use the CFURL API (only on Mac OS X)</td>
</tr>
<tr>
<td><code>--enable-netaccessor-winsock</code></td>
<td>use WinSock (only on Windows, Cygwin, MinGW)</td>
</tr>
<tr>
<td><code>--disable-network</code></td>
<td>disable network support</td>
</tr>
</table>
<p>Transcoder (used to convert between internal UTF-16 and other encodings):</p>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td><code>--enable-transcoder-gnuiconv</code></td>
<td>use the GNU iconv library</td>
</tr>
<tr>
<td><code>--enable-transcoder-iconv</code></td>
<td>use the iconv library</td>
</tr>
<tr>
<td><code>--enable-transcoder-icu</code></td>
<td>use the ICU library</td>
</tr>
<tr>
<td><code>--enable-transcoder-macosunicodeconverter</code></td>
<td>use Mac OS X APIs (only on Mac OS X)</td>
</tr>
<tr>
<td><code>--enable-transcoder-windows</code></td>
<td>use Windows APIs (only on Windows, Cygwin, MinGW)</td>
</tr>
</table>
<p>Message Loader (used to access diagnostics messages):</p>
<table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td><code>--enable-msgloader-inmemory</code></td>
<td>store the messages in memory</td>
</tr>
<tr>
<td><code>--enable-msgloader-icu</code></td>
<td>store the messages using the ICU resource bundles</td>
</tr>
<tr>
<td><code>--enable-msgloader-iconv</code></td>
<td>store the messages in the iconv message catalog</td>
</tr>
</table>
<p>Thread support is enabled by default and can be disabled with the
<code>--disable-threads</code> option.</p>
<p>By default <code>configure</code> selects both shared and static
libraries. You can use the <code>--disable-shared</code> and
<code>--disable-static</code> options to avoid building the
version you don't need.</p>
<p>Finally, to make the build process cleaner the &XercesCName;
build system hides actual compiler commands being executed
by <code>make</code>. If you would like to see those then you
can specify the <code>--disable-pretty-make</code> option.</p>
<p>If you need to specify compiler executables that should be
used to build &XercesCName;, you can set the CC and CXX
variables when invoking <code>configure</code>. Similarly,
if you need to specify additional compiler or linker options,
you can set the CFLAGS, CXXFLAGS, and LDFLAGS variables.
For example:</p>
<source>./configure --disable-static CC=gcc-4.3 CXX=g++-4.3 CFLAGS=-O3 CXXFLAGS=-O3</source>
<p>Once the configuration part is complete you can run
<code>make</code> (or <code>gmake</code>). Running
<code>make</code> from the <code>&XercesC3SrcInstallDir;</code>
directory builds &XercesCName; library and examples. The
library is placed into the <code>src/.libs</code> directory. If
you like to build only the library, you can run make from
<code>&XercesC3SrcInstallDir;/src</code>.</p>
<p>If you would like to build the tests and run the
automated test suite, run <code>make check</code>
from the <code>&XercesC3SrcInstallDir;</code>
directory. The automated test suite required
Perl and the <code>diff</code> command.</p>
<p>Finally, to install the library and examples you can run
<code>make install</code> (or <code>gmake install</code>).
To change the installation directory, use the <code>--prefix</code>
<code>configure</code> option.</p>
<p>Some platforms and configurations require extra
<code>configure</code> and <code>make</code> options
which are shown in the following table.</p>
<table>
<tr>
<th>Platform</th>
<th>Compiler</th>
<th>Options</th>
</tr>
<tr>
<td>Solaris x86</td>
<td>Sun CC</td>
<td><code>./configure CXX=CC CC=cc</code></td>
</tr>
<tr>
<td>Solaris x86-64</td>
<td>Sun CC</td>
<td><code>./configure CXX=CC CC=cc CFLAGS=-xarch=amd64 CXXFLAGS=-xarch=amd64</code><br/>
(for newer Sun CC versions use -m64 instead of -xarch=amd64)</td>
</tr>
<tr>
<td>Solaris SPARC</td>
<td>Sun CC</td>
<td><code>./configure CXX=CC CC=cc</code></td>
</tr>
<tr>
<td>Solaris SPARCv9</td>
<td>Sun CC</td>
<td><code>./configure CXX=CC CC=cc CFLAGS=-xarch=v9 CXXFLAGS=-xarch=v9</code><br/>
(for newer Sun CC versions use -m64 instead of -xarch=v9)</td>
</tr>
<tr>
<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>
</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>
</tr>
<tr>
<td>HP-UX IA-64-32</td>
<td>HP aCC</td>
<td><code>./configure CXX=aCC CC=aCC CFLAGS=-mt CXXFLAGS=-mt LDFLAGS=-mt</code></td>
</tr>
<tr>
<td>HP-UX IA-64</td>
<td>HP aCC</td>
<td><code>./configure CXX=aCC CC=aCC CFLAGS="-mt +DD64" CXXFLAGS="-mt +DD64" LDFLAGS="-mt +DD64"</code></td>
</tr>
<tr>
<td>Mac OS X x86-64</td>
<td>GCC</td>
<td><code>./configure CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" </code></td>
</tr>
<tr>
<td>Mac OS X PowerPC-64</td>
<td>GCC</td>
<td><code>./configure CFLAGS="-arch ppc64" CXXFLAGS="-arch ppc64"</code></td>
</tr>
<tr>
<td>Mac OS X x86/PowerPC</td>
<td>GCC</td>
<td><code>./configure --disable-dependency-tracking CFLAGS="-arch i386 -arch ppc" CXXFLAGS="-arch i386 -arch ppc"</code></td>
</tr>
<tr>
<td>Mingw x86</td>
<td>GCC</td>
<td><code>./configure LDFLAGS=-no-undefined</code></td>
</tr>
<tr>
<td>Cygwin x86</td>
<td>GCC</td>
<td><code>./configure LDFLAGS=-no-undefined</code></td>
</tr>
</table>
<p/>
<note>
Note that different UNIX platforms use different system
environment variable for finding shared libraries. On Linux
and Solaris, the environment variable name is
<code>LD_LIBRARY_PATH</code>, on AIX it is
<code>LIBPATH</code>, on Mac OS X it is
<code>DYLD_LIBRARY_PATH</code>, and on HP-UX
it is <code>SHLIB_PATH</code>.
</note>
<note>
Note that Cygwin and MinGW are different from the UNIX platforms
in the way they find shared libraries at run time. While UNIX
platforms may use the <code>LD_LIBRARY_PATH</code> environment
variable, Cygwin and MinGW use the <code>PATH</code> environment
variable.
</note>
</s3>
</s2>
</s1>

457
lib/xerces/doc/charter.xml Normal file
Просмотреть файл

@ -0,0 +1,457 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="&XercesCFullName;">
<s2 title="Xerces Project Charter">
<p>
The following charter applies to all Xerces projects.
</p>
</s2>
<s2 title="1 INTRODUCTION" >
<p>
1.1 Apache Xerces is a collaborative software development project
dedicated to providing robust, full-featured, commercial-quality, and
freely available XML parsers and closely related technologies
on a wide variety of platforms supporting several languages. This
project is managed in cooperation with various individuals worldwide
(both independent and company-affiliated experts), who use the
Internet to communicate, plan, and develop XML software and related
documentation.
</p>
<p>
1.2 This charter briefly describes the mission, history, organization, and
processes of the project.
</p>
</s2>
<s2 title="2 MISSION" >
<p>
2.1 Apache Xerces exists to promote the use of XML. We view XML as a
compelling paradigm that structures data as information, thereby
facilitating the exchange, transformation, and presentation of
knowledge. The ability to transform raw data into usable information
has great potential to improve the functionality and use of
information systems. We intend to build freely available XML
parsers and closely related technologies in order to engender such
improvements.
</p>
<p>
2.2 The Apache Xerces parsers support standard APIs (formal, de facto,
or proposed).
They are designed to be high performance, reliable, and easy to use.
To facilitate easy porting of ideas between languages, the API's supported
should be as similar as possible, given the constraints of the languages
and existing architectures. Apache Xerces parsers should also be designed
to work efficiently with other Apache projects that deal
with XML whenever possible.
</p>
<p>
2.3 We believe that the best way to further these goals
is by having both individuals and corporations
collaborate on the best possible infrastructure, APIs, code, testing,
and release cycles. Components must be vendor neutral and usable as
core components for all.
</p>
<p>
2.4 In order to achieve a coherent architecture between Apache Xerces
parsers
and other components and applications, standards (formal or
de facto) will be used as much as possible for both protocols and
APIs. Where appropriate, experiences and lessons learned will be fed
back to standards bodies in an effort to assist in the development of
those standards. We will also encourage the innovation of new
protocols, APIs, and components in order to seed new concepts not
yet defined by standards.
</p>
</s2>
<s2 title="3 HISTORY" >
<p>
3.1 The code base which formed the foundations of both the
Xerces-Java and Xerces-C++ subprojects of the Apache XML Project
was originally donated to Apache by IBM in 1999. Xerces-Perl
came into existence as a subproject of the Apache XML project
after the Xerces-C++ community had already matured to a
significant extent. All three were subprojects of the Apache XML
Project until late 2004. At this time, reflecting the growth in
the Apache XML project and these communities themselves, Apache
Xerces became a top-level Project of the Apache Software
Foundation. Apache Xerces still shares much infrastructure with
the Apache XML project and the other former subprojects of Apache
XML that have become projects in their own right.
</p>
</s2>
<s2 title="4 TERMS" >
<p>
4.1 The ASF Board. The management board of the Apache Software
Foundation.
</p>
<p>
4.2 The Project. The Apache Xerces Project; intended
to refer to the source code, website and community that are Apache Xerces.
</p>
<p>
4.3 Subproject. Apache Xerces is composed of a number of subprojects
which fit into one of two categories:
</p>
<p>
a) An XML parser implementation in some particular programming
language. There may be multiple parsers for a given
language, if the API's the parsers support are sufficiently
dissimilar. At the time of writing, there is one parser for
each of Java, C/C++ and Perl.
</p>
<p>
b) A set of components serving some purpose not directly
pertinent to XML parsing, but which are used in related
applications and are tightly bound, usually through internal
API's, to one (or more) of the parser subprojects.
</p>
<p>
4.4 Product. Some deliverable (usually a binary or source
package) that a subproject releases to the public. Subprojects
may have multiple products.
</p>
<p>
4.5 Contributor. Anyone who makes a contribution to the development
of the Apache Xerces project or a subproject.
</p>
<p>
4.6 Committer. Apache Xerces has a set of committers. Committers
are contributors who have read/write access to the source code
repository.
</p>
</s2>
<s2 title="5 THE PROJECT MANAGEMENT COMMITTEE" >
<p>
5.1 The Apache Xerces project is managed by a core group of
committers known as the Project Management Committee [PMC],
which is composed of volunteers from among the active committers
(see 8.3 below) from all subprojects. Each subproject must have
at least one representative on the PMC, to ensure active
supervision of the subproject.
</p>
<p>
5.2 The activities of the PMC are coordinated by the Chairperson,
who is an officer of the corporation and reports to the Apache
Board. The Chairperson will, on the request of the Apache Board,
provide reports to the Board on issues related to the running of
the Apache Xerces project.
</p>
<p>
5.3 The PMC has the following responsibilities:
</p>
<p>
a) Accepting new subproject proposals, voting on these
proposals and creating the
subproject (see SUBPROJECTS below). This is done in collaboration
with the Incubator (see http://incubator.apache.org).
</p>
<p>
b) Facilitating code or other donations by individuals or companies,
in collaboration with the Incubator.
</p>
<p>
c) Resolving license issues and other legal issues in conjunction with
the ASF board.
</p><p>
d) Ensuring that administrative and infrastructure work is completed.
</p><p>
e) Facilitating relationships among subprojects and other Apache projects.
</p><p>
f) Facilitating relationships between Apache Xerces and the external
world.
</p><p>
g) Overseeing Apache Xerces to ensure that the mission defined in
this document is being fulfilled.
</p><p>
h) Resolving conflicts within the project.
</p><p>
i) Reporting to the ASF board (through the Chair) on the progress
of the project.
</p><p>
5.4 In cases where the sub-project is unable to directly provide
at least one representative on the PMC--implying that there are no
active committers on that code base--then the subproject should
be considered dormant, and any relevant Apache policies for dormant
projects should be implemented. At the least, the subproject's status
should
be updated on its website.
</p><p>
5.5 Every 12 months, or at the request of the Board, the PMC will provide
a recommendation to the Apache Board for the position of Chairperson
of the PMC.
</p><p>
5.6 This recommendation will be made on the basis of an election held
within the PMC. The election will be performed using a simple
majority vote of PMC members.
</p><p>
5.7 Upon agreement by the Apache Board, the recommended Chairperson will,
if they are not already, be appointed an officer of the corporation.
See http://www.apache.org/foundation/bylaws.html for more information.
</p><p>
5.8 In the unlikely event that a member of the PMC becomes disruptive to
the process, ceases to make codebase contributions for an extended
period, or ceases to take part in PMC votes for an extended period of
time, said member may be removed by unanimous vote of remaining PMC
members.
</p><p>
5.9 The PMC is responsible for maintaining and updating this
charter. Development must follow the process outlined below, so any
change to the development process necessitates a change to the
charter. Changes must be approved by a two-thirds majority of all members
of the PMC.
</p>
</s2>
<s2 title="6 SUBPROJECTS" >
<p>
6.1 When a new subproject proposal is submitted to the PMC, it
may be accepted by a two-thirds vote of the PMC.
</p><p>
6.2 A subproject may be removed by unanimous vote of the PMC, subject to
the
approval of the ASF board.
</p>
</s2>
<s2 title="7 CONTRIBUTORS" >
<p>
7.1 Like all Apache projects, the Apache Xerces project is a meritocracy
--
the more work you do, the more you are allowed to do. Contributions
will include participating in mailing lists, reporting bugs, providing
patches and proposing changes to a product.
</p><p>
7.2 In order to ensure that all code contained in the Apache
Xerces project's code repository is free of licensing,
intellectual property and patent issues, any developer wishing
to contribute a new feature to Xerces must either sign:
</p><p>
a) If contributing as an individual, sign the "Individual
Contributor License Agreement (CLA)"
(http://www.apache.org/licenses/icla.txt) and file a copy with
the Secretary of the Corporation; or
</p><p>
b) If making the contribution as part of their employment
responsibilities, sign the "Corporate CLA (CCLA)",
(http://www.apache.org/licenses/cla-corporate.txt) and file a
copy with the Secretary of the Corporation.
</p><p>
7.3 If the contribution in question is a small bugfix, the
contributor need not sign a CLA, but need only provide the
following information, attaching it to the communication
containing the patch:
</p><p>
a) Name and employer
</p><p>
b) Are you the author of the code being contributed?
</p><p>
c) Do you have the right to grant the copyright and patent
licenses for the contribution that are set forth in the ASF v.2.0
license (http://www.apache.org/licenses/LICENSE-2.0)?
</p><p>
d) Does your employer have any rights to code that you have
written, for example, through your contract for employment? If
so, has your employer given you permission to contribute the code
on its behalf or waived its rights in the code?
</p><p>
e) Are you aware of any third-party licenses or other
restrictions (such as related patents or trademarks) that could
apply to your contribution? If so, what are they?
</p><p>
7.4 Contributors who make regular and substantial contributions may become
committers as described below.
</p>
</s2>
<s2 title="8 COMMITTERS" >
<p>
8.1 Each subproject has a set of committers. Committers are
contributors who have read/write access to the source code
repository.
</p><p>
8.2 Normally, a new committer is added after a contributor has
been nominated by a committer and approved by at least 50 percent
of the active committers for that subproject with no opposing
votes. In the case that a subproject has a very small number of
active committers, the PMC may choose to require a PMC resolution
to approve the nomination of a contributor by one of the active
committers in that subproject. All committers must have a signed
Contributor License Agreement on file with the Secretary of the
Corporation. Since, in most cases, contributors will already
have contributed significant amounts of code, this should usually
have been done before nomination.
</p><p>
8.3 Although committers have write access to all Apache Xerces
subprojects,
they are only permitted to make changes to the subprojects to which they
have been elected committers. A committer may be elected to multiple
subprojects, but, except that no new access need be granted, the
process is the same as for any other contributor.
</p><p>
8.4 For the purposes of voting, committers will be classed as "active" or
"inactive". Only active committers will be included in the totals used to
determine the success or failure of a particular vote, and
only active committers are part of the PMC.
</p><p>
8.5 Committers remain active as long as they are contributing code or
posting to the subproject mailing lists. If a committer has neither
contributed code nor posted to the subproject mailing lists in 3
months, the PMC chair may e-mail the
committer, the subproject development list, and the PMC mailing list
notifying the committer that they are going to be moved to inactive
status. If there is no response in 72 hours, the committer will become
inactive, and may be removed from the PMC mailing list.
</p><p>
8.6 An inactive status will not prevent a committer committing new code
changes or posting to the mailing lists. Either of these activities will
automatically re-activate the committer for the purposes of
voting, and necessitate their addition to the PMC mailing list.
</p>
</s2>
<s2 title="9 INFRASTRUCTURE" >
<p>
9.1 The Apache Xerces project relies on the Apache XML project
and the Apache Infrastructure project for the following:
</p><p>
a) Bug Database -- This is a system for tracking bugs and feature
requests.
</p><p>
b) Subproject Source Repositories -- These are several repositories
containing both the source code and documentation for the
subprojects.
</p><p>
c) Website -- A xerces.apache.org website will contain information about
the Apache Xerces project, including documentation, downloads of
releases, and this charter. Each subproject will have its own website
with subproject information.
</p><p>
d) PMC Mailing List -- This list is for PMC business requiring
confidentiality, particularly when an individual or company requests
discretion. All other PMC business should be done on the general
mailing list.
</p><p>
e) General Mailing List -- This mailing list is open to the public. It is
intended for discussions that cross subprojects.
</p><p>
f) Subproject Mailing Lists -- Each subproject should have at least one
devoted mailing
list. Many subprojects may wish to have both user and development
lists. The individual subprojects may decide on the exact structure of
their mailing lists.
</p>
</s2>
<s2 title="10 LICENSING" >
<p>
10.1 All contributions to the Apache Xerces project adhere to the
Apache Software Foundation License, v.2.0
(http://www.apache.org/licenses/LICENSE-2.0)?
All further contributions must be made under the
same terms.
</p><p>
10.2 When a committer is considering integrating a contribution
from a contributor who has no CLA on file with the Corporation,
it is the responsibility of the committer, in consultation with
the PMC, to conduct due diligence on the pedigree of the
contribution under consideration; see sections 7.2 and 7.3.
</p>
</s2>
<s2 title="11 THE DEVELOPMENT PROCESS" >
<p>
11.1 The development process is intentionally lightweight; like other
Apache projects, the committers decide which changes may be committed
to the repository. Three +1 ('yes' votes) with no -1 ('no' votes or
vetoes) are needed to approve a significant code change. For
efficiency, some code changes from some contributors (e.g.
feature additions, bug fixes) may be approved in advance, in
which case they may be committed first and changed as needed,
with conflicts resolved by majority vote of the committers.
</p>
</s2>
<s2 title="12 SUBPROJECT REQUIREMENTS" >
<p>
12.1 Each subproject should have a set of requirements as well as an
up-to-date release plan and design document on its dedicated web page.
</p><p>
12.2 It is recommended that each subproject have a smoke-test system
that works at least as a basic integration test.
</p>
</s2>
<s2 title="13 RELATIONSHIP TO OTHER APACHE PROJECTS" >
<p>
13.1 The Apache Xerces project should work closely with other Apache
projects, such as XML, Jakarta and the Apache Server, to avoid redundancy
and achieve a coherent architecture among Apache Xerces and these
projects.
</p>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,39 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: CreateDOMDocument">
<s2 title="CreateDOMDocument">
<p>The CreateDOMDocument example illustrates how you can create a DOM tree in
memory from scratch. It then reports the number of elements in the tree that
was just created.</p>
<s3 title="Running CreateDOMDocument">
<p>The CreateDOMDocument sample illustrates how you can create a DOM tree
in memory from scratch. To run CreateDOMDocument, enter the following</p>
<source>CreateDOMDocument</source>
<p>Here is a sample output from CreateDOMDocument</p>
<source>CreateDOMDocument
The tree just created contains: 4 elements.</source>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,67 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: DOMCount">
<s2 title="DOMCount">
<p>DOMCount uses the provided DOM API to parse an XML file,
construct the DOM tree and walk through the tree counting
the elements (using just one API call).</p>
<s3 title="Running DOMCount">
<p>The DOMCount sample parses an XML file and prints out the number of
elements in the file. To run DOMCount, enter the following </p>
<source>DOMCount &lt;XML file&gt;</source>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
DOMCount [options] &lt;XML file | List file&gt;
This program invokes the DOMLSParser, builds the DOM tree,
and then prints the number of elements found in each XML file.
Options:
-l Indicate the input file is a List File that has a list of xml files.
Default to off (Input file is an XML file).
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Defaults to off.
-s Enable schema processing. Defaults to off.
-f Enable full schema constraint checking. Defaults to off.
-d Disallow doctype. Defaults to off.
-locale=ll_CC specify the locale, default: en_US
-p Print out names of elements and attributes encountered.
-? Show this help.
* = Default if not provided explicitly.
</source>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from DOMCount</p>
<source>cd &XercesC3InstallDir;/samples/data
DOMCount -v=always personal.xml
personal.xml: 20 ms (37 elems)</source>
<note>The time reported by the system may be different, depending on your
processor speed.</note>
</s3>
</s2>
</s1>

158
lib/xerces/doc/domprint.xml Normal file
Просмотреть файл

@ -0,0 +1,158 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: DOMPrint">
<s2 title="DOMPrint">
<p>DOMPrint parses an XML file, constructs the DOM tree, and
invokes DOMLSSerializer::write() to serialize the resultant
DOM tree back to XML stream.
</p>
<s3 title="Running DOMPrint">
<p>The DOMPrint sample parses an XML file, using either a validating
or non-validating DOM parser configuration, builds a DOM tree,
and then invokes DOMLSSerializer::write() to serialize the
resultant DOM tree. To run DOMPrint, enter the following:</p>
<source>DOMPrint &lt;XML file&gt;</source>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
DOMPrint [options] &lt;XML file&gt;
This program invokes the DOM parser, and builds the DOM tree
It then asks the DOMLSSerializer to serialize the DOM tree.
Options:
-e create entity reference nodes. Default is no expansion.
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Default is off.
-s Enable schema processing. Default is off.
-f Enable full schema constraint checking. Defaults is off.
-wenc=XXX Use a particular encoding for output. Default is
the same encoding as the input XML file. UTF-8 if
input XML file has not XML declaration.
-wfile=xxx Write to a file instead of stdout.
-wscs=xxx Enable/Disable split-cdata-sections. Default on.
-wddc=xxx Enable/Disable discard-default-content. Default on.
-wflt=xxx Enable/Disable filtering. Default off.
-wfpp=xxx Enable/Disable format-pretty-print. Default off.
-wbom=xxx Enable/Disable write Byte-Order-Mark Default off.
-? Show this help
* = Default if not provided explicitly.
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"
</source>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from DOMPrint</p>
<source>cd &XercesC3InstallDir;/samples/data
DOMPrint -v=always personal.xml
&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
&lt;!DOCTYPE personnel SYSTEM "personal.dtd"&gt;
&lt;!-- @version: --&gt;
&lt;personnel&gt;
&lt;person id="Big.Boss"&gt;
&lt;name&gt;&lt;family&gt;Boss&lt;/family&gt; &lt;given&gt;Big&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;chief@foo.com&lt;/email&gt;
&lt;link subordinates="one.worker two.worker three.worker
four.worker five.worker"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="one.worker"&gt;
&lt;name&gt;&lt;family>Worker&lt;/family&gt; &lt;given&gt;One&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;one@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="two.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Two&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;two@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="three.worker"&gt;
&lt;name&gt;&lt;family>Worker&lt;/family&gt; &lt;given&gt;Three&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;three@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="four.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Four&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;four@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="five.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Five&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;five@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;/personnel&gt;</source>
<p>Note that DOMPrint does not reproduce the original XML file. DOMPrint and
SAXPrint produce different results because of the way the two APIs store data
and capture events.</p>
<p>Application needs to provide its own implementation of
DOMErrorHandler (in this sample, the DOMPrintErrorHandler),
if it would like to receive notification from the serializer
in the case any error occurs during the serialization.
</p>
<p>Application needs to provide its own implementation of
DOMLSSerializerFilter (in this sample, the DOMPrintFilter),
if it would like to filter out certain part of the DOM
representation, but must be aware that thus may render the
resultant XML stream invalid.
</p>
<p>Application may choose any combination of characters as the
end of line sequence to be used in the resultant XML stream,
but must be aware that this may render the resultant XML
stream ill formed.
</p>
<p>Application may choose a particular encoding name in which
the output XML stream should be, but must be aware that if
unrepresentable in the encoding specified characters appear
in the markup, it may force the serializer to terminate serialization
prematurely, and thus no complete serialization would be done.
</p>
<p>Application shall query the serializer first, before set any
feature/mode(true, false), or be ready to catch exception if this
feature/mode is not supported by the serializer.
</p>
<p>Application needs to release the filter, error handler and
format target objects created for the serialization.
</p>
</s3>
</s2>
</s1>

148
lib/xerces/doc/download.xml Normal file
Просмотреть файл

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Download">
<s2 title="Download">
<p>Use the links below to download &XercesCName; from one of
our mirrors. You <em>must</em> <link anchor="verify">verify the
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
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
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>
</s2>
<s2 title="Mirror">
<p>The currently selected mirror is <em>[preferred]</em>. If you
encounter a problem with this mirror, please select another
mirror. If all mirrors are failing, there are <em>backup</em>
mirrors (at the end of the mirrors list) that should be available.</p>
<form action="[location]" method="get" id="SelectMirror">
Other mirrors: <select name="Preferred">
[if-any http]
[for http]<option value="[http]">[http]</option>[end]
[end]
[if-any ftp]
[for ftp]<option value="[ftp]">[ftp]</option>[end]
[end]
[if-any backup]
[for backup]<option value="[backup]">[backup] (backup)</option>[end]
[end]
</select>
<input type="submit" value="Change" />
</form>
<p>You may also consult the <jump href="http://www.apache.org/mirrors/">complete
list of mirrors</jump>.</p>
</s2>
<s2 title="Latest 3-Series Release">
<p>The &XercesCName; &XercesCLatest; release is available in source code
distributions only. If binaries are produced at a future point, this
page will be updated.</p>
<s3 title="Source Distributions">
<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.md5">MD5</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.md5">MD5</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.md5">MD5</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.md5">MD5</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>
</s3>
</s2>
<anchor name="verify"/>
<s2 title="Verify the integrity of the files">
<p>It is essential that you verify the integrity of the downloaded
files using the PGP or MD5/SHA files. Please read <jump
href="http://httpd.apache.org/dev/verification.html">Verifying
HTTP Server Releases</jump> for more information on why you
should verify our releases.</p>
<p>The PGP signatures can be verified using PGP or GPG. First
download the <jump href="http://www.apache.org/dist/xerces/c/KEYS">&XercesCName; KEYS</jump>
as well as the <code>.asc</code> signature file for the particular
distribution. Make sure you get these files from the <jump
href="http://www.apache.org/dist/xerces/c/">main distribution
directory</jump>, rather than from a mirror. Then verify the
signatures using:</p>
<source>
% pgpk -a KEYS
% pgpv &lt;distribution-name>.asc
</source>
<p><em>or</em></p>
<source>
% pgp -ka KEYS
% pgp &lt;distribution-name>.asc
</source>
<p><em>or</em></p>
<source>
% gpg --import KEYS
% gpg --verify &lt;distribution-name>.asc
</source>
<p>Alternatively, you can verify the digests on the files. A
command line program called <code>md5</code> or <code>md5sum</code>
is included in most UNIX distributions. It is also available as
part of <jump href="http://www.gnu.org/software/textutils/textutils.html">GNU
Textutils</jump>. Windows users can get binary md5 programs from <jump
href="http://www.fourmilab.ch/md5/">here</jump>, <jump
href="http://www.pc-tools.net/win32/freeware/console/">here</jump>, or
<jump href="http://www.slavasoft.com/fsum/">here</jump>.</p>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,76 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: EnumVal">
<s2 title="EnumVal">
<p>EnumVal shows how to enumerate the markup declarations in a DTD Grammar.</p>
<s3 title="Running EnumVal">
<p>This program parses the specified XML file, then shows how to
enumerate the contents of the DTD Grammar.</p>
<source>
Usage:
EnumVal &lt;XML file&gt;
This program parses the specified XML file, then shows how to
enumerate the contents of the DTD Grammar. Essentially,
shows how one can access the DTD information stored in internal
data structures.
</source>
<p>Here is a sample output from EnumVal</p>
<source>cd &XercesC3InstallDir;/samples/data
EnumVal personal.xml
ELEMENTS:
----------------------------
Name: personnel
Content Model: (person)+
Name: person
Content Model: (name,email*,url*,link?)
Attributes:
Name:id, Type: ID
Name: name
Content Model: (#PCDATA|family|given)*
Name: email
Content Model: (#PCDATA)*
Name: url
Content Model: EMPTY
Attributes:
Name:href, Type: CDATA
Name: link
Content Model: EMPTY
Attributes:
Name:subordinates, Type: IDREF(S)
Name:manager, Type: IDREF(S)
Name: family
Content Model: (#PCDATA)*
Name: given
Content Model: (#PCDATA)*</source>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,109 @@
<?xml version="1.0" encoding = "iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
<faqs title="Building / Running &XercesCName;">
<faq title="Why do I get compilation error saying DOMDocument was declared twice using
Microsoft Visual C++?">
<q>Why do I get compilation error saying DOMDocument was declared twice using
Microsoft Visual C++?</q>
<a>
<p>Your application somehow has picked up the Microsoft SDK header <code>Msxml.h</code>
which has its own typedef of <code>DOMDocument</code>. This confuses
with the &XercesCName; &XercesC3Version; <code>&XercesC3Namespace;::DOMDocument</code>
and thus lead to the compilation errors.</p>
<p>Qualifier the use of DOMDocument in your application explicitly e.g.,
<br/><br/><code>xercesc::DOMDocument* doc;</code><br/><br/>
will eliminate these compilation problems. Alternatively, you
may want to get rid of the <code>Msxml.h</code> header inclusion.
</p>
</a>
</faq>
<faq title="Why does my application have unresolved linking errors?">
<q>Why does my application give unresolved linking errors?</q>
<a>
<p>Please check the following:</p>
<ol>
<li>Verify that you have specified the appropriate option and library path in the linker
command line</li>
<li>If you're using the binary build of &XercesCName;, make sure that the CPU architecture, OS,
and compiler are
the same as the ones used to build the application. Different OS and
compiler versions might cause unresolved linking problems or compilation
errors. If the versions are different, rebuild the &XercesCName; library on
your system before building your application.</li>
<li>If you are using Microsoft Visual Studio 2003 (7.1), 2005 (8.0), or 2008 (9.0),
check that the
"Treat wchar_t as a built-in type" option has been set to the same value as
used to build &XercesCName;. The binary distribution for Visual Studio 7.1 is
built with this option turned off. The binary distributions for Visual Studio 8.0
and 9.0 are built with this option turned on.</li>
</ol>
</a>
</faq>
<faq title="I cannot run the sample applications. What is wrong?">
<q>I cannot run the sample applications. What is wrong?</q>
<a>
<p>In order to run an application built using &XercesCProjectName; you must
set up your path and library search path properly. For more information
refer to the <link idref="install-&XercesC3Series;">Installation instructions</link>.
</p>
</a>
</faq>
<faq title="Why my document is valid on some platforms while invalid on others">
<q>Why my document is valid on some platform while invalid on others?</q>
<a>
<p>The parser relies on the system call, strtod(), to parse a string representation
of a double/float data. In the case of no invalid characters found, the strtod()
returns a double/float value if it is representable on that platform, or raises
ERANGE to indicate either underflow or underflow occurs. And the parser assigns
zero to the said data if underflow is found.
</p>
<p>The threshold, where the strtod() decides if an underflow occurs, varies on
platforms. On Windows, it is roughly the order of e-308, on Linux, e-325, and
on AIX, HP-UX and Solaris, e-324.
</p>
<p>So in an instance document, a data of value 1.0e-310 from a type with minExclusive 0,
is considered invalid on windows (since it is converted to 0 and therefore violates
the minExclusive constraint), but valid on other Unix platforms (since it remains
the original value).
</p>
<p>The discussion above applies to data in xsd file as well.
</p>
</a>
</faq>
</faqs>

Просмотреть файл

@ -0,0 +1,179 @@
<?xml version="1.0" encoding = "iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
<faqs title='Contributing to &XercesCName;'>
<faq title="Submitting Patches">
<q>I have a problem and I think I know how to fix it. How can I
communicate my ideas to the &XercesCName; team?
</q>
<a>
<p>To maximize the probability that your ideas will grab the
attention of one of the &XercesCName; developers who knows about the
area of the parser you're concerned with, you should follow
these steps:
</p>
<ol>
<li>Check out and build the most recent &XercesCName; code. For
instructions on how to do this, see <jump href="&RepURI;">&XercesCName;
Repository Information</jump>. If you do this, you can confirm that your
bug still exists and has not been fixed since the last
release.
</li>
<li>
Write up your bug report as per the instructions described in
the <jump href="&BugURI;">Bug-Reporting</jump> page.
</li>
<li>
Describe why your solution works.
</li>
<li>
Prepare a patch to fix &XercesCName; code. To do this, when you
have applied your changes to a local copy of the most
recent &XercesCName; source code, do <code>svn diff file</code>
for each file you have changed.
Keep in mind the coding guidelines for &XercesCName; as
described below.
</li>
<li>
Zip (or tar) up your patches. If you send them in the
body of a message or bug report they are very difficult to
apply.
</li>
<li>
Submit a bug report to the &XercesCName; bug database as
described on the <jump href="&BugURI;">Bug-Reporting</jump> page.
Pick the product "&XercesCName;" (remembering to attach your patches
and test code) or, if you think your patch might need some discussion,
post it to the <jump href="&MailURI;">developer mailing list</jump>.
</li>
<li>
If you are submitting a substantial amount of code, provide the
information required in the Contributors section of the Project
Charter.
</li>
</ol>
</a>
</faq>
<faq title="Release Policy">
<q>What are the release policies for &XercesCName;?
</q>
<a>
<p>The informal release policies for &XercesCName; are (using a versioning of version.release.modification):</p>
<ul>
<li>We don't try to enforce binary compatibility between new versions and releases.</li>
<li>New versions and releases will be delivered when a certain number of bug fixes/new features have been added
(as decided by the committers).</li>
<li>New modification levels will almost never be issued, the only exception is a showstopper bug encountered within
a release.</li>
<li>Any normal bug is fixed only in the HEAD branch (latest development code).</li>
</ul>
<p>The specific source and binary compatibility objectives for these release policies and the corresponding allowed source changes are:</p>
<ul>
<li>x.x.x to x.x.y: the API is the same to ensure binary compatibility.</li>
<ul>
<li>To maintain binary compatibility the allowed source code changes are:</li>
<ul>
<li>Add new non-virtual functions.</li>
<li>Add new classes.</li>
<li>Add new STATIC data members.</li>
</ul>
<li>To maintain binary compatibility you cannot:</li>
<ul>
<li>Add new virtual functions as this will change the layout of the virtual function table.</li>
<li>Change the order of virtual functions in the class declaration.</li>
<li>Change the signature of a function (including adding additional parameters with defaults).</li>
<li>Change the access specifier (private/public/protected) on functions or data members as this may be part of the signature with some compilers.</li>
<li>Add new data members to a class (other than STATIC members).</li>
<li>Change the order of data members in the class declaration (other than STATIC members).</li>
<li>Change the class hierarchy (other than adding new classes).</li>
</ul>
<li>Methods that are deprecated should be marked with the Doxygen tag @deprecated in the header file.</li>
</ul>
<li>x.x.x to x.y.z: the API is source code compatible but not binary compatible (a recompilation of an application that uses the public headers of &XercesCName; should work).</li>
<ul>
<li>This means that to maintain release to release source code compatibility the signature of public methods can only be
changed by adding default parameters.</li>
<li>Signatures of private and protected methods can be changed and/or removed.</li>
<li>Methods that are deprecated should be marked with the Doxygen tag @deprecated in the header file.</li>
</ul>
<li>x.x.x to a.b.c: the API may not be source code compatible and is not binary compatible (a recompilation of an application using &XercesCName; may fail).</li>
<ul>
<li>In this situation, a separate branch of the code will be created so that bug fixes may be applied to the last version.</li>
<li>Deprecated methods may be removed. Deprecated methods that are removed should be documented in the migration information (migration.xml).</li>
</ul>
</ul>
</a>
</faq>
<faq title="Coding Conventions">
<q>What are the coding conventions for &XercesCName;?
</q>
<a>
<p>As with any coding effort, there are always arguments over what coding conventions to use. Everyone thinks
that they have the best style which leads to the entire source tree looking different. This causes consternation
as well as eye fatigue on subsequent developers that need to maintain the code. Therefore, we are going to
make an attempt at defining some basic coding conventions for &XercesCName;. When committing files or providing
patches please keep them in mind:</p>
<ol>
<li>All classes should have a constructor, destructor, assignment operator and copy constructor to
avoid compiler generated default versions of these.</li>
<ul>
<li>If a class contains only static methods, only a private constructor is required.</li>
<li>If a class contains any virtual methods, the destructor should be virtual.</li>
<li>If a class has a public or protected constructor, it should declare private assignment operator
and copy constructor which are not implemented (unless of course you need either of these).</li>
</ul>
<li>If you add a catch(...) block be sure to add the following block
<code>
catch(const OutOfMemoryException&amp;)
{
throw;
}
</code> so the OutOfMemory condition does not get absorbed.</li>
<li>If you change the serialization format (by adding something to be serialized or removing something that
was serialized) increment the XERCES_GRAMMAR_SERIALIZATION_LEVEL constant in XercesVersion.hpp.</li>
<li>If a class allocates memory or is instantiated with new then it should inherit from XMemory.</li>
<li>Use a tab size of 4 and insert them as spaces instead of keeping tabs.</li>
<li>The code is written to be platform independent. Platform specific code should only be in the
util/FileManagers, util/MutexManagers, util/Transcoders, util/MsgLoaders, and util/NetAccessors directories.</li>
<li>The header file name and the source file name should both be named corresponding to the primary
class they contain. For example class StringPool should be in the header file StringPool.hpp and in
the source file StringPool.cpp.</li>
<li>In general, code should be documented with comments. Use Doxygen tags to describe methods.</li>
<li>The naming convention for enumerations should be chosen to be unique and descriptive
(i.e. INVALID or UNKNOWN) to avoid colliding with predefined macros in other
products. The current style of using ALL CAP enums should be phased out with
Mixed Case instead, except for names specified in standards (for example, TEXT_NODE
should not be converted to mixed case for standards compliance).</li>
</ol>
</a>
</faq>
</faqs>

Просмотреть файл

@ -0,0 +1,100 @@
<?xml version="1.0" ?>
<!--
* 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.
-->
<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
<faqs title="Distributing &XercesCName;">
<faq title="Can I use &XercesCName; in my product?">
<q>Can I use &XercesCName; in my product?</q>
<a>
<p>Most likely yes. &XercesCName; is distributed under
the terms of the Apache Software License version 2.0
which is a fairly permissive license. In particular,
it allows you to distribute your application in
binary form without requiring you to also release
the source code. Read the license agreement for more
information and if you still have further questions,
then please address them to the
<jump href="&MailURI;">&XercesCName; user mailing list</jump>.</p>
</a>
</faq>
<faq title="Which files do I need to distribute with my application?">
<q>Which files do I need to distribute with my application?</q>
<a>
<p>You only need to distribute <em>one</em> file:<br></br>
&XercesC3WindowsDLL;.dll for Windows<br/>
&XercesC3UnixLib;-&XercesC3UnixSoVersion;.a for AIX<br/>
&XercesC3UnixLib;-&XercesC3UnixSoVersion;so. for Solaris/Linux<br/>
&XercesC3UnixLib;-&XercesC3UnixSoVersion;.sl for HP-UX on PA-RISC<br/>
&XercesC3UnixLib;-&XercesC3UnixSoVersion;.so for HP-UX on IA64<br/>
&XercesC3UnixLib;-&XercesC3UnixSoVersion;.dylib for Mac OS X
</p>
<p>Note, however, that if you built &XercesCName; with dependencies
on other libraries (e.g., ICU for transcoder support or libcurl
for net accessor support) then you will need to ship those
libraries as well.</p>
<p>You can also link your application to a static version
of the &XercesCName; library in which case you won't need
to distribute any extra libraries.</p>
</a>
</faq>
<faq title="I do not see a binary for my platform. When will it be available?">
<q>I do not see a binary for my platform. When will it be available?</q>
<a>
<p>The reason why you see binaries only for some specific
platforms is that we have had the maximum requests for
them. Moreover, we have limited resources and hence cannot
publish binaries for every platform. If you wish to
contribute your time and effort in building binaries for a
specific platform/environment then please send a mail to the
<jump href="&MailURI;">&XercesCName; developer mailing list</jump>.</p>
</a>
</faq>
<faq title="When will a port to my platform be available?">
<q>When will a port to my platform be available?</q>
<a>
<p>We would like to see &XercesCName; ported to as
many platforms as practical. However, due to limited resources
we cannot do all the ports. Here are the <jump
href="program-others-&XercesC3Series;.html#PortingGuidelines">Porting
Guidelines</jump>.</p>
<p>We encourage you to submit the changes that
are required to make it work on another platform. We will
incorporate these changes in the source code base and make
them available in the future releases.</p>
<p>All porting changes may be sent to the
<jump href="&MailURI;">&XercesCName; developer mailing list</jump>
.</p>
</a>
</faq>
</faqs>

Просмотреть файл

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
<faqs title="Other &XercesCName; Questions">
<faq title="How do I determine the version of &XercesCName; I am using?">
<q>How do I determine the version of &XercesCName; I am using?</q>
<a>
<p>The version string for &XercesCName; is in one of the header files. Look
inside the file <code>src/xercesc/util/XercesVersion.hpp</code> or, in the binary distribution,
look in <code>include/xercesc/utils/XercesVersion.hpp</code>. </p>
<p>If you don't have the header files, you have to find the version
information from the shared library name. On Windows right click on
the DLL name in the bin directory and look up
properties. The version information can be found in the Version tab.</p>
<p>On UNIX/Linux/Mac OS X platforms the version is
embedded into the library name.</p>
</a>
</faq>
<faq title="Is there any kind of support available for &XercesCName;?">
<q>Is there any kind of support available for &XercesCName;?</q>
<a>
<p>&XercesCName; comes with <em>no</em> formal support.</p>
<p>Every volunteer project obtains its strength from the people involved in
it. Mailing lists provide a simple and effective communication mechanism. You
are welcome to join any of these mailing lists (or all of them if you wish).
You can choose to lurk, or to actively participate. It is up to you.</p>
<p>Instructions for subscribing as well as archives are available at the
<jump href="&MailURI;">&XercesCName; mailing lists</jump> page.</p>
</a>
</faq>
<faq title="I found a defect -- how do I report it?">
<q>I found a defect -- how do I report it?</q>
<a>
<p>See <jump href="&BugURI;">Bug Reporting</jump>.
</p>
</a>
</faq>
</faqs>

Просмотреть файл

@ -0,0 +1,608 @@
<?xml version="1.0" encoding = "iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
<faqs title="Programming &XercesCName;">
<faq title="Does &XercesCName; support XML Schema?">
<q> Does &XercesCName; support Schema?</q>
<a>
<p>Yes, &XercesCName; &XercesC3Version; contains an implementation
of the W3C XML Schema Language, a recommendation of the Worldwide Web Consortium
available in three parts:
<jump href="http://www.w3.org/TR/xmlschema-0/">XML Schema: Primer</jump> and
<jump href="http://www.w3.org/TR/xmlschema-1/">XML Schema: Structures</jump> and
<jump href="http://www.w3.org/TR/xmlschema-2/">XML Schema: Datatypes</jump>.
We consider this implementation complete. See the
<jump href="schema-&XercesC3Series;.html#limitation">XML Schema Support</jump> page for limitations.</p>
</a>
</faq>
<faq title="Does &XercesCName; support XPath?">
<q> Does &XercesCName; support XPath?</q>
<a>
<p>&XercesCName; &XercesC3Version; provides partial XPath 1 implementation
for the purposes of handling XML Schema identity constraints.
The same engine is made available through the DOMDocument::evaluate API to
let the user perform simple XPath queries involving DOMElement nodes only,
with no predicate testing and allowing the "//" operator only as the initial
step. For full XPath 1 and 2 support refer to the
<jump href="http://xqilla.sourceforge.net">XQilla</jump> and
<jump href="http://xml.apache.org/xalan-c/overview.html">Apache Xalan C++</jump>
open source projects.
</p>
</a>
</faq>
<faq title="Why does my application crash when instantiating the parser?">
<q>Why does my application crash when instantiating the parser?</q>
<a>
<p>In order to work with the &XercesCName; parser, you have to first
initialize the XML subsystem. The most common mistake is to forget this
initialization. Before you make any calls to &XercesCName; APIs, you must
call XMLPlatformUtils::Initialize(): </p>
<source>
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException&amp; toCatch) {
// Do your failure processing here
}</source>
<p>This initializes the &XercesCProjectName; system and sets its internal
variables. Note that you must include the <code>xercesc/util/PlatformUtils.hpp</code> file for this to work.</p>
</a>
</faq>
<faq title="Is it OK to call the XMLPlatformUtils::Initialize/Terminate pair of routines multiple times in one program?">
<q>Is it OK to call the XMLPlatformUtils::Initialize/Terminate pair of routines multiple times in one program?</q>
<a>
<p>Yes. Note, however, that the application needs to guarantee that the
XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
methods are called from the same thread (usually the initial
thread executing main()) or proper synchronization is performed
by the application if multiple threads call
XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
concurrently.</p>
<p>If you are calling XMLPlatformUtils::Initialize() a number of times, and then follow with
XMLPlatformUtils::Terminate() the same number of times, only the first XMLPlatformUtils::Initialize()
will do the initialization, and only the last XMLPlatformUtils::Terminate() will clean up
the memory. The other calls are ignored.
</p>
</a>
</faq>
<faq title="Why does my application crash after calling XMLPlatformUtils::Terminate()?">
<q>Why does my application crash after calling XMLPlatformUtils::Terminate()?</q>
<a>
<p>Please make sure the XMLPlatformUtils::Terminate() is the last &XercesCName; function to be called
in your program. NO explicit nor implicit &XercesCName; destructor (those local data that are
destructed when going out of scope) should be called after XMLPlatformUtils::Terminate().
</p>
<p>
For example consider the following code snippet which is incorrect:
</p>
<source>
1: {
2: XMLPlatformUtils::Initialize();
3: XercesDOMParser parser;
4: XMLPlatformUtils::Terminate();
5: }
</source>
<p>The XercesDOMParser object "parser" is destructed when going out of scope at line 5 before the closing
brace. As a result, XercesDOMParser destructor is called at line 5 after
XMLPlatformUtils::Terminate() which is incorrect. Correct code should be:
</p>
<source>
1: {
2: XMLPlatformUtils::Initialize();
2a: {
3: XercesDOMParser parser;
3a: }
4: XMLPlatformUtils::Terminate();
5: }
</source>
<p>The extra pair of braces (line 2a and 3a) ensures that all implicit destructors are called
before terminating &XercesCName;.</p>
<p>Note also that the application needs to guarantee that the
XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
methods are called from the same thread (usually the initial
thread executing main()) or proper synchronization is performed
by the application if multiple threads call
XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
concurrently.</p>
</a>
</faq>
<faq title="Is &XercesCName; thread-safe?">
<q>Is &XercesCName; thread-safe?</q>
<a>
<p>The answer is yes if you observe the following rules for using
&XercesCName; in a multi-threaded environment:</p>
<p>Within an address space, an instance of the parser may be used without
restriction from a single thread, or an instance of the parser can be accessed
from multiple threads, provided the application guarantees that only one thread
has entered a method of the parser at any one time.</p>
<p>When two or more parser instances exist in a process, the instances can
be used concurrently, without external synchronization. That is, in an
application containing two parsers and two threads, one parser can be running
within the first thread concurrently with the second parser running within the
second thread.</p>
<p>The same rules apply to &XercesCName; DOM documents. Multiple document
instances may be concurrently accessed from different threads, but any given
document instance can only be accessed by one thread at a time.</p>
<p>The application also needs to guarantee that the
XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
methods are called from the same thread (usually the initial
thread executing main()) or proper synchronization is performed
by the application if multiple threads call
XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
concurrently.</p>
</a>
</faq>
<faq title="I am seeing memory leaks in &XercesCName;. Are they real?">
<q>I am seeing memory leaks in &XercesCName;. Are they real?</q>
<a>
<p>The &XercesCName; library allocates and caches some commonly reused
items. The storage for these may be reported as memory leaks by some heap
analysis tools; to avoid the problem, call the function <code>XMLPlatformUtils::Terminate()</code> before your application exits. This will free all memory that was being
held by the library.</p>
<p>For most applications, the use of <code>Terminate()</code> is optional. The system will recover all memory when the application
process shuts down. The exception to this is the use of &XercesCName; from DLLs
that will be repeatedly loaded and unloaded from within the same process. To
avoid memory leaks with this kind of use, <code>Terminate()</code> must be called before unloading the &XercesCName; library</p>
<p>To ensure all the memory held by the parser are freed, the number of XMLPlatformUtils::Terminate() calls
should match the number of XMLPlatformUtils::Initialize() calls.
</p>
<p>If you have built &XercesCName; with dependency on ICU then you may
want to call the u_cleanup() ICU function to clean up
ICU static data. Refer to the ICU documentation for details.
</p>
</a>
</faq>
<faq title="Can &XercesCName; create an XML skeleton based on a DTD">
<q>Is there a function that creates an XML file from a DTD (obviously
with the values missing, a skeleton)?</q>
<a>
<p>No, there is no such functionality.</p>
</a>
</faq>
<faq title="Can I use &XercesCName; to perform write validation">
<q>Can I use &XercesCName; to perform "write validation"? That is, having an
appropriate Grammar and being able to add elements to the DOM whilst validating
against the grammar?</q>
<a>
<p>No, there is no such functionality.</p>
<p>The best you can do for now is to create the DOM document, write it back
as XML and re-parse it with validation turned on.</p>
</a>
</faq>
<faq title="Can I validate the data contained in a DOM tree?">
<q>Is there a facility in &XercesCName; to validate the data contained in a
DOM tree? That is, without saving and re-parsing the source document?</q>
<a>
<p>No, there is no such functionality. The best you can do for now is to create the DOM document, write it back
as XML and re-parse it with validation turned on.</p>
</a>
</faq>
<faq title="How to write out a DOM tree into a string or an XML file?">
<q>How to write out a DOM tree into a string or an XML file?</q>
<a>
<p>You can use
the DOMLSSerializer::writeToString, or DOMLSSerializer::writeNode to serialize a DOM tree.
Please refer to the sample DOMPrint or the API documentation for more details of
DOMLSSerializer.</p>
</a>
</faq>
<faq title="Why doesn't DOMNode::cloneNode() clone the pointer assigned to a DOMNode via DOMNode::setUserData()?">
<q>Why doesn't DOMNode::cloneNode() clone the pointer assigned to a DOMNode via DOMNode::setUserData()?</q>
<a>
<p>&XercesCName; supports the DOMNode::userData specified
in <jump href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-3A0ED0A4">
the DOM level 3 Node interface</jump>. As
is made clear in the description of the behavior of
<code>cloneNode()</code>, userData that has been set on the
Node is not cloned. Thus, if the userData is to be copied
to the new Node, this copy must be effected manually.
Note further that the operation of <code>importNode()</code>
is specified similarly.
</p>
</a>
</faq>
<faq title="How are entity reference nodes handled in DOM?">
<q>How are entity reference nodes handled in DOM?</q>
<a>
<p>If you are using the native DOM classes, the function <code>setCreateEntityReferenceNodes</code>
controls how entities appear in the DOM tree. When
setCreateEntityReferenceNodes is set to true (the default), an occurrence of an
entity reference in the XML document will be represented by a subtree with an
EntityReference node at the root whose children represent the entity expansion.
Entity expansion will be a DOM tree representing the structure of the entity
expansion, not a text node containing the entity expansion as text.</p>
<p>If setCreateEntityReferenceNodes is false, an entity reference in the XML
document is represented by only the nodes that represent the entity expansion.
The DOM tree will not contain any entityReference nodes.</p>
</a>
</faq>
<faq title="Can I use &XercesCName; to parse HTML?">
<q>Can I use &XercesCName; to parse HTML?</q>
<a>
<p>Yes, but only if the HTML follows the rules given in the
<jump href="http://www.w3.org/TR/REC-xml">XML specification</jump>. Most HTML,
however, does not follow the XML rules, and will generate XML well-formedness
errors.</p>
</a>
</faq>
<faq title="I keep getting an error: &quot;invalid UTF-8 character&quot;. What's wrong?">
<q>I keep getting an error: "invalid UTF-8 character". What's wrong?</q>
<a>
<p>Most commonly, the XML <code>encoding =</code> declaration is either incorrect or missing. Without a declaration, XML
defaults to the use utf-8 character encoding, which is not compatible with the
default text file encoding on most systems.</p>
<p>The XML declaration should look something like this:</p>
<p><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;</code></p>
<p>Make sure to specify the encoding that is actually used by file. The
encoding for "plain" text files depends both on the operating system and the
locale (country and language) in use.</p>
<p>Another common source of problems is characters that are not
allowed in XML documents, according to the XML spec. Typical disallowed
characters are control characters, even if you escape them using the Character
Reference form. See the XML specification, sections 2.2 and 4.1 for details.
If the parser is generating an <code>Invalid character (Unicode: 0x???)</code> error, it is very likely that there's a character in there that you
can't see. You can generally use a UNIX command like "od -hc" to find it.</p>
</a>
</faq>
<faq title="What encodings are supported by &XercesCName;?">
<q>What encodings are supported by &XercesCName;?</q>
<a>
<p>&XercesCName; has intrinsic support for ASCII, UTF-8, UTF-16 (Big/Small
Endian), UCS4 (Big/Small Endian), EBCDIC code pages IBM037, IBM1047 and IBM1140
encodings, ISO-8859-1 (aka Latin1) and Windows-1252. This means that it can
always parse input XML files in these above mentioned encodings.</p>
<p>Furthermore, if you build &XercesCName; with the International Components
for Unicode (ICU) as a transcoder then the list of supported encodings
extends to over 100 different encodings that are supported by
ICU. In particular, all the encodings registered with the
Internet Assigned Numbers Authority (IANA) are supported
in this configuration.</p>
</a>
</faq>
<faq title="What character encoding should I use when creating XML documents?">
<q>What character encoding should I use when creating XML documents?</q>
<a>
<p>The best choice in most cases is either utf-8 or utf-16. Advantages of
these encodings include:</p>
<ul>
<li>The best portability. These encodings are more widely supported by
XML processors than any others, meaning that your documents will have the best
possible chance of being read correctly, no matter where they end up.</li>
<li>Full international character support. Both utf-8 and utf-16 cover the
full Unicode character set, which includes all of the characters from all major
national, international and industry character sets.</li>
<li>Efficient. utf-8 has the smaller storage requirements for documents
that are primarily composed of characters from the Latin alphabet. utf-16 is
more efficient for encoding Asian languages. But both encodings cover all
languages without loss.</li>
</ul>
<p>The only drawback of utf-8 or utf-16 is that they are not the native
text file format for most systems, meaning that some text file editors
and viewers can not be directly used.</p>
<p>A second choice of encoding would be any of the others listed in the
table above. This works best when the xml encoding is the same as the default
system encoding on the machine where the XML document is being prepared,
because the document will then display correctly as a plain text file. For UNIX
systems in countries speaking Western European languages, the encoding will
usually be iso-8859-1.</p>
<p>A word of caution for Windows users: The default character set on
Windows systems is windows-1252, not iso-8859-1. While &XercesCName; does
recognize this Windows encoding, it is a poor choice for portable XML data
because it is not widely recognized by other XML processing tools. If you are
using a Windows-based editing tool to generate XML, check which character set
it generates, and make sure that the resulting XML specifies the correct name
in the <code>encoding="..."</code> declaration.</p>
</a>
</faq>
<faq title="Why does deleting a transcoded string result in assertion on windows?">
<q>Why does deleting a transcoded string result in assertion on windows?</q>
<a>
<p>Both your application program and the &XercesCName; DLL must use the same DLL version of the
runtime library. If either statically links to the runtime library, this
problem will still occur.</p>
<p>For a Visual Studio build the runtime library setting MUST
be "Multithreaded DLL" for release builds and "Debug Multithreaded DLL" for
debug builds.</p>
<p>To bypass such problem, instead of calling operator delete[] directly, you can use the
provided function XMLString::release to delete any string that was allocated by the parser.
This will ensure the string is allocated and deleted by the same DLL and such assertion
problem should be resolved.</p>
</a>
</faq>
<faq title="How do I transcode to/from something besides the local code page?">
<q>How do I transcode to/from something besides the local code page?</q>
<a>
<p>XMLString::transcode() will transcode from XMLCh to the local code page, and
other APIs which take a char* assume that the source text is in the local
code page. If this is not true, you must transcode the text yourself. You
can do this using local transcoding support on your OS, such as Iconv on
Unix or IBM's ICU package. However, if your transcoding needs are simple,
you can achieve better portability by using the &XercesCName; parser's
transcoder wrappers. You get a transcoder like this:
</p>
<ul>
<li>
Call XMLPlatformUtils::fgTransServer->MakeNewTranscoderFor() and provide
the name of the encoding you wish to create a transcoder for. This will
return a transcoder to you, which you own and must delete when you are
through with it.
NOTE: You must provide a maximum block size that you will pass to the transcoder
at one time, and you must pass blocks of characters of this count or smaller when
you do your transcoding. The reason for this is that this is really an
internal API and is used by the parser itself to do transcoding. The parser
always does transcoding in known block sizes, and this allows transcoders to
be much more efficient for internal use since it knows the max size it will
ever have to deal with and can set itself up for that internally. In
general, you should stick to block sizes in the 4 to 64K range.
</li>
<li>
The returned transcoder is something derived from XMLTranscoder, so they
are all returned to you via that interface.
</li>
<li>
This object is really just a wrapper around the underlying transcoding
system actually in use by your version of &XercesCName;, and does whatever is
necessary to handle differences between the XMLCh representation and the
representation used by that underlying transcoding system.
</li>
<li>
The transcoder object has two primary APIs, transcodeFrom() and
transcodeTo(). These transcode between the XMLCh format and the encoding you
indicated.
</li>
<li>
These APIs will transcode as much of the source data as will fit into the
outgoing buffer you provide. They will tell you how much of the source they
ate and how much of the target they filled. You can use this information to
continue the process until all source is consumed.
</li>
<li>
char* data is always dealt with in terms of bytes, and XMLCh data is
always dealt with in terms of characters. Don't mix up which you are dealing
with or you will not get the correct results, since many encodings don't
have a one to one relationship of characters to bytes.
</li>
<li>
When transcoding from XMLCh to the target encoding, the transcodeTo()
method provides an 'unrepresentable flag' parameter, which tells the
transcoder how to deal with an XMLCh code point that cannot be converted
legally to the target encoding, which can easily happen since XMLCh is
Unicode and can represent thousands of code points. The options are to use a
default replacement character (which the underlying transcoding service will
choose, and which is guaranteed to be legal for the target encoding), or to
throw an exception.
</li>
</ul>
<p>Here is an example:</p>
<source>
// Create an XMLTranscoder that is able to transcode between
// Unicode and UTF-8.
//
XMLTranscoder* t = XMLPlatformUtils::fgTransService->makeNewTranscoderFor(
"UTF-8", failReason, 16*1024);
// Source string is in Unicode, want to transcode to UTF-8
t-&gt;transcodeTo(source_unicode,
length,
result_utf8,
length,
charsEaten,
XMLTranscoder::UnRep_Throw);
// Source string in UTF-8, want to transcode to Unicode.
t-&gt;transcodeFrom(source_utf8,
length,
result_unicode,
length,
bytesEaten,
(unsigned char*)charSz);
</source>
<p>An even simpler way to transcode to a different encoding is
to use the TranscodeToStr and TranscodeFromStr wrapper classes
which represent a one-time transcoding and encapsulate all the
memory management. Refer to the API Reference for more information.</p>
</a>
</faq>
<faq title="Why does the parser still try to locate the DTD even validation is turned off
and how to ignore external DTD reference?">
<q>Why does the parser still try to locate the DTD even validation is turned off
and how to ignore external DTD reference?</q>
<a>
<p>When DTD is referenced, the parser will try to read it, because DTDs can
provide a lot more information than just validation. It defines entities and
notations, external unparsed entities, default attributes, character
entities, etc. Therefore the parser will always try to read it if present, even if
validation is turned off.
</p>
<p>To ignore external DTDs completely you can call
<code>setLoadExternalDTD(false)</code> (or
<code>setFeature(XMLUni::fgXercesLoadExternalDTD, false)</code>
to disable the loading of external DTD. The parser will then ignore
any external DTD completely if the validationScheme is set to Val_Never.
</p>
<p>Note: This flag is ignored if the validationScheme is set to Val_Always or Val_Auto.
</p>
</a>
</faq>
<faq title="Why does the XML data generated by the DOMLSSerializer does not match my original XML input?">
<q>Why does the XML data generated by the DOMLSSerializer does not match my original XML input?</q>
<a>
<p>If you parse an xml document using XercesDOMParser or DOMLSParser and pass such DOMNode
to DOMLSSerializer for serialization, you may not get something that is exactly the same
as the original XML data. The parser may have done normalization, end of line conversion,
or has expanded the entity reference as per the XML 1.0 specification, 4.4 XML Processor Treatment of
Entities and References. From DOMLSSerializer perspective, it does not know what the original
string was, all it sees is a processed DOMNode generated by the parser.
But since the DOMLSSerializer is supposed to generate something that is parsable if sent
back to the parser, it will not print the DOMNode node value as is. The DOMLSSerializer
may do some "touch up" to the output data for it to be parsable.</p>
<p>See <jump href="program-dom-&XercesC3Series;.html#DOMLSSerializerEntityRef">How does DOMLSSerializer handle built-in entity
Reference in node value?</jump> to understand further how DOMLSSerializer touches up the entity reference.
</p>
</a>
</faq>
<faq title="Why does my application crash when deleting the parser after releasing a document?">
<q>Why does my application crash when deleting the parser after releasing a document?</q>
<a>
<p>In most cases, the parser handles deleting documents when the parser gets deleted. However, if an application
needs to release a document, it shall adopt the document before releasing it, so that the parser
knows that the ownership of this particular document is transfered to the application and will not
try to delete it once the parser gets deleted.
</p>
<source>
XercesDOMParser *parser = new XercesDOMParser;
...
try
{
parser->parse(xml_file);
}
catch ()
{
...
}
DOMNode *doc = parser->getDocument();
...
parser->adoptDocument();
doc->release();
...
delete parser;
</source>
<p>The alternative to release document is to call parser's resetDocumentPool(), which releases
all the documents parsed.
</p>
</a>
</faq>
</faqs>

193
lib/xerces/doc/feedback.xml Normal file
Просмотреть файл

@ -0,0 +1,193 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Feedback Procedures">
<s2 title="Questions or Comments">
<p>Please browse through this bundled documentation completely. Most of
the common questions have been answered in the FAQs. Browsing this
documentation may be the quickest way to get an answer. Of course, if
all else fails, as mentioned in the link above, you can post a question
to one of the <jump href="mailing-lists.html">&XercesCName; mailing
lists</jump>.</p> <p>See <jump href="bug-report.html">Bug Reporting</jump>
if you would like to report a defect (which is greatly appreciated).</p>
</s2>
<s2 title="Acknowledgements">
<p>Ever since this source code base was initially created, many people
have helped to port the code to different platforms, and provided
patches for both new features and bug fixes.
</p>
<p>Listed below are some names (in alphabetical order) of people to whom
we would like to give special thanks. </p>
<ul>
<li>Nadav Aharoni</li>
<li>Curt Arnold</li>
<li>Edward Avis</li>
<li>Anupam Bagchi</li>
<li>Torbjörn Bäckström</li>
<li>Abe Backus</li>
<li>Frank Balluffi</li>
<li>Matthew Baker</li>
<li>Devin Barnhart</li>
<li>James Berry</li>
<li>David Bertoni</li>
<li>John Bellardo</li>
<li>Arundhati Bhowmick</li>
<li>Joanne Bogart</li>
<li>Michael Boos</li>
<li>Edward Bortner</li>
<li>Sean Bright</li>
<li>Phil Brown</li>
<li>Robert Buck</li>
<li>Scott Cantor</li>
<li>David Cargill</li>
<li>Chris Cates</li>
<li>Gilbert Chan</li>
<li>Sumit Chawla</li>
<li>Nick Chiang</li>
<li>Chih Hsiang Chou</li>
<li>Radovan Chytracek</li>
<li>Hiram Clawson</li>
<li>John Clayton</li>
<li>Todd Collins</li>
<li>Nathan Codding</li>
<li>Michael Crawford</li>
<li>Murray Cumming</li>
<li>Zeid Derhally</li>
<li>James Devries</li>
<li>Ailian Ding</li>
<li>Steve Dulin</li>
<li>David Earlam</li>
<li>Helmut Eiken</li>
<li>Mark Everline</li>
<li>Andrew Fang</li>
<li>Simon Fell</li>
<li>Paul Ferguson</li>
<li>Greg Franks</li>
<li>Pierpaolo Fumagalli</li>
<li>Syam Gadde</li>
<li>Guido Gagliardi</li>
<li>Gary Gale</li>
<li>Michael Glavassevich</li>
<li>Natalie Gorden</li>
<li>Max Gotlib</li>
<li>Petr Gotthard</li>
<li>Neil Graham</li>
<li>Matthew Hall</li>
<li>Jay Hansen</li>
<li>Susan Hardenbrook</li>
<li>Jeff Harrell</li>
<li>Andrew Hefford</li>
<li>Adam Heinz</li>
<li>Andy Heninger</li>
<li>John Hibbert</li>
<li>William L. Hopper</li>
<li>Michael Huedepohl</li>
<li>Anders Hybertz</li>
<li>Rahul Jain</li>
<li>Tom Jordahl</li>
<li>Christopher Just</li>
<li>Martin Kalen</li>
<li>Joe Kesselman</li>
<li>John Kim</li>
<li>Artur Klauser</li>
<li>Bob Kline</li>
<li>Richard Ko</li>
<li>Boris Kolpackov</li>
<li>Paul Kramer</li>
<li>Volker Krause</li>
<li>Berin Lautenbach</li>
<li>Arnaud LeHors</li>
<li>Roger Leigh</li>
<li>Andy Levine</li>
<li>Jeff Lewis</li>
<li>James Littlejohn</li>
<li>Ray Logel</li>
<li>Pedro Lopes</li>
<li>Matt Lovett</li>
<li>Sean MacRoibeaird</li>
<li>Alberto Massari</li>
<li>Don Mastrovito</li>
<li>David McCreedy</li>
<li>Charles McLouth</li>
<li>Shin'ya Morino</li>
<li>Urs Muff</li>
<li>Jordan Naftolin</li>
<li>Tinny Ng</li>
<li>David Nickerson</li>
<li>Anton Nikolaevsky</li>
<li>Khaled Noaman</li>
<li>Michael Ottati</li>
<li>Anthony O'Dowd</li>
<li>Mike Pawlowski</li>
<li>Kevin Philips</li>
<li>Mike Pogue</li>
<li>Joe Polastre</li>
<li>John Ponzo</li>
<li>Vitaly Prapirny</li>
<li>Shengkai Qu</li>
<li>Gareth Reakes</li>
<li>Jim Reitz</li>
<li>Caroline Rioux</li>
<li>Dean Roddey</li>
<li>John Roper</li>
<li>Dan Rosen</li>
<li>Steven Rosenthal</li>
<li>Erik Rydgren</li>
<li>Markus Scherer</li>
<li>Bill Schindler</li>
<li>Erik Schroeder</li>
<li>Christian Schuhegger</li>
<li>Tobias Schuette</li>
<li>John Smirl</li>
<li>Andrei Smirnov</li>
<li>John Snelson</li>
<li>Gereon Steffens</li>
<li>Jason Stewart</li>
<li>Rick J. Stevens</li>
<li>Roman Sulzhyk</li>
<li>Linda M. Swan</li>
<li>Vasily Tchekalkin</li>
<li>Pieter Van-Dyck</li>
<li>Curtis Walker</li>
<li>John Warrier</li>
<li>Tom Watson</li>
<li>Mark Weaver</li>
<li>Roger Webster</li>
<li>Robert Weir</li>
<li>Axel Weiss</li>
<li>Carolyn Weiss</li>
<li>Christian Will</li>
<li>Kari Whitcomb</li>
<li>Dietrich Wolf</li>
<li>Kirk Wylie</li>
<li>Peter A. Volchek</li>
<li>Grace Yan</li>
<li>Hiramatsu Yoshifumi</li>
<li>PeiYong Zhang</li>
<li>Henry Zongaro</li>
</ul>
</s2>
</s1>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,51 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
CVE-2015-0252: Apache Xerces-C XML Parser Crashes on Malformed Input
Severity: Important
Vendor: The Apache Software Foundation
Versions Affected: Apache Xerces-C XML Parser library versions
prior to V3.1.2
Description: The Xerces-C XML parser mishandles certain kinds of
malformed input documents, resulting in a segmentation fault during
a parse operation. The bug does not appear to allow for remote code
execution, but is a denial of service attack that in many applications
may allow for an unauthenticated attacker to supply malformed input
and cause a crash.
Mitigation: Applications that are using library versions older than
V3.1.2 should upgrade as soon as possible. Distributors of older versions
should apply the patches from this subversion revision:
http://svn.apache.org/viewvc?view=revision&revision=1667870
Credit: This issue was reported independently by Anton Rager and Jonathan
Brossard from the Salesforce.com Product Security Team and by Ben Laurie
of Google.
References:
http://xerces.apache.org/xerces-c/secadv/CVE-2015-0252.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCgAGBQJVCzmVAAoJEDeLhFQCJ3lipRoP/RLr+6EyyUBp7PxXi31pHYbv
z7E1GZLZ+349BydmI+28y6QXSjjQIeU1VXHaRdBCpfNqv2rIe7n+s/PvojprdHGZ
Ocxg7iPs+mQTxtkTJht1JqT1d4s96BN+DgPDRf7vUzMsu7u6mf9E+Ds2Yajddqgh
zxmsv5YFJlppeAOKDbyaWPfivJS7ubjDK7SQ8Il5N7XHSmVcdGMjGh0Zmbn0mlzk
iTp13aoEknYI3M+4OpIgtszOgbsMQnhRwOgAX+0jBHxrWkK4MBNlotY6oPtx6zWt
DjM/JRr9+V59BsQKrNmE/D0csoEf4OeBEgeqmNTjpy8EO+gOgVHWMowUUAVQkMqu
37njc8IyR/JXStdtzJpHsj4HO2PE9ZE1Uy69DCqCDEeGWl61qx4+sg7Ul783dAab
hCAvAO0zLiyPgkNdydmBQWGymHsle+niydNAi+EGj47rEJ7lDhJhl9qVQ0zyMXr4
O1//QwV7BUaRcgQhcbvd71KeDkPBBNvwpYLAXxIpDkI1/2qjo8ANHxzu/EMP8weK
N+KoIEugAab+t1s1qWpgneYXHLy3uE3KvVeNvb/iHsl5nzzFVBkPe+2OCZfWoedJ
t7gAXaZ2htrF2BQl6g/5hm13/6ajmrtNcX0hBjx2VB4VACOtt0bqextaW/w2Vvb4
AcsopfNHOGvXLDJ3JkHS
=l9vC
-----END PGP SIGNATURE-----

Просмотреть файл

@ -0,0 +1,48 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
CVE-2016-0729: Apache Xerces-C XML Parser Crashes on Malformed Input
Severity: Critical
Vendor: The Apache Software Foundation
Versions Affected: Apache Xerces-C XML Parser library versions
prior to V3.1.3
Description: The Xerces-C XML parser mishandles certain kinds of malformed
input documents, resulting in buffer overlows during processing and error
reporting. The overflows can manifest as a segmentation fault or as memory
corruption during a parse operation. The bugs allow for a denial of service
attack in many applications by an unauthenticated attacker, and could
conceivably result in remote code execution.
Mitigation: Applications that are using library versions older than
V3.1.3 should upgrade as soon as possible. Distributors of older versions
should apply the patches from this subversion revision:
http://svn.apache.org/viewvc?view=revision&revision=1727978
Credit: This issue was reported by Gustavo Grieco.
References:
http://xerces.apache.org/xerces-c/secadv/CVE-2016-0729.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWzlsyAAoJEDeLhFQCJ3liUAsP/Rr4rBKVPxOw3+5JDiQWT27y
/TT1kLFV+u6LtuBL3q6rwOIANquEMP1nJPVuYtceNF66xHi7eX6HZ8jZch6T+uvZ
Bt+kUTOfG4PW1RLm83W1kof58PTI5mIYBWofAQzXm9TSyvoHF5GXWqzNyGOKauYN
pto5xvJzEN5gM7DjbXF8OoIesNVaqCnr+9A2WmCCdNGNzSQLlUVDg9kDvXUdDvHD
+TXHDfgP8OSEYl5e3B3P5OV6SzUi2xdATR6zQgb1QANJy7FoK/FOP5+2J8ccultu
mXlVHpsGlPoIi85nyKVykK3hTT4DyhqSwCa9ek3D5i7lIEk2dXxeevh90is3y/Al
0GSUoG7yXbfe7xmlcUUghdYeYBP6JSOiOqAREUsKfY6nYo4XpGwvJRz/Xgk7iw9y
p39sCIKuJBpqe1Vgy8ONeTFc0WZkkriq23n2oZ4zxoOImF5k44f01olZhA/wmE1P
Wi6Qrafn6myUtp1TAXWoakfxJo0DgHfH6fazlmYSPHIyfLShrAcG6aETDn92KsDp
gy4a5ulP/qpkncJrF2+XeM1wgQSTpUln2664fSwRw5whqg/PW/qGx+/1sltwOSQe
l4bvQhr9xvkv+W++aPFgmJF3HW0Gnsglty6KQAcQ/RqheZ+/vL9buCqWw2xg4bkN
BQJ4QvN4uaHIUxhzVfiL
=vI5o
-----END PGP SIGNATURE-----

Просмотреть файл

@ -0,0 +1,58 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
CVE-2016-4463: Apache Xerces-C XML Parser Crashes on Malformed DTD
Severity: Important
Vendor: The Apache Software Foundation
Versions Affected: Apache Xerces-C XML Parser library versions
prior to V3.1.4
Description: The Xerces-C XML parser fails to successfully parse a
DTD that is deeply nested, and this causes a stack overflow, which
makes a denial of service attack against many applications possible
by an unauthenticated attacker.
Mitigation: Applications that are using library versions older than
V3.1.4 should upgrade as soon as possible. Distributors of older
versions should apply the patches from this subversion revision:
http://svn.apache.org/viewvc?view=revision&revision=1747619
Note that the nesting limit is currently implemented as a compile-time
constant in order to maintain ABI-compatibility.
In addition, a related enhancement was made to enable applications
to fully disable DTD processing through the use of an environment
variable. Distributors of older versions are urged to incorporate
this patch to enable applications to more fully protect themselves
from future issues if they do not require DTD support. This change
is ABI-compatible and can be found in this subversion revision:
http://svn.apache.org/viewvc?view=revision&revision=1747620
Credit: This issue was reported by Brandon Perry.
References:
http://xerces.apache.org/xerces-c/secadv/CVE-2016-4463.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXXqPQAAoJEDeLhFQCJ3liyRwQAI5aUjhKtZtw+51EgNizpuLa
dvfEP27anUXLKwLXt+WIfogW3TLQ4HwyiszanO4YTlwz3qbKO3TJQXdT4kTQx6/k
KhWr7+vsn7pBEPiiC7kj3lH7QHCd+T8/W+Xik/rKDFV1qAAKuoFgYJ31qED8I65z
371Tdm+p2QE4Nh9M7k7LUs+yWu5XdwJIS61L3R/MpEptynuo7Onbp+sjF6OQCZHc
u1KJ3zAlKzP4iwtxKjvoXqOnLgYwjtqC2p7nYBEXOEn4DA4Q/PMrfdYIebjUo/Wy
CeIN5TGJ2aunMkVK0RgxCqjr0sl2cYqY8iegUqp9Iz4+rMpy5ZDLNyyjgbXgSY73
8145xO2tscLs7bLXAXUGbLlOPxnDqVieGlYyHICFnl58I4ekfhwtMmd9d2WOlaVE
7NEPTorFiHI+wdK2yebCLAMaJbL9KJQiJa/4xw9qvpZ4DQ7aein9jq7fklQ62crc
Ff4h4icX4icM1/s1tvcEM1lZw8Td4UyXkwvoEmfZg7dVy4NW+XM/Kn4FUCPRnC9A
XVAabL3K290Mz77YLqUTk733w1q/lFCxgOCJF18/OJef2azMn74QgFbLcBD16i2O
FNxdtPsSRGNsfOGN08Uiwg9RN6uqoZ6Rxwq3hEcAiufYQHFiXldlS26koP2QMk03
gNuHTr22AcR0ZgoW9GYP
=eilz
-----END PGP SIGNATURE-----

209
lib/xerces/doc/install.xml Normal file
Просмотреть файл

@ -0,0 +1,209 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Installation">
<anchor name="Windows"/>
<s2 title="Windows">
<p>This section contains installation instructions for the Windows
platform.</p>
<s3 title="Source distribution">
<p>The &XercesCName; source is available in the source distribution:
&XercesC3SrcInstallDir;.zip.</p>
<p>Install the &XercesCName; source distribution by using <code>unzip</code>
on the &XercesC3SrcInstallDir;.zip archive in the Windows environment. You can
use WinZip, or any other UnZip utility:</p>
<source>
unzip &XercesC3SrcInstallDir;.zip
</source>
<p>This creates the &apos;&XercesC3SrcInstallDir;&apos; sub-directory
containing the &XercesCName; source distribution. </p>
<p>To build the &XercesCName; source after installation,
please follow the <jump href="build-&XercesC3Series;.html">Build Instructions</jump>.</p>
</s3>
<!--
<s3 title="Binary distribution">
<p>Install the &XercesCName; binary distribution by using <code>unzip</code>
on the &XercesC3InstallDir;-{arch}-windows-{compiler}.zip archive in
the Windows environment. Here {arch} denotes the CPU architecture
and {compiler} denotes the C++ compiler of your choice. You can use
WinZip, or any other UnZip utility. For example:</p>
<source>
unzip &XercesC3InstallDir;-x86-windows-vc-8.0.zip
</source>
<p>This creates a &apos;&XercesC3InstallDir;-x86-windows-vc-8.0&apos;
sub-directory containing the &XercesCName; binary distribution.</p>
<p>You need to add the &apos;&XercesC3InstallDir;-{arch}-windows-{compiler}\bin&apos;
directory to your path.
To do this go to the start menu, click the settings menu and
select control panel. When the control panel opens, double
click on System and select the &apos;Environment&apos; tab.
Locate the PATH variable under system variables and add
&lt;full-path-to-&XercesC3InstallDir;-{arch}-windows-{compiler}>\bin
to the PATH variable.</p>
<p>Additionally, if you don't have the corresponding version of
Microsoft Visual C++ installed, you may need to download and
install the C/C++ runtime libraries from the Microsoft website.
For example, for Visual Studio 2008 (9.0) the package is called
"Microsoft Visual C++ 2008 Redistributable Package".</p>
<p>The binary distribution contains the pre-built parser libraries
and sample executables. Please refer to the
<jump href="samples-&XercesC3Series;.html">Samples</jump> for how to run the
samples.</p>
</s3>
-->
</s2>
<anchor name="Unix"/>
<s2 title="UNIX">
<p>This section contains installation instructions for the UNIX,
Linux, and Mac OS X platforms.</p>
<s3 title="Source distribution">
<p>The &XercesCName; source is available in the source distribution:
&XercesC3SrcInstallDir;.tar.gz (other formats also available).</p>
<p>Install the &XercesCName; source distribution
&XercesC3SrcInstallDir;.tar.gz by extracting the files
from the compressed archive:</p>
<source>
gzip -d &XercesC3SrcInstallDir;.tar.gz
tar -xf &XercesC3SrcInstallDir;.tar
</source>
<p>This creates the &apos;&XercesC3SrcInstallDir;&apos; sub-directory
containing the &XercesCName; source distribution. </p>
<p>To build the &XercesCName; source after installation,
please follow the <jump href="build-&XercesC3Series;.html">Build Instructions</jump>.</p>
</s3>
<!--
<s3 title="Binary distribution">
<p>Install the binary distribution &XercesC3InstallDir;-{arch}-{os}-{compiler}.tar.gz
by extracting the files from the compressed archive. Here {arch}
denotes the CPU architecture, {os} denotes the operating system,
and {compiler} denotes the C++ compiler of your choice.
For example:</p>
<source>
gzip -d &XercesC3InstallDir;-x86-linux-gcc-3.4.tar.gz
tar -xf &XercesC3InstallDir;-x86-linux-gcc-3.4.tar
</source>
<p>This will create an '&XercesC3InstallDir;-x86-linux-gcc-3.4'
sub-directory containing the &XercesCName; binary distribution.</p>
<p>You will need to add the
&XercesC3InstallDir;-{arch}-{os}-{compiler}/bin directory to your
PATH environment variable:</p>
<p>For Bourne Shell, K Shell or Bash, type: </p>
<source>
export PATH="$PATH:&lt;full-path-to-&XercesC3InstallDir;-{arch}-{os}-{compiler}>/bin"
</source>
<p>For C Shell, type:</p>
<source>
setenv PATH "$PATH:&lt;full-path-to-&XercesC3InstallDir;-{arch}-{os}-{compiler}>/bin"
</source>
<p>If you wish to make this setting permanent, you need to change
your profile by changing your setup files which can be either
.profile or .kshrc.</p>
<p>In addition, you will also need to set the library search path.
(LIBPATH on AIX, LD_LIBRARY_PATH on Solaris and Linux,
SHLIB_PATH on HP-UX, and DYLD_LIBRARY_PATH on Mac OS X).</p>
<p>In the following shell commands, the &lt;xerces-path>
denotes the full path to the
&XercesC3InstallDir;-{arch}-{os}-{compiler} directory. For
Bourne Shell, K Shell or Bash, type:</p>
<source>
export LIBPATH=&lt;xerces-path>/lib:$LIBPATH (AIX)
export LD_LIBRARY_PATH=&lt;xerces-path>/lib:$LD_LIBRARY_PATH (Solaris, Linux)
export SHLIB_PATH=&lt;xerces-path>/lib:$SHLIB_PATH (HP-UX)
export DYLD_LIBRARY_PATH=&lt;xerces-path>/lib:$DYLD_LIBRARY_PATH (Mac OS X)
</source>
<p>For C Shell, type:</p>
<source>
setenv LIBPATH "&lt;xerces-path>/lib:$LIBPATH" (AIX)
setenv LD_LIBRARY_PATH "&lt;xerces-path>/lib:$LD_LIBRARY_PATH" (Solaris, Linux)
setenv SHLIB_PATH "&lt;xerces-path>/lib:$SHLIB_PATH" (HP-UX)
setenv DYLD_LIBRARY_PATH "&lt;xerces-path>/lib:$DYLD_LIBRARY_PATH" (Mac OS X)
</source>
<p>The binary distribution contains the pre-built parser libraries
and sample executables. Please refer to the
<jump href="samples-&XercesC3Series;.html">Samples</jump> for how to run the
samples.</p>
</s3>
-->
</s2>
<anchor name="Cygwin"/>
<s2 title="Cygwin">
<p>This section contains installation instructions for the Cygwin
platform.</p>
<s3 title="Source distribution">
<p>The &XercesCName; source is available in the source distribution:
&XercesC3SrcInstallDir;.tar.gz (other formats available).</p>
<p>Install the &XercesCName; source distribution
&XercesC3SrcInstallDir;.tar.gz by extracting the files
from the compressed archive:</p>
<source>
tar -xfz &XercesC3SrcInstallDir;.tar.gz
</source>
<p>This creates the &apos;&XercesC3SrcInstallDir;&apos; sub-directory
containing the &XercesCName; source distribution. </p>
<p>To build the &XercesCName; source after installation,
please follow the <jump href="build-&XercesC3Series;.html">Build Instructions</jump>.
</p>
</s3>
<s3 title="Binary distribution">
<p>Precompiled Xerces-C++ libraries for Cygwin may be provided as
part of the Cygwin package repository. To install the binary
distribution run Cygwin setup.exe.
When you reach the Packages step of the Cygwin Setup wizard,
expand the Devel category, then click in the New column next
to "xerces-c-devel" until it reads "&XercesC3Version;-X".</p>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Mailing Lists">
<s2 title="Overview">
<p>The &XercesCName; project hosts two mailing lists:
<jump href="mailto&colon;&XercesCUserEmailAddress;">&XercesCUserEmailAddress;</jump>
for general usage questions and
<jump href="mailto&colon;&XercesCDevelEmailAddress;">&XercesCDevelEmailAddress;</jump>
for the development-related discussions. Note that both lists accept
posts from subscribers only so you need to subscribe before sending
your questions (see below). Previous message archives and NNTP news
gateways are available for both mailing lists. For more information
on Apache-hosted mailing lists see <jump href="http://xml.apache.org/mail.html">
Mailing Lists and Usage Notes</jump>.</p>
<s3 title="User mailing list">
<p>To subscribe send an email to <jump href="mailto&colon;&XercesCUserSAddress;">&XercesCUserSAddress;</jump></p>
<p>To unsubscribe send an email to <jump href="mailto&colon;&XercesCUserUAddress;">&XercesCUserUAddress;</jump></p>
<p>For help send an email to <jump href="mailto&colon;&XercesCUserHAddress;">&XercesCUserHAddress;</jump></p>
<p>To post to the mailing list send an email to <jump href="mailto&colon;&XercesCUserEmailAddress;">&XercesCUserEmailAddress;</jump></p>
<p>NNTP news gateway: <jump href="nntp://news.gmane.org/gmane.text.xml.xerces-c.user">gmane.text.xml.xerces-c.user</jump></p>
<p>Mailing list archives:
<jump href="http://marc.info/?l=xerces-c-users">MARC</jump>,
<jump href="http://news.gmane.org/gmane.text.xml.xerces-c.user">Gmane</jump>,
<jump href="http://mail-archives.apache.org/mod_mbox/xerces-c-users/">Apache</jump></p>
</s3>
<s3 title="Developer mailing list">
<p>To subscribe send an email to <jump href="mailto&colon;&XercesCDevelSAddress;">&XercesCDevelSAddress;</jump></p>
<p>To unsubscribe send an email to <jump href="mailto&colon;&XercesCDevelUAddress;">&XercesCDevelUAddress;</jump></p>
<p>For help send an email to <jump href="mailto&colon;&XercesCDevelHAddress;">&XercesCDevelHAddress;</jump></p>
<p>To post to the mailing list send an email to <jump href="mailto&colon;&XercesCDevelEmailAddress;">&XercesCDevelEmailAddress;</jump></p>
<p>NNTP news gateway: <jump href="nntp://news.gmane.org/gmane.text.xml.xerces-c.devel">gmane.text.xml.xerces-c.devel</jump></p>
<p>Mailing list archives:
<jump href="http://marc.info/?l=xerces-c-dev">MARC</jump>,
<jump href="http://news.gmane.org/gmane.text.xml.xerces-c.devel">Gmane</jump>,
<jump href="http://mail-archives.apache.org/mod_mbox/xerces-c-dev/">Apache</jump></p>
</s3>
</s2>
</s1>

112
lib/xerces/doc/memparse.xml Normal file
Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: MemParse">
<s2 title="MemParse">
<p>MemParse uses the SAX Parser to parse a memory buffer containing
XML statements, and reports the number of elements and attributes found.</p>
<s3 title="Running MemParse">
<p>This program uses the SAX Parser to parse a memory buffer
containing XML statements, and reports the number of elements and attributes
found. </p>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
MemParse [options]
This program uses the SAX Parser to parse a memory buffer
containing XML statements, and reports the number of
elements and attributes found.
Options:
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Defaults to off.
-s Enable schema processing. Defaults to off.
-f Enable full schema constraint checking. Defaults to off.
-? Show this help.
* = Default if not provided explicitly.
</source>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from MemParse</p>
<source>MemParse -v=always</source>
<p>The output is the following:</p>
<source>Finished parsing the memory buffer containing the following XML statements:
&lt;?xml version='1.0' encoding='ascii'?&gt;
&lt;!DOCTYPE company [
&lt;!ELEMENT company (product,category,developedAt)&gt;
&lt;!ELEMENT product (#PCDATA)&gt;
&lt;!ELEMENT category (#PCDATA)&gt;
&lt;!ATTLIST category idea CDATA #IMPLIED&gt;
&lt;!ELEMENT developedAt (#PCDATA)&gt;
]&gt;
&lt;company&gt;
&lt;product&gt;XML4C&lt;/product&gt;
&lt;category idea='great'&gt;XML Parsing Tools&lt;/category&gt;
&lt;developedAt&gt;
IBM Center for Java Technology, Silicon Valley, Cupertino, CA
&lt;/developedAt&gt;
&lt;/company&gt;
Parsing took 10 ms (4 elements, 1 attributes, 16 spaces, 95 characters).</source>
<p>Running MemParse with the validating parser gives a different result because
ignorable white-space is counted separately from regular characters.</p>
<source>
MemParse -v=never</source>
<p>The output is the following:</p>
<source>Finished parsing the memory buffer containing the following XML statements:
&lt;?xml version='1.0' encoding='ascii'?&gt;
&lt;!DOCTYPE company [
&lt;!ELEMENT company (product,category,developedAt)&gt;
&lt;!ELEMENT product (#PCDATA)&gt;
&lt;!ELEMENT category (#PCDATA)&gt;
&lt;!ATTLIST category idea CDATA #IMPLIED&gt;
&lt;!ELEMENT developedAt (#PCDATA)&gt;
]&gt;
&lt;company&gt;
&lt;product&gt;XML4C&lt;/product&gt;
&lt;category idea='great'&gt;XML Parsing Tools&lt;/category&gt;
&lt;developedAt&gt;
IBM Center for Java Technology, Silicon Valley, Cupertino, CA
&lt;/developedAt&gt;
&lt;/company&gt;
Parsing took 10 ms (4 elements, 1 attributes, 0 spaces, 111 characters).</source>
<p>Note that the sum of spaces and characters in both versions is the same.</p>
<note>The time reported by the system may be different, depending on your
processor speed.</note>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,37 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Migration">
<s2 title="Migration Archive">
<p>For migration information on earlier versions of &XercesCName;
please refer to <link idref="migrate-archive-&XercesC3Series;">Migration Archive</link>.</p>
</s2>
<s2 title="Migrating from &XercesCName; 3.X to &XercesCName; &XercesC3Version;">
<p>&XercesCName; &XercesC3Version; is an API-compatible, but not ABI-compatible, update to the 3.x branch. Code designed for use with Xerces 3 should continue to compile, but existing applications MUST be recompiled to work with this version.</p>
<p>Most of the changes are purely bug fixes, but there is a new build system based on CMake that provides support for Windows compilers. Both CMake and autoconf-based builds work on non-Windows platforms.</p>
<p>There is also support for the standard DOM disallow-doctype property, which provides substantial security benefits to applications that don't require DTD support.</p>
</s2>
</s1>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

76
lib/xerces/doc/pparse.xml Normal file
Просмотреть файл

@ -0,0 +1,76 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: PParse">
<s2 title="PParse">
<p>PParse demonstrates progressive parsing.</p>
<p>In this example, the application doesn't have to depend upon throwing
an exception to terminate the parsing operation. Calling parseFirst() will
cause the DTD to be parsed (both internal and external subsets) and any
pre-content, i.e. everything up to but not including the root element.
Subsequent calls to parseNext() will cause one more piece of markup to
be parsed, and propagated from the core scanning code to the parser. You
can quit the parse any time by just not calling parseNext() anymore
and breaking out of the loop. When you call parseNext() and the end
of the root element is the next piece of markup, the parser will
continue on to the end of the file and return false, to let you
know that the parse is done.</p>
<s3 title="Running PParse">
<p>PParse parses an XML file and prints out the number of
elements in the file.</p>
<source>Usage:
PParse [options] &lt;XML file&gt;
This program demonstrates the progressive parse capabilities of
the parser system. It allows you to do a scanFirst() call followed by
a loop which calls scanNext(). You can drop out when you've found what
ever it is you want. In our little test, our event handler looks for
16 new elements then sets a flag to indicate its found what it wants.
At that point, our progressive parse loop exits.
Options:
-v=xxx - Validation scheme [always | never | auto*].
-n - Enable namespace processing [default is off].
-s - Enable schema processing [default is off].
-f - Enable full schema constraint checking [default is off].
-? - Show this help.
* = Default if not provided explicitly.
</source>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from PParse</p>
<source>cd &XercesC3InstallDir;/samples/data
PParse -v=always personal.xml
personal.xml: 60 ms (37 elems, 12 attrs, 134 spaces, 134 chars)</source>
<p>Running PParse with the validating parser gives a different result because
ignorable white-space is counted separately from regular characters.</p>
<source>PParse -v=never personal.xml
personal.xml: 10 ms (37 elems, 12 attrs, 0 spaces, 268 chars)</source>
<p>Note that the sum of spaces and characters in both versions is the same.</p>
<note>The time reported by the program may be different depending on your
processor speed.</note>
</s3>
</s2>
</s1>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,721 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Programming Guide">
<anchor name="Macro"/>
<s2 title="Version Macro">
<p>&XercesCName; defines a numeric preprocessor macro, _XERCES_VERSION, for users to
introduce into their code to perform conditional compilation where the
version of &XercesCName; is detected in order to enable or disable version
specific capabilities. For example,
</p>
<source>
#if _XERCES_VERSION >= 30102
// Code specific to Xerces-C++ version 3.1.2 and later.
#else
// Old code.
#endif
</source>
<p>The minor and revision (patch level) numbers have two digits of resolution
which means that '1' becomes '01' and '2' becomes '02' in this example.
</p>
<p>There are also other string macros or constants to represent the Xerces-C++ version.
Please refer to the <code>xercesc/util/XercesVersion.hpp</code> header for details.
</p>
</s2>
<anchor name="Schema"/>
<s2 title="Schema Support">
<p>&XercesCName; contains an implementation of the W3C XML Schema
Language. See the <jump href="schema-&XercesC3Series;.html">XML Schema Support</jump> page for details.
</p>
</s2>
<anchor name="Progressive"/>
<s2 title="Progressive Parsing">
<p>In addition to using the <code>parse()</code> method to parse an XML File.
You can use the other two parsing methods, <code>parseFirst()</code> and <code>parseNext()</code>
to do the so called progressive parsing. This way you don't
have to depend on throwing an exception to terminate the
parsing operation.
</p>
<p>
Calling <code>parseFirst()</code> will cause the DTD (both internal and
external subsets), and any pre-content, i.e. everything up to
but not including the root element, to be parsed. Subsequent calls to
<code>parseNext()</code> will cause one more pieces of markup to be parsed,
and propagated from the core scanning code to the parser (and
hence either on to you if using SAX/SAX2 or into the DOM tree if
using DOM).
</p>
<p>
You can quit the parse any time by just not
calling <code>parseNext()</code> anymore and breaking out of the loop. When
you call <code>parseNext()</code> and the end of the root element is the
next piece of markup, the parser will continue on to the end
of the file and return false, to let you know that the parse
is done. So a typical progressive parse loop will look like
this:</p>
<source>// Create a progressive scan token
XMLPScanToken token;
if (!parser.parseFirst(xmlFile, token))
{
cerr &lt;&lt; "scanFirst() failed\n" &lt;&lt; endl;
return 1;
}
//
// We started ok, so lets call scanNext()
// until we find what we want or hit the end.
//
bool gotMore = true;
while (gotMore &amp;&amp; !handler.getDone())
gotMore = parser.parseNext(token);</source>
<p>In this case, our event handler object (named 'handler')
is watching for some criteria and will
return a status from its <code>getDone()</code> method. Since
the handler
sees the SAX events coming out of the SAXParser, it can tell
when it finds what it wants. So we loop until we get no more
data or our handler indicates that it saw what it wanted to
see.</p>
<p>When doing non-progressive parses, the parser can easily
know when the parse is complete and insure that any used
resources are cleaned up. Even in the case of a fatal parsing
error, it can clean up all per-parse resources. However, when
progressive parsing is done, the client code doing the parse
loop might choose to stop the parse before the end of the
primary file is reached. In such cases, the parser will not
know that the parse has ended, so any resources will not be
reclaimed until the parser is destroyed or another parse is started.</p>
<p>This might not seem like such a bad thing; however, in this case,
the files and sockets which were opened in order to parse the
referenced XML entities will remain open. This could cause
serious problems. Therefore, you should destroy the parser instance
in such cases, or restart another parse immediately. In a future
release, a reset method will be provided to do this more cleanly.</p>
<p>Also note that you must create a scan token and pass it
back in on each call. This insures that things don't get done
out of sequence. When you call <code>parseFirst()</code> or
<code>parse()</code>, any
previous scan tokens are invalidated and will cause an error
if used again. This prevents incorrect mixed use of the two
different parsing schemes or incorrect calls to
<code>parseNext()</code>.</p>
</s2>
<anchor name="GrammarCache"/>
<s2 title="Pre-parsing Grammar and Grammar Caching">
<p>&XercesCName; provides a function to pre-parse the grammar so that users
can check for any syntax error before using the grammar. Users can also optionally
cache these pre-parsed grammars for later use during actual parsing.
</p>
<p>Here is an example:</p>
<source>
XercesDOMParser parser;
// Enable schema processing.
parser.setDoSchema(true);
parser.setDONamespaces(true);
// Let's preparse the schema grammar (.xsd) and cache it.
Grammar* grammar = parser.loadGrammar(xmlFile, Grammar::SchemaGrammarType, true);
</source>
<p>Besides caching pre-parsed schema grammars, users can also cache any
grammars encountered during an xml document parse.
</p>
<p>Here is an example:</p>
<source>
SAXParser parser;
// Enable grammar caching by setting cacheGrammarFromParse to true.
// The parser will cache any encountered grammars if it does not
// exist in the pool.
// If the grammar is DTD, no internal subset is allowed.
parser.cacheGrammarFromParse(true);
// Let's parse our xml file (DTD grammar)
parser.parse(xmlFile);
// We can get the grammar where the root element was declared
// by calling the parser's method getRootGrammar;
// Note: The parser owns the grammar, and the user should not delete it.
Grammar* grammar = parser.getRootGrammar();
</source>
<p>We can use any previously cached grammars when parsing new xml
documents. Here are some examples on how to use those cached grammars:
</p>
<source>
/**
* Caching and reusing XML Schema (.xsd) grammar
* Parse an XML document and cache its grammar set. Then, use the cached
* grammar set in subsequent parses.
*/
XercesDOMParser parser;
// Enable schema processing
parser.setDoSchema(true);
parser.setDoNamespaces(true);
// Enable grammar caching
parser.cacheGrammarFromParse(true);
// Let's parse the XML document. The parser will cache any grammars encountered.
parser.parse(xmlFile);
// No need to enable re-use by setting useCachedGrammarInParse to true. It is
// automatically enabled with grammar caching.
for (int i=0; i&lt; 3; i++)
parser.parse(xmlFile);
// This will flush the grammar pool
parser.resetCachedGrammarPool();
</source>
<source>
/**
* Caching and reusing DTD grammar
* Preparse a grammar and cache it in the pool. Then, we use the cached grammar
* when parsing XML documents.
*/
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
// Load grammar and cache it
parser->loadGrammar(dtdFile, Grammar::DTDGrammarType, true);
// enable grammar reuse
parser->setFeature(XMLUni::fgXercesUseCachedGrammarInParse, true);
// Parse xml files
parser->parse(xmlFile1);
parser->parse(xmlFile2);
</source>
<p>There are some limitations about caching and using cached grammars:</p>
<ul>
<li>When caching/reusing DTD grammars, no internal subset is allowed.</li>
<li>When preparsing grammars with caching option enabled, if a grammar, in the
result set, already exists in the pool (same namespace for schema or same system
id for DTD), the entire set will not be cached. This behavior is the default but can
be overridden for XML Schema caching. See the SAX/SAX2/DOM parser features for details.</li>
<li>When parsing an XML document with the grammar caching option enabled, the
reuse option is also automatically enabled. We will only parse a grammar if it
does not exist in the pool.</li>
</ul>
</s2>
<anchor name="LoadableMessageText"/>
<s2 title="Loadable Message Text">
<p>The &XercesCName; supports loadable message text. Although
the current distribution only supports English, it is capable of
supporting other
languages. Anyone interested in contributing any translations
should contact us. This would be an extremely useful
service.</p>
<p>In order to support the local message loading services, all the error messages
are captured in an XML file in the src/xercesc/NLS/ directory.
There is a simple program, in the tools/NLS/Xlat/ directory,
which can translate that text in various formats. It currently
supports a simple 'in memory' format (i.e. an array of
strings), the Win32 resource format, and the message catalog
format. The 'in memory' format is intended for very simple
installations or for use when porting to a new platform (since
you can use it until you can get your own local message
loading support done.)</p>
<p>In the src/xercesc/util/ directory, there is an XMLMsgLoader
class. This is an abstraction from which any number of
message loading services can be derived. Your platform driver
file can create whichever type of message loader it wants to
use on that platform. &XercesCName; currently has versions for the in
memory format, the Win32 resource format, the message
catalog format, and ICU message loader.
Some of the platforms can support multiple message
loaders, in which case a #define token is used to control
which one is used. You can set this in your build projects to
control the message loader type used.</p>
</s2>
<anchor name="PluggableTranscoders"/>
<s2 title="Pluggable Transcoders">
<p>&XercesCName; also supports pluggable transcoding services. The
XMLTransService class is an abstract API that can be derived
from, to support any desired transcoding
service. XMLTranscoder is the abstract API for a particular
instance of a transcoder for a particular encoding. The
platform driver file decides what specific type of transcoder
to use, which allows each platform to use its native
transcoding services, or the ICU service if desired.</p>
<p>Implementations are provided for Win32 native services, ICU
services, and the <ref>iconv</ref> services available on many
Unix platforms. The Win32 version only provides native code
page services, so it can only handle XML code in the intrinsic
encodings ASCII, UTF-8, UTF-16 (Big/Small Endian), UCS4
(Big/Small Endian), EBCDIC code pages IBM037, IBM1047 and
IBM1140 encodings, ISO-8859-1 (aka Latin1) and Windows-1252. The ICU version
provides all of the encodings that ICU supports. The
<ref>iconv</ref> version will support the encodings supported
by the local system. You can use transcoders we provide or
create your own if you feel ours are insufficient in some way,
or if your platform requires an implementation that &XercesCName; does not
provide.</p>
</s2>
<anchor name="PortingGuidelines"/>
<s2 title="Porting Guidelines">
<p>All platform dependent code in &XercesCName; has been
isolated to a couple of files, which should ease the porting
effort. The <code>src/xercesc/util</code> directory
contains all such files. In particular:</p>
<ul>
<li>The <code>src/xercesc/util/FileManagers</code> directory
contains implementations of file managers for various
platforms.</li>
<li>The <code>src/xercesc/util/MutexManagers</code> directory
contains implementations of mutex managers for various
platforms.</li>
<li>The <code>src/xercesc/util/Xerces_autoconf_const*</code> files
provide base definitions for various platforms.</li>
</ul>
<p>Other concerns are:</p>
<ul>
<li>Does ICU compile on your platform? If not, then you'll need to
create a transcoder implementation that uses your local transcoding
services. The iconv transcoder should work for you, though perhaps
with some modifications.</li>
<li>What message loader will you use? To get started, you can use the
"in memory" one, which is very simple and easy. Then, once you get
going, you may want to adapt the message catalog message loader, or
write one of your own that uses local services.</li>
<li>What should I define XMLCh to be? Please refer to <jump
href="build-misc-&XercesC3Series;.html#XMLChInfo">What should I define XMLCh to be?</jump> for
further details.</li>
</ul>
<p>Finally, you need to decide about how to define XMLCh. Generally,
XMLCh should be defined to be a type suitable for holding a
utf-16 encoded (16 bit) value, usually an <code>unsigned short</code>. </p>
<p>All XML data is handled within &XercesCName; as strings of
XMLCh characters. Regardless of the size of the
type chosen, the data stored in variables of type XMLCh
will always be utf-16 encoded values. </p>
<p>Unlike XMLCh, the encoding
of wchar_t is platform dependent. Sometimes it is utf-16
(AIX, Windows), sometimes ucs-4 (Solaris,
Linux), sometimes it is not based on Unicode at all
(HP/UX, AS/400, system 390). </p>
<p>Some earlier releases of &XercesCName; defined XMLCh to be the
same type as wchar_t on most platforms, with the goal of making
it possible to pass XMLCh strings to library or system functions
that were expecting wchar_t parameters. This approach has
been abandoned because of</p>
<ul>
<li>
Portability problems with any code that assumes that
the types of XMLCh and wchar_t are compatible
</li>
<li>Excessive memory usage, especially in the DOM, on
platforms with 32 bit wchar_t.
</li>
<li>utf-16 encoded XMLCh is not always compatible with
ucs-4 encoded wchar_t on Solaris and Linux. The
problem occurs with Unicode characters with values
greater than 64k; in ucs-4 the value is stored as
a single 32 bit quantity. With utf-16, the value
will be stored as a "surrogate pair" of two 16 bit
values. Even with XMLCh equated to wchar_t, xerces will
still create the utf-16 encoded surrogate pairs, which
are illegal in ucs-4 encoded wchar_t strings.
</li>
</ul>
</s2>
<anchor name="CPPNamespace"/>
<s2 title="Using C++ Namespace">
<p>&XercesCName; makes use of C++ namespace 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
variables using the <code>xercesc</code> name. Alternatively,
applications can use <code>using xercesc::&lt;Name>;</code>
declarations
to make individual &XercesCName; names visible in the
current scope
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>
<anchor name="SpecifyLocaleForMessageLoader"/>
<s2 title="Specify Locale for Message Loader">
<p>&XercesCName; provides mechanisms for Native Language Support (NLS).
Even though
the current distribution has only English message file, it is capable
of supporting other languages once the translated version of the
target language is available.</p>
<p>An application can specify the locale for the message loader in their
very first invocation to XMLPlatformUtils::Initialize() by supplying
a parameter for the target locale intended. The default locale is "en_US".
</p>
<source>
// Initialize the parser system
try
{
XMLPlatformUtils::Initialize("fr_FR");
}
catch ()
{
}
</source>
</s2>
<anchor name="SpecifyLocationForMessageLoader"/>
<s2 title="Specify Location for Message Loader">
<p>&XercesCName; searches for message files at the location
specified in the <code>XERCESC_NLS_HOME</code> environment
variable and, if that is not set, at the default
message directory, <code>$XERCESCROOT/msg</code>.
</p>
<p>Application can specify an alternative location for the message files in their
very first invocation to XMLPlatformUtils::Initialize() by supplying
a parameter for the alternative location.
</p>
<source>
// Initialize the parser system
try
{
XMLPlatformUtils::Initialize("en_US", "/usr/nls");
}
catch ()
{
}
</source>
</s2>
<anchor name="PluggablePanicHandler"/>
<s2 title="Pluggable Panic Handler">
<p>&XercesCName; reports panic conditions encountered to the panic
handler installed. The panic handler can take whatever action
appropriate to handle the panic condition.
</p>
<p>&XercesCName; allows application to provide a customized panic handler
(class implementing the interface PanicHandler), in its very first invocation of
XMLPlatformUtils::Initialize().
</p>
<p>In the absence of an application-specific panic handler, &XercesCName; default
panic handler is installed and used, which aborts program whenever a panic
condition is encountered.
</p>
<source>
// Initialize the parser system
try
{
PanicHandler* ph = new MyPanicHandler();
XMLPlatformUtils::Initialize("en_US",
"/usr/nls",
ph);
}
catch ()
{
}
</source>
</s2>
<anchor name="PluggableMemoryManager"/>
<s2 title="Pluggable Memory Manager">
<p>Certain applications wish to maintain precise control over
memory allocation. This enables them to recover more easily
from crashes of individual components, as well as to allocate
memory more efficiently than a general-purpose OS-level
procedure with no knowledge of the characteristics of the
program making the requests for memory. In &XercesCName; this
is supported via the Pluggable Memory Handler.
</p>
<p>Users who wish to implement their own MemoryManager,
an interface found in <code>xercesc/framework/MemoryManager.hpp</code>,
need to implement only two methods:</p>
<source>
// This method allocates requested memory.
// the parameter is the requested memory size
// A pointer to the allocated memory is returned.
virtual void* allocate(XMLSize_t size) = 0;
// This method deallocates memory
// The parameter is a pointer to the allocated memory to be deleted
virtual void deallocate(void* p) = 0;
</source>
<p>To maximize the amount of flexibility that applications
have in terms of controlling memory allocation, a
MemoryManager instance may be set as part of the call to
XMLPlatformUtils::Initialize() to allow for static
initialization to be done with the given MemoryHandler; a
(possibly different) MemoryManager may be passed in to the
constructors of all Xerces parser objects as well, and all
dynamic allocations within the parsers will make use of this
object. Assuming that MyMemoryHandler is a class that
implements the MemoryManager interface, here is a bit of
pseudocode which illustrates these ideas:
</p>
<source>
MyMemoryHandler *mm_for_statics = new MyMemoryHandler();
MyMemoryHandler *mm_for_particular_parser = new MyMemoryManager();
// initialize the parser information; try/catch
// removed for brevity
XMLPlatformUtils::Initialize(XMLUni::fgXercescDefaultLocale, 0,0,
mm_for_statics);
// create a parser object
XercesDOMParser *parser = new
XercesDomParser(mm_for_particular_parser);
// ...
delete parser;
XMLPlatformUtils::Terminate();
</source>
<p>
If a user provides a MemoryManager object to the parser, then
the user owns that object. It is also important to note that
&XercesCName; default implementation simply uses the global
new and delete operators.
</p>
</s2>
<anchor name="SecurityManager"/>
<s2 title="Managing Security Vulnerabilities">
<p>
The purpose of the SecurityManager class is to permit applications a
means to have the parser reject documents whose processing would
otherwise consume large amounts of system resources. Malicious
use of such documents could be used to launch a denial-of-service
attack against a system running the parser. Initially, the
SecurityManager only knows about attacks that can result from
exponential entity expansion; this is the only known attack that
involves processing a single XML document. Other, similar attacks
can be launched if arbitrary schemas may be parsed; there already
exist means (via use of the EntityResolver interface) by which
applications can deny processing of untrusted schemas. In future,
the SecurityManager will be expanded to take these other exploits
into account.
</p>
<p>
The SecurityManager class is very simple: It will contain
getters and setters corresponding to each known variety of
exploit. These will reflect limits that the application may
impose on the parser with respect to the processing of various
XML constructs. When an instance of SecurityManager is
instantiated, default values for these limits will be provided
that should suit most applications.
</p>
<p>
By default, &XercesCName; is a wholly conformant XML parser; that
is, no security-related considerations will be observed by
default. An application must provide an instance of the
SecurityManager class to a parser in order to make that
parser behave in a security-conscious manner. For example:
</p>
<source>
SAXParser *myParser = new SAXParser();
SecurityManager *myManager = new SecurityManager();
myManager->setEntityExpansionLimit(100000); // larger than default
myParser->setSecurityManager(myManager);
// ... use the parser
</source>
<p>
Note that SecurityManager instances may be set on all kinds of
&XercesCName; parsers; please see the documentation for the
individual parsers for details.
</p>
<p>
Note also that the application always owns the SecurityManager
instance. The default SecurityManager that &XercesCName; provides
is not thread-safe; although it only uses primitive operations at
the moment, users may need to extend the class with a
thread-safe implementation on some platforms.
</p>
</s2>
<anchor name="UseSpecificScanner"/>
<s2 title="Use Specific Scanner">
<p>For performance and modularity &XercesCName; provides a mechanism
for specifying the scanner to be used when scanning an XML document.
Such mechanism will enable the creation of special purpose scanners
that can be easily plugged in.</p>
<p>&XercesCName; supports the following scanners:</p>
<s3 title="WFXMLScanner">
<p>
The WFXMLScanner is a non-validating scanner which performs well-formedness check only.
It does not do any DTD/XMLSchema processing. If the XML document contains a DOCTYPE, it
will be silently ignored (i.e. no warning message is issued). Similarly, any schema
specific attributes (e.g. schemaLocation), will be treated as normal element attributes.
Setting grammar specific features/properties will have no effect on its behavior
(e.g. setLoadExternalDTD(true) is ignored).
</p>
<source>
// Create a DOM parser
XercesDOMParser parser;
// Specify scanner name
parser.useScanner(XMLUni::fgWFXMLScanner);
// Specify other parser features, e.g.
parser.setDoNamespaces(true);
</source>
</s3>
<s3 title="DGXMLScanner">
<p>
The DGXMLScanner handles XML documents with DOCTYPE information. It does not do any
XMLSchema processing, which means that any schema specific attributes (e.g. schemaLocation),
will be treated as normal element attributes. Setting schema grammar specific features/properties
will have no effect on its behavior (e.g. setDoSchema(true) and setLoadSchema(true) are ignored).
</p>
<source>
// Create a SAX parser
SAXParser parser;
// Specify scanner name
parser.useScanner(XMLUni::fgDGXMLScanner);
// Specify other parser features, e.g.
parser.setLoadExternalDTD(true);
</source>
</s3>
<s3 title="SGXMLScanner">
<p>
The SGXMLScanner handles XML documents with XML schema grammar information.
If the XML document contains a DOCTYPE, it will be ignored. Namespace and
schema processing features are on by default, and setting them to off has
not effect.
</p>
<source>
// Create a SAX2 parser
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
// Specify scanner name
parser->setProperty(XMLUni::fgXercesScannerName, (void *)XMLUni::fgSGXMLScanner);
// Specify other parser features, e.g.
parser->setFeature(XMLUni::fgXercesSchemaFullChecking, false);
</source>
</s3>
<s3 title="IGXMLScanner">
<p>
The IGXMLScanner is an integrated scanner and handles XML documents with DTD and/or
XML schema grammar. This is the default scanner used by the various parsers if no
scanner is specified.
</p>
<source>
// Create a DOMLSParser parser
DOMLSParser *parser = ((DOMImplementationLS*)impl)->createLSParser(
DOMImplementationLS::MODE_SYNCHRONOUS, 0);
// Specify scanner name - This is optional as IGXMLScanner is the default
parser->getDomConfig()->setParameter(
XMLUni::fgXercesScannerName, (void *)XMLUni::fgIGXMLScanner);
// Specify other parser features, e.g.
parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, doNamespaces);
parser->getDomConfig()->setParameter(XMLUni::fgXercesSchema, doSchema);
</source>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,580 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="SAX Programming Guide">
<anchor name="UsingSAX1API"/>
<s2 title="Using the SAX API">
<p>The SAX API for XML parsers was originally developed for
Java. Please be aware that there is no standard SAX API for
C++, and that use of the &XercesCName; SAX API does not
guarantee client code compatibility with other C++ XML
parsers.</p>
<p>The SAX API presents a callback based API to the parser. An
application that uses SAX provides an instance of a handler
class to the parser. When the parser detects XML constructs,
it calls the methods of the handler class, passing them
information about the construct that was detected. The most
commonly used handler classes are DocumentHandler which is
called when XML constructs are recognized, and ErrorHandler
which is called when an error occurs. The header files for the
various SAX handler classes are in the <code>xercesc/sax/</code>
directory.</p>
<p>As a convenience, &XercesCName; provides
HandlerBase, a single class which is publicly derived
from all the Handler classes. HandlerBase's default
implementation of the handler callback methods is to do
nothing. A convenient way to get started with &XercesCName; is
to derive your own handler class from HandlerBase and override
just those methods in HandlerBase which you are interested in
customizing. This simple example shows how to create a handler
which will print element names, and print fatal error
messages. The source code for the sample applications show
additional examples of how to write handler classes.</p>
<p>This is the header file MySAXHandler.hpp:</p>
<source>#include &lt;xercesc/sax/HandlerBase.hpp>
class MySAXHandler : public HandlerBase {
public:
void startElement(const XMLCh* const, AttributeList&amp;);
void fatalError(const SAXParseException&amp;);
};</source>
<p>This is the implementation file MySAXHandler.cpp:</p>
<source>#include "MySAXHandler.hpp"
#include &lt;iostream>
using namespace std;
MySAXHandler::MySAXHandler()
{
}
void MySAXHandler::startElement(const XMLCh* const name,
AttributeList&amp; attributes)
{
char* message = XMLString::transcode(name);
cout &lt;&lt; "I saw element: "&lt;&lt; message &lt;&lt; endl;
XMLString::release(&amp;message);
}
void MySAXHandler::fatalError(const SAXParseException&amp; exception)
{
char* message = XMLString::transcode(exception.getMessage());
cout &lt;&lt; "Fatal Error: " &lt;&lt; message
&lt;&lt; " at line: " &lt;&lt; exception.getLineNumber()
&lt;&lt; endl;
XMLString::release(&amp;message);
}</source>
<p>The XMLCh and AttributeList types are supplied by
&XercesCName; and are documented in the API reference.
Examples of their usage appear in the source code for
the sample applications.</p>
</s2>
<anchor name="SAXParser"/>
<s2 title="SAXParser">
<anchor name="ConstructParser"/>
<s3 title="Constructing a SAXParser">
<p>In order to use &XercesCName; SAX to parse XML files, you will
need to create an instance of the SAXParser class. The example
below shows the code you need in order to create an instance
of SAXParser. The DocumentHandler and ErrorHandler instances
required by the SAX API are provided using the HandlerBase
class supplied with &XercesCName;.</p>
<source>
#include &lt;xercesc/parsers/SAXParser.hpp>
#include &lt;xercesc/sax/HandlerBase.hpp>
#include &lt;xercesc/util/XMLString.hpp>
#include &lt;iostream>
using namespace std;
using namespace xercesc;
int main (int argc, char* args[]) {
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException&amp; toCatch) {
char* message = XMLString::transcode(toCatch.getMessage());
cout &lt;&lt; "Error during initialization! :\n"
&lt;&lt; message &lt;&lt; "\n";
XMLString::release(&amp;message);
return 1;
}
char* xmlFile = "x1.xml";
SAXParser* parser = new SAXParser();
parser->setDoValidation(true);
parser->setDoNamespaces(true); // optional
DocumentHandler* docHandler = new HandlerBase();
ErrorHandler* errHandler = (ErrorHandler*) docHandler;
parser->setDocumentHandler(docHandler);
parser->setErrorHandler(errHandler);
try {
parser->parse(xmlFile);
}
catch (const XMLException&amp; toCatch) {
char* message = XMLString::transcode(toCatch.getMessage());
cout &lt;&lt; "Exception message is: \n"
&lt;&lt; message &lt;&lt; "\n";
XMLString::release(&amp;message);
return -1;
}
catch (const SAXParseException&amp; toCatch) {
char* message = XMLString::transcode(toCatch.getMessage());
cout &lt;&lt; "Exception message is: \n"
&lt;&lt; message &lt;&lt; "\n";
XMLString::release(&amp;message);
return -1;
}
catch (...) {
cout &lt;&lt; "Unexpected Exception \n" ;
return -1;
}
delete parser;
delete docHandler;
return 0;
}</source>
</s3>
<anchor name="SAXFeatures"/>
<s3 title="SAXParser Supported Features">
<p>The behavior of the SAXParser is dependant on the values of the following features. All
of the features below are set using the "setter" methods (e.g. <code>setDoNamespaces</code>),
and are queried using the corresponding "getter" methods (e.g. <code>getDoNamespaces</code>).
The following only gives you a quick summary of supported features. Please
refer to <jump href="api-&XercesC3Series;.html">API Documentation</jump> for complete detail.
</p>
<p>None of these features can be modified in the middle of a parse, or an exception will be thrown.</p>
<anchor name="namespaces"/>
<table>
<tr><th colspan="2"><em>void setDoNamespaces(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Perform Namespace processing. </td></tr>
<tr><th><em>false:</em></th><td> Do not perform Namespace processing. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td> If the validation scheme is set to Val_Always or Val_Auto, then the
document must contain a grammar that supports the use of namespaces. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="validation-dynamic">setValidationScheme</link>
</td></tr>
</table>
<p/>
<anchor name="validation-dynamic"/>
<table>
<tr><th colspan="2"><em>void setValidationScheme(const ValSchemes)</em></th></tr>
<tr><th><em>Val_Auto:</em></th><td> The parser will report validation errors only if a grammar is specified. </td></tr>
<tr><th><em>Val_Always:</em></th><td> The parser will always report validation errors. </td></tr>
<tr><th><em>Val_Never:</em></th><td> Do not report validation errors. </td></tr>
<tr><th><em>default:</em></th><td> Val_Never </td></tr>
<tr><th><em>note:</em></th><td> If set to Val_Always, the document must
specify a grammar. If this feature is set to Val_Never and document specifies a grammar,
that grammar might be parsed but no validation of the document contents will be
performed. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="load-external-dtd">setLoadExternalDTD</link>
</td></tr>
</table>
<p/>
<anchor name="schema"/>
<table>
<tr><th colspan="2"><em>void setDoSchema(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Enable the parser's schema support. </td></tr>
<tr><th><em>false:</em></th><td> Disable the parser's schema support. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note</em></th><td> If set to true, namespace processing must also be turned on. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="namespaces">setDoNamespaces</link>
</td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>void setValidationSchemaFullChecking(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Enable full schema constraint checking, including checking
which may be time-consuming or memory intensive. Currently, particle unique
attribution constraint checking and particle derivation restriction checking
are controlled by this option. </td></tr>
<tr><th><em>false:</em></th><td> Disable full schema constraint checking. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td> This feature checks the Schema grammar itself for
additional errors that are time-consuming or memory intensive. It does <em>not</em> affect the
level of checking performed on document instances that use Schema grammars. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="schema">setDoSchema</link>
</td></tr>
</table>
<p/>
<anchor name="load-schema"/>
<table>
<tr><th colspan="2"><em>void setLoadSchema(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Load the schema. </td></tr>
<tr><th><em>false:</em></th><td> Don't load the schema if it wasn't found in the grammar pool. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>note:</em></th><td> This feature is ignored and no schemas are loaded if schema processing is disabled. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="schema">setDoSchema</link>
</td></tr>
</table>
<p/>
<anchor name="load-external-dtd"/>
<table>
<tr><th colspan="2"><em>void setLoadExternalDTD(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Load the External DTD. </td></tr>
<tr><th><em>false:</em></th><td> Ignore the external DTD completely. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>note</em></th><td> This feature is ignored and DTD is always loaded
if the validation scheme is set to Val_Always or Val_Auto. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="validation-dynamic">setValidationScheme</link>
</td></tr>
</table>
<p/>
<anchor name="continue-after-fatal"/>
<table>
<tr><th colspan="2"><em>void setExitOnFirstFatalError(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Stops parse on first fatal error. </td></tr>
<tr><th><em>false:</em></th><td> Attempt to continue parsing after a fatal error. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>note:</em></th><td> The behavior of the parser when this feature is set to
false is <em>undetermined</em>! Therefore use this feature with extreme caution because
the parser may get stuck in an infinite loop or worse. </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>void setValidationConstraintFatal(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> The parser will treat validation error as fatal and will
exit depends on the state of
<link anchor="continue-after-fatal">setExitOnFirstFatalError</link>.
</td></tr>
<tr><th><em>false:</em></th><td> The parser will report the error and continue processing. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td> Setting this true does not mean the validation error will
be printed with the word "Fatal Error". It is still printed as "Error", but the parser
will exit if
<link anchor="continue-after-fatal">setExitOnFirstFatalError</link>
is set to true. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="continue-after-fatal">setExitOnFirstFatalError</link>
</td></tr>
</table>
<p/>
<anchor name="use-cached"/>
<table>
<tr><th colspan="2"><em>void useCachedGrammarInParse(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td>Use cached grammar if it exists in the pool.</td></tr>
<tr><th><em>false:</em></th><td>Parse the schema grammar.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td>The getter function for this method is called isUsingCachedGrammarInParse.</td></tr>
<tr><th><em>note:</em></th><td>If the grammar caching option is enabled, this option is set to true automatically
and any setting to this option by the user is a no-op.</td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="cache-grammar">cacheGrammarFromParse</link>
</td></tr>
</table>
<p/>
<anchor name="cache-grammar"/>
<table>
<tr><th colspan="2"><em>void cacheGrammarFromParse(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td>Cache the grammar in the pool for re-use in subsequent parses.</td></tr>
<tr><th><em>false:</em></th><td>Do not cache the grammar in the pool</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td>The getter function for this method is called isCachingGrammarFromParse</td></tr>
<tr><th><em>note:</em></th><td> If set to true, the useCachedGrammarInParse
is also set to true automatically.</td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="use-cached">useCachedGrammarInParse</link>
</td></tr>
</table>
<p/>
<anchor name="StandardUriConformant"/>
<table>
<tr><th colspan="2"><em>void setStandardUriConformant(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Force standard uri conformance. </td></tr>
<tr><th><em>false:</em></th><td> Do not force standard uri conformance. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td> If set to true, malformed uri will be rejected
and fatal error will be issued. </td></tr>
</table>
<p/>
<anchor name="CalculateSrcOffset"/>
<table>
<tr><th colspan="2"><em>void setCalculateSrcOfs(const bool)</em></th></tr>
<tr><th><em>true:</em></th><td> Enable src offset calculation. </td></tr>
<tr><th><em>false:</em></th><td> Disable src offset calculation. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td> If set to true, the user can inquire about
the current src offset within the input source. Setting it to false (default)
improves the performance.</td></tr>
</table>
<p/>
<anchor name="IdentityConstraintChecking"/>
<table>
<tr><th colspan="2"><em>void setIdentityConstraintChecking(const bool);</em></th></tr>
<tr><th><em>true:</em></th><td> Enable identity constraint checking. </td></tr>
<tr><th><em>false:</em></th><td> Disable identity constraint checking. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
</table>
<p/>
<anchor name="GenerateSyntheticAnnotations"/>
<table>
<tr><th colspan="2"><em>void setGenerateSyntheticAnnotations(const bool);</em></th></tr>
<tr><th><em>true:</em></th><td> Enable generation of synthetic annotations. A synthetic annotation will be
generated when a schema component has non-schema attributes but no child annotation. </td></tr>
<tr><th><em>false:</em></th><td> Disable generation of synthetic annotations. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
</table>
<p/>
<anchor name="XercesValidateAnnotations"/>
<table>
<tr><th colspan="2"><em>setValidateAnnotation</em></th></tr>
<tr><th><em>true:</em></th><td> Enable validation of annotations. </td></tr>
<tr><th><em>false:</em></th><td> Disable validation of annotations. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>note:</em></th><td> Each annotation is validated independently. </td></tr>
</table>
<p/>
<anchor name="IgnoreAnnotations"/>
<table>
<tr><th colspan="2"><em>setIgnoreAnnotations</em></th></tr>
<tr><th><em>true:</em></th><td> Do not generate XSAnnotations when traversing a schema.</td></tr>
<tr><th><em>false:</em></th><td> Generate XSAnnotations when traversing a schema.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
</table>
<p/>
<anchor name="DisableDefaultEntityResolution"/>
<table>
<tr><th colspan="2"><em>setDisableDefaultEntityResolution</em></th></tr>
<tr><th><em>true:</em></th><td> The parser will not attempt to resolve the entity when the resolveEntity method returns NULL.</td></tr>
<tr><th><em>false:</em></th><td> The parser will attempt to resolve the entity when the resolveEntity method returns NULL.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
</table>
<p/>
<anchor name="SkipDTDValidation"/>
<table>
<tr><th colspan="2"><em>setSkipDTDValidation</em></th></tr>
<tr><th><em>true:</em></th><td> When schema validation is on the parser will ignore the DTD, except for entities.</td></tr>
<tr><th><em>false:</em></th><td> The parser will not ignore DTDs when validating.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="schema">DoSchema</link></td></tr>
</table>
<p/>
<anchor name="XercesIgnoreCachedDTD"/>
<table>
<tr><th colspan="2"><em>setIgnoreCachedDTD</em></th></tr>
<tr><th><em>true:</em></th><td> Ignore a cached DTD when an XML document contains both an
internal and external DTD, and the use cached grammar from parse option
is enabled. Currently, we do not allow using cached DTD grammar when an
internal subset is present in the document. This option will only affect
the behavior of the parser when an internal and external DTD both exist
in a document (i.e. no effect if document has no internal subset).</td></tr>
<tr><th><em>false:</em></th><td> Don't ignore cached DTD. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="use-cached">useCachedGrammarInParse</link></td></tr>
</table>
<p/>
<anchor name="XercesHandleMultipleImports"/>
<table>
<tr><th colspan="2"><em>setHandleMultipleImports</em></th></tr>
<tr><th><em>true:</em></th><td> During schema validation allow multiple schemas with the same namespace
to be imported.</td></tr>
<tr><th><em>false:</em></th><td> Don't import multiple schemas with the same namespace. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>void setExternalSchemaLocation(const XMLCh* const)</em></th></tr>
<tr><th><em>Description</em></th><td> The XML Schema Recommendation explicitly states that
the inclusion of schemaLocation/ noNamespaceSchemaLocation attributes in the
instance document is only a hint; it does not mandate that these attributes
must be used to locate schemas. Similar situation happens to &lt;import&gt;
element in schema documents. This property allows the user to specify a list
of schemas to use. If the targetNamespace of a schema specified using this
method matches the targetNamespace of a schema occurring in the instance
document in schemaLocation attribute, or
if the targetNamespace matches the namespace attribute of &lt;import&gt;
element, the schema specified by the user using this property will
be used (i.e., the schemaLocation attribute in the instance document
or on the &lt;import&gt; element will be effectively ignored). </td></tr>
<tr><th><em>Value</em></th><td> The syntax is the same as for schemaLocation attributes
in instance documents: e.g, "http://www.example.com file_name.xsd".
The user can specify more than one XML Schema in the list. </td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>void setExternalNoNamespaceSchemaLocation(const XMLCh* const)</em></th></tr>
<tr><th><em>Description</em></th><td> The XML Schema Recommendation explicitly states that
the inclusion of schemaLocation/ noNamespaceSchemaLocation attributes in the
instance document is only a hint; it does not mandate that these attributes
must be used to locate schemas. This property allows the user to specify the
no target namespace XML Schema Location externally. If specified, the instance
document's noNamespaceSchemaLocation attribute will be effectively ignored. </td></tr>
<tr><th><em>Value</em></th><td> The syntax is the same as for the noNamespaceSchemaLocation
attribute that may occur in an instance document: e.g."file_name.xsd". </td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>void useScanner(const XMLCh* const)</em></th></tr>
<tr><th><em>Description</em></th><td> This property allows the user to specify the name of
the XMLScanner to use for scanning XML documents. If not specified, the default
scanner "IGXMLScanner" is used.</td></tr>
<tr><th><em>Value</em></th><td> The recognized scanner names are: <br/>
1."WFXMLScanner" - scanner that performs well-formedness checking only.<br/>
2. "DGXMLScanner" - scanner that handles XML documents with DTD grammar information.<br/>
3. "SGXMLScanner" - scanner that handles XML documents with XML schema grammar information.<br/>
4. "IGXMLScanner" - scanner that handles XML documents with DTD or/and XML schema grammar information.<br/>
Users can use the predefined constants defined in XMLUni directly (fgWFXMLScanner, fgDGXMLScanner,
fgSGXMLScanner, or fgIGXMLScanner) or a string that matches the value of one of those constants.</td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
<tr><th><em>note: </em></th><td> See <jump href="program-others-&XercesC3Series;.html#UseSpecificScanner">Use Specific Scanner</jump>
for more programming details. </td></tr>
</table>
<p/>
<table>
<tr><th
colspan="2"><em>setSecurityManager(Security Manager * const)</em></th></tr>
<tr><th><em>Description</em></th>
<td>
Certain valid XML and XML Schema constructs can force a
processor to consume more system resources than an
application may wish. In fact, certain features could
be exploited by malicious document writers to produce a
denial-of-service attack. This property allows
applications to impose limits on the amount of
resources the processor will consume while processing
these constructs.
</td></tr>
<tr><th><em>Value</em></th>
<td>
An instance of the SecurityManager class (see
<code>xercesc/util/SecurityManager</code>). This
class's documentation describes the particular limits
that may be set. Note that, when instantiated, default
values for limits that should be appropriate in most
settings are provided. The default implementation is
not thread-safe; if thread-safety is required, the
application should extend this class, overriding
methods appropriately. The parser will not adopt the
SecurityManager instance; the application is
responsible for deleting it when it is finished with
it. If no SecurityManager instance has been provided to
the parser (the default) then processing strictly
conforming to the relevant specifications will be
performed.
</td></tr>
<tr><th><em>Value Type</em></th><td> SecurityManager* </td></tr>
</table>
<p/>
<table>
<tr><th
colspan="2"><em>setLowWaterMark(XMLSize_t)</em></th></tr>
<tr><th><em>Description</em></th>
<td>
If the number of available bytes in the raw buffer is less than
the low water mark the parser will attempt to read more data before
continuing parsing. By default the value for this parameter is 100
bytes. You may want to set this parameter to 0 if you would like
the parser to parse the available data immediately without
potentially blocking while waiting for more date.
</td></tr>
<tr><th><em>Value</em></th>
<td>
New low water mark.
</td></tr>
<tr><th><em>Value Type</em></th><td> XMLSize_t </td></tr>
</table>
<p/>
<table>
<tr><th
colspan="2"><em>setInputBufferSize(const size_t bufferSize)</em></th></tr>
<tr><th><em>Description</em></th>
<td>
Set maximum input buffer size.
This method allows users to limit the size of buffers used in parsing
XML character data. The effect of setting this size is to limit the
size of a ContentHandler::characters() call.
The parser's default input buffer size is 1 megabyte.
</td></tr>
<tr><th><em>Value</em></th>
<td>
The maximum input buffer size
</td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
</table>
<p/>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,662 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="SAX2 Programming Guide">
<anchor name="UsingSAX2API"/>
<s2 title="Using the SAX2 API">
<p>The SAX2 API for XML parsers was originally developed for
Java. Please be aware that there is no standard SAX2 API for
C++, and that use of the &XercesCName; SAX2 API does not
guarantee client code compatibility with other C++ XML
parsers.</p>
<p>The SAX2 API presents a callback based API to the parser. An
application that uses SAX2 provides an instance of a handler
class to the parser. When the parser detects XML constructs,
it calls the methods of the handler class, passing them
information about the construct that was detected. The most
commonly used handler classes are ContentHandler which is
called when XML constructs are recognized, and ErrorHandler
which is called when an error occurs. The header files for the
various SAX2 handler classes are in the <code>xercesc/sax2/</code>
directory.</p>
<p>As a convenience, &XercesCName; provides DefaultHandler,
a single class which is publicly derived
from all the Handler classes. DefaultHandler's default
implementation of the handler callback methods is to do
nothing. A convenient way to get started with &XercesCName; is
to derive your own handler class from DefaultHandler and override
just those methods in HandlerBase which you are interested in
customizing. This simple example shows how to create a handler
which will print element names, and print fatal error
messages. The source code for the sample applications show
additional examples of how to write handler classes.</p>
<p>This is the header file MySAX2Handler.hpp:</p>
<source>#include &lt;xercesc/sax2/DefaultHandler.hpp>
class MySAX2Handler : public DefaultHandler {
public:
void startElement(
const XMLCh* const uri,
const XMLCh* const localname,
const XMLCh* const qname,
const Attributes&amp; attrs
);
void fatalError(const SAXParseException&amp;);
};</source>
<p>This is the implementation file MySAX2Handler.cpp:</p>
<source>#include "MySAX2Handler.hpp"
#include &lt;iostream>
using namespace std;
MySAX2Handler::MySAX2Handler()
{
}
void MySAX2Handler::startElement(const XMLCh* const uri,
const XMLCh* const localname,
const XMLCh* const qname,
const Attributes&amp; attrs)
{
char* message = XMLString::transcode(localname);
cout &lt;&lt; "I saw element: "&lt;&lt; message &lt;&lt; endl;
XMLString::release(&amp;message);
}
void MySAX2Handler::fatalError(const SAXParseException&amp; exception)
{
char* message = XMLString::transcode(exception.getMessage());
cout &lt;&lt; "Fatal Error: " &lt;&lt; message
&lt;&lt; " at line: " &lt;&lt; exception.getLineNumber()
&lt;&lt; endl;
XMLString::release(&amp;message);
}</source>
<p>The XMLCh and Attributes types are supplied by
&XercesCName; and are documented in the API Reference.
Examples of their usage appear in the source code to
the sample applications.</p>
</s2>
<anchor name="SAX2XMLReader"/>
<s2 title="SAX2XMLReader">
<anchor name="ConstructParser2"/>
<s3 title="Constructing an XML Reader">
<p>In order to use &XercesCName; SAX2 to parse XML files, you will
need to create an instance of the SAX2XMLReader class. The example
below shows the code you need in order to create an instance
of SAX2XMLReader. The ContentHandler and ErrorHandler instances
required by the SAX2 API are provided using the DefaultHandler
class supplied with &XercesCName;.</p>
<source>
#include &lt;xercesc/sax2/SAX2XMLReader.hpp>
#include &lt;xercesc/sax2/XMLReaderFactory.hpp>
#include &lt;xercesc/sax2/DefaultHandler.hpp>
#include &lt;xercesc/util/XMLString.hpp>
#include &lt;iostream>
using namespace std;
using namespace xercesc;
int main (int argc, char* args[]) {
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException&amp; toCatch) {
char* message = XMLString::transcode(toCatch.getMessage());
cout &lt;&lt; "Error during initialization! :\n";
cout &lt;&lt; "Exception message is: \n"
&lt;&lt; message &lt;&lt; "\n";
XMLString::release(&amp;message);
return 1;
}
char* xmlFile = "x1.xml";
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
parser->setFeature(XMLUni::fgSAX2CoreValidation, true);
parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true); // optional
DefaultHandler* defaultHandler = new DefaultHandler();
parser->setContentHandler(defaultHandler);
parser->setErrorHandler(defaultHandler);
try {
parser->parse(xmlFile);
}
catch (const XMLException&amp; toCatch) {
char* message = XMLString::transcode(toCatch.getMessage());
cout &lt;&lt; "Exception message is: \n"
&lt;&lt; message &lt;&lt; "\n";
XMLString::release(&amp;message);
return -1;
}
catch (const SAXParseException&amp; toCatch) {
char* message = XMLString::transcode(toCatch.getMessage());
cout &lt;&lt; "Exception message is: \n"
&lt;&lt; message &lt;&lt; "\n";
XMLString::release(&amp;message);
return -1;
}
catch (...) {
cout &lt;&lt; "Unexpected Exception \n" ;
return -1;
}
delete parser;
delete defaultHandler;
return 0;
}</source>
</s3>
<anchor name="SAX2Features"/>
<s3 title="Supported Features in SAX2XMLReader">
<p>The behavior of the SAX2XMLReader is dependant on the values of the following features.
All of the features below can be set using the function <code>SAX2XMLReader::setFeature(cons XMLCh* const, const bool)</code>.
And can be queried using the function <code>bool SAX2XMLReader::getFeature(const XMLCh* const)</code>.
</p>
<p>None of these features can be modified in the middle of a parse, or an exception will be thrown.</p>
<s4 title="SAX2 Features">
<anchor name="namespaces"/>
<table>
<tr><th colspan="2"><em>http://xml.org/sax/features/namespaces</em></th></tr>
<tr><th><em>true:</em></th><td> Perform Namespace processing. </td></tr>
<tr><th><em>false:</em></th><td> Do not perform Namespace processing. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgSAX2CoreNameSpaces </td></tr>
<tr><th><em>note:</em></th><td> If the validation feature is set to true, then the
document must contain a grammar that supports the use of namespaces. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="namespace-prefixes">http://xml.org/sax/features/namespace-prefixes </link>
</td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="validation">http://xml.org/sax/features/validation</link>
</td></tr>
</table>
<p/>
<anchor name="namespace-prefixes"/>
<table>
<tr><th colspan="2"><em>http://xml.org/sax/features/namespace-prefixes</em></th></tr>
<tr><th><em>true:</em></th><td> Report the original prefixed names and attributes used for Namespace declarations. </td></tr>
<tr><th><em>false:</em></th><td> Do not report attributes used for Namespace declarations, and optionally do not report original prefixed names. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgSAX2CoreNameSpacePrefixes </td></tr>
</table>
<p/>
<anchor name="validation"/>
<table>
<tr><th colspan="2"><em>http://xml.org/sax/features/validation</em></th></tr>
<tr><th><em>true:</em></th><td> Report all validation errors. </td></tr>
<tr><th><em>false:</em></th><td> Do not report validation errors. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgSAX2CoreValidation </td></tr>
<tr><th><em>note:</em></th><td> If this feature is set to true, the document must
specify a grammar. If this feature is set to false and document specifies a grammar,
that grammar might be parsed but no validation of the document contents will be
performed. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="validation-dynamic">http://apache.org/xml/features/validation/dynamic</link>
</td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="load-external-dtd">http://apache.org/xml/features/nonvalidating/load-external-dtd</link>
</td></tr>
</table>
</s4>
<s4 title="Xerces Features">
<anchor name="validation-dynamic"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/dynamic</em></th></tr>
<tr><th><em>true:</em></th><td> The parser will validate the document only if a grammar is specified. (http://xml.org/sax/features/validation must be true). </td></tr>
<tr><th><em>false:</em></th><td> Validation is determined by the state of the http://xml.org/sax/features/validation feature. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesDynamic </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="validation">http://xml.org/sax/features/validation</link>
</td></tr>
</table>
<p/>
<anchor name="schema"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/schema</em></th></tr>
<tr><th><em>true:</em></th><td> Enable the parser's schema support. </td></tr>
<tr><th><em>false:</em></th><td> Disable the parser's schema support. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesSchema </td></tr>
<tr><th><em>note</em></th><td> If set to true, namespace processing must also be turned on. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="namespaces">http://xml.org/sax/features/namespaces</link>
</td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/schema-full-checking</em></th></tr>
<tr><th><em>true:</em></th><td> Enable full schema constraint checking, including checking
which may be time-consuming or memory intensive. Currently, particle unique
attribution constraint checking and particle derivation restriction checking
are controlled by this option. </td></tr>
<tr><th><em>false:</em></th><td> Disable full schema constraint checking. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesSchemaFullChecking </td></tr>
<tr><th><em>note:</em></th><td> This feature checks the schema grammar itself for
additional errors that are time-consuming or memory intensive. It does <em>not</em> affect the
level of checking performed on document instances that use schema grammars. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="schema">http://apache.org/xml/features/validation/schema</link>
</td></tr>
</table>
<p/>
<anchor name="load-schema"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validating/load-schema</em></th></tr>
<tr><th><em>true:</em></th><td> Load the schema. </td></tr>
<tr><th><em>false:</em></th><td> Don't load the schema if it wasn't found in the grammar pool. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesLoadSchema </td></tr>
<tr><th><em>note:</em></th><td> This feature is ignored and no schemas are loaded if schema processing is disabled. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="schema">http://apache.org/xml/features/validation/schema</link>
</td></tr>
</table>
<p/>
<anchor name="load-external-dtd"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/nonvalidating/load-external-dtd</em></th></tr>
<tr><th><em>true:</em></th><td> Load the external DTD. </td></tr>
<tr><th><em>false:</em></th><td> Ignore the external DTD completely. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesLoadExternalDTD </td></tr>
<tr><th><em>note</em></th><td> This feature is ignored and DTD is always loaded when validation is on. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="validation">http://xml.org/sax/features/validation</link>
</td></tr>
</table>
<p/>
<anchor name="continue-after-fatal"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/continue-after-fatal-error</em></th></tr>
<tr><th><em>true:</em></th><td> Attempt to continue parsing after a fatal error. </td></tr>
<tr><th><em>false:</em></th><td> Stops parse on first fatal error. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesContinueAfterFatalError </td></tr>
<tr><th><em>note:</em></th><td> The behavior of the parser when this feature is set to
true is <em>undetermined</em>! Therefore use this feature with extreme caution because
the parser may get stuck in an infinite loop or worse. </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation-error-as-fatal</em></th></tr>
<tr><th><em>true:</em></th><td> The parser will treat validation error as fatal and will
exit depends on the state of
<link anchor="continue-after-fatal">http://apache.org/xml/features/continue-after-fatal-error</link>.
</td></tr>
<tr><th><em>false:</em></th><td> The parser will report the error and continue processing. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesValidationErrorAsFatal </td></tr>
<tr><th><em>note:</em></th><td> Setting this true does not mean the validation error will
be printed with the word "Fatal Error". It is still printed as "Error", but the parser
will exit if
<link anchor="continue-after-fatal">http://apache.org/xml/features/continue-after-fatal-error</link>
is set to false. </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="continue-after-fatal">http://apache.org/xml/features/continue-after-fatal-error</link>
</td></tr>
</table>
<p/>
<anchor name="use-cached"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/use-cachedGrammarInParse</em></th></tr>
<tr><th><em>true:</em></th><td>Use cached grammar if it exists in the pool.</td></tr>
<tr><th><em>false:</em></th><td>Parse the schema grammar.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesUseCachedGrammarInParse </td></tr>
<tr><th><em>note:</em></th><td>If http://apache.org/xml/features/validation/cache-grammarFromParse is enabled,
this feature is set to true automatically and any setting to this feature by the user is a no-op.</td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="cache-grammar">http://apache.org/xml/features/validation/cache-grammarFromParse</link>
</td></tr>
</table>
<p/>
<anchor name="cache-grammar"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/cache-grammarFromParse</em></th></tr>
<tr><th><em>true:</em></th><td>Cache the grammar in the pool for re-use in subsequent parses.</td></tr>
<tr><th><em>false:</em></th><td>Do not cache the grammar in the pool</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesCacheGrammarFromParse </td></tr>
<tr><th><em>note:</em></th><td> If set to true, the http://apache.org/xml/features/validation/use-cachedGrammarInParse
is also set to true automatically.</td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="use-cached">http://apache.org/xml/features/validation/use-cachedGrammarInParse</link>
</td></tr>
</table>
<p/>
<anchor name="StandardUriConformant"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/standard-uri-conformant</em></th></tr>
<tr><th><em>true:</em></th><td> Force standard uri conformance. </td></tr>
<tr><th><em>false:</em></th><td> Do not force standard uri conformance. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesStandardUriConformant </td></tr>
<tr><th><em>note:</em></th><td> If set to true, malformed uri will be rejected
and fatal error will be issued. </td></tr>
</table>
<p/>
<anchor name="CalculateSrcOffset"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/calculate-src-ofs</em></th></tr>
<tr><th><em>true:</em></th><td> Enable src offset calculation. </td></tr>
<tr><th><em>false:</em></th><td> Disable src offset calculation. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesCalculateSrcOfs </td></tr>
<tr><th><em>note:</em></th><td> If set to true, the user can inquire about
the current src offset within the input source. Setting it to false (default)
improves the performance.</td></tr>
</table>
<p/>
<anchor name="IdentityConstraintChecking"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/identity-constraint-checking</em></th></tr>
<tr><th><em>true:</em></th><td> Enable identity constraint checking. </td></tr>
<tr><th><em>false:</em></th><td> Disable identity constraint checking. </td></tr>
<tr><th><em>default:</em></th><td> true </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesIdentityConstraintChecking </td></tr>
</table>
<p/>
<anchor name="GenerateSyntheticAnnotations"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/generate-synthetic-annotations</em></th></tr>
<tr><th><em>true:</em></th><td> Enable generation of synthetic annotations. A synthetic annotation will be
generated when a schema component has non-schema attributes but no child annotation. </td></tr>
<tr><th><em>false:</em></th><td> Disable generation of synthetic annotations. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesGenerateSyntheticAnnotations </td></tr>
</table>
<p/>
<anchor name="XercesValidateAnnotations"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validate-annotations</em></th></tr>
<tr><th><em>true:</em></th><td> Enable validation of annotations. </td></tr>
<tr><th><em>false:</em></th><td> Disable validation of annotations. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesValidateAnnotations </td></tr>
<tr><th><em>note:</em></th><td> Each annotation is validated independently. </td></tr>
</table>
<p/>
<anchor name="IgnoreAnnotations"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/schema/ignore-annotations</em></th></tr>
<tr><th><em>true:</em></th><td> Do not generate XSAnnotations when traversing a schema.</td></tr>
<tr><th><em>false:</em></th><td> Generate XSAnnotations when traversing a schema.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesIgnoreAnnotations </td></tr>
</table>
<p/>
<anchor name="DisableDefaultEntityResolution"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/disable-default-entity-resolution</em></th></tr>
<tr><th><em>true:</em></th><td> The parser will not attempt to resolve the entity when the resolveEntity method returns NULL.</td></tr>
<tr><th><em>false:</em></th><td> The parser will attempt to resolve the entity when the resolveEntity method returns NULL.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesDisableDefaultEntityResolution </td></tr>
</table>
<p/>
<anchor name="SkipDTDValidation"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/schema/skip-dtd-validation</em></th></tr>
<tr><th><em>true:</em></th><td> When schema validation is on the parser will ignore the DTD, except for entities.</td></tr>
<tr><th><em>false:</em></th><td> The parser will not ignore DTDs when validating.</td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesSkipDTDValidation </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="schema">Schema Validation</link></td></tr>
</table>
<p/>
<anchor name="IgnoreCachedDTD"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/ignoreCachedDTD</em></th></tr>
<tr><th><em>true:</em></th><td> Ignore a cached DTD when an XML document contains both an
internal and external DTD, and the use cached grammar from parse option
is enabled. Currently, we do not allow using cached DTD grammar when an
internal subset is present in the document. This option will only affect
the behavior of the parser when an internal and external DTD both exist
in a document (i.e. no effect if document has no internal subset).</td></tr>
<tr><th><em>false:</em></th><td> Don't ignore cached DTD. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesIgnoreCachedDTD </td></tr>
<tr><th><em>see:</em></th><td>
<link anchor="use-cached">http://apache.org/xml/features/validation/use-cachedGrammarInParse</link>
</td></tr>
</table>
<p/>
<anchor name="HandleMultipleImports"/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/features/validation/schema/handle-multiple-imports</em></th></tr>
<tr><th><em>true:</em></th><td> During schema validation allow multiple schemas with the same namespace
to be imported.</td></tr>
<tr><th><em>false:</em></th><td> Don't import multiple schemas with the same namespace. </td></tr>
<tr><th><em>default:</em></th><td> false </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesHandleMultipleImports </td></tr>
</table>
<p/>
</s4>
</s3>
<anchor name="SAX2Properties"/>
<s3 title="Supported Properties in SAX2XMLReader">
<p>The behavior of the SAX2XMLReader is dependant on the values of the following properties.
All of the properties below can be set using the function <code>SAX2XMLReader::setProperty(const XMLCh* const, void*)</code>.
It takes a void pointer as the property value. Application is required to initialize this void
pointer to a correct type. Please check the column "Value Type" below
to learn exactly what type of property value each property expects for processing.
Passing a void pointer that was initialized with a wrong type will lead to unexpected result.
If the same property is set more than once, the last one takes effect.</p>
<p>Property values can be queried using the function <code>void* SAX2XMLReader::getProperty(const XMLCh* const)</code>.
The parser owns the returned pointer, and the memory allocated for the returned pointer will
be destroyed when the parser is deleted. To ensure accessibility of the returned information after
the parser is deleted, callers need to copy and store the returned information somewhere else.
Since the returned pointer is a generic void pointer, check the column "Value Type" below to learn
exactly what type of object each property returns for replication.</p>
<p>None of these properties can be modified in the middle of a parse, or an exception will be thrown.</p>
<s4 title="Xerces Properties">
<table>
<tr><th colspan="2"><em>http://apache.org/xml/properties/schema/external-schemaLocation</em></th></tr>
<tr><th><em>Description</em></th><td> The XML Schema Recommendation explicitly states that
the inclusion of schemaLocation/ noNamespaceSchemaLocation attributes in the
instance document is only a hint; it does not mandate that these attributes
must be used to locate schemas. Similar situation happens to &lt;import&gt;
element in schema documents. This property allows the user to specify a list
of schemas to use. If the targetNamespace of a schema specified using this
method matches the targetNamespace of a schema occurring in the instance
document in schemaLocation attribute, or
if the targetNamespace matches the namespace attribute of &lt;import&gt;
element, the schema specified by the user using this property will
be used (i.e., the schemaLocation attribute in the instance document
or on the &lt;import&gt; element will be effectively ignored). </td></tr>
<tr><th><em>Value</em></th><td> The syntax is the same as for schemaLocation attributes
in instance documents: e.g, "http://www.example.com file_name.xsd".
The user can specify more than one XML Schema in the list. </td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesSchemaExternalSchemaLocation </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation</em></th></tr>
<tr><th><em>Description</em></th><td> The XML Schema Recommendation explicitly states that
the inclusion of schemaLocation/ noNamespaceSchemaLocation attributes in the
instance document is only a hint; it does not mandate that these attributes
must be used to locate schemas. This property allows the user to specify the
no target namespace XML Schema Location externally. If specified, the instance
document's noNamespaceSchemaLocation attribute will be effectively ignored. </td></tr>
<tr><th><em>Value</em></th><td> The syntax is the same as for the noNamespaceSchemaLocation
attribute that may occur in an instance document: e.g."file_name.xsd". </td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesSchemaExternalNoNameSpaceSchemaLocation </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/properties/scannerName</em></th></tr>
<tr><th><em>Description</em></th><td> This property allows the user to specify the name of
the XMLScanner to use for scanning XML documents. If not specified, the default
scanner "IGXMLScanner" is used.</td></tr>
<tr><th><em>Value</em></th><td> The recognized scanner names are: <br/>
1."WFXMLScanner" - scanner that performs well-formedness checking only.<br/>
2. "DGXMLScanner" - scanner that handles XML documents with DTD grammar information.<br/>
3. "SGXMLScanner" - scanner that handles XML documents with XML schema grammar information.<br/>
4. "IGXMLScanner" - scanner that handles XML documents with DTD or/and XML schema grammar information.<br/>
Users can use the predefined constants defined in XMLUni directly (fgWFXMLScanner, fgDGXMLScanner,
fgSGXMLScanner, or fgIGXMLScanner) or a string that matches the value of
one of those constants.</td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesScannerName </td></tr>
<tr><th><em>note: </em></th><td> See <jump href="program-others-&XercesC3Series;.html#UseSpecificScanner">Use Specific Scanner</jump>
for more programming details. </td></tr>
</table>
<p/>
<table>
<tr><th colspan="2"><em>http://apache.org/xml/properties/security-manager</em></th></tr>
<tr><th><em>Description</em></th>
<td>
Certain valid XML and XML Schema constructs can force a
processor to consume more system resources than an
application may wish. In fact, certain features could
be exploited by malicious document writers to produce a
denial-of-service attack. This property allows
applications to impose limits on the amount of
resources the processor will consume while processing
these constructs.
</td></tr>
<tr><th><em>Value</em></th>
<td>
An instance of the SecurityManager class (see
<code>xercesc/util/SecurityManager</code>). This
class's documentation describes the particular limits
that may be set. Note that, when instantiated, default
values for limits that should be appropriate in most
settings are provided. The default implementation is
not thread-safe; if thread-safety is required, the
application should extend this class, overriding
methods appropriately. The parser will not adopt the
SecurityManager instance; the application is
responsible for deleting it when it is finished with
it. If no SecurityManager instance has been provided to
the parser (the default) then processing strictly
conforming to the relevant specifications will be
performed.
</td></tr>
<tr><th><em>Value Type</em></th><td> SecurityManager* </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesSecurityManager </td></tr>
</table>
<p/>
<table>
<tr><th
colspan="2"><em>http://apache.org/xml/properties/low-water-mark</em></th></tr>
<tr><th><em>Description</em></th>
<td>
If the number of available bytes in the raw buffer is less than
the low water mark the parser will attempt to read more data before
continuing parsing. By default the value for this parameter is 100
bytes. You may want to set this parameter to 0 if you would like
the parser to parse the available data immediately without
potentially blocking while waiting for more date.
</td></tr>
<tr><th><em>Value</em></th>
<td>
New low water mark.
</td></tr>
<tr><th><em>Value Type</em></th><td> XMLSize_t* </td></tr>
<tr><th><em>XMLUni Predefined Constant:</em></th><td> fgXercesLowWaterMark </td></tr>
</table>
<p/>
<table>
<tr><th
colspan="2"><em>setInputBufferSize(const size_t bufferSize)</em></th></tr>
<tr><th><em>Description</em></th>
<td>
Set maximum input buffer size.
This method allows users to limit the size of buffers used in parsing
XML character data. The effect of setting this size is to limit the
size of a ContentHandler::characters() call.
The parser's default input buffer size is 1 megabyte.
</td></tr>
<tr><th><em>Value</em></th>
<td>
The maximum input buffer size
</td></tr>
<tr><th><em>Value Type</em></th><td> XMLCh* </td></tr>
</table>
<p/>
</s4>
</s3>
</s2>
</s1>

149
lib/xerces/doc/program.xml Normal file
Просмотреть файл

@ -0,0 +1,149 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Programming Guide">
<p>This Programming Guide is for &XercesCName; version &XercesC3Version;.</p>
<p>Independent of the API you want to use, DOM, SAX, or SAX2, your
application must initialize the &XercesCProjectName; system
before using the API, and terminate it after you are done. This
is achieved by the following code:</p>
<source>
#include &lt;xercesc/util/PlatformUtils.hpp&gt;
// Other include files, declarations, and non-&XercesCName; initializations.
using namespace xercesc;
int main(int argc, char* argv[])
{
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException&amp; toCatch) {
// Do your failure processing here
return 1;
}
// Do your actual work with &XercesCName; here.
XMLPlatformUtils::Terminate();
// Other terminations and cleanup.
return 0;
}</source>
<p><code>XMLPlatformUtils::Initialize()</code> and
<code>XMLPlatformUtils::Terminate</code> must be called at
least once in each process. You are allowed to call
<code>XMLPlatformUtils::Initialize()</code> and
<code>XMLPlatformUtils::Terminate</code> multiple times, but
each call to <code>XMLPlatformUtils::Initialize()</code> must
be matched with a call to
<code>XMLPlatformUtils::Terminate</code>.</p>
<s2 title="DOM Programming Guide">
<p>The DOM API is based on the
<jump href="ApacheDOMC++Binding.html">Apache Recommended DOM C++ binding</jump>.</p>
<p>Read the <jump href="program-dom-&XercesC3Series;.html">DOM Programming Guide</jump> document
or jump directly to:</p>
<ul>
<li><jump href="program-dom-&XercesC3Series;.html#Objectives">Design Objectives</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOM3">DOM Level 3 Support in &XercesCName; </jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#UsingDOMAPI">Using DOM API</jump></li>
<ul>
<li><jump href="program-dom-&XercesC3Series;.html#AccessAPI">Accessing API from application code</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOMClassNames">Class Names</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOMObjMgmt">Objects Management</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOMMemMgmt">Memory Management</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#XMLCh">String Type</jump></li>
</ul>
<li><jump href="program-dom-&XercesC3Series;.html#XercesDOMParser">XercesDOMParser</jump></li>
<ul>
<li><jump href="program-dom-&XercesC3Series;.html#ConstructXercesDOMParser">Constructing a XercesDOMParser</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#XercesDOMFeatures">Supported Features</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#XercesDOMProperties">Supported Properties</jump></li>
</ul>
<li><jump href="program-dom-&XercesC3Series;.html#DOMLSParser">DOMLSParser</jump></li>
<ul>
<li><jump href="program-dom-&XercesC3Series;.html#ConstructDOMLSParser">Constructing a DOMLSParser</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#InputSourceWrapper">How to interchange DOMLSInput and SAX InputSource?</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOMLSParserFeatures">Supported Features</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOMLSParserProperties">Supported Properties</jump></li>
</ul>
<li><jump href="program-dom-&XercesC3Series;.html#DOMLSSerializer">DOMLSSerializer</jump></li>
<ul>
<li><jump href="program-dom-&XercesC3Series;.html#ConstructDOMLSSerializer">Constructing a DOMLSSerializer</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOMLSSerializerEntityRef">How does DOMLSSerializer handle built-in entity Reference in node value?</jump></li>
<li><jump href="program-dom-&XercesC3Series;.html#DOMLSSerializerFeatures">Supported Features</jump></li>
</ul>
</ul>
</s2>
<s2 title="SAX2 Programming Guide">
<p>Read the <jump href="program-sax2-&XercesC3Series;.html">SAX2 Programming Guide</jump> document
or jump directly to:</p>
<ul>
<li><jump href="program-sax2-&XercesC3Series;.html#UsingSAX2API">Using the SAX2 API</jump></li>
<li><jump href="program-sax2-&XercesC3Series;.html#SAX2XMLReader">SAX2XMLReader</jump></li>
<ul>
<li><jump href="program-sax2-&XercesC3Series;.html#ConstructParser2">Constructing an XML Reader</jump></li>
<li><jump href="program-sax2-&XercesC3Series;.html#SAX2Features">Supported Features</jump></li>
<li><jump href="program-sax2-&XercesC3Series;.html#SAX2Properties">Supported Properties</jump></li>
</ul>
</ul>
</s2>
<s2 title="SAX Programming Guide">
<p>Read the <jump href="program-sax-&XercesC3Series;.html">SAX Programming Guide</jump> document
or jump directly to:</p>
<ul>
<li><jump href="program-sax-&XercesC3Series;.html#UsingSAX1API">Using the SAX API</jump></li>
<li><jump href="program-sax-&XercesC3Series;.html#SAXParser">SAXParser</jump></li>
<ul>
<li><jump href="program-sax-&XercesC3Series;.html#ConstructParser">Constructing a SAXParser</jump></li>
<li><jump href="program-sax-&XercesC3Series;.html#SAXFeatures">Supported Features</jump></li>
</ul>
</ul>
</s2>
<s2 title="Other Features">
<p>Read the <jump href="program-others-&XercesC3Series;.html">&XercesCName; Programming Guide</jump> document
or jump directly to:</p>
<ul>
<li><jump href="program-others-&XercesC3Series;.html#Macro">Version Macros</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#Schema">Schema Support</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#Progressive">Progressive Parsing</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#GrammarCache">Pre-parsing Grammar and Grammar Caching</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#LoadableMessageText">Loadable Message Text</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#PluggableTranscoders">Pluggable Transcoders</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#PortingGuidelines">Porting Guidelines</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#CPPNamespace">Using C++ Namespace</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#SpecifylocaleforMessageLoader">Specify Locale for Message Loader</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#SpecifylocationforMessageLoader">Specify Location for Message Loader</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#UseSpecificScanner">Use Specific Scanner</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#PluggablePanicHandler">Pluggable Panic Handler</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#PluggableMemoryManager">Pluggable Memory Manager</jump></li>
<li><jump href="program-others-&XercesC3Series;.html#SecurityManager">Managing Security Vulnerabilities</jump></li>
</ul>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,69 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: PSVIWriter">
<s2 title="PSVIWriter">
<p>PSVIWriter shows how to access the Post Schema Validation Infoset (PSVI) and Schema Component Model
information for the parsed document.</p>
<s3 title="Running PSVIWriter">
<p>This program parses the specified XML file, then exposes
the PSVI and Schema Component Model information.</p>
<source>
Usage:
PSVIWriter [options] &lt;XML file | List file&gt;
This program invokes the SAX2XMLReaderImpl, and then exposes the
underlying PSVI of each parsed XML file, using SAX2 API.
Options:
-f Enable full schema constraint checking processing. Defaults to off.
-o=xxx Output PSVI to file xxx (default is stdout)
-e=xxx Output errors to file xxx (default is stdout)
-u=xxx Handle unrepresentable chars [fail | rep | ref*].
-x=XXX Use a particular encoding for output (UTF8*).
-l Indicate the input file is a List File that has a list of xml files.
Default to off (Input file is an XML file).
-? Show this help.
* = Default if not provided explicitly.
</source>
<p>Here is some sample output from PSVWriter (as the output is verbose
it has been truncated)</p>
<source>cd &XercesC3InstallDir;/samples/data
PSVIWriter personal.xml
&lt;document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:psv="http://apache.org/xml/2001/PSVInfosetExtension"
xmlns="http://www.w3.org/2001/05/XMLInfoset"&gt;
&lt;characterEncodingScheme&gt;UTF8&lt;/characterEncodingScheme&gt;
&lt;standalone xsi:nil="true"/&gt;
&lt;version&gt;1.0&lt;/version&gt;
&lt;children&gt;
&lt;comment&gt;
&lt;content&gt; @version: &lt;/content&gt;
&lt;/comment&gt;
...
</source>
</s3>
</s2>
</s1>

115
lib/xerces/doc/readme.xml Normal file
Просмотреть файл

@ -0,0 +1,115 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="&XercesCFullName;">
<s2 title="&XercesCName; Version &XercesC3Version;">
<p>&XercesCName; is a validating XML parser written in a portable subset of
C++. &XercesCName; makes it easy to give your application the ability to read and write
<jump href="http://www.w3.org/XML/">XML</jump> data. A shared
library is provided for parsing, generating, manipulating, and validating XML documents
using the DOM, SAX, and SAX2 APIs. For an introduction to programming
with &XercesCName; refer to the <jump href="program-&XercesC3Series;.html">Programming
Guide</jump>.</p>
<p>&XercesCName; is faithful to the
<jump href="http://www.w3.org/TR/REC-xml">XML 1.0</jump> recommendation
and many associated standards (see <link anchor="Features">Features</link> below).
</p>
<p>The parser provides high performance, modularity, and scalability. Source
code, samples and API documentation are provided with the parser. For
portability, care has been taken to make minimal use of templates,
no RTTI, and minimal use of #ifdefs.</p>
</s2>
<s2 title="Applications of the &XercesCProjectName; Parser">
<p>&XercesCProjectName; has rich generating and validating capabilities. The parser is used for:</p>
<ul>
<li>Building XML-savvy Web servers</li>
<li>Building next generation of vertical applications that use XML as
their data format</li>
<li>On-the-fly validation for creating XML editors</li>
<li>Ensuring the integrity of e-business data expressed in XML</li>
<li>Building truly internationalized XML applications</li>
</ul>
</s2>
<anchor name="Features"/>
<s2 title="Features">
<ul>
<li>Conforms to</li>
<ul>
<li><jump href="http://www.w3.org/TR/2004/REC-xml-20040204/">
XML 1.0 (Third Edition)</jump>, W3C Recommendation</li>
<li><jump href="http://www.w3.org/TR/2004/REC-xml11-20040204/">
XML 1.1 (First Edition)</jump>, W3C Recommendation
(Note: section 2.13 Normalization Checking has not been implemented)</li>
<li><jump href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/">
DOM Level 1 Specification</jump>, W3C Recommendation of October 1, 1998</li>
<li><jump href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/">
DOM Level 2 Core Specification</jump>, W3C Recommendation of November 13, 2000</li>
<li><jump href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/">
DOM Level 2 Traversal and Range Specification</jump>,
W3C Recommendation of November 13, 2000</li>
<li><jump href="http://sax.sourceforge.net/">SAX 1.0 and SAX 2.0</jump></li>
<li><jump href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">
Namespaces in XML</jump>, W3C Recommendation of January 14, 1999</li>
<li><jump href="http://www.w3.org/TR/xml-names11/">
Namespaces in XML 1.1</jump>, W3C Recommendation</li>
<li><jump href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">
XML Schema Part 1: Structure</jump>, W3C Recommendation 2 May 2001</li>
<li><jump href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">
XML Schema Part 2: Datatypes</jump>, W3C Recommendation 2 May 2001</li>
<li><jump href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407">
DOM Level 3.0 Core Specification</jump>, W3C Recommendation 7 April 2004</li>
<li><jump href="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407">
DOM Level 3.0 Load and Save Specification</jump>, W3C Recommendation 7 April 2004<br/>
See <jump href="program-dom-&XercesC3Series;.html#DOM3">DOM Level 3 Support</jump> for detail.</li>
<li><jump href="http://www.w3.org/TR/2006/REC-xinclude-20061115/">
XML Inclusions (XInclude) 1.0 (Second Edition)</jump>, W3C Recommendation 15 November 2006</li>
<li><jump href="http://www.w3.org/TR/2008/REC-ElementTraversal-20081222/">
Element Traversal Specification</jump>, W3C Recommendation 22 December 2008</li>
</ul>
<li>Source code, samples, and documentation are provided</li>
<li>Programmatic generation and validation of XML</li>
<li>Pluggable catalogs, validators and encodings</li>
<li>High performance</li>
<li>Customizable error handling</li>
</ul>
</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
<jump href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Software License, Version 2.0</jump>.
</p>
</s2>
<s2 title="A Note About Xerces 2.x">
<p>If you're looking for information regarding the old Xerces 2.x
library, please be advised that Xerces 2.8.0 and all earlier releases
are 100% unsupported and should no longer be used by applications.</p>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,65 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: Redirect">
<s2 title="Redirect">
<p>Redirect uses the SAX EntityResolver handler to redirect the
input stream for external entities. It installs an entity
resolver, traps the call to the external DTD file and redirects
it to another file which contains the actual DTD.</p>
<s3 title="Running Redirect">
<p>This program illustrates how an application can use the SAX EntityResolver
handler to redirect the input stream for external entities. It installs an entity
resolver, traps the call to the external DTD file and redirects it to another
file which contains the actual DTD.</p>
<p>The program then counts and reports the number of elements and attributes in
the given XML file.</p>
<source>Redirect &lt;XML file&gt;</source>
<p>Redirect is invoked as follows:</p>
<source>cd &XercesC3InstallDir;/samples/data
Redirect personal.xml</source>
<p>The output is the following:</p>
<source>cd &XercesC3InstallDir;/samples/data
Redirect personal.xml
personal.xml: 30 ms (37 elems, 12 attrs, 0 spaces, 268 chars)</source>
<p>External files required to run this sample are 'personal.xml', 'personal.dtd' and
'redirect.dtd', which are all present in the 'samples/data' directory. Make sure
that you run redirect in the samples/data directory.</p>
<p>The 'resolveEntity' callback in this sample looks for an external entity with
system id as 'personal.dtd'. When it is asked to resolve this particular external
entity, it creates and returns a new InputSource for the file 'redirect.dtd'.</p>
<p>A real-world XML application can similarly do application specific processing
when encountering external entities. For example, an application might want to
redirect all references to entities outside of its domain to local cached copies.</p>
<note>The time reported by the program may be different depending on your
processor speed.</note>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Releases">
<s2 title="Releases Plan">
<p> For future release plan about &XercesCName;,
please refer to <jump href="releases_plan.html">Releases Plan</jump>.
</p>
</s2>
<s2 title="Releases Archive">
<p>For information about earlier &XercesCName; releases,
refer to the <jump href="releases_archive.html">Releases Archive</jump>.
</p>
</s2>
<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=12314395&amp;styleName=Text&amp;projectId=10510">Release Notes</jump>
</p>
</s2>
</s1>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Future Releases Plan">
<s2 title="&XercesCName; Future Releases Plan">
<p>This document highlights the release plan for &XercesCName;.</p>
<s3 title="Current Status"><p>&XercesCName; &XercesCLatest; - released on August XX, 2017.</p></s3>
<s3 title="Next Target Release">
<p>There are no specific plans for the next 3.x release.</p>
<p>There will be no further releases in the Xerces-C++ 2-series.</p>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,96 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="&XercesCName; Samples">
<s2 title="Introduction">
<p>&XercesCName; comes with sample applications that
demonstrate salient features of the parser. They are simple
applications written on top of the SAX and DOM APIs provided by
the parser. Sample XML data files are provided in the
<code>samples/data</code> directory.</p>
</s2>
<s2 title="Running the Samples">
<p>The sample applications are dependent on the &XercesCName; shared library
(and could also depend on the ICU library if you built &XercesCName; with ICU).
Therefore, on Windows platforms you must make sure that your <code>PATH</code>
environment variable is set properly to pick up these shared libraries at
runtime.</p>
<p>On UNIX platforms you must ensure that <code>LD_LIBRARY_PATH</code>
environment variable is set properly to pick up the shared libraries at
runtime. (UNIX gurus will understand here that <code>LD_LIBRARY_PATH</code>
actually translates to <code>LD_LIBRARY_PATH</code> on Solaris and Linux,
<code>SHLIB_PATH</code> on HP-UX, <code>DYLD_LIBRARY_PATH</code> on Mac OS X,
and <code>LIBPATH</code> on AIX).</p>
<p>On both Windows and UNIX platforms, if the parser is built with the ICU
message loader or message catalog loader, then you may need to set another
environment variable, <code>XERCESC_NLS_HOME</code>, to point to the
&XercesC3SrcInstallDir;/msg directory, which is where the message
files reside.
</p>
<p>Once you have set up the environment variables, you can run the
samples by opening a command window (or your shell prompt for
UNIX environments).</p>
<s3 title="&XercesCName; Samples">
<ul>
<li><link idref="saxcount-&XercesC3Series;">SAXCount</link>
<br/>SAXCount counts the elements, attributes, spaces and
characters in an XML file.</li>
<li><link idref="saxprint-&XercesC3Series;">SAXPrint</link>
<br/>SAXPrint parses an XML file and prints it out.</li>
<li><link idref="sax2count-&XercesC3Series;">SAX2Count</link>
<br/>SAX2Count counts the elements, attributes, spaces and
characters in an XML file.</li>
<li><link idref="sax2print-&XercesC3Series;">SAX2Print</link>
<br/>SAX2Print parses an XML file and prints it out.</li>
<li><link idref="domcount-&XercesC3Series;">DOMCount</link>
<br/>DOMCount counts the elements in a XML file.</li>
<li><link idref="domprint-&XercesC3Series;">DOMPrint</link>
<br/>DOMPrint parses an XML file and prints it out.</li>
<li><link idref="createdoc-&XercesC3Series;">CreateDOMDocument</link>
<br/>CreateDOMDocument creates a DOM tree in memory from scratch.</li>
<li><link idref="memparse-&XercesC3Series;">MemParse</link>
<br/>MemParse parses XML in a memory buffer, printing the number of elements and attributes.</li>
<li><link idref="redirect-&XercesC3Series;">Redirect</link>
<br/>Redirect redirects the input stream for external entities.</li>
<li><link idref="pparse-&XercesC3Series;">PParse</link>
<br/>PParse demonstrates progressive parsing.</li>
<li><link idref="stdinparse-&XercesC3Series;">StdInParse</link>
<br/>StdInParse demonstrates streaming XML data from standard input.</li>
<li><link idref="enumval-&XercesC3Series;">EnumVal</link>
<br/>EnumVal shows how to enumerate the markup declarations in a DTD Grammar.</li>
<li><link idref="senumval-&XercesC3Series;">SEnumVal</link>
<br/>SEnumVal shows how to enumerate the markup declarations in a Schema Grammar.</li>
<li><link idref="psviwriter-&XercesC3Series;">PSVIWriter</link>
<br/>PSVIWriter exposes the underlying PSVI of the parsed XML file.</li>
<li><link idref="scmprint-&XercesC3Series;">SCMPrint</link>
<br/>SCMPrint parses an XSD file and prints information about the Schema Component Model.</li>
<li><link idref="xinclude-&XercesC3Series;">XInclude</link>
<br/>XInclude parses an XML file and writes a new XML file with the xi:include elements expanded.</li>
</ul>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,73 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: SAX2Count">
<s2 title="SAX2Count">
<p>SAX2Count is a simple application that counts the elements and characters of
a given XML file using the (event based) SAX2 API.</p>
<s3 title="Running SAX2Count">
<p>The SAX2Count sample parses an XML file and prints out the number of
elements and characters in the file. To run SAX2Count, enter the following </p>
<source>SAX2Count &lt;XML File&gt;</source>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
SAX2Count [options] &lt;XML file | List file&gt;
This program invokes the SAX2XMLReader, and then prints the
number of elements, attributes, spaces and characters found
in each XML file, using SAX2 API.
Options:
-l Indicate the input file is a List File that has a list of xml files.
Default to off (Input file is an XML file).
-v=xxx Validation scheme [always | never | auto*].
-f Enable full schema constraint checking processing. Defaults to off.
-n Disable namespace processing. Defaults to on.
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.
-s Disable schema processing. Defaults to on.
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.
-locale=ll_CC specify the locale, default: en_US
-? Show this help.
* = Default if not provided explicitly.
</source>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from SAX2Count</p>
<source>cd &XercesC3InstallDir;/samples/data
SAX2Count -v=always personal.xml
personal.xml: 60 ms (37 elems, 12 attrs, 134 spaces, 134 chars)</source>
<p>Running SAX2Count with the validating parser gives a different result because
ignorable white-space is counted separately from regular characters.</p>
<source>SAX2Count -v=never personal.xml
personal.xml: 10 ms (37 elems, 12 attrs, 0 spaces, 268 chars)</source>
<p>Note that the sum of spaces and characters in both versions is the same.</p>
<note>The time reported by the program may be different depending on your
processor speed.</note>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,123 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: SAX2Print">
<s2 title="SAX2Print">
<p>SAX2Print uses the SAX2 APIs to parse an XML file and print
it back. Do note that the output of this sample is not
exactly the same as the input (in terms of whitespaces, first
line), but the output has the same information content as the
input.</p>
<s3 title="Running SAX2Print">
<p>The SAX2Print sample parses an XML file and prints out the
contents again in XML (some loss occurs). To run SAX2Print,
enter the following </p>
<source>SAX2Print &lt;XML file&gt;</source>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
SAX2Print [options] &lt;XML file&gt;
This program invokes the SAX2XMLReader, and then prints the
data returned by the various SAX2 handlers for the specified
XML file.
Options:
-u=xxx Handle unrepresentable chars [fail | rep | ref*].
-v=xxx Validation scheme [always | never | auto*].
-e Expand Namespace Alias with URI's.
-x=XXX Use a particular encoding for output (LATIN1*).
-f Enable full schema constraint checking processing. Defaults to off.
-p Enable namespace-prefixes feature. Defaults to off.\n"
-n Disable namespace processing. Defaults to on.\n"
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.\n"
-s Disable schema processing. Defaults to on.
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.
-? Show this help.
* = Default if not provided explicitly.
The parser has intrinsic support for the following encodings:
UTF-8, US-ASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,
WINDOWS-1252, IBM1140, IBM037, IBM1047.
</source>
<p><em>-u=fail</em> will fail when unrepresentable characters are encountered<br/>
<em>-u=rep</em> will replace with the substitution character for that codepage<br/>
<em>-u=ref</em> will report the character as a reference</p>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from SAX2Print</p>
<source>cd &XercesC3InstallDir;/samples/data
SAX2Print -v=always personal.xml
&lt;?xml version="1.0" encoding="LATIN1"?&gt;
&lt;personnel&gt;
&lt;person id="Big.Boss"&gt;
&lt;name&gt;&lt;family&gt;Boss&lt;/family&gt; &lt;given&gt;Big&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;chief@foo.com&lt;/email&gt;
&lt;link subordinates="one.worker two.worker three.worker
four.worker five.worker"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="one.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;One&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;one@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="two.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Two&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;two@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="three.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Three&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;three@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="four.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Four&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;four@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="five.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Five&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;five@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;/personnel&gt;</source>
<note>SAX2Print does not reproduce the original XML file.
SAX2Print and DOMPrint produce different results because of
the way the two APIs store data and capture events.</note>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,71 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: SAXCount">
<s2 title="SAXCount">
<p>SAXCount is the simplest application that counts the elements and characters of
a given XML file using the (event based) SAX API.</p>
<s3 title="Running SAXCount">
<p>The SAXCount sample parses an XML file and prints out the number of
elements in the file. To run SAXCount, enter the following </p>
<source>SAXCount &lt;XML File&gt;</source>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
SAXCount [options] &lt;XML file | List file&gt;
This program invokes the SAX Parser, and then prints the
number of elements, attributes, spaces and characters found
in each XML file, using SAX API.
Options:
-l Indicate the input file is a List File that has a list of xml files.
Default to off (Input file is an XML file).
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Defaults to off.
-s Enable schema processing. Defaults to off.
-f Enable full schema constraint checking. Defaults to off.
-locale=ll_CC specify the locale, default: en_US
-? Show this help.
* = Default if not provided explicitly.
</source>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from SAXCount</p>
<source>cd &XercesC3InstallDir;/samples/data
SAXCount -v=always personal.xml
personal.xml: 60 ms (37 elems, 12 attrs, 134 spaces, 134 chars)</source>
<p>Running SAXCount with the validating parser gives a different result because
ignorable white-space is counted separately from regular characters.</p>
<source>SAXCount -v=never personal.xml
personal.xml: 10 ms (37 elems, 12 attrs, 0 spaces, 268 chars)</source>
<p>Note that the sum of spaces and characters in both versions is the same.</p>
<note>The time reported by the program may be different depending on your
processor speed.</note>
</s3>
</s2>
</s1>

119
lib/xerces/doc/saxprint.xml Normal file
Просмотреть файл

@ -0,0 +1,119 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: SAXPrint">
<s2 title="SAXPrint">
<p>SAXPrint uses the SAX APIs to parse an XML file and print
it back. Do note that the output of this sample is not
exactly the same as the input (in terms of whitespaces, first
line), but the output has the same information content as the
input.</p>
<s3 title="Running SAXPrint">
<p>The SAXPrint sample parses an XML file and prints out the
contents again in XML (some loss occurs). To run SAXPrint,
enter the following </p>
<source>SAXPrint &lt;XML file&gt;</source>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
SAXPrint [options] &lt;XML file&gt;
This program invokes the SAX Parser, and then prints the
data returned by the various SAX handlers for the specified
XML file.
Options:
-u=xxx Handle unrepresentable chars [fail | rep | ref*].
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing.
-s Enable schema processing.
-f Enable full schema constraint checking.
-x=XXX Use a particular encoding for output (LATIN1*).
-? Show this help.
* = Default if not provided explicitly.
The parser has intrinsic support for the following encodings:
UTF-8, US-ASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,
WINDOWS-1252, IBM1140, IBM037, IBM1047.
</source>
<p><em>-u=fail</em> will fail when unrepresentable characters are encountered<br/>
<em>-u=rep</em> will replace with the substitution character for that codepage<br/>
<em>-u=ref</em> will report the character as a reference</p>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Here is a sample output from SAXPrint</p>
<source>cd &XercesC3InstallDir;/samples/data
SAXPrint -v=always personal.xml
&lt;?xml version="1.0" encoding="LATIN1"?&gt;
&lt;personnel&gt;
&lt;person id="Big.Boss"&gt;
&lt;name&gt;&lt;family&gt;Boss&lt;/family&gt; &lt;given&gt;Big&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;chief@foo.com&lt;/email&gt;
&lt;link subordinates="one.worker two.worker three.worker
four.worker five.worker"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="one.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;One&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;one@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="two.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Two&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;two@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="three.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Three&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;three@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="four.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Four&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;four@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;person id="five.worker"&gt;
&lt;name&gt;&lt;family&gt;Worker&lt;/family&gt; &lt;given&gt;Five&lt;/given&gt;&lt;/name&gt;
&lt;email&gt;five@foo.com&lt;/email&gt;
&lt;link manager="Big.Boss"&gt;&lt;/link&gt;
&lt;/person&gt;
&lt;/personnel&gt;</source>
<note>SAXPrint does not reproduce the original XML file.
SAXPrint and DOMPrint produce different results because of
the way the two APIs store data and capture events.</note>
</s3>
</s2>
</s1>

247
lib/xerces/doc/schema.xml Normal file
Просмотреть файл

@ -0,0 +1,247 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="XML Schema Support">
<s2 title="Introduction">
<p>&XercesCName; includes an implementation of the W3C XML Schema
specification, a recommendation of the Worldwide Web Consortium
available in three parts:
<jump href="http://www.w3.org/TR/xmlschema-0/">XML Schema: Primer</jump>,
<jump href="http://www.w3.org/TR/xmlschema-1/">XML Schema: Structures</jump> and
<jump href="http://www.w3.org/TR/xmlschema-2/">XML Schema: Datatypes</jump>.
We consider this implementation complete except for the limitations outlined below.
</p>
</s2>
<anchor name="limitation"/>
<s2 title="Limitations">
<ul>
<li>In certain complex content models specifying large
values for the <code>minOccurs</code> or <code>maxOccurs</code>
attributes may result in poor performance and/or large amount
of memory being allocated by the parser. In such situations large values for
<code>minOccurs</code> should be avoided, and <code>unbounded</code>
should be used instead.</li>
<li>The parser treats local elements in the same scope with the
same name and namespace as one element declaration and does not
differentiate between them.</li>
</ul>
</s2>
<anchor name="interpretation"/>
<s2 title="Interpretation of Areas that are Unclear or Implementation-Dependent">
<s3 title="keyref">
<p>
We have interpreted the specs as requiring &lt;keyref&gt; Identity Constraints to refer to
&lt;key&gt; or &lt;unique&gt; identity constraints within the scope of the elements to which
the &lt;keyref&gt; is attached. This interpretation is at variance with the Schema Primer, which
contains an example with a &lt;keyref&gt; declared on an element used inside the element of its
corresponding &lt;key&gt;.
</p>
</s3>
<s3 title="out-of-bound float values">
<p>
For float data, the specification does not explicitly prescribe how to deal with
out-of-bound data. &XercesCName; converts these values as shown below:
</p>
<table>
<tr>
<td>Values in range</td>
<td>Values converted</td>
</tr>
<tr>
<td>less than -2<sup>24</sup> * 2<sup>104</sup> (approx -3.402823669e+38) </td>
<td>-INF</td>
</tr>
<tr>
<td>greater than -1 * 2<sup>-149</sup> (approx -1.401298464e-45) and less than -0 </td>
<td>-0</td>
</tr>
<tr>
<td>greater than +0 and less than +1 * 2<sup>-149</sup> (approx +1.401298464e-45) </td>
<td>+0</td>
</tr>
<tr>
<td>greater than +2<sup>24</sup> * 2<sup>104</sup> (approx 3.402823669e+38) </td>
<td>+INF</td>
</tr>
</table>
<p>
The effect of this conversion would invalidate an instance data, for example,
"1.1e-46", of a data type derived from float, with minExclusive value '+0',
since "1.1e-46" is converted to "+0", which is the same as the minExclusive.
</p>
</s3>
<s3 title="out-of-bound double values">
<p>
Similarly, &XercesCName; converts double values as shown below (the values
depend on the system specific values of DBL_MAX and DBL_MIN):
</p>
<table>
<tr>
<td>Values in range</td>
<td>Values converted</td>
</tr>
<tr>
<td>less than -DBL_MAX (approx -1.7976931348623158e+308) </td>
<td>-INF</td>
</tr>
<tr>
<td>greater than -DBL_MIN (approx -2.2250738585072014e-308) and less than -0 </td>
<td>-0</td>
</tr>
<tr>
<td>greater than +0 and less than +DBL_MIN (approx +2.2250738585072014e-308) </td>
<td>+0</td>
</tr>
<tr>
<td>greater than +DBL_MAX (approx +1.7976931348623158e+308) </td>
<td>+INF</td>
</tr>
</table>
</s3>
</s2>
<anchor name="usage"/>
<s2 title="Usage">
<p>Below is an example that shows how to turn on schema processing in DOMParser
(default is off). Note that you must also turn on namespace support
(default is off) for schema processing.
</p>
<source>// Instantiate the DOM parser.
XercesDOMParser parser;
parser.setDoNamespaces(true);
parser.setDoSchema(true);
parser.parse(xmlFile);
</source>
<p>Usage in SAXParser is similar, please refer to the SAXCount
sample program for further reference.
</p>
<p>Below is an example that shows how to turn on schema processing in SAX2XMLReader
(default is on). Note that namespace must be on (default is on) as well.
</p>
<source>SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);
parser->setFeature(XMLUni::fgXercesSchema, true);
parser->parse(xmlFile);
</source>
</s2>
<anchor name="associate"/>
<s2 title="Associating Schema Grammar with instance document">
<p>Schema grammars can be associated with instance documents in three ways.
</p>
<s3 title="Specifying Schema Grammar through attributes in the instance document">
<p>If schema grammar was not specified externally through methods,
then each instance document that uses XML Schema grammars must specify the location of
the grammars it uses by using an xsi:schemaLocation attribute if they use
namespaces, and xsi:noNamespaceSchemaLocation attribute otherwise.
</p>
<p>Here is an example with no target namespace:
</p>
<source>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='personal.xsd'&gt;
...
&lt;/personnel&gt;
</source>
<p>Here is an example with a target namespace. Note that it is an error to specify a
different namespace in xsi:schemaLocation attribute than the target namespace
defined in the Schema.
</p>
<source>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;personnel xmlns="http://my.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://my.com personal.xsd http://my2.com test2.xsd"&gt;
...
&lt;/personnel&gt;
</source>
</s3>
<s3 title="Specifying Schema Grammar through method calls">
<p>An application developer may associate schemas with instance documents through
methods <code>setExternalSchemaLocation</code> if they use namespaces, and
<code>setExternalNoNamespaceSchemaLocation</code> otherwise.
(For SAX2XMLReader, use the properties:
"http://apache.org/xml/properties/schema/external-schemaLocation" and
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation")
</p>
<p>Here is an example with no target namespace:
</p>
<source>
// Instantiate the DOM parser.
XercesDOMParser parser;
parser.setDoNamespaces(true);
parser.setDoSchema(true);
parser.setExternalNoNamespaceSchemaLocation("personal.xsd");
parser.parse("test.xml");
// Instantiate the SAX2 XMLReader.
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
XMLCh* propertyValue = XMLString::transcode("personal.xsd");
ArrayJanitor&lt;XMLCh&gt; janValue(propertyValue);
parser->setProperty(
XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation,
propertyValue);
parser.parse("test.xml");
</source>
<p>Here is an example with a target namespace. Note that it is an error to specify a
different namespace in <code>setExternalSchemaLocation</code> than the target
namespace defined in the Schema.
</p>
<source>
// Instantiate the DOM parser.
XercesDOMParser parser;
parser.setDoNamespaces(true);
parser.setDoSchema(true);
parser.setExternalSchemaLocation(
"http://my.com personal.xsd http://my2.com test2.xsd");
parser.parse("test.xml");
// Instantiate the SAX2 XMLReader.
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
XMLCh* propertyValue = XMLString::transcode(
"http://my.com personal.xsd http://my2.com test2.xsd");
ArrayJanitor&lt;XMLCh&gt; janValue(propertyValue);
parser->setProperty(
XMLUni::fgXercesSchemaExternalSchemaLocation,
propertyValue);
parser.parse("test.xml");
</source>
</s3>
<s3 title="Pre-parsing and Caching Schema Grammar">
<p>An application developer may also pre-parse and
cache the grammar corresponding to the XML document
namespace as described in the
<jump href="program-others-&XercesC3Series;.html#GrammarCache">Pre-parsing
Grammar and Grammar Caching</jump> section of the
&XercesCName; Programming Guide.</p>
</s3>
</s2>
</s1>

124
lib/xerces/doc/scmprint.xml Normal file
Просмотреть файл

@ -0,0 +1,124 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: SCMPrint">
<s2 title="SCMPrint">
<p>SCMPrint shows how to access the Schema Content Model information.</p>
<s3 title="Running SCMPrint">
<p>This program parses the specified XSD file, then shows how to
access the Schema Content Model information.</p>
<source>
Usage:
SCMPrint [options] &lt;XSD file | List file&gt;
This program loads XML Schema file(s), to show how one can
access the Schema Content Model information.
Options:
-f Enable full schema constraint checking processing. Defaults to off.
-l Indicate the input file is a List File that has a list of XSD files.
Default to off (Input file is a XSD file).
-? Show this help.
</source>
<p>Here is some sample output from SCMPrint (as the output is verbose
it has been truncated)</p>
<source>cd &XercesC3InstallDir;/samples/data
SCMPrint personal.xsd
********** Printing out information from Schema **********
Processing Namespace:
============================================
Name: personnel
Component Type: Element
Content Model
Type: Complex
Name: C0
--------------------------------------------
Name: person
Component Type: Element
Content Model
Type: Complex
Name: C1
--------------------------------------------
Name: name
Component Type: Element
Content Model
Type: Complex
Name: C2
--------------------------------------------
Name: family
Component Type: Element
Content Model
Type: Complex
Name: C3
--------------------------------------------
Name: given
Component Type: Element
Content Model
Type: Complex
Name: C4
--------------------------------------------
Name: email
Component Type: Element
Content Model
Type: Simple
Name: string
--------------------------------------------
Name: url
Component Type: Element
Content Model
Type: Complex
Name: C5
--------------------------------------------
Name: link
Component Type: Element
Content Model
Type: Complex
Name: C6
--------------------------------------------
Processing Namespace: http://www.w3.org/2001/XMLSchema
============================================
no elements
Name: http://www.w3.org/2001/XMLSchema, anyType
Component Type: Type Definition
Category: Complex
Base: anyType
Content Model: (* (wildcard))
...
</source>
</s3>
</s2>
</s1>

47
lib/xerces/doc/secadv.xml Normal file
Просмотреть файл

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Security Advisories">
<s2 title="Addressed in 3.1.4 and Later Releases">
<p>The following security advisories apply to versions of
Xerces-C older than V3.1.4:</p>
<ul>
<li><jump href="secadv/CVE-2016-4463.txt">CVE-2016-4463: Apache Xerces-C XML Parser Crashes on Malformed DTD</jump></li>
</ul>
</s2>
<s2 title="Addressed in 3.1.3 and Later Releases">
<p>The following security advisories apply to versions of
Xerces-C older than V3.1.3:</p>
<ul>
<li><jump href="secadv/CVE-2016-0729.txt">CVE-2016-0729: Apache Xerces-C XML Parser Crashes on Malformed Input</jump></li>
</ul>
</s2>
<s2 title="Addressed in 3.1.2 and Later Releases">
<p>The following security advisories apply to versions of
Xerces-C older than V3.1.2:</p>
<ul>
<li><jump href="secadv/CVE-2015-0252.txt">CVE-2015-0252: Apache Xerces-C XML Parser Crashes on Malformed Input</jump></li>
</ul>
</s2>
</s1>

145
lib/xerces/doc/senumval.xml Normal file
Просмотреть файл

@ -0,0 +1,145 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: SEnumVal">
<s2 title="SEnumVal">
<p>SEnumVal shows how to enumerate the markup declarations in a Schema Grammar.</p>
<s3 title="Running SEnumVal">
<p>This program parses the specified XML file, then shows how to
enumerate the contents of the Schema Grammar. </p>
<source>
Usage:
SEnumVal &lt;XML file&gt;
This program parses a file, then shows how to enumerate the
contents of the Schema Grammar. Essentially, shows how one can
access the Schema information stored in internal data structures.
</source>
<p>Here is a sample output from SEnumVal</p>
<source>cd &XercesC3InstallDir;/samples/data
SEnumVal personal-schema.xml
Name: personnel
Model Type: Children
Create Reason: Declared
ContentType: OneOrMore
Content Model: (person)+
ComplexType:
TypeName: ,C0
ContentType: OneOrMore
--------------------------------------------
Name: person
Model Type: Children
Create Reason: Declared
ContentType: Sequence
Content Model: (name,email*,url*,link?)
ComplexType:
TypeName: ,C1
ContentType: Sequence
Attributes:
Name: salary
Type: CDATA
Default Type: #IMPLIED
Base Datatype: Decimal
Facets:
fractionDigits=0
Name: id
Type: ID
Default Type: #REQUIRED
Base Datatype: ID
Name: contr
Type: CDATA
Default Type: #DEFAULT
Value: false
Base Datatype: string
Enumeration:
true
false
Name: note
Type: CDATA
Default Type: #IMPLIED
Base Datatype: string
--------------------------------------------
Name: name
Model Type: Children
Create Reason: Declared
ContentType: All
Content Model: All(family,given)
ComplexType:
TypeName: ,C3
ContentType: All
--------------------------------------------
Name: family
Model Type: Simple
Create Reason: Declared
Base Datatype: string
--------------------------------------------
Name: given
Model Type: Simple
Create Reason: Declared
Base Datatype: string
--------------------------------------------
Name: email
Model Type: Simple
Create Reason: Declared
Base Datatype: string
--------------------------------------------
Name: url
Model Type: Empty
Create Reason: Declared
Content Model: EMPTY
ComplexType:
TypeName: ,C4
Attributes:
Name: href
Type: CDATA
Default Type: #DEFAULT
Value: http://
Base Datatype: string
--------------------------------------------
Name: link
Model Type: Empty
Create Reason: Declared
Content Model: EMPTY
ComplexType:
TypeName: ,C5
Attributes:
Name: subordinates
Type: IDREFS
Default Type: #IMPLIED
Base Datatype: List
Name: manager
Type: IDREF
Default Type: #IMPLIED
Base Datatype: IDREF
--------------------------------------------
</source>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Source Repository">
<s2 title="Overview">
<p>The &XercesCName; source code is stored in the Subversion
repository (SVN). The SVN repository is public and everyone
has read access. The repository uses a standard layout of:</p>
<source>
https://svn.apache.org/repos/asf/xerces/c/
|
| - branches/
|
| - tags/
\
- trunk/
</source>
<p>For example, to check out the trunk (the place where the main
development is taking place), execute:</p>
<source>
svn co https://svn.apache.org/repos/asf/xerces/c/trunk
</source>
<p>To check out the code in the xerces-3.1 branch (the place where
the development for the next 3.1-series release, if any, is
taking place), execute:</p>
<source>
svn co https://svn.apache.org/repos/asf/xerces/c/branches/xerces-3.1
</source>
<p>To check out the code for the 3.2.0 release, execute:</p>
<source>
svn co https://svn.apache.org/repos/asf/xerces/c/tags/Xerces-C_3_2_0
</source>
<p>You can also browse the repository and examine individual
files using the <jump href="http://svn.apache.org/viewvc/xerces/c/?root=Apache-SVN">Web
interface</jump>.</p>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,68 @@
<?xml version="1.0" standalone="no"?>
<!--
* 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.
-->
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<s1 title="Sample: StdInParse">
<s2 title="StdInParse">
<p>StdInParse demonstrates streaming XML data from standard input.</p>
<s3 title="Running StdInParse">
<p>The StdInParse sample parses an XML file from standard input and prints out
the number of
elements in the file. To run StdInParse, enter the following: </p>
<source>StdInParse &lt; &lt;XML file&gt;</source>
<p>The following parameters may be set from the command line </p>
<source>
Usage:
StdInParse [options] &lt; &lt;XML file&gt;
This program demonstrates streaming XML data from standard
input. It then uses the SAX Parser, and prints the
number of elements, attributes, spaces and characters found
in the input, using SAX API.
Options:
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Defaults to off.
-s Enable schema processing. Defaults to off.
-f Enable full schema constraint checking. Defaults to off.
-? Show this help.
* = Default if not provided explicitly.
</source>
<p><em>-v=always</em> will force validation<br/>
<em>-v=never</em> will not use any validation<br/>
<em>-v=auto</em> will validate if a DOCTYPE declaration or a schema declaration is present in the XML document</p>
<p>Make sure that you run StdInParse in the samples/data directory.</p>
<p>Here is a sample output from StdInParse:</p>
<source>cd &XercesC3InstallDir;/samples/data
StdInParse -v=always &lt; personal.xml
stdin: 10 ms (37 elems, 12 attrs, 0 spaces, 268 chars)</source>
<p>Running StdInParse with the validating parser gives a different result because
ignorable white-space is counted separately from regular characters.</p>
<source>StdInParse -v=never &lt; personal.xml
stdin: 10 ms (37 elems, 12 attrs, 0 spaces, 268 chars)</source>
<p>Note that the sum of spaces and characters in both versions is the same.</p>
<note>The time reported by the program may be different depending on your
processor speed.</note>
</s3>
</s2>
</s1>

Просмотреть файл

@ -0,0 +1,54 @@
<?xml encoding='ISO-8859-1'?>
<!-- BLOCKS ENTITY -->
<!ENTITY % blocks "p|note|ul|ol|gloss|table|source|anchor|form">
<!-- import the external markup.ent dtd -->
<!ENTITY % markupEntity SYSTEM "markup.ent">
%markupEntity;
<!ENTITY % content "(#PCDATA|%markup;|%links;)*">
<!ELEMENT p %content;>
<!ELEMENT note %content;>
<!ELEMENT ul (li|ol|ul)+>
<!ELEMENT ol (li|ol|ul)+>
<!ELEMENT li %content;>
<!ELEMENT gloss (label|item)+>
<!ELEMENT label %content;>
<!ELEMENT item %content;>
<!ELEMENT source (#PCDATA)>
<!ELEMENT table (tr)+>
<!ELEMENT tr (tn|th|td)+>
<!ELEMENT tn EMPTY>
<!ATTLIST tn colspan CDATA "1"
rowspan CDATA "1">
<!ELEMENT th %content;>
<!ATTLIST th colspan CDATA "1"
rowspan CDATA "1">
<!ELEMENT td %content;>
<!ATTLIST td colspan CDATA "1"
rowspan CDATA "1">
<!ELEMENT form (#PCDATA|select|input)*>
<!ATTLIST form action CDATA #REQUIRED
method CDATA #REQUIRED
id CDATA #REQUIRED>
<!ELEMENT select (#PCDATA|option)*>
<!ATTLIST select name CDATA #REQUIRED>
<!ELEMENT option (#PCDATA)>
<!ATTLIST option value CDATA #REQUIRED>
<!ELEMENT input EMPTY>
<!ATTLIST input type CDATA #REQUIRED
value CDATA #REQUIRED>

Просмотреть файл

@ -0,0 +1,59 @@
<?xml encoding='ISO-8859-1'?>
<!-- STYLEBOOK BOOK DTD -->
<!-- import the external source-specific dtd -->
<!ENTITY % externalEntity SYSTEM "entities.ent">
%externalEntity;
<!ELEMENT book (resources?|document|hidden|faqs|changes|group|container|external|section|separator|separator-space)+>
<!ATTLIST book title CDATA #REQUIRED
copyright CDATA #IMPLIED>
<!ELEMENT resources EMPTY>
<!ATTLIST resources source CDATA #REQUIRED>
<!ELEMENT document EMPTY>
<!ATTLIST document id ID #REQUIRED
source CDATA #REQUIRED
label CDATA #REQUIRED>
<!ELEMENT hidden EMPTY>
<!ATTLIST hidden id ID #REQUIRED
source CDATA #REQUIRED>
<!ELEMENT faqs EMPTY>
<!ATTLIST faqs id ID #REQUIRED
source CDATA #REQUIRED
label CDATA #REQUIRED>
<!ELEMENT changes EMPTY>
<!ATTLIST changes id ID #REQUIRED
source CDATA #REQUIRED
label CDATA #REQUIRED>
<!ELEMENT group (entry)+>
<!ATTLIST group id ID #IMPLIED
label CDATA #REQUIRED
title CDATA #IMPLIED>
<!ELEMENT container (entry)+>
<!ATTLIST container id ID #IMPLIED
source CDATA #REQUIRED
label CDATA #REQUIRED>
<!ELEMENT entry EMPTY>
<!ATTLIST entry id ID #REQUIRED
source CDATA #REQUIRED>
<!ELEMENT external EMPTY>
<!ATTLIST external label CDATA #REQUIRED
href CDATA #REQUIRED>
<!ELEMENT section EMPTY>
<!ATTLIST section label CDATA #REQUIRED>
<!ELEMENT separator EMPTY>
<!ELEMENT separator-space EMPTY>

Просмотреть файл

@ -0,0 +1,24 @@
<?xml encoding='ISO-8859-1'?>
<!-- STYLEBOOK CHANGES DTD -->
<!-- import the external markup.ent dtd -->
<!ENTITY % markupEntity SYSTEM "markup.ent">
%markupEntity;
<!ENTITY % content "(#PCDATA|%markup;|%links;)*">
<!ELEMENT changes (release)+>
<!ATTLIST changes title CDATA #REQUIRED>
<!ELEMENT release ((features,fixes)|(features)|(fixes))>
<!ATTLIST release version CDATA #REQUIRED
date CDATA #IMPLIED>
<!ELEMENT features (feat)+>
<!ELEMENT fixes (fix)+>
<!ELEMENT feat %content;>
<!ELEMENT fix %content;>
<!-- CVS $Revision$ $Date$ -->

Просмотреть файл

@ -0,0 +1,297 @@
<?xml encoding='ISO-8859-1'?>
<!-- CHARACTERS ENTITY -->
<!-- Latin A -->
<!ENTITY nbsp "&#160;"> <!-- U+00A0 ISOnum - no-break space = non-breaking space -->
<!ENTITY iexcl "&#161;"> <!-- U+00A1 ISOnum - inverted exclamation mark -->
<!ENTITY cent "&#162;"> <!-- U+00A2 ISOnum - cent sign -->
<!ENTITY pound "&#163;"> <!-- U+00A3 ISOnum - pound sign -->
<!ENTITY curren "&#164;"> <!-- U+00A4 ISOnum - currency sign -->
<!ENTITY yen "&#165;"> <!-- U+00A5 ISOnum - yen sign = yuan sign -->
<!ENTITY brvbar "&#166;"> <!-- U+00A6 ISOnum - broken bar = broken vertical bar -->
<!ENTITY sect "&#167;"> <!-- U+00A7 ISOnum - section sign -->
<!ENTITY uml "&#168;"> <!-- U+00A8 ISOdia - diaeresis = spacing diaeresis -->
<!ENTITY copy "&#169;"> <!-- U+00A9 ISOnum - copyright sign -->
<!ENTITY ordf "&#170;"> <!-- U+00AA ISOnum - feminine ordinal indicator -->
<!ENTITY laquo "&#171;"> <!-- U+00AB ISOnum - left-pointing double angle quotation mark = left pointing guillemet -->
<!ENTITY not "&#172;"> <!-- U+00AC ISOnum - not sign -->
<!ENTITY shy "&#173;"> <!-- U+00AD ISOnum - soft hyphen = discretionary hyphen -->
<!ENTITY reg "&#174;"> <!-- U+00AE ISOnum - registered sign = registered trade mark sign -->
<!ENTITY macr "&#175;"> <!-- U+00AF ISOdia - macron = spacing macron = overline = APL overbar -->
<!ENTITY deg "&#176;"> <!-- U+00B0 ISOnum - degree sign -->
<!ENTITY plusmn "&#177;"> <!-- U+00B1 ISOnum - plus-minus sign = plus-or-minus sign -->
<!ENTITY sup2 "&#178;"> <!-- U+00B2 ISOnum - superscript two = superscript digit two = squared -->
<!ENTITY sup3 "&#179;"> <!-- U+00B3 ISOnum - superscript three = superscript digit three = cubed -->
<!ENTITY acute "&#180;"> <!-- U+00B4 ISOdia - acute accent = spacing acute -->
<!ENTITY micro "&#181;"> <!-- U+00B5 ISOnum - micro sign -->
<!ENTITY para "&#182;"> <!-- U+00B6 ISOnum - pilcrow sign = paragraph sign -->
<!ENTITY middot "&#183;"> <!-- U+00B7 ISOnum - middle dot = Georgian comma = Greek middle dot -->
<!ENTITY cedil "&#184;"> <!-- U+00B8 ISOdia - cedilla = spacing cedilla -->
<!ENTITY sup1 "&#185;"> <!-- U+00B9 ISOnum - superscript one = superscript digit one -->
<!ENTITY ordm "&#186;"> <!-- U+00BA ISOnum - masculine ordinal indicator -->
<!ENTITY raquo "&#187;"> <!-- U+00BB ISOnum - right-pointing double angle quotation mark = right pointing guillemet -->
<!ENTITY frac14 "&#188;"> <!-- U+00BC ISOnum - vulgar fraction one quarter = fraction one quarter -->
<!ENTITY frac12 "&#189;"> <!-- U+00BD ISOnum - vulgar fraction one half = fraction one half -->
<!ENTITY frac34 "&#190;"> <!-- U+00BE ISOnum - vulgar fraction three quarters = fraction three quarters -->
<!ENTITY iquest "&#191;"> <!-- U+00BF ISOnum - inverted question mark = turned question mark -->
<!ENTITY Agrave "&#192;"> <!-- U+00C0 ISOlat1 - latin capital letter A with grave = latin capital letter A grave -->
<!ENTITY Aacute "&#193;"> <!-- U+00C1 ISOlat1 - latin capital letter A with acute -->
<!ENTITY Acirc "&#194;"> <!-- U+00C2 ISOlat1 - latin capital letter A with circumflex -->
<!ENTITY Atilde "&#195;"> <!-- U+00C3 ISOlat1 - latin capital letter A with tilde -->
<!ENTITY Auml "&#196;"> <!-- U+00C4 ISOlat1 - latin capital letter A with diaeresis -->
<!ENTITY Aring "&#197;"> <!-- U+00C5 ISOlat1 - latin capital letter A with ring above = latin capital letter A ring -->
<!ENTITY AElig "&#198;"> <!-- U+00C6 ISOlat1 - latin capital letter AE = latin capital ligature AE -->
<!ENTITY Ccedil "&#199;"> <!-- U+00C7 ISOlat1 - latin capital letter C with cedilla -->
<!ENTITY Egrave "&#200;"> <!-- U+00C8 ISOlat1 - latin capital letter E with grave -->
<!ENTITY Eacute "&#201;"> <!-- U+00C9 ISOlat1 - latin capital letter E with acute -->
<!ENTITY Ecirc "&#202;"> <!-- U+00CA ISOlat1 - latin capital letter E with circumflex -->
<!ENTITY Euml "&#203;"> <!-- U+00CB ISOlat1 - latin capital letter E with diaeresis -->
<!ENTITY Igrave "&#204;"> <!-- U+00CC ISOlat1 - latin capital letter I with grave -->
<!ENTITY Iacute "&#205;"> <!-- U+00CD ISOlat1 - latin capital letter I with acute -->
<!ENTITY Icirc "&#206;"> <!-- U+00CE ISOlat1 - latin capital letter I with circumflex -->
<!ENTITY Iuml "&#207;"> <!-- U+00CF ISOlat1 - latin capital letter I with diaeresis -->
<!ENTITY ETH "&#208;"> <!-- U+00D0 ISOlat1 - latin capital letter ETH -->
<!ENTITY Ntilde "&#209;"> <!-- U+00D1 ISOlat1 - latin capital letter N with tilde -->
<!ENTITY Ograve "&#210;"> <!-- U+00D2 ISOlat1 - latin capital letter O with grave -->
<!ENTITY Oacute "&#211;"> <!-- U+00D3 ISOlat1 - latin capital letter O with acute -->
<!ENTITY Ocirc "&#212;"> <!-- U+00D4 ISOlat1 - latin capital letter O with circumflex -->
<!ENTITY Otilde "&#213;"> <!-- U+00D5 ISOlat1 - latin capital letter O with tilde -->
<!ENTITY Ouml "&#214;"> <!-- U+00D6 ISOlat1 - latin capital letter O with diaeresis -->
<!ENTITY times "&#215;"> <!-- U+00D7 ISOnum - multiplication sign -->
<!ENTITY Oslash "&#216;"> <!-- U+00D8 ISOlat1 - latin capital letter O with stroke = latin capital letter O slash -->
<!ENTITY Ugrave "&#217;"> <!-- U+00D9 ISOlat1 - latin capital letter U with grave -->
<!ENTITY Uacute "&#218;"> <!-- U+00DA ISOlat1 - latin capital letter U with acute -->
<!ENTITY Ucirc "&#219;"> <!-- U+00DB ISOlat1 - latin capital letter U with circumflex -->
<!ENTITY Uuml "&#220;"> <!-- U+00DC ISOlat1 - latin capital letter U with diaeresis -->
<!ENTITY Yacute "&#221;"> <!-- U+00DD ISOlat1 - latin capital letter Y with acute -->
<!ENTITY THORN "&#222;"> <!-- U+00DE ISOlat1 - latin capital letter THORN -->
<!ENTITY szlig "&#223;"> <!-- U+00DF ISOlat1 - latin small letter sharp s = ess-zed -->
<!ENTITY agrave "&#224;"> <!-- U+00E0 ISOlat1 - latin small letter a with grave = latin small letter a grave -->
<!ENTITY aacute "&#225;"> <!-- U+00E1 ISOlat1 - latin small letter a with acute -->
<!ENTITY acirc "&#226;"> <!-- U+00E2 ISOlat1 - latin small letter a with circumflex -->
<!ENTITY atilde "&#227;"> <!-- U+00E3 ISOlat1 - latin small letter a with tilde -->
<!ENTITY auml "&#228;"> <!-- U+00E4 ISOlat1 - latin small letter a with diaeresis -->
<!ENTITY aring "&#229;"> <!-- U+00E5 ISOlat1 - latin small letter a with ring above = latin small letter a ring -->
<!ENTITY aelig "&#230;"> <!-- U+00E6 ISOlat1 - latin small letter ae = latin small ligature ae -->
<!ENTITY ccedil "&#231;"> <!-- U+00E7 ISOlat1 - latin small letter c with cedilla -->
<!ENTITY egrave "&#232;"> <!-- U+00E8 ISOlat1 - latin small letter e with grave -->
<!ENTITY eacute "&#233;"> <!-- U+00E9 ISOlat1 - latin small letter e with acute -->
<!ENTITY ecirc "&#234;"> <!-- U+00EA ISOlat1 - latin small letter e with circumflex -->
<!ENTITY euml "&#235;"> <!-- U+00EB ISOlat1 - latin small letter e with diaeresis -->
<!ENTITY igrave "&#236;"> <!-- U+00EC ISOlat1 - latin small letter i with grave -->
<!ENTITY iacute "&#237;"> <!-- U+00ED ISOlat1 - latin small letter i with acute -->
<!ENTITY icirc "&#238;"> <!-- U+00EE ISOlat1 - latin small letter i with circumflex -->
<!ENTITY iuml "&#239;"> <!-- U+00EF ISOlat1 - latin small letter i with diaeresis -->
<!ENTITY eth "&#240;"> <!-- U+00F0 ISOlat1 - latin small letter eth -->
<!ENTITY ntilde "&#241;"> <!-- U+00F1 ISOlat1 - latin small letter n with tilde -->
<!ENTITY ograve "&#242;"> <!-- U+00F2 ISOlat1 - latin small letter o with grave -->
<!ENTITY oacute "&#243;"> <!-- U+00F3 ISOlat1 - latin small letter o with acute -->
<!ENTITY ocirc "&#244;"> <!-- U+00F4 ISOlat1 - latin small letter o with circumflex -->
<!ENTITY otilde "&#245;"> <!-- U+00F5 ISOlat1 - latin small letter o with tilde -->
<!ENTITY ouml "&#246;"> <!-- U+00F6 ISOlat1 - latin small letter o with diaeresis -->
<!ENTITY divide "&#247;"> <!-- U+00F7 ISOnum - division sign -->
<!ENTITY oslash "&#248;"> <!-- U+00F8 ISOlat1 - latin small letter o with stroke = latin small letter o slash -->
<!ENTITY ugrave "&#249;"> <!-- U+00F9 ISOlat1 - latin small letter u with grave -->
<!ENTITY uacute "&#250;"> <!-- U+00FA ISOlat1 - latin small letter u with acute -->
<!ENTITY ucirc "&#251;"> <!-- U+00FB ISOlat1 - latin small letter u with circumflex -->
<!ENTITY uuml "&#252;"> <!-- U+00FC ISOlat1 - latin small letter u with diaeresis -->
<!ENTITY yacute "&#253;"> <!-- U+00FD ISOlat1 - latin small letter y with acute -->
<!ENTITY thorn "&#254;"> <!-- U+00FE ISOlat1 - latin small letter thorn -->
<!ENTITY yuml "&#255;"> <!-- U+00FF ISOlat1 - latin small letter y with diaeresis -->
<!-- C0 Controls and Basic Latin -->
<!ENTITY quot "&#34;"> <!-- U+0022 ISOnum - quotation mark = APL quote -->
<!ENTITY amp "&#38;"> <!-- U+0026 ISOnum - ampersand -->
<!ENTITY lt "&#60;"> <!-- U+003C ISOnum - less-than sign -->
<!ENTITY gt "&#62;"> <!-- U+003E ISOnum - greater-than sign -->
<!-- Latin Extended-A -->
<!ENTITY OElig "&#338;"> <!-- U+0152 ISOlat2 - latin capital ligature OE -->
<!ENTITY oelig "&#339;"> <!-- U+0153 ISOlat2 - latin small ligature oe -->
<!-- ligature is a misnomer, this is a separate character in some languages -->
<!ENTITY Scaron "&#352;"> <!-- U+0160 ISOlat2 - latin capital letter S with caron -->
<!ENTITY scaron "&#353;"> <!-- U+0161 ISOlat2 - latin small letter s with caron -->
<!ENTITY Yuml "&#376;"> <!-- U+0178 ISOlat2 - latin capital letter Y with diaeresis -->
<!-- Spacing Modifier Letters -->
<!ENTITY circ "&#710;" > <!-- U+02C6 ISOpub - modifier letter circumflex accent -->
<!ENTITY tilde "&#732;" > <!-- U+02DC ISOdia - small tilde -->
<!-- General Punctuation -->
<!ENTITY ensp "&#8194;"> <!-- U+2002 ISOpub - en space -->
<!ENTITY emsp "&#8195;"> <!-- U+2003 ISOpub - em space -->
<!ENTITY thinsp "&#8201;"> <!-- U+2009 ISOpub - thin space -->
<!ENTITY zwnj "&#8204;"> <!-- U+200C RFC 2070 - zero width non-joiner -->
<!ENTITY zwj "&#8205;"> <!-- U+200D RFC 2070 - zero width joiner -->
<!ENTITY lrm "&#8206;"> <!-- U+200E RFC 2070 - left-to-right mark -->
<!ENTITY rlm "&#8207;"> <!-- U+200F RFC 2070 - right-to-left mark -->
<!ENTITY ndash "&#8211;"> <!-- U+2013 ISOpub - en dash -->
<!ENTITY mdash "&#8212;"> <!-- U+2014 ISOpub - em dash -->
<!ENTITY lsquo "&#8216;"> <!-- U+2018 ISOnum - left single quotation mark -->
<!ENTITY rsquo "&#8217;"> <!-- U+2019 ISOnum - right single quotation mark -->
<!ENTITY sbquo "&#8218;"> <!-- U+201A NEW - single low-9 quotation mark -->
<!ENTITY ldquo "&#8220;"> <!-- U+201C ISOnum - left double quotation mark -->
<!ENTITY rdquo "&#8221;"> <!-- U+201D ISOnum - right double quotation mark, -->
<!ENTITY bdquo "&#8222;"> <!-- U+201E NEW - double low-9 quotation mark -->
<!ENTITY dagger "&#8224;"> <!-- U+2020 ISOpub - dagger -->
<!ENTITY Dagger "&#8225;"> <!-- U+2021 ISOpub - double dagger -->
<!ENTITY permil "&#8240;"> <!-- U+2030 ISOtech - per mille sign -->
<!ENTITY lsaquo "&#8249;"> <!-- U+2039 ISO prop. - single left-pointing angle quotation mark -->
<!-- lsaquo is proposed but not yet ISO standardized -->
<!ENTITY rsaquo "&#8250;"> <!-- U+203A ISO prop. - single right-pointing angle quotation mark -->
<!-- rsaquo is proposed but not yet ISO standardized -->
<!ENTITY euro "&#8364;"> <!-- U+20AC NEW - euro sign -->
<!-- Latin Extended-B -->
<!ENTITY fnof "&#402;"> <!-- U+0192 ISOtech - latin small f with hook = function = florin -->
<!-- Greek -->
<!ENTITY Alpha "&#913;"> <!-- U+0391 - greek capital letter alpha -->
<!ENTITY Beta "&#914;"> <!-- U+0392 - greek capital letter beta -->
<!ENTITY Gamma "&#915;"> <!-- U+0393 ISOgrk3 - greek capital letter gamma -->
<!ENTITY Delta "&#916;"> <!-- U+0394 ISOgrk3 - greek capital letter delta -->
<!ENTITY Epsilon "&#917;"> <!-- U+0395 - greek capital letter epsilon -->
<!ENTITY Zeta "&#918;"> <!-- U+0396 - greek capital letter zeta -->
<!ENTITY Eta "&#919;"> <!-- U+0397 - greek capital letter eta -->
<!ENTITY Theta "&#920;"> <!-- U+0398 ISOgrk3 - greek capital letter theta -->
<!ENTITY Iota "&#921;"> <!-- U+0399 - greek capital letter iota -->
<!ENTITY Kappa "&#922;"> <!-- U+039A - greek capital letter kappa -->
<!ENTITY Lambda "&#923;"> <!-- U+039B ISOgrk3 - greek capital letter lambda -->
<!ENTITY Mu "&#924;"> <!-- U+039C - greek capital letter mu -->
<!ENTITY Nu "&#925;"> <!-- U+039D - greek capital letter nu -->
<!ENTITY Xi "&#926;"> <!-- U+039E ISOgrk3 - greek capital letter xi -->
<!ENTITY Omicron "&#927;"> <!-- U+039F - greek capital letter omicron -->
<!ENTITY Pi "&#928;"> <!-- U+03A0 ISOgrk3 - greek capital letter pi -->
<!ENTITY Rho "&#929;"> <!-- U+03A1 - greek capital letter rho -->
<!ENTITY Sigma "&#931;"> <!-- U+03A3 ISOgrk3 - greek capital letter sigma -->
<!ENTITY Tau "&#932;"> <!-- U+03A4 - greek capital letter tau -->
<!ENTITY Upsilon "&#933;"> <!-- U+03A5 ISOgrk3 - greek capital letter upsilon -->
<!ENTITY Phi "&#934;"> <!-- U+03A6 ISOgrk3 - greek capital letter phi -->
<!ENTITY Chi "&#935;"> <!-- U+03A7 - greek capital letter chi -->
<!ENTITY Psi "&#936;"> <!-- U+03A8 ISOgrk3 - greek capital letter psi -->
<!ENTITY Omega "&#937;"> <!-- U+03A9 ISOgrk3 - greek capital letter omega -->
<!ENTITY alpha "&#945;"> <!-- U+03B1 ISOgrk3 - greek small letter alpha -->
<!ENTITY beta "&#946;"> <!-- U+03B2 ISOgrk3 - greek small letter beta -->
<!ENTITY gamma "&#947;"> <!-- U+03B3 ISOgrk3 - greek small letter gamma -->
<!ENTITY delta "&#948;"> <!-- U+03B4 ISOgrk3 - greek small letter delta -->
<!ENTITY epsilon "&#949;"> <!-- U+03B5 ISOgrk3 - greek small letter epsilon -->
<!ENTITY zeta "&#950;"> <!-- U+03B6 ISOgrk3 - greek small letter zeta -->
<!ENTITY eta "&#951;"> <!-- U+03B7 ISOgrk3 - greek small letter eta -->
<!ENTITY theta "&#952;"> <!-- U+03B8 ISOgrk3 - greek small letter theta -->
<!ENTITY iota "&#953;"> <!-- U+03B9 ISOgrk3 - greek small letter iota -->
<!ENTITY kappa "&#954;"> <!-- U+03BA ISOgrk3 - greek small letter kappa -->
<!ENTITY lambda "&#955;"> <!-- U+03BB ISOgrk3 - greek small letter lambda -->
<!ENTITY mu "&#956;"> <!-- U+03BC ISOgrk3 - greek small letter mu -->
<!ENTITY nu "&#957;"> <!-- U+03BD ISOgrk3 - greek small letter nu -->
<!ENTITY xi "&#958;"> <!-- U+03BE ISOgrk3 - greek small letter xi -->
<!ENTITY omicron "&#959;"> <!-- U+03BF NEW - greek small letter omicron -->
<!ENTITY pi "&#960;"> <!-- U+03C0 ISOgrk3 - greek small letter pi -->
<!ENTITY rho "&#961;"> <!-- U+03C1 ISOgrk3 - greek small letter rho -->
<!ENTITY sigmaf "&#962;"> <!-- U+03C2 ISOgrk3 - greek small letter final sigma -->
<!ENTITY sigma "&#963;"> <!-- U+03C3 ISOgrk3 - greek small letter sigma -->
<!ENTITY tau "&#964;"> <!-- U+03C4 ISOgrk3 - greek small letter tau -->
<!ENTITY upsilon "&#965;"> <!-- U+03C5 ISOgrk3 - greek small letter upsilon -->
<!ENTITY phi "&#966;"> <!-- U+03C6 ISOgrk3 - greek small letter phi -->
<!ENTITY chi "&#967;"> <!-- U+03C7 ISOgrk3 - greek small letter chi -->
<!ENTITY psi "&#968;"> <!-- U+03C8 ISOgrk3 - greek small letter psi -->
<!ENTITY omega "&#969;"> <!-- U+03C9 ISOgrk3 - greek small letter omega -->
<!ENTITY thetasym "&#977;"> <!-- U+03D1 NEW - greek small letter theta symbol -->
<!ENTITY upsih "&#978;"> <!-- U+03D2 NEW - greek upsilon with hook symbol -->
<!ENTITY piv "&#982;"> <!-- U+03D6 ISOgrk3 - greek pi symbol -->
<!-- General Punctuation -->
<!ENTITY bull "&#8226;"> <!-- U+2022 ISOpub - bullet = black small circle -->
<!ENTITY hellip "&#8230;"> <!-- U+2026 ISOpub - horizontal ellipsis = three dot leader -->
<!ENTITY prime "&#8242;"> <!-- U+2032 ISOtech - prime = minutes = feet -->
<!ENTITY Prime "&#8243;"> <!-- U+2033 ISOtech - double prime = seconds = inches -->
<!ENTITY oline "&#8254;"> <!-- U+203E NEW - overline = spacing overscore -->
<!ENTITY frasl "&#8260;"> <!-- U+2044 NEW - fraction slash -->
<!-- Letterlike Symbols -->
<!ENTITY weierp "&#8472;"> <!-- U+2118 ISOamso - script capital P = power set = Weierstrass p -->
<!ENTITY image "&#8465;"> <!-- U+2111 ISOamso - blackletter capital I = imaginary part -->
<!ENTITY real "&#8476;"> <!-- U+211C ISOamso - blackletter capital R = real part symbol -->
<!ENTITY trade "&#8482;"> <!-- U+2122 ISOnum - trade mark sign -->
<!ENTITY alefsym "&#8501;"> <!-- U+2135 NEW - alef symbol = first transfinite cardinal -->
<!-- Arrows -->
<!ENTITY larr "&#8592;"> <!-- U+2190 ISOnum - leftwards arrow -->
<!ENTITY uarr "&#8593;"> <!-- U+2191 ISOnum - upwards arrow -->
<!ENTITY rarr "&#8594;"> <!-- U+2192 ISOnum - rightwards arrow -->
<!ENTITY darr "&#8595;"> <!-- U+2193 ISOnum - downwards arrow -->
<!ENTITY harr "&#8596;"> <!-- U+2194 ISOamsa - left right arrow -->
<!ENTITY crarr "&#8629;"> <!-- U+21B5 NEW - downwards arrow with corner leftwards = carriage return -->
<!ENTITY lArr "&#8656;"> <!-- U+21D0 ISOtech - leftwards double arrow -->
<!ENTITY uArr "&#8657;"> <!-- U+21D1 ISOamsa - upwards double arrow -->
<!ENTITY rArr "&#8658;"> <!-- U+21D2 ISOtech - rightwards double arrow -->
<!ENTITY dArr "&#8659;"> <!-- U+21D3 ISOamsa - downwards double arrow -->
<!ENTITY hArr "&#8660;"> <!-- U+21D4 ISOamsa - left right double arrow -->
<!-- Mathematical Operators -->
<!ENTITY forall "&#8704;"> <!-- U+2200 ISOtech - for all -->
<!ENTITY part "&#8706;"> <!-- U+2202 ISOtech - partial differential -->
<!ENTITY exist "&#8707;"> <!-- U+2203 ISOtech - there exists -->
<!ENTITY empty "&#8709;"> <!-- U+2205 ISOamso - empty set = null set = diameter -->
<!ENTITY nabla "&#8711;"> <!-- U+2207 ISOtech - nabla = backward difference -->
<!ENTITY isin "&#8712;"> <!-- U+2208 ISOtech - element of -->
<!ENTITY notin "&#8713;"> <!-- U+2209 ISOtech - not an element of -->
<!ENTITY ni "&#8715;"> <!-- U+220B ISOtech - contains as member -->
<!ENTITY prod "&#8719;"> <!-- U+220F ISOamsb - n-ary product = product sign -->
<!ENTITY sum "&#8721;"> <!-- U+2211 ISOamsb - n-ary sumation -->
<!ENTITY minus "&#8722;"> <!-- U+2212 ISOtech - minus sign -->
<!ENTITY lowast "&#8727;"> <!-- U+2217 ISOtech - asterisk operator -->
<!ENTITY radic "&#8730;"> <!-- U+221A ISOtech - square root = radical sign -->
<!ENTITY prop "&#8733;"> <!-- U+221D ISOtech - proportional to -->
<!ENTITY infin "&#8734;"> <!-- U+221E ISOtech - infinity -->
<!ENTITY ang "&#8736;"> <!-- U+2220 ISOamso - angle -->
<!ENTITY and "&#8743;"> <!-- U+2227 ISOtech - logical and = wedge -->
<!ENTITY or "&#8744;"> <!-- U+2228 ISOtech - logical or = vee -->
<!ENTITY cap "&#8745;"> <!-- U+2229 ISOtech - intersection = cap -->
<!ENTITY cup "&#8746;"> <!-- U+222A ISOtech - union = cup -->
<!ENTITY int "&#8747;"> <!-- U+222B ISOtech - integral -->
<!ENTITY there4 "&#8756;"> <!-- U+2234 ISOtech - therefore -->
<!ENTITY sim "&#8764;"> <!-- U+223C ISOtech - tilde operator = varies with = similar to -->
<!ENTITY cong "&#8773;"> <!-- U+2245 ISOtech - approximately equal to -->
<!ENTITY asymp "&#8776;"> <!-- U+2248 ISOamsr - almost equal to = asymptotic to -->
<!ENTITY ne "&#8800;"> <!-- U+2260 ISOtech - not equal to -->
<!ENTITY equiv "&#8801;"> <!-- U+2261 ISOtech - identical to -->
<!ENTITY le "&#8804;"> <!-- U+2264 ISOtech - less-than or equal to -->
<!ENTITY ge "&#8805;"> <!-- U+2265 ISOtech - greater-than or equal to -->
<!ENTITY sub "&#8834;"> <!-- U+2282 ISOtech - subset of -->
<!ENTITY sup "&#8835;"> <!-- U+2283 ISOtech - superset of -->
<!ENTITY nsub "&#8836;"> <!-- U+2284 ISOamsn - not a subset of -->
<!ENTITY sube "&#8838;"> <!-- U+2286 ISOtech - subset of or equal to -->
<!ENTITY supe "&#8839;"> <!-- U+2287 ISOtech - superset of or equal to -->
<!ENTITY oplus "&#8853;"> <!-- U+2295 ISOamsb - circled plus = direct sum -->
<!ENTITY otimes "&#8855;"> <!-- U+2297 ISOamsb - circled times = vector product -->
<!ENTITY perp "&#8869;"> <!-- U+22A5 ISOtech - up tack = orthogonal to = perpendicular -->
<!ENTITY sdot "&#8901;"> <!-- U+22C5 ISOamsb - dot operator -->
<!-- Miscellaneous Technical -->
<!ENTITY lceil "&#8968;"> <!-- U+2308 ISOamsc - left ceiling = apl upstile -->
<!ENTITY rceil "&#8969;"> <!-- U+2309 ISOamsc - right ceiling -->
<!ENTITY lfloor "&#8970;"> <!-- U+230A ISOamsc - left floor = apl downstile -->
<!ENTITY rfloor "&#8971;"> <!-- U+230B ISOamsc - right floor -->
<!ENTITY lang "&#9001;"> <!-- U+2329 ISOtech - left-pointing angle bracket = bra -->
<!ENTITY rang "&#9002;"> <!-- U+232A ISOtech - right-pointing angle bracket = ket -->
<!-- Geometric Shapes -->
<!ENTITY loz "&#9674;"> <!-- U+25CA ISOpub - lozenge -->
<!-- Miscellaneous Symbols -->
<!ENTITY spades "&#9824;"> <!-- U+2660 ISOpub - black spade suit -->
<!ENTITY clubs "&#9827;"> <!-- U+2663 ISOpub - black club suit = shamrock -->
<!ENTITY hearts "&#9829;"> <!-- U+2665 ISOpub - black heart suit = valentine -->
<!ENTITY diams "&#9830;"> <!-- U+2666 ISOpub - black diamond suit -->
<!-- CVS $Revision$ $Date$ -->
<!-- Portions (C) International Organization for Standardization 1986
Permission to copy in any form is granted for use with
conforming SGML systems and applications as defined in
ISO 8879, provided this notice is included in all copies. -->

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше