• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

XML/H03-May-2022-6,2642,628

cases/H03-May-2022-3,6293,434

tests/H03-May-2022-16,37715,339

tutorials/XML_Query2XML/H03-May-2022-12,35012,017

ChangeLogH A D01-Jan-1970309.3 KiB4,6364,173

ChangeLog-until-v0.6.0H A D01-Jan-197027.1 KiB896578

INSTALLH A D01-Jan-197031.9 KiB344337

LICENSEH A D01-Jan-197025.8 KiB505418

READMEH A D01-Jan-19705.8 KiB131106

RELEASESH A D01-Jan-197014.3 KiB360322

README

1XML_Query2XML
2=============
3Version: $Id: README 257890 2008-04-19 09:36:04Z lukasfeiler $
4
51. Overview
62. Contents of this package
73. Testing
84. ChangeLog
95. About the author
106. Copyright Notice
11
12
131. Overview
14-----------
15XML_Query2XML allows you to transform the records retrieved
16with one or more SQL SELECT queries into XML data. Very simple
17to highly complex transformations are supported. Is was written
18with performance in mind and can handel large amounts of data.
19
20Another thing you will find useful is XML_Query2XML's capabilities
21of Profiling and Performance Tuning.
22
23
242. Contents of this package
25---------------------------
26+---cases ............... Case studies; will be installed in $PHP_PEAR_DOC_DIR
27�   +---case01 .......... Case 01: simple SELECT with getFlatXML
28�   +---case02 .......... Case 02: LEFT JOIN
29�   +---case03 .......... Case 03: Two SELECTs instead of a LEFT JOIN
30�   +---case04 .......... Case 04: Case 03 with all the bells and whistles
31�   +---case05 .......... Case 05: three LEFT JOINs
32|   +---case06 .......... Case 06: BIG join over 10 tables
33|   +---case07 .......... Case 07: Case 03 revisited: Simplifications with
34|   |                     Asterisk Shortcuts
35|   +---case08 .......... Case 08: Case 06 revisited: Making use of Mappers
36+---XML ................. CONTAINS THE ACTUAL Query2XML.php that
37|                         will be installed in $PHP_PEAR_INSTALL_DIR/XML/
38+---tests ............... contains 239 phpt unit tests; all will be installed
39                          in $PHP_PEAR_TEST_DIR/XML_Query2XML/tests. Please
40                          see 3. Testing.
41
42
433. Testing
44----------
45XML_Query2XML can be tested with different drivers and different data sources
46(databases and LDAP directories). The most straightforward way to run the unit
47tests is by using the following command:
48
49 `pear run-tests -p XML_Query2XML'
50
51This will use the MDB2 driver with an SQLite 2 database. For LDAP functionality
52the Net_LDAP2 driver will be used to access an LDAP directory on
53localhost, port=389, version=3, starttls=0 without a binddn or bindpw.
54
55To change the above mentioned behaviour you can use the following environment variables.
56(Note: make sure the php.ini setting 'variables_order' also contains 'E' for Environment.)
57- PHP_PEAR_XML_QUERY2XML_TEST_DBLAYER: the name of the database abstraction layer
58  (and corresponding driver) to use. Valid values are 'MDB2', 'DB', 'PDO', 'ADOdbDefault',
59  'ADOdbException' and 'ADOdbPEAR'. The default is 'MDB2'.
60- PHP_PEAR_XML_QUERY2XML_TEST_DSN: the DSN to connect to the database. Please see
61  http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php for the format
62  to use. Examples would be
63  * mysql://root@localhost/Query2XML_Tests
64  * pgsql://postgres:test@localhost/query2xml_tests
65  * sqlite:///$PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.sq2
66  The default is the last mentioned example - this should work out of the box
67  on most systems.
68- PHP_PEAR_XML_QUERY2XML_TEST_LDAPLAYER: whether to use PEAR Net_LDAP or
69  PEAR Net_LDAP2. Valid values are 'LDAP' and 'LDAP2'. The default is 'LDAP2'.
70- PHP_PEAR_XML_QUERY2XML_TEST_LDAPCONFIG: a comma separated list of key
71  value pairs that specify how to connect to the LDAP directory. Please
72  see http://pear.php.net/manual/en/package.networking.net-ldap.connecting.php
73  for a list of valid keys. The default is
74  host=localhost,port=389,version=3,starttls=0,binddn=,bindpw=
75
76If you want to run the unit tests with MySQL or PostgreSQL, you need to:
77- run the MySQL DDL from $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.sql:
78   `mysql -u root -p < $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.sql`
79  or the PostgreSQL DDL from $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.psql:
80   `psql -U postgres < $PHP_PEAR_TEST_DIR/XML_Query2XML/tests/Query2XML_Tests.psql`
81- Set the environment variable PHP_PEAR_XML_QUERY2XML_TEST_DSN (see above).
82
83After installation $PHP_PEAR_TEST_DIR/XML_Query2XML/tests will contain the following
84(all paths relative to $PHP_PEAR_TEST_DIR/XML_Query2XML/tests):
85
86./Query2XML_Tests.sql ........... the MySQL DDL required to run the unit tests
87./Query2XML_Tests.psql .......... the PosgreSQL DDL required to run the unit tests
88./Query2XML_Tests.sq2 ........... the SQLite 2 database used by default
89./XML_Query2XML_ISO9075Mapper ... unit tests for XML_Query2XML_ISO9075Mapper
90./XML_Query2XML/ ................ phpt unit tests for XML_Query2XML
91./XML_Query2XML/AllDBLayers ..... phpt unit tests for XML_Query2XML using database
92                                  related drivers
93./XML_Query2XML/LDAP ............ phpt unit tests for XML_Query2XML using Net_LDAP
94                                  or Net_LDAP2
95./XML_Query2XML/NoDBLayer ....... phpt unit tests not using any driver
96
97Each of the ./XML_Query2XML/*/ directories contains subdirectories named
98like the class methods; the directories contain phpt unit tests for
99the respective method.
100
101If a specific database or LDAP directory abstraction layer
102(MDB2/DB/ADOdb/PDO/Net_LDAP/Net_LDAP2) is not installed
103the respective tests will be skipped. If I18N_UnicodeString is not installed
104all tests for XML_Query2XML_ISO9075Mapper will be skipped. Also all tests
105that require a database or LDAP connection will be skipped if the connection
106fails.
107
108
1094. ChangeLog
110------------
111Beginning with v0.6.0 the development of XML_Query2XML was moved from sourceforge.net
112to cvs.php.net. Therefore you will find two ChangeLog files:
113
114ChangeLog-until-v0.6.0 ....... ChangeLog entries from cvs.sourceforge.net
115                               (until v0.6.0)
116ChangeLog .................... ChangeLog entries from cvs.php.net
117
118
1195. About the author
120-------------------
121Please see http://www.lukasfeiler.com or write to lukas.feiler@lukasfeiler.com.
122
123
1246. Copyright Notice
125-------------------
126Copyright 2006 Lukas Feiler
127
128LICENSE:
129This source file is subject to version 2.1 of the LGPL
130that is bundled with this package in the file LICENSE.
131