1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
|
Index
I - INSTALLING THIS LIBRARY ON UNIX
II - INSTALLING THIS LIBRARY ON VMS
III - INSTALLING THIS LIBRARY ON WINDOWS
IV - TESTING THE LIBRARY
V - CONTENTS OF THE LIBRARY
VI - LICENSING
VII - BUG REPORTS
I - INSTALLING THIS LIBRARY ON UNIX
===================================
Make sure that you do not have a previous installation of XML/Ada in one
of the directories given in ADA_OBJECTS_PATH, or some files will not be
properly recompiled.
Compiling with GNAT 3.14p
-------------------------
You might need to modify Makefile.module.314 to replace the GNATMAKE=
and CC= lines, in case you are using a compiler other than gnatmake,
or in case the compiler is called gnatgcc (debian systems for instance).
You might also want to change the variable BUILD_SHARED if you want to get
shared libraries. However, on some systems this means you'll also need to
set the line
FPIC=-fPIC
This is for instance the case on HPUX.
Configure and compile with the following commands:
> ./configure --prefix=<PREFIX>
> make -f Makefile.314 install
Compiling with GNAT 3.15a1 or GNAT 3.16w
----------------------------------------
You might need to modify the following lines in the Makefile
GNATMAKE= gnatmake
CC= gcc
if you are using a compiler other than native GNAT. For instance, if
you are using a cross-compiler for powerpc/vxworks, you would set them
to
GNATMAKE= powerpc-wrs-vxworks-gnatmake
CC= powerpc-wrs-vxworks-gcc
On some architectures, most notably Solaris, you need to compile the
library with -fPIC to get relocatable code. To do this, replace the line
that defines FPIC in the Makefile with
FPIC=-fPIC
You might also want to change the variable BUILD_SHARED if you want to get
shared libraries. However, on some systems this means you'll also need to
set the line
FPIC=-fPIC
This is for instance the case on HPUX.
Configure and compile with the following commands:
> ./configure --prefix=<PREFIX>
> make install
to build and install the library.
Using the library
-----------------
Files will be copied into ${PREFIX}/lib and ${PREFIX}/include/xmlada.
To use this library, add the following arguments to the gnatmake
command line:
-aI${PREFIX}/include/xmlada -largs -L${PREFIX}/lib -lxmlada
Alternatively, a script is provided in ${PREFIX}/bin, that outputs all
the command line arguments. You should compile with:
gnatmake test.adb `xmlada-config`
You can also build a static version of your program by using:
gnatmake test.adb `xmlada-config --static`
To run a command compiled with this library, you might need to edit the
LD_LIBRARY_PATH environment variable so that ${PREFIX}/lib is included.
Note that this library will not compile with GNU make 3.77 on some platforms,
due to a bug in the handling of the wildcard command. It is recommended that
you update to at least 3.78
II - INSTALLING THIS LIBRARY ON VMS
===================================
On VMS, you should have a recent version of GNAT (3.15 or more recent), since
the makefile is set up to use the GNAT project files that are now available.
Do the following, from the root directory of XML/Ada:
- Edit makefile.vms, and change the PREFIX variable to reflect the directory
where you want to install XML/Ada
- make -f makefile.vms
- make -f makefile.vms install
If you do not have MKDIR.EXE and other unix-like tools, this command
will fail.
You can replace it with some manual steps:
* Create the installation directory
* copy the files
unicode/obj/*
unicode/*.adb unicode/*.ads
input_sources/obj/*
input_sources/*.ads input_sources/*.adb
sax/obj/*
sax/*.adb sax/*.ads
dom/obj/*
dom/*.adb dom/*.ads
into this directory
To use XML/Ada in your own applications, you need to add the installation
directory on the gnatmake command line with a -I switch
- (optional) make -f makefile.vms test
This last step is only required if you want to build the test executables
testsax and testdom which can be used to test the library on any XML file.
III - INSTALLING THIS LIBRARY ON WINDOWS
========================================
1. Due to the nature of GNU Make you need to have a UNIX-type shell and
utilities installed to build this library. If you do not have this,
you can download a set at:
http://www.weihenstephan.de/~syring/win32/UnxUtils.html
2. Run 'configure' to generate the makefile.
An example copy is provided as Makefile.nt, rename it to makefile if you
cannot run configure. You also need to rename Makefile.module.nt to
Makefile.module
3. Before building make sure to set the following values in 'Makefile':
PREFIX=C:/GNAT/XMLada
the makefile where to install the library. Note the slashes in the path!
4. The best way to proceed is to do a 'make install'.
5. If you have GNAT 3.14 or later, you can register the library as a
standard library using the 'gnatreg' command.
IV - TESTING THE LIBRARY
========================
You need to download the official OASIS test suite for XML,
from www.xml.org. The name of the current archive is
xmlconf-19990712.tar.Z.
Uncompress it somewhere on your disk, then edit the file dom/test/testsuite to
reflect the location of that testsuite (BASE should point to the directory
containing these official tests)
Execute the file
make test
cd dom/test
./testsuite
This will report the number of errors found.
V - CONTENTS OF THE LIBRARY
===========================
The sources in this library are split into several subdirectories, each
with its own README, sources, documentation and unit tests.
The list of subdirectories (aka modules) is:
- unicode:
provides a full support for Unicode and Utf8/Utf16/Utf32 encodings. It also
support other encodings like Latin1, Latin2, ...
- input_sources
provides types to read characters from several types of media.
- sax
Provides a common, standard interface for any XML parser, through
callback subprograms. You can extend any of the tagged types defined in these
package and thus parse XML files without having to store a XML tree in
memory.
This package is compatible with SAX 2.0, but doesn't implement the functions
specific to SAX 1.0
- dom
The Document Object Model is a set of standard subprograms to manipulate
XML tree in memory.
Only the Core module is currently implemented.
- docs
This contains the full documentation for this XML library
VI - LICENSING
==============
This library is distributed under the GNAT-Modified GNU Public License.
It has the following addition to the GPL:
"As a special exception, if other files instantiate generics from
this unit, or you link this unit with other files to produce an
executable, this unit does not by itself cause the resulting
executable to be covered by the GNU General Public License. This
exception does not however invalidate any other reasons why the
executable file might be covered by the GNU Public License."
VII - BUG REPORTS
=================
Please send questions and bug reports to report@gnat.com following
the same procedures used to submit reports with the GNAT toolset itself.
|