diff --git a/test/OPDSTest.php b/test/OPDSTest.php
new file mode 100644
index 0000000..fcb3866
--- /dev/null
+++ b/test/OPDSTest.php
@@ -0,0 +1,55 @@
+InitializeContent ();
+
+ $OPDSRender = new OPDSRenderer ();
+
+ file_put_contents (TEST_FEED, $OPDSRender->render ($currentPage));
+ $this->AssertTrue ($this->opdsValidateSchema (TEST_FEED));
+ file_put_contents (TEST_FEED, str_replace ("id>", "ido>", $OPDSRender->render ($currentPage)));
+ $this->AssertFalse ($this->opdsValidateSchema (TEST_FEED));
+
+ $_SERVER['QUERY_STRING'] = NULL;
+ }
+
+}
\ No newline at end of file
diff --git a/test/atom.rng b/test/atom.rng
new file mode 100644
index 0000000..f1407fc
--- /dev/null
+++ b/test/atom.rng
@@ -0,0 +1,598 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text
+ html
+
+
+
+
+
+
+
+
+ xhtml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An atom:feed must have an atom:author unless all of its atom:entry children have an atom:author.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An atom:entry must have at least one atom:link element with a rel attribute of 'alternate' or an atom:content.
+
+
+ An atom:entry must have an atom:author if its feed does not.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text
+ html
+
+
+
+
+
+
+
+
+
+
+
+
+ xhtml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ [^:]*
+
+
+
+
+
+ .+/.+
+
+
+
+
+
+ [A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*
+
+
+
+
+
+
+
+
+
+ .+@.+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xml:base
+ xml:lang
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/jing.jar b/test/jing.jar
new file mode 100644
index 0000000..fe01514
Binary files /dev/null and b/test/jing.jar differ
diff --git a/test/opds_catalog_1_1.rng b/test/opds_catalog_1_1.rng
new file mode 100644
index 0000000..e4ed2fb
--- /dev/null
+++ b/test/opds_catalog_1_1.rng
@@ -0,0 +1,599 @@
+
+
+
+
+
+
+
+ http://opds-spec.org/acquisition/buy
+ http://opds-spec.org/acquisition/borrow
+ http://opds-spec.org/acquisition/subscribe
+ http://opds-spec.org/acquisition/sample
+
+
+
+
+
+
+ http://opds-spec.org/acquisition/borrow
+ http://opds-spec.org/acquisition/subscribe
+ http://opds-spec.org/acquisition/sample
+
+
+
+
+
+
+
+
+
+ xml:base
+ xml:lang
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://opds-spec.org/facet
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+ http://opds-spec.org/acquisition/buy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .*[ <>{}|^`"\\\n\r\t].*
+
+
+
+
+
+
+
+
+
+
+ text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.0
+
+
+
+
+
+
+ AED
+ AFN
+ ALL
+ AMD
+ ANG
+ AOA
+ ARS
+ AUD
+ AWG
+ AZN
+ BAM
+ BBD
+ BDT
+ BGN
+ BHD
+ BIF
+ BMD
+ BND
+ BOB
+ BOV
+ BRL
+ BSD
+ BTN
+ BWP
+ BYR
+ BZD
+ CAD
+ CDF
+ CHE
+ CHF
+ CHW
+ CLF
+ CLP
+ CNY
+ COP
+ COU
+ CRC
+ CUC
+ CUP
+ CVE
+ CZK
+ DJF
+ DKK
+ DOP
+ DZD
+ EEK
+ EGP
+ ERN
+ ETB
+ EUR
+ FJD
+ FKP
+ GBP
+ GEL
+ GHS
+ GIP
+ GMD
+ GNF
+ GTQ
+ GYD
+ HKD
+ HNL
+ HRK
+ HTG
+ HUF
+ IDR
+ ILS
+ INR
+ IQD
+ IRR
+ ISK
+ JMD
+ JOD
+ JPY
+ KES
+ KGS
+ KHR
+ KMF
+ KPW
+ KRW
+ KWD
+ KYD
+ KZT
+ LAK
+ LBP
+ LKR
+ LRD
+ LSL
+ LTL
+ LVL
+ LYD
+ MAD
+ MDL
+ MGA
+ MKD
+ MMK
+ MNT
+ MOP
+ MRO
+ MUR
+ MVR
+ MWK
+ MXN
+ MXV
+ MYR
+ MZN
+ NAD
+ NGN
+ NIO
+ NOK
+ NPR
+ NZD
+ OMR
+ PAB
+ PEN
+ PGK
+ PHP
+ PKR
+ PLN
+ PYG
+ QAR
+ RON
+ RSD
+ RUB
+ RWF
+ SAR
+ SBD
+ SCR
+ SDG
+ SEK
+ SGD
+ SHP
+ SLL
+ SOS
+ SRD
+ STD
+ SVC
+ SYP
+ SZL
+ THB
+ TJS
+ TMT
+ TND
+ TOP
+ TRY
+ TTD
+ TWD
+ TZS
+ UAH
+ UGX
+ USD
+ USN
+ USS
+ UYI
+ UYU
+ UZS
+ VEF
+ VND
+ VUV
+ WST
+ XAF
+ XAG
+ XAU
+ XBA
+ XBB
+ XBC
+ XBD
+ XCD
+ XDR
+ XFU
+ XOF
+ XPD
+ XPF
+ XPT
+ XTS
+ XXX
+ YER
+ ZAR
+ ZMK
+ ZWL
+ 008
+ 012
+ 032
+ 036
+ 044
+ 048
+ 050
+ 051
+ 052
+ 060
+ 064
+ 068
+ 072
+ 084
+ 090
+ 096
+ 104
+ 108
+ 116
+ 124
+ 132
+ 136
+ 144
+ 152
+ 156
+ 170
+ 174
+ 188
+ 191
+ 192
+ 203
+ 208
+ 214
+ 222
+ 230
+ 232
+ 233
+ 238
+ 242
+ 262
+ 270
+ 292
+ 320
+ 324
+ 328
+ 332
+ 340
+ 344
+ 348
+ 352
+ 356
+ 360
+ 364
+ 368
+ 376
+ 388
+ 392
+ 398
+ 400
+ 404
+ 408
+ 410
+ 414
+ 417
+ 418
+ 422
+ 426
+ 428
+ 430
+ 434
+ 440
+ 446
+ 454
+ 458
+ 462
+ 478
+ 480
+ 484
+ 496
+ 498
+ 504
+ 512
+ 516
+ 524
+ 532
+ 533
+ 548
+ 554
+ 558
+ 566
+ 578
+ 586
+ 590
+ 598
+ 600
+ 604
+ 608
+ 634
+ 643
+ 646
+ 654
+ 678
+ 682
+ 690
+ 694
+ 702
+ 704
+ 706
+ 710
+ 748
+ 752
+ 756
+ 760
+ 764
+ 776
+ 780
+ 784
+ 788
+ 800
+ 807
+ 818
+ 826
+ 834
+ 840
+ 858
+ 860
+ 882
+ 886
+ 894
+ 901
+ 931
+ 932
+ 934
+ 936
+ 937
+ 938
+ 940
+ 941
+ 943
+ 944
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 984
+ 985
+ 986
+ 990
+ 997
+ 998
+ 999
+
+
+