XML_Query2XML
=============
Version: $Id: README,v 1.12 2008/01/02 15:42:46 lukasfeiler Exp $

1. Overview
2. Contents of this package
3. Testing
4. ChangeLog
5. About the author
6. Copyright Notice


1. Overview
-----------
XML_Query2XML allows you to transform the records retrieved
with one or more SQL SELECT queries into XML data. Very simple
to highly complex transformations are supported. Is was written
with performance in mind and can handel large amounts of data.

Another thing you will find useful is XML_Query2XML's capabilities
of Profiling and Performance Tuning.


2. Contents of this package
---------------------------
+---cases ............... Case studies; will be installed in $PHP_PEAR_DOC_DIR
   +---case01 .......... Case 01: simple SELECT with getFlatXML
   +---case02 .......... Case 02: LEFT JOIN
   +---case03 .......... Case 03: Two SELECTs instead of a LEFT JOIN
   +---case04 .......... Case 04: Case 03 with all the bells and whistles
   +---case05 .......... Case 05: three LEFT JOINs
|   +---case06 .......... Case 06: BIG join over 10 tables
|   +---case07 .......... Case 07: Case 03 revisited: Simplifications with
|   |                     Asterisk Shortcuts
|   +---case08 .......... Case 08: Case 06 revisited: Making use of Mappers
+---XML ................. CONTAINS THE ACTUAL Query2XML.php that
|                         will be installed in $PHP_PEAR_INSTALL_DIR/XML/
+---tests ............... contains 1159 phpt unit tests; all will be installed
                          in $PHP_PEAR_TEST_DIR/XML_Query2XML/tests. Please
                          see 3. Testing.


3. Testing
----------
The most straightforward way to run the unit tests is by using the following
command:

 `pear run-tests -p XML_Query2XML'

This will use an SQLite 2 database. Therefore the unit tests for ADOdb
and PEAR DB will skipped. If you want all unit tests to be ran, you have
to:
- run the MySQL DDL from $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.sql:
   `mysql -u root -p < $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.sql`
  or the PostgreSQL DDL from $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.psql:
   `psql -U postgres < $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.psql`
  
- Edit $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/XML_Query2XML/settings.php
  to change the DSN used to connect to the MySQL database. Alternatively
  you can also set the environment variable PHP_PEAR_XML_QUERY2XML_TEST_DSN.
  For MySQL the DSN would look like this: "mysql://root@localhost/Query2XML_Tests".
  If you do set PHP_PEAR_XML_QUERY2XML_TEST_DSN, make sure the php.ini setting
  variables_order also contains "E" for Environment.

Read on for more information about the php unit tests. After installation
$PHP_PEAR_TEST_DIR/XML_Query2XML/tests will contain the following
(all paths relative to $PHP_PEAR_TEST_DIR/XML_Query2XML/tests):

./Query2XML_Tests.sql ........... the MySQL DDL required to run the unit tests
./Query2XML_Tests.psql .......... the PosgreSQL DDL required to run the unit tests
./Query2XML_Tests.sq2 ........... the SQLite 2 database used by default
./XML_Query2XML_ISO9075Mapper ... unit tests for XML_Query2XML_ISO9075Mapper
./XML_Query2XML/ ................ phpt unit tests for XML_Query2XML
./XML_Query2XML/DB .............. phpt unit tests for XML_Query2XML using PEAR DB
./XML_Query2XML/MDB2 ............ phpt unit tests for XML_Query2XML using PEAR MDB2
./XML_Query2XML/ADOdbDefault .... phpt unit tests for XML_Query2XML using ADOdb
                                  with default error handling
./XML_Query2XML/ADOdbException .. phpt unit tests for XML_Query2XML using ADOdb
                                  with Exceptions
./XML_Query2XML/ADOdbPEAR ....... phpt unit tests for XML_Query2XML using ADOdb
                                  with PEAR_Error
./XML_Query2XML/PDO ............. phpt unit tests for XML_Query2XML using PDO

Each of the ./XML_Query2XML/*/ directories contains subdirectories named
like the class methods; the directories contain phpt unit tests for
the respective method.

If a specific database abstraction layer (DB/MDB2/ADOdb/PDO) is not installed
the respective tests will be skipped. If I18N_UnicodeString is not installed
all tests for XML_Query2XML_ISO9075Mapper will be skipped. Also all tests
that require a database connection will be skipped if the connection fails.


4. ChangeLog
------------
Beginning with v0.6.0 the development of XML_Query2XML was moved from sourceforge.net
to cvs.php.net. Therefore you will find two ChangeLog files:

ChangeLog-until-v0.6.0 ....... ChangeLog entries from cvs.sourceforge.net
                               (until v0.6.0)
ChangeLog .................... ChangeLog entries from cvs.php.net


5. About the author
-------------------
Please see http://www.lukasfeiler.com or write to lukas.feiler@lukasfeiler.com.


6. Copyright Notice
-------------------
Copyright 2006 Lukas Feiler

LICENSE:
This source file is subject to version 2.1 of the LGPL
that is bundled with this package in the file LICENSE.
