diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-30 11:06:01 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-30 11:06:01 +0000 |
commit | 8f547c7bd349e0dc905e0dc5f32edbf1e01061ce (patch) | |
tree | 0ba575c11b1875b638324194e16ebda4586baec8 /test/testcases/tests/level3 | |
parent | e3eae8836e177220d556868e4fa7741c00b2d729 (diff) | |
download | libdom-8f547c7bd349e0dc905e0dc5f32edbf1e01061ce.tar.gz libdom-8f547c7bd349e0dc905e0dc5f32edbf1e01061ce.tar.bz2 |
Merge DOMTS tests -- they're causing havoc with review diffs.
svn path=/trunk/dom/; revision=8910
Diffstat (limited to 'test/testcases/tests/level3')
1192 files changed, 64512 insertions, 0 deletions
diff --git a/test/testcases/tests/level3/CVS/Entries b/test/testcases/tests/level3/CVS/Entries new file mode 100644 index 0000000..03beefd --- /dev/null +++ b/test/testcases/tests/level3/CVS/Entries @@ -0,0 +1,5 @@ +D/core//// +D/events//// +D/ls//// +D/validation//// +D/xpath//// diff --git a/test/testcases/tests/level3/CVS/Repository b/test/testcases/tests/level3/CVS/Repository new file mode 100644 index 0000000..61d04a9 --- /dev/null +++ b/test/testcases/tests/level3/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3 diff --git a/test/testcases/tests/level3/CVS/Root b/test/testcases/tests/level3/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/CVS/Template b/test/testcases/tests/level3/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/CVS/Template diff --git a/test/testcases/tests/level3/core/.cvsignore b/test/testcases/tests/level3/core/.cvsignore new file mode 100644 index 0000000..65d27fe --- /dev/null +++ b/test/testcases/tests/level3/core/.cvsignore @@ -0,0 +1,3 @@ +dom3.dtd +test-to-html.xsl +dom3.xsd diff --git a/test/testcases/tests/level3/core/CVS/Entries b/test/testcases/tests/level3/core/CVS/Entries new file mode 100644 index 0000000..078b303 --- /dev/null +++ b/test/testcases/tests/level3/core/CVS/Entries @@ -0,0 +1,726 @@ +D/files//// +/.cvsignore/1.1/Fri Apr 3 02:48:00 2009// +/alltests.xml/1.42/Fri Apr 3 02:47:59 2009// +/attrgetschematypeinfo01.xml/1.4/Fri Apr 3 02:48:01 2009// +/attrgetschematypeinfo02.xml/1.4/Fri Apr 3 02:48:01 2009// +/attrgetschematypeinfo03.xml/1.6/Fri Apr 3 02:47:59 2009// +/attrgetschematypeinfo04.xml/1.6/Fri Apr 3 02:47:58 2009// +/attrgetschematypeinfo05.xml/1.5/Fri Apr 3 02:48:00 2009// +/attrgetschematypeinfo06.xml/1.4/Fri Apr 3 02:47:59 2009// +/attrgetschematypeinfo07.xml/1.3/Fri Apr 3 02:48:00 2009// +/attrgetschematypeinfo08.xml/1.3/Fri Apr 3 02:48:00 2009// +/attrisid01.xml/1.6/Fri Apr 3 02:48:00 2009// +/attrisid02.xml/1.6/Fri Apr 3 02:47:58 2009// +/attrisid03.xml/1.6/Fri Apr 3 02:47:59 2009// +/attrisid04.xml/1.5/Fri Apr 3 02:47:58 2009// +/attrisid05.xml/1.6/Fri Apr 3 02:48:01 2009// +/attrisid06.xml/1.5/Fri Apr 3 02:47:59 2009// +/attrisid07.xml/1.2/Fri Apr 3 02:47:58 2009// +/canonicalform01.xml/1.3/Fri Apr 3 02:47:58 2009// +/canonicalform02.xml/1.3/Fri Apr 3 02:48:00 2009// +/canonicalform03.xml/1.2/Fri Apr 3 02:48:01 2009// +/canonicalform04.xml/1.3/Fri Apr 3 02:48:00 2009// +/canonicalform05.xml/1.2/Fri Apr 3 02:47:59 2009// +/canonicalform06.xml/1.2/Fri Apr 3 02:48:01 2009// +/canonicalform07.xml/1.3/Fri Apr 3 02:48:00 2009// +/canonicalform08.xml/1.4/Fri Apr 3 02:47:59 2009// +/canonicalform09.xml/1.4/Fri Apr 3 02:47:59 2009// +/canonicalform10.xml/1.3/Fri Apr 3 02:47:58 2009// +/canonicalform11.xml/1.3/Fri Apr 3 02:48:01 2009// +/canonicalform12.xml/1.2/Fri Apr 3 02:47:59 2009// +/cdatasections01.xml/1.2/Fri Apr 3 02:48:00 2009// +/checkcharacternormalization01.xml/1.3/Fri Apr 3 02:48:00 2009// +/checkcharacternormalization02.xml/1.4/Fri Apr 3 02:48:00 2009// +/checkcharacternormalization03.xml/1.3/Fri Apr 3 02:48:01 2009// +/comments01.xml/1.2/Fri Apr 3 02:47:59 2009// +/datatypenormalization01.xml/1.7/Fri Apr 3 02:47:58 2009// +/datatypenormalization02.xml/1.8/Fri Apr 3 02:47:59 2009// +/datatypenormalization03.xml/1.8/Fri Apr 3 02:48:01 2009// +/datatypenormalization04.xml/1.8/Fri Apr 3 02:48:00 2009// +/datatypenormalization05.xml/1.8/Fri Apr 3 02:48:00 2009// +/datatypenormalization06.xml/1.8/Fri Apr 3 02:47:58 2009// +/datatypenormalization07.xml/1.3/Fri Apr 3 02:48:01 2009// +/datatypenormalization08.xml/1.3/Fri Apr 3 02:48:01 2009// +/datatypenormalization09.xml/1.3/Fri Apr 3 02:48:00 2009// +/datatypenormalization10.xml/1.3/Fri Apr 3 02:47:58 2009// +/datatypenormalization11.xml/1.3/Fri Apr 3 02:47:59 2009// +/datatypenormalization12.xml/1.3/Fri Apr 3 02:47:59 2009// +/datatypenormalization13.xml/1.3/Fri Apr 3 02:48:01 2009// +/datatypenormalization14.xml/1.3/Fri Apr 3 02:48:00 2009// +/datatypenormalization15.xml/1.3/Fri Apr 3 02:47:58 2009// +/datatypenormalization16.xml/1.4/Fri Apr 3 02:48:00 2009// +/datatypenormalization17.xml/1.3/Fri Apr 3 02:48:00 2009// +/datatypenormalization18.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentadoptnode01.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentadoptnode02.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode03.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode04.xml/1.6/Fri Apr 3 02:48:01 2009// +/documentadoptnode05.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode06.xml/1.6/Fri Apr 3 02:47:59 2009// +/documentadoptnode07.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode08.xml/1.6/Fri Apr 3 02:47:59 2009// +/documentadoptnode09.xml/1.6/Fri Apr 3 02:47:58 2009// +/documentadoptnode10.xml/1.6/Fri Apr 3 02:48:01 2009// +/documentadoptnode11.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode12.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode13.xml/1.7/Fri Apr 3 02:47:58 2009// +/documentadoptnode14.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentadoptnode15.xml/1.7/Fri Apr 3 02:47:59 2009// +/documentadoptnode16.xml/1.7/Fri Apr 3 02:47:58 2009// +/documentadoptnode17.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode18.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode19.xml/1.6/Fri Apr 3 02:47:59 2009// +/documentadoptnode20.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentadoptnode21.xml/1.2/Fri Apr 3 02:47:59 2009// +/documentadoptnode22.xml/1.7/Fri Apr 3 02:48:01 2009// +/documentadoptnode23.xml/1.7/Fri Apr 3 02:47:59 2009// +/documentadoptnode24.xml/1.3/Fri Apr 3 02:47:59 2009// +/documentadoptnode25.xml/1.7/Fri Apr 3 02:47:58 2009// +/documentadoptnode26.xml/1.8/Fri Apr 3 02:47:58 2009// +/documentadoptnode27.xml/1.8/Fri Apr 3 02:47:59 2009// +/documentadoptnode28.xml/1.7/Fri Apr 3 02:48:01 2009// +/documentadoptnode30.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentadoptnode31.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentadoptnode32.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentadoptnode33.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentadoptnode34.xml/1.7/Fri Apr 3 02:47:59 2009// +/documentadoptnode35.xml/1.8/Fri Apr 3 02:48:00 2009// +/documentadoptnode36.xml/1.8/Fri Apr 3 02:47:59 2009// +/documentgetdoctype01.xml/1.5/Fri Apr 3 02:48:00 2009// +/documentgetdocumenturi01.xml/1.4/Fri Apr 3 02:47:59 2009// +/documentgetdocumenturi02.xml/1.5/Fri Apr 3 02:48:01 2009// +/documentgetdocumenturi03.xml/1.5/Fri Apr 3 02:47:58 2009// +/documentgetinputencoding01.xml/1.4/Fri Apr 3 02:48:01 2009// +/documentgetinputencoding02.xml/1.5/Fri Apr 3 02:48:01 2009// +/documentgetinputencoding03.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentgetinputencoding04.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentgetstricterrorchecking01.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentgetstricterrorchecking02.xml/1.5/Fri Apr 3 02:47:58 2009// +/documentgetxmlencoding01.xml/1.4/Fri Apr 3 02:48:01 2009// +/documentgetxmlencoding02.xml/1.5/Fri Apr 3 02:48:00 2009// +/documentgetxmlencoding03.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentgetxmlencoding04.xml/1.4/Fri Apr 3 02:47:59 2009// +/documentgetxmlencoding05.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentgetxmlstandalone01.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentgetxmlstandalone02.xml/1.5/Fri Apr 3 02:47:58 2009// +/documentgetxmlstandalone03.xml/1.4/Fri Apr 3 02:47:58 2009// +/documentgetxmlstandalone04.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentgetxmlstandalone05.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentgetxmlversion01.xml/1.4/Fri Apr 3 02:48:01 2009// +/documentgetxmlversion02.xml/1.5/Fri Apr 3 02:47:58 2009// +/documentgetxmlversion03.xml/1.4/Fri Apr 3 02:48:00 2009// +/documentnormalizedocument01.xml/1.6/Fri Apr 3 02:48:01 2009// +/documentnormalizedocument02.xml/1.10/Fri Apr 3 02:48:00 2009// +/documentnormalizedocument03.xml/1.11/Fri Apr 3 02:48:01 2009// +/documentnormalizedocument04.xml/1.10/Fri Apr 3 02:47:58 2009// +/documentnormalizedocument05.xml/1.3/Fri Apr 3 02:47:59 2009// +/documentnormalizedocument06.xml/1.5/Fri Apr 3 02:47:59 2009// +/documentnormalizedocument07.xml/1.4/Fri Apr 3 02:47:59 2009// +/documentnormalizedocument08.xml/1.2/Fri Apr 3 02:48:00 2009// +/documentnormalizedocument09.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentnormalizedocument10.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentnormalizedocument11.xml/1.3/Fri Apr 3 02:47:59 2009// +/documentnormalizedocument12.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentnormalizedocument13.xml/1.2/Fri Apr 3 02:48:00 2009// +/documentrenamenode01.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode02.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode03.xml/1.7/Fri Apr 3 02:47:58 2009// +/documentrenamenode04.xml/1.7/Fri Apr 3 02:47:58 2009// +/documentrenamenode05.xml/1.7/Fri Apr 3 02:47:59 2009// +/documentrenamenode06.xml/1.6/Fri Apr 3 02:47:58 2009// +/documentrenamenode07.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentrenamenode08.xml/1.7/Fri Apr 3 02:48:00 2009// +/documentrenamenode09.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentrenamenode10.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentrenamenode11.xml/1.3/Fri Apr 3 02:48:01 2009// +/documentrenamenode12.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentrenamenode13.xml/1.3/Fri Apr 3 02:47:59 2009// +/documentrenamenode14.xml/1.3/Fri Apr 3 02:48:00 2009// +/documentrenamenode15.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode16.xml/1.6/Fri Apr 3 02:47:59 2009// +/documentrenamenode17.xml/1.7/Fri Apr 3 02:47:58 2009// +/documentrenamenode18.xml/1.7/Fri Apr 3 02:47:59 2009// +/documentrenamenode19.xml/1.2/Fri Apr 3 02:48:00 2009// +/documentrenamenode20.xml/1.7/Fri Apr 3 02:47:59 2009// +/documentrenamenode21.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode22.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode23.xml/1.2/Fri Apr 3 02:48:00 2009// +/documentrenamenode24.xml/1.2/Fri Apr 3 02:48:00 2009// +/documentrenamenode25.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode26.xml/1.6/Fri Apr 3 02:47:59 2009// +/documentrenamenode27.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode28.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentrenamenode29.xml/1.6/Fri Apr 3 02:48:00 2009// +/documentsetdocumenturi01.xml/1.5/Fri Apr 3 02:47:59 2009// +/documentsetdocumenturi02.xml/1.5/Fri Apr 3 02:48:00 2009// +/documentsetdocumenturi03.xml/1.6/Fri Apr 3 02:47:58 2009// +/documentsetstricterrorchecking01.xml/1.5/Fri Apr 3 02:48:00 2009// +/documentsetstricterrorchecking02.xml/1.5/Fri Apr 3 02:48:00 2009// +/documentsetstricterrorchecking03.xml/1.5/Fri Apr 3 02:48:01 2009// +/documentsetxmlstandalone01.xml/1.5/Fri Apr 3 02:47:59 2009// +/documentsetxmlstandalone02.xml/1.7/Fri Apr 3 02:47:59 2009// +/documentsetxmlversion01.xml/1.6/Fri Apr 3 02:47:59 2009// +/documentsetxmlversion02.xml/1.6/Fri Apr 3 02:47:58 2009// +/documentsetxmlversion03.xml/1.6/Fri Apr 3 02:47:58 2009// +/documentsetxmlversion05.xml/1.6/Fri Apr 3 02:47:59 2009// +/domconfigcanonicalform1.xml/1.5/Fri Apr 3 02:48:00 2009// +/domconfigcdatasections1.xml/1.4/Fri Apr 3 02:47:58 2009// +/domconfigcheckcharacternormalization1.xml/1.4/Fri Apr 3 02:48:00 2009// +/domconfigcomments1.xml/1.3/Fri Apr 3 02:48:00 2009// +/domconfigdatatypenormalization1.xml/1.3/Fri Apr 3 02:48:00 2009// +/domconfigdatatypenormalization2.xml/1.2/Fri Apr 3 02:48:01 2009// +/domconfigelementcontentwhitespace1.xml/1.5/Fri Apr 3 02:48:00 2009// +/domconfigentities1.xml/1.4/Fri Apr 3 02:47:59 2009// +/domconfigerrorhandler1.xml/1.5/Fri Apr 3 02:47:58 2009// +/domconfigerrorhandler2.xml/1.3/Fri Apr 3 02:47:58 2009// +/domconfiginfoset1.xml/1.5/Fri Apr 3 02:47:59 2009// +/domconfignamespacedeclarations1.xml/1.4/Fri Apr 3 02:48:00 2009// +/domconfignamespaces1.xml/1.3/Fri Apr 3 02:48:00 2009// +/domconfignamespaces2.xml/1.3/Fri Apr 3 02:47:58 2009// +/domconfignormalizecharacters1.xml/1.4/Fri Apr 3 02:47:58 2009// +/domconfigparameternames01.xml/1.6/Fri Apr 3 02:48:00 2009// +/domconfigschemalocation1.xml/1.4/Fri Apr 3 02:47:58 2009// +/domconfigschematype1.xml/1.4/Fri Apr 3 02:48:01 2009// +/domconfigsplitcdatasections1.xml/1.4/Fri Apr 3 02:48:01 2009// +/domconfigurationcansetparameter01.xml/1.6/Fri Apr 3 02:48:00 2009// +/domconfigurationcansetparameter02.xml/1.3/Fri Apr 3 02:48:00 2009// +/domconfigurationcansetparameter03.xml/1.4/Fri Apr 3 02:48:00 2009// +/domconfigurationcansetparameter04.xml/1.4/Fri Apr 3 02:48:00 2009// +/domconfigurationcansetparameter06.xml/1.4/Fri Apr 3 02:48:00 2009// +/domconfigurationgetparameter01.xml/1.6/Fri Apr 3 02:48:00 2009// +/domconfigurationgetparameter02.xml/1.5/Fri Apr 3 02:48:00 2009// +/domconfigvalidate1.xml/1.4/Fri Apr 3 02:48:01 2009// +/domconfigvalidateifschema1.xml/1.4/Fri Apr 3 02:48:00 2009// +/domconfigwellformed1.xml/1.4/Fri Apr 3 02:48:00 2009// +/domimplementationgetfeature01.xml/1.5/Fri Apr 3 02:48:00 2009// +/domimplementationgetfeature02.xml/1.5/Fri Apr 3 02:48:00 2009// +/domimplementationgetfeature03.xml/1.4/Fri Apr 3 02:47:58 2009// +/domimplementationgetfeature05.xml/1.4/Fri Apr 3 02:47:58 2009// +/domimplementationgetfeature06.xml/1.4/Fri Apr 3 02:48:00 2009// +/domimplementationregistry01.xml/1.2/Fri Apr 3 02:48:00 2009// +/domimplementationregistry02.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry03.xml/1.3/Fri Apr 3 02:48:01 2009// +/domimplementationregistry04.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry05.xml/1.3/Fri Apr 3 02:47:59 2009// +/domimplementationregistry06.xml/1.3/Fri Apr 3 02:47:58 2009// +/domimplementationregistry07.xml/1.3/Fri Apr 3 02:48:01 2009// +/domimplementationregistry08.xml/1.3/Fri Apr 3 02:48:01 2009// +/domimplementationregistry09.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry10.xml/1.3/Fri Apr 3 02:48:01 2009// +/domimplementationregistry11.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry12.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry13.xml/1.4/Fri Apr 3 02:48:01 2009// +/domimplementationregistry14.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry15.xml/1.3/Fri Apr 3 02:47:59 2009// +/domimplementationregistry16.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry17.xml/1.3/Fri Apr 3 02:48:01 2009// +/domimplementationregistry18.xml/1.3/Fri Apr 3 02:47:59 2009// +/domimplementationregistry19.xml/1.3/Fri Apr 3 02:47:59 2009// +/domimplementationregistry20.xml/1.4/Fri Apr 3 02:48:00 2009// +/domimplementationregistry21.xml/1.3/Fri Apr 3 02:48:00 2009// +/domimplementationregistry22.xml/1.3/Fri Apr 3 02:47:59 2009// +/domimplementationregistry23.xml/1.4/Fri Apr 3 02:47:59 2009// +/domimplementationregistry24.xml/1.2/Fri Apr 3 02:48:01 2009// +/domimplementationregistry25.xml/1.2/Fri Apr 3 02:47:58 2009// +/domstringlistcontains01.xml/1.3/Fri Apr 3 02:47:59 2009// +/domstringlistcontains02.xml/1.2/Fri Apr 3 02:47:58 2009// +/domstringlistgetlength01.xml/1.5/Fri Apr 3 02:48:00 2009// +/domstringlistitem01.xml/1.4/Fri Apr 3 02:48:00 2009// +/domstringlistitem02.xml/1.2/Fri Apr 3 02:47:59 2009// +/elementcontentwhitespace01.xml/1.5/Fri Apr 3 02:48:01 2009// +/elementcontentwhitespace02.xml/1.3/Fri Apr 3 02:48:00 2009// +/elementcontentwhitespace03.xml/1.3/Fri Apr 3 02:48:01 2009// +/elementgetschematypeinfo01.xml/1.3/Fri Apr 3 02:48:00 2009// +/elementgetschematypeinfo02.xml/1.5/Fri Apr 3 02:47:58 2009// +/elementgetschematypeinfo03.xml/1.4/Fri Apr 3 02:47:58 2009// +/elementgetschematypeinfo04.xml/1.3/Fri Apr 3 02:48:00 2009// +/elementgetschematypeinfo05.xml/1.4/Fri Apr 3 02:48:00 2009// +/elementgetschematypeinfo06.xml/1.3/Fri Apr 3 02:48:00 2009// +/elementgetschematypeinfo07.xml/1.3/Fri Apr 3 02:47:58 2009// +/elementsetidattribute01.xml/1.6/Fri Apr 3 02:47:58 2009// +/elementsetidattribute03.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattribute04.xml/1.6/Fri Apr 3 02:47:59 2009// +/elementsetidattribute05.xml/1.6/Fri Apr 3 02:48:01 2009// +/elementsetidattribute06.xml/1.6/Fri Apr 3 02:48:01 2009// +/elementsetidattribute07.xml/1.6/Fri Apr 3 02:47:59 2009// +/elementsetidattribute08.xml/1.6/Fri Apr 3 02:48:01 2009// +/elementsetidattribute09.xml/1.6/Fri Apr 3 02:48:01 2009// +/elementsetidattribute10.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattribute11.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattributenode01.xml/1.6/Fri Apr 3 02:47:59 2009// +/elementsetidattributenode02.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattributenode03.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattributenode04.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattributenode05.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattributenode06.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattributenode07.xml/1.6/Fri Apr 3 02:47:58 2009// +/elementsetidattributenode08.xml/1.2/Fri Apr 3 02:48:01 2009// +/elementsetidattributenode09.xml/1.2/Fri Apr 3 02:48:00 2009// +/elementsetidattributenode10.xml/1.2/Fri Apr 3 02:48:00 2009// +/elementsetidattributens01.xml/1.6/Fri Apr 3 02:48:01 2009// +/elementsetidattributens02.xml/1.5/Fri Apr 3 02:47:58 2009// +/elementsetidattributens03.xml/1.6/Fri Apr 3 02:47:58 2009// +/elementsetidattributens04.xml/1.2/Fri Apr 3 02:48:00 2009// +/elementsetidattributens05.xml/1.2/Fri Apr 3 02:48:00 2009// +/elementsetidattributens06.xml/1.6/Fri Apr 3 02:47:58 2009// +/elementsetidattributens07.xml/1.6/Fri Apr 3 02:47:58 2009// +/elementsetidattributens08.xml/1.6/Fri Apr 3 02:48:00 2009// +/elementsetidattributens09.xml/1.2/Fri Apr 3 02:47:59 2009// +/elementsetidattributens10.xml/1.2/Fri Apr 3 02:48:00 2009// +/elementsetidattributens11.xml/1.2/Fri Apr 3 02:48:00 2009// +/elementsetidattributens12.xml/1.2/Fri Apr 3 02:48:01 2009// +/elementsetidattributens13.xml/1.6/Fri Apr 3 02:47:58 2009// +/elementsetidattributens14.xml/1.2/Fri Apr 3 02:48:01 2009// +/entities01.xml/1.3/Fri Apr 3 02:47:58 2009// +/entities02.xml/1.3/Fri Apr 3 02:48:00 2009// +/entities03.xml/1.3/Fri Apr 3 02:47:59 2009// +/entities04.xml/1.3/Fri Apr 3 02:48:01 2009// +/entitygetinputencoding01.xml/1.4/Fri Apr 3 02:48:00 2009// +/entitygetinputencoding02.xml/1.4/Fri Apr 3 02:48:00 2009// +/entitygetinputencoding03.xml/1.5/Fri Apr 3 02:47:59 2009// +/entitygetinputencoding04.xml/1.5/Fri Apr 3 02:48:00 2009// +/entitygetxmlencoding01.xml/1.4/Fri Apr 3 02:48:00 2009// +/entitygetxmlencoding02.xml/1.4/Fri Apr 3 02:48:00 2009// +/entitygetxmlencoding03.xml/1.4/Fri Apr 3 02:48:00 2009// +/entitygetxmlencoding04.xml/1.4/Fri Apr 3 02:48:00 2009// +/entitygetxmlversion01.xml/1.4/Fri Apr 3 02:48:01 2009// +/entitygetxmlversion02.xml/1.4/Fri Apr 3 02:47:59 2009// +/entitygetxmlversion03.xml/1.4/Fri Apr 3 02:48:01 2009// +/entitygetxmlversion04.xml/1.4/Fri Apr 3 02:48:01 2009// +/handleerror01.xml/1.3/Fri Apr 3 02:48:01 2009// +/handleerror02.xml/1.3/Fri Apr 3 02:48:00 2009// +/hasFeature01.xml/1.5/Fri Apr 3 02:48:01 2009// +/hasFeature02.xml/1.2/Fri Apr 3 02:48:00 2009// +/hasFeature03.xml/1.2/Fri Apr 3 02:48:01 2009// +/hasFeature04.xml/1.2/Fri Apr 3 02:48:00 2009// +/infoset01.xml/1.3/Fri Apr 3 02:47:58 2009// +/infoset02.xml/1.3/Fri Apr 3 02:48:01 2009// +/infoset03.xml/1.2/Fri Apr 3 02:47:59 2009// +/infoset04.xml/1.2/Fri Apr 3 02:48:01 2009// +/infoset05.xml/1.3/Fri Apr 3 02:47:59 2009// +/infoset06.xml/1.2/Fri Apr 3 02:47:59 2009// +/infoset07.xml/1.4/Fri Apr 3 02:48:00 2009// +/infoset08.xml/1.3/Fri Apr 3 02:48:00 2009// +/infoset09.xml/1.2/Fri Apr 3 02:48:00 2009// +/metadata.xml/1.2/Fri Apr 3 02:47:58 2009// +/namespacedeclarations01.xml/1.3/Fri Apr 3 02:48:01 2009// +/namespacedeclarations02.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodeappendchild01.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodeappendchild02.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition01.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition02.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition03.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition04.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition05.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition06.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition07.xml/1.8/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition08.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition09.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition10.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition11.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition12.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition13.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition14.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition15.xml/1.7/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition16.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition17.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition18.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition19.xml/1.2/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition20.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition21.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition22.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition23.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition24.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition25.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition26.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition27.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodecomparedocumentposition28.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition29.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition30.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition31.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition32.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodecomparedocumentposition33.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition34.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition35.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodecomparedocumentposition36.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition37.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodecomparedocumentposition38.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodecomparedocumentposition39.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodecomparedocumentposition40.xml/1.8/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri01.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri02.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri03.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodegetbaseuri04.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodegetbaseuri05.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodegetbaseuri06.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri07.xml/1.8/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri09.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri10.xml/1.7/Fri Apr 3 02:48:01 2009// +/nodegetbaseuri11.xml/1.7/Fri Apr 3 02:48:01 2009// +/nodegetbaseuri12.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri13.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri14.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodegetbaseuri15.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri16.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri17.xml/1.3/Fri Apr 3 02:47:59 2009// +/nodegetbaseuri18.xml/1.3/Fri Apr 3 02:47:58 2009// +/nodegetbaseuri19.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodegetbaseuri20.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodegetfeature01.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodegetfeature02.xml/1.3/Fri Apr 3 02:47:59 2009// +/nodegetfeature03.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodegetfeature04.xml/1.3/Fri Apr 3 02:47:59 2009// +/nodegetfeature05.xml/1.3/Fri Apr 3 02:47:59 2009// +/nodegetfeature06.xml/1.3/Fri Apr 3 02:48:01 2009// +/nodegetfeature07.xml/1.3/Fri Apr 3 02:48:01 2009// +/nodegetfeature08.xml/1.3/Fri Apr 3 02:48:01 2009// +/nodegetfeature09.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodegetfeature10.xml/1.3/Fri Apr 3 02:47:59 2009// +/nodegetfeature11.xml/1.3/Fri Apr 3 02:48:01 2009// +/nodegetfeature12.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodegetfeature13.xml/1.3/Fri Apr 3 02:47:58 2009// +/nodegettextcontent01.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodegettextcontent02.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodegettextcontent03.xml/1.4/Fri Apr 3 02:48:01 2009// +/nodegettextcontent04.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodegettextcontent05.xml/1.4/Fri Apr 3 02:48:01 2009// +/nodegettextcontent06.xml/1.5/Fri Apr 3 02:48:01 2009// +/nodegettextcontent07.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodegettextcontent08.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodegettextcontent09.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodegettextcontent10.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodegettextcontent11.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodegettextcontent12.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodegettextcontent13.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodegettextcontent14.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodegettextcontent15.xml/1.2/Fri Apr 3 02:48:01 2009// +/nodegettextcontent16.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodegettextcontent17.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodegettextcontent18.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodegettextcontent19.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodegetuserdata01.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodegetuserdata02.xml/1.4/Fri Apr 3 02:48:01 2009// +/nodegetuserdata03.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodegetuserdata04.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodegetuserdata05.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodegetuserdata06.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodegetuserdata07.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodeinsertbefore01.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodeinsertbefore02.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore03.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore04.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore05.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore06.xml/1.8/Fri Apr 3 02:48:01 2009// +/nodeinsertbefore07.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodeinsertbefore08.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore09.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore10.xml/1.8/Fri Apr 3 02:47:58 2009// +/nodeinsertbefore11.xml/1.7/Fri Apr 3 02:47:58 2009// +/nodeinsertbefore12.xml/1.3/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore13.xml/1.8/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore14.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore15.xml/1.7/Fri Apr 3 02:48:01 2009// +/nodeinsertbefore16.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodeinsertbefore17.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore18.xml/1.2/Fri Apr 3 02:47:59 2009// +/nodeinsertbefore19.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeinsertbefore20.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodeinsertbefore21.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodeinsertbefore22.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodeinsertbefore23.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodeinsertbefore24.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodeinsertbefore25.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodeisdefaultnamespace01.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodeisdefaultnamespace02.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace03.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace04.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodeisdefaultnamespace05.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace06.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodeisdefaultnamespace07.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace08.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace09.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace10.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodeisdefaultnamespace11.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodeisdefaultnamespace13.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodeisdefaultnamespace14.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace15.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeisdefaultnamespace16.xml/1.5/Fri Apr 3 02:48:01 2009// +/nodeisequalnode01.xml/1.5/Fri Apr 3 02:48:01 2009// +/nodeisequalnode02.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodeisequalnode03.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode04.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode05.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodeisequalnode06.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodeisequalnode07.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode08.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodeisequalnode09.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeisequalnode10.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode11.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodeisequalnode12.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodeisequalnode13.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode14.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode15.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode16.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodeisequalnode17.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodeisequalnode18.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode19.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode20.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode21.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodeisequalnode22.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodeisequalnode25.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodeisequalnode26.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodeisequalnode27.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodeisequalnode28.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodeisequalnode29.xml/1.4/Fri Apr 3 02:48:01 2009// +/nodeisequalnode31.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodeisequalnode32.xml/1.4/Fri Apr 3 02:48:01 2009// +/nodeissamenode01.xml/1.4/Fri Apr 3 02:48:01 2009// +/nodeissamenode02.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodeissamenode03.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeissamenode04.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodeissamenode05.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodeissamenode06.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodeissamenode07.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodeissamenode08.xml/1.4/Fri Apr 3 02:48:01 2009// +/nodeissamenode09.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodeissamenode10.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri01.xml/1.4/Fri Apr 3 02:47:58 2009// +/nodelookupnamespaceuri02.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodelookupnamespaceuri03.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri04.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri05.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri06.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodelookupnamespaceuri07.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri08.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri09.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodelookupnamespaceuri10.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri11.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri13.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodelookupnamespaceuri14.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodelookupnamespaceuri15.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodelookupnamespaceuri16.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodelookupnamespaceuri17.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodelookupnamespaceuri18.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodelookupnamespaceuri19.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodelookupnamespaceuri20.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix01.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodelookupprefix02.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix03.xml/1.4/Fri Apr 3 02:47:59 2009// +/nodelookupprefix04.xml/1.4/Fri Apr 3 02:48:00 2009// +/nodelookupprefix05.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodelookupprefix06.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix07.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix08.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix09.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix10.xml/1.5/Fri Apr 3 02:48:01 2009// +/nodelookupprefix11.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodelookupprefix12.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix13.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodelookupprefix14.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodelookupprefix15.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodelookupprefix16.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix17.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix18.xml/1.5/Fri Apr 3 02:47:58 2009// +/nodelookupprefix19.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodelookupprefix20.xml/1.5/Fri Apr 3 02:47:59 2009// +/noderemovechild01.xml/1.6/Fri Apr 3 02:47:59 2009// +/noderemovechild02.xml/1.6/Fri Apr 3 02:47:58 2009// +/noderemovechild03.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild04.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild05.xml/1.7/Fri Apr 3 02:48:00 2009// +/noderemovechild07.xml/1.7/Fri Apr 3 02:48:01 2009// +/noderemovechild08.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild09.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild10.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild11.xml/1.6/Fri Apr 3 02:48:01 2009// +/noderemovechild12.xml/1.2/Fri Apr 3 02:48:00 2009// +/noderemovechild13.xml/1.6/Fri Apr 3 02:48:01 2009// +/noderemovechild14.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild15.xml/1.6/Fri Apr 3 02:48:01 2009// +/noderemovechild16.xml/1.6/Fri Apr 3 02:47:59 2009// +/noderemovechild17.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild18.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild19.xml/1.7/Fri Apr 3 02:47:58 2009// +/noderemovechild20.xml/1.6/Fri Apr 3 02:47:59 2009// +/noderemovechild21.xml/1.6/Fri Apr 3 02:47:59 2009// +/noderemovechild22.xml/1.6/Fri Apr 3 02:48:01 2009// +/noderemovechild23.xml/1.6/Fri Apr 3 02:47:58 2009// +/noderemovechild24.xml/1.6/Fri Apr 3 02:47:59 2009// +/noderemovechild25.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild26.xml/1.6/Fri Apr 3 02:47:59 2009// +/noderemovechild27.xml/1.2/Fri Apr 3 02:47:58 2009// +/noderemovechild28.xml/1.6/Fri Apr 3 02:47:58 2009// +/noderemovechild29.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild30.xml/1.6/Fri Apr 3 02:48:00 2009// +/noderemovechild31.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodereplacechild01.xml/1.2/Fri Apr 3 02:47:58 2009// +/nodereplacechild02.xml/1.2/Fri Apr 3 02:48:01 2009// +/nodereplacechild03.xml/1.2/Fri Apr 3 02:47:59 2009// +/nodereplacechild04.xml/1.2/Fri Apr 3 02:47:58 2009// +/nodereplacechild06.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild07.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodereplacechild08.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodereplacechild10.xml/1.3/Fri Apr 3 02:48:01 2009// +/nodereplacechild12.xml/1.7/Fri Apr 3 02:47:58 2009// +/nodereplacechild13.xml/1.7/Fri Apr 3 02:48:01 2009// +/nodereplacechild14.xml/1.2/Fri Apr 3 02:47:58 2009// +/nodereplacechild15.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodereplacechild16.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild17.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild18.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodereplacechild19.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild20.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodereplacechild21.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodereplacechild22.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild23.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild24.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodereplacechild25.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodereplacechild26.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild27.xml/1.2/Fri Apr 3 02:48:01 2009// +/nodereplacechild28.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodereplacechild29.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild30.xml/1.7/Fri Apr 3 02:47:58 2009// +/nodereplacechild31.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodereplacechild32.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodereplacechild33.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild34.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild35.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild36.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodereplacechild37.xml/1.6/Fri Apr 3 02:47:58 2009// +/nodereplacechild38.xml/1.9/Fri Apr 3 02:48:00 2009// +/nodereplacechild39.xml/1.3/Fri Apr 3 02:47:59 2009// +/nodereplacechild40.xml/1.2/Fri Apr 3 02:48:00 2009// +/nodesettextcontent01.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodesettextcontent02.xml/1.2/Fri Apr 3 02:48:01 2009// +/nodesettextcontent03.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodesettextcontent04.xml/1.6/Fri Apr 3 02:48:01 2009// +/nodesettextcontent05.xml/1.6/Fri Apr 3 02:47:59 2009// +/nodesettextcontent06.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodesettextcontent07.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodesettextcontent08.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodesettextcontent10.xml/1.2/Fri Apr 3 02:47:58 2009// +/nodesettextcontent11.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodesettextcontent12.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodesettextcontent13.xml/1.5/Fri Apr 3 02:47:59 2009// +/nodesetuserdata01.xml/1.5/Fri Apr 3 02:48:00 2009// +/nodesetuserdata02.xml/1.6/Fri Apr 3 02:48:00 2009// +/nodesetuserdata03.xml/1.8/Fri Apr 3 02:47:58 2009// +/nodesetuserdata04.xml/1.8/Fri Apr 3 02:48:01 2009// +/nodesetuserdata05.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodesetuserdata06.xml/1.7/Fri Apr 3 02:48:00 2009// +/nodesetuserdata07.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodesetuserdata08.xml/1.8/Fri Apr 3 02:48:00 2009// +/nodesetuserdata09.xml/1.7/Fri Apr 3 02:47:59 2009// +/nodesetuserdata10.xml/1.6/Fri Apr 3 02:48:01 2009// +/normalizecharacters01.xml/1.3/Fri Apr 3 02:48:00 2009// +/normalizecharacters02.xml/1.4/Fri Apr 3 02:48:00 2009// +/normalizecharacters03.xml/1.3/Fri Apr 3 02:48:00 2009// +/normalizecharacters04.xml/1.3/Fri Apr 3 02:48:00 2009// +/normalizecharacters05.xml/1.3/Fri Apr 3 02:47:59 2009// +/normalizecharacters06.xml/1.3/Fri Apr 3 02:48:00 2009// +/normalizecharacters07.xml/1.3/Fri Apr 3 02:48:00 2009// +/normalizecharacters08.xml/1.3/Fri Apr 3 02:48:00 2009// +/splitcdatasections01.xml/1.2/Fri Apr 3 02:47:59 2009// +/textiselementcontentwhitespace01.xml/1.6/Fri Apr 3 02:47:59 2009// +/textiselementcontentwhitespace02.xml/1.5/Fri Apr 3 02:48:00 2009// +/textiselementcontentwhitespace03.xml/1.6/Fri Apr 3 02:48:00 2009// +/textiselementcontentwhitespace04.xml/1.2/Fri Apr 3 02:48:00 2009// +/textiselementcontentwhitespace05.xml/1.4/Fri Apr 3 02:47:58 2009// +/textiselementcontentwhitespace06.xml/1.4/Fri Apr 3 02:48:01 2009// +/textreplacewholetext01.xml/1.7/Fri Apr 3 02:48:00 2009// +/textreplacewholetext02.xml/1.6/Fri Apr 3 02:48:00 2009// +/textreplacewholetext03.xml/1.5/Fri Apr 3 02:47:59 2009// +/textreplacewholetext04.xml/1.6/Fri Apr 3 02:48:00 2009// +/textreplacewholetext05.xml/1.6/Fri Apr 3 02:48:00 2009// +/textreplacewholetext06.xml/1.2/Fri Apr 3 02:48:01 2009// +/textreplacewholetext07.xml/1.5/Fri Apr 3 02:47:59 2009// +/textreplacewholetext08.xml/1.4/Fri Apr 3 02:47:59 2009// +/textwholetext01.xml/1.6/Fri Apr 3 02:48:00 2009// +/textwholetext02.xml/1.7/Fri Apr 3 02:48:00 2009// +/textwholetext03.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfogettypename03.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfogettypename04.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfogettypenamespace01.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfogettypenamespace03.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfogettypenamespace04.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom01.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom02.xml/1.7/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom03.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom04.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom05.xml/1.6/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom06.xml/1.5/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom07.xml/1.5/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom08.xml/1.5/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom09.xml/1.5/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom10.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom11.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom12.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom13.xml/1.5/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom14.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom15.xml/1.4/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom16.xml/1.4/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom17.xml/1.4/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom18.xml/1.6/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom19.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom20.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom21.xml/1.5/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom22.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom23.xml/1.4/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom24.xml/1.4/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom25.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom26.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom27.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom28.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom29.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom30.xml/1.4/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom31.xml/1.4/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom32.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom33.xml/1.4/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom34.xml/1.5/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom35.xml/1.4/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom36.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom37.xml/1.5/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom38.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom39.xml/1.5/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom40.xml/1.4/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom41.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom42.xml/1.4/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom43.xml/1.7/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom44.xml/1.7/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom45.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom46.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom47.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom48.xml/1.6/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom49.xml/1.2/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom50.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom51.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom52.xml/1.2/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom53.xml/1.2/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom54.xml/1.2/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom55.xml/1.3/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom56.xml/1.3/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom57.xml/1.2/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom58.xml/1.2/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom59.xml/1.2/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom60.xml/1.2/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom61.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom62.xml/1.2/Fri Apr 3 02:48:01 2009// +/typeinfoisderivedfrom63.xml/1.2/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom64.xml/1.4/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom65.xml/1.4/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom66.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom67.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom68.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom69.xml/1.2/Fri Apr 3 02:47:58 2009// +/typeinfoisderivedfrom70.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom71.xml/1.2/Fri Apr 3 02:47:59 2009// +/typeinfoisderivedfrom72.xml/1.2/Fri Apr 3 02:48:00 2009// +/typeinfoisderivedfrom73.xml/1.2/Fri Apr 3 02:48:00 2009// +/userdatahandler01.xml/1.3/Fri Apr 3 02:48:00 2009// +/userdatahandler02.xml/1.3/Fri Apr 3 02:48:00 2009// +/userdatahandler03.xml/1.3/Fri Apr 3 02:48:00 2009// +/userdatahandler04.xml/1.3/Fri Apr 3 02:47:58 2009// +/wellformed01.xml/1.2/Fri Apr 3 02:47:59 2009// +/wellformed02.xml/1.3/Fri Apr 3 02:48:00 2009// +/wellformed03.xml/1.4/Fri Apr 3 02:48:01 2009// +/wellformed04.xml/1.3/Fri Apr 3 02:47:59 2009// diff --git a/test/testcases/tests/level3/core/CVS/Repository b/test/testcases/tests/level3/core/CVS/Repository new file mode 100644 index 0000000..798d143 --- /dev/null +++ b/test/testcases/tests/level3/core/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/core diff --git a/test/testcases/tests/level3/core/CVS/Root b/test/testcases/tests/level3/core/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/core/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/core/CVS/Template b/test/testcases/tests/level3/core/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/core/CVS/Template diff --git a/test/testcases/tests/level3/core/alltests.xml b/test/testcases/tests/level3/core/alltests.xml new file mode 100644 index 0000000..4e0a35c --- /dev/null +++ b/test/testcases/tests/level3/core/alltests.xml @@ -0,0 +1,745 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. +See W3C License http://www.w3.org/Consortium/Legal/ for more details. +--> +<!DOCTYPE suite SYSTEM "dom3.dtd"> + +<suite xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="alltests"> +<metadata> +<title>DOM Level 3 Core Test Suite</title> +<creator>DOM Test Suite Project</creator> +</metadata> +<suite.member href="attrgetschematypeinfo01.xml"/> +<suite.member href="attrgetschematypeinfo02.xml"/> +<suite.member href="attrgetschematypeinfo03.xml"/> +<suite.member href="attrgetschematypeinfo04.xml"/> +<suite.member href="attrgetschematypeinfo05.xml"/> +<suite.member href="attrgetschematypeinfo06.xml"/> +<suite.member href="attrgetschematypeinfo07.xml"/> +<suite.member href="attrgetschematypeinfo08.xml"/> +<suite.member href="attrisid01.xml"/> +<suite.member href="attrisid02.xml"/> +<suite.member href="attrisid03.xml"/> +<suite.member href="attrisid04.xml"/> +<suite.member href="attrisid05.xml"/> +<suite.member href="attrisid06.xml"/> +<suite.member href="attrisid07.xml"/> +<suite.member href="canonicalform01.xml"/> +<suite.member href="canonicalform02.xml"/> +<suite.member href="canonicalform03.xml"/> +<suite.member href="canonicalform04.xml"/> +<suite.member href="canonicalform05.xml"/> +<suite.member href="canonicalform06.xml"/> +<suite.member href="canonicalform07.xml"/> +<suite.member href="canonicalform08.xml"/> +<suite.member href="canonicalform09.xml"/> +<suite.member href="canonicalform10.xml"/> +<suite.member href="canonicalform11.xml"/> +<suite.member href="canonicalform12.xml"/> +<suite.member href="cdatasections01.xml"/> +<suite.member href="checkcharacternormalization01.xml"/> +<suite.member href="checkcharacternormalization02.xml"/> +<suite.member href="checkcharacternormalization03.xml"/> +<suite.member href="comments01.xml"/> +<suite.member href="datatypenormalization01.xml"/> +<suite.member href="datatypenormalization02.xml"/> +<suite.member href="datatypenormalization03.xml"/> +<suite.member href="datatypenormalization04.xml"/> +<suite.member href="datatypenormalization05.xml"/> +<suite.member href="datatypenormalization06.xml"/> +<suite.member href="datatypenormalization07.xml"/> +<suite.member href="datatypenormalization08.xml"/> +<suite.member href="datatypenormalization09.xml"/> +<suite.member href="datatypenormalization10.xml"/> +<suite.member href="datatypenormalization11.xml"/> +<suite.member href="datatypenormalization12.xml"/> +<suite.member href="datatypenormalization13.xml"/> +<suite.member href="datatypenormalization14.xml"/> +<suite.member href="datatypenormalization15.xml"/> +<suite.member href="datatypenormalization16.xml"/> +<suite.member href="datatypenormalization17.xml"/> +<suite.member href="datatypenormalization18.xml"/> +<suite.member href="documentadoptnode01.xml"/> +<suite.member href="documentadoptnode02.xml"/> +<suite.member href="documentadoptnode03.xml"/> +<suite.member href="documentadoptnode04.xml"/> +<suite.member href="documentadoptnode05.xml"/> +<suite.member href="documentadoptnode06.xml"/> +<suite.member href="documentadoptnode07.xml"/> +<suite.member href="documentadoptnode08.xml"/> +<suite.member href="documentadoptnode09.xml"/> +<suite.member href="documentadoptnode10.xml"/> +<suite.member href="documentadoptnode11.xml"/> +<suite.member href="documentadoptnode12.xml"/> +<suite.member href="documentadoptnode13.xml"/> +<suite.member href="documentadoptnode14.xml"/> +<suite.member href="documentadoptnode15.xml"/> +<suite.member href="documentadoptnode16.xml"/> +<suite.member href="documentadoptnode17.xml"/> +<suite.member href="documentadoptnode18.xml"/> +<suite.member href="documentadoptnode19.xml"/> +<suite.member href="documentadoptnode20.xml"/> +<suite.member href="documentadoptnode21.xml"/> +<suite.member href="documentadoptnode22.xml"/> +<suite.member href="documentadoptnode23.xml"/> +<suite.member href="documentadoptnode24.xml"/> +<suite.member href="documentadoptnode25.xml"/> +<suite.member href="documentadoptnode26.xml"/> +<suite.member href="documentadoptnode27.xml"/> +<suite.member href="documentadoptnode28.xml"/> +<suite.member href="documentadoptnode30.xml"/> +<suite.member href="documentadoptnode31.xml"/> +<suite.member href="documentadoptnode32.xml"/> +<suite.member href="documentadoptnode33.xml"/> +<suite.member href="documentadoptnode34.xml"/> +<suite.member href="documentadoptnode35.xml"/> +<suite.member href="documentadoptnode36.xml"/> +<suite.member href="documentgetdoctype01.xml"/> +<suite.member href="documentgetdocumenturi01.xml"/> +<suite.member href="documentgetdocumenturi02.xml"/> +<suite.member href="documentgetdocumenturi03.xml"/> +<suite.member href="documentgetinputencoding01.xml"/> +<suite.member href="documentgetinputencoding02.xml"/> +<suite.member href="documentgetinputencoding03.xml"/> +<suite.member href="documentgetinputencoding04.xml"/> +<suite.member href="documentgetstricterrorchecking01.xml"/> +<suite.member href="documentgetstricterrorchecking02.xml"/> +<suite.member href="documentgetxmlencoding01.xml"/> +<suite.member href="documentgetxmlencoding02.xml"/> +<suite.member href="documentgetxmlencoding03.xml"/> +<suite.member href="documentgetxmlencoding04.xml"/> +<suite.member href="documentgetxmlencoding05.xml"/> +<suite.member href="documentgetxmlstandalone01.xml"/> +<suite.member href="documentgetxmlstandalone02.xml"/> +<suite.member href="documentgetxmlstandalone03.xml"/> +<suite.member href="documentgetxmlstandalone04.xml"/> +<suite.member href="documentgetxmlstandalone05.xml"/> +<suite.member href="documentgetxmlversion01.xml"/> +<suite.member href="documentgetxmlversion02.xml"/> +<suite.member href="documentgetxmlversion03.xml"/> +<suite.member href="documentnormalizedocument01.xml"/> +<suite.member href="documentnormalizedocument02.xml"/> +<suite.member href="documentnormalizedocument03.xml"/> +<suite.member href="documentnormalizedocument04.xml"/> +<suite.member href="documentnormalizedocument05.xml"/> +<suite.member href="documentnormalizedocument06.xml"/> +<suite.member href="documentnormalizedocument07.xml"/> +<suite.member href="documentnormalizedocument08.xml"/> +<suite.member href="documentnormalizedocument09.xml"/> +<suite.member href="documentnormalizedocument10.xml"/> +<suite.member href="documentnormalizedocument11.xml"/> +<suite.member href="documentnormalizedocument12.xml"/> +<suite.member href="documentnormalizedocument13.xml"/> +<suite.member href="documentrenamenode01.xml"/> +<suite.member href="documentrenamenode02.xml"/> +<suite.member href="documentrenamenode03.xml"/> +<suite.member href="documentrenamenode04.xml"/> +<suite.member href="documentrenamenode05.xml"/> +<suite.member href="documentrenamenode06.xml"/> +<suite.member href="documentrenamenode07.xml"/> +<suite.member href="documentrenamenode08.xml"/> +<suite.member href="documentrenamenode09.xml"/> +<suite.member href="documentrenamenode10.xml"/> +<suite.member href="documentrenamenode11.xml"/> +<suite.member href="documentrenamenode12.xml"/> +<suite.member href="documentrenamenode13.xml"/> +<suite.member href="documentrenamenode14.xml"/> +<suite.member href="documentrenamenode15.xml"/> +<suite.member href="documentrenamenode16.xml"/> +<suite.member href="documentrenamenode17.xml"/> +<suite.member href="documentrenamenode18.xml"/> +<suite.member href="documentrenamenode19.xml"/> +<suite.member href="documentrenamenode20.xml"/> +<suite.member href="documentrenamenode21.xml"/> +<suite.member href="documentrenamenode22.xml"/> +<suite.member href="documentrenamenode23.xml"/> +<suite.member href="documentrenamenode24.xml"/> +<suite.member href="documentrenamenode25.xml"/> +<suite.member href="documentrenamenode26.xml"/> +<suite.member href="documentrenamenode27.xml"/> +<suite.member href="documentrenamenode28.xml"/> +<suite.member href="documentrenamenode29.xml"/> +<suite.member href="documentsetdocumenturi01.xml"/> +<suite.member href="documentsetdocumenturi02.xml"/> +<suite.member href="documentsetdocumenturi03.xml"/> +<suite.member href="documentsetstricterrorchecking01.xml"/> +<suite.member href="documentsetstricterrorchecking02.xml"/> +<suite.member href="documentsetstricterrorchecking03.xml"/> +<suite.member href="documentsetxmlstandalone01.xml"/> +<suite.member href="documentsetxmlstandalone02.xml"/> +<suite.member href="documentsetxmlversion01.xml"/> +<suite.member href="documentsetxmlversion02.xml"/> +<suite.member href="documentsetxmlversion03.xml"/> +<suite.member href="documentsetxmlversion05.xml"/> +<suite.member href="domconfigcanonicalform1.xml"/> +<suite.member href="domconfigcdatasections1.xml"/> +<suite.member href="domconfigcheckcharacternormalization1.xml"/> +<suite.member href="domconfigcomments1.xml"/> +<suite.member href="domconfigdatatypenormalization1.xml"/> +<suite.member href="domconfigdatatypenormalization2.xml"/> +<suite.member href="domconfigelementcontentwhitespace1.xml"/> +<suite.member href="domconfigentities1.xml"/> +<suite.member href="domconfigerrorhandler1.xml"/> +<suite.member href="domconfigerrorhandler2.xml"/> +<suite.member href="domconfiginfoset1.xml"/> +<suite.member href="domconfignamespacedeclarations1.xml"/> +<suite.member href="domconfignamespaces1.xml"/> +<suite.member href="domconfignamespaces2.xml"/> +<suite.member href="domconfignormalizecharacters1.xml"/> +<suite.member href="domconfigparameternames01.xml"/> +<suite.member href="domconfigschemalocation1.xml"/> +<suite.member href="domconfigschematype1.xml"/> +<suite.member href="domconfigsplitcdatasections1.xml"/> +<suite.member href="domconfigurationcansetparameter01.xml"/> +<suite.member href="domconfigurationcansetparameter02.xml"/> +<suite.member href="domconfigurationcansetparameter03.xml"/> +<suite.member href="domconfigurationcansetparameter04.xml"/> +<suite.member href="domconfigurationcansetparameter06.xml"/> +<suite.member href="domconfigurationgetparameter01.xml"/> +<suite.member href="domconfigurationgetparameter02.xml"/> +<suite.member href="domconfigvalidate1.xml"/> +<suite.member href="domconfigvalidateifschema1.xml"/> +<suite.member href="domconfigwellformed1.xml"/> +<suite.member href="domimplementationgetfeature01.xml"/> +<suite.member href="domimplementationgetfeature02.xml"/> +<suite.member href="domimplementationgetfeature03.xml"/> +<suite.member href="domimplementationgetfeature05.xml"/> +<suite.member href="domimplementationgetfeature06.xml"/> +<suite.member href="domimplementationregistry01.xml"/> +<suite.member href="domimplementationregistry02.xml"/> +<suite.member href="domimplementationregistry03.xml"/> +<suite.member href="domimplementationregistry04.xml"/> +<suite.member href="domimplementationregistry05.xml"/> +<suite.member href="domimplementationregistry06.xml"/> +<suite.member href="domimplementationregistry07.xml"/> +<suite.member href="domimplementationregistry08.xml"/> +<suite.member href="domimplementationregistry09.xml"/> +<suite.member href="domimplementationregistry10.xml"/> +<suite.member href="domimplementationregistry11.xml"/> +<suite.member href="domimplementationregistry12.xml"/> +<suite.member href="domimplementationregistry13.xml"/> +<suite.member href="domimplementationregistry14.xml"/> +<suite.member href="domimplementationregistry15.xml"/> +<suite.member href="domimplementationregistry16.xml"/> +<suite.member href="domimplementationregistry17.xml"/> +<suite.member href="domimplementationregistry18.xml"/> +<suite.member href="domimplementationregistry19.xml"/> +<suite.member href="domimplementationregistry20.xml"/> +<suite.member href="domimplementationregistry21.xml"/> +<suite.member href="domimplementationregistry22.xml"/> +<suite.member href="domimplementationregistry23.xml"/> +<suite.member href="domimplementationregistry24.xml"/> +<suite.member href="domimplementationregistry25.xml"/> +<suite.member href="domstringlistcontains01.xml"/> +<suite.member href="domstringlistcontains02.xml"/> +<suite.member href="domstringlistgetlength01.xml"/> +<suite.member href="domstringlistitem01.xml"/> +<suite.member href="domstringlistitem02.xml"/> +<suite.member href="elementcontentwhitespace01.xml"/> +<suite.member href="elementcontentwhitespace02.xml"/> +<suite.member href="elementcontentwhitespace03.xml"/> +<suite.member href="elementgetschematypeinfo01.xml"/> +<suite.member href="elementgetschematypeinfo02.xml"/> +<suite.member href="elementgetschematypeinfo03.xml"/> +<suite.member href="elementgetschematypeinfo04.xml"/> +<suite.member href="elementgetschematypeinfo05.xml"/> +<suite.member href="elementgetschematypeinfo06.xml"/> +<suite.member href="elementgetschematypeinfo07.xml"/> +<suite.member href="elementsetidattribute01.xml"/> +<suite.member href="elementsetidattribute03.xml"/> +<suite.member href="elementsetidattribute04.xml"/> +<suite.member href="elementsetidattribute05.xml"/> +<suite.member href="elementsetidattribute06.xml"/> +<suite.member href="elementsetidattribute07.xml"/> +<suite.member href="elementsetidattribute08.xml"/> +<suite.member href="elementsetidattribute09.xml"/> +<suite.member href="elementsetidattribute10.xml"/> +<suite.member href="elementsetidattribute11.xml"/> +<suite.member href="elementsetidattributenode01.xml"/> +<suite.member href="elementsetidattributenode02.xml"/> +<suite.member href="elementsetidattributenode03.xml"/> +<suite.member href="elementsetidattributenode04.xml"/> +<suite.member href="elementsetidattributenode05.xml"/> +<suite.member href="elementsetidattributenode06.xml"/> +<suite.member href="elementsetidattributenode07.xml"/> +<suite.member href="elementsetidattributenode08.xml"/> +<suite.member href="elementsetidattributenode09.xml"/> +<suite.member href="elementsetidattributenode10.xml"/> +<suite.member href="elementsetidattributens01.xml"/> +<suite.member href="elementsetidattributens02.xml"/> +<suite.member href="elementsetidattributens03.xml"/> +<suite.member href="elementsetidattributens04.xml"/> +<suite.member href="elementsetidattributens05.xml"/> +<suite.member href="elementsetidattributens06.xml"/> +<suite.member href="elementsetidattributens07.xml"/> +<suite.member href="elementsetidattributens08.xml"/> +<suite.member href="elementsetidattributens09.xml"/> +<suite.member href="elementsetidattributens10.xml"/> +<suite.member href="elementsetidattributens11.xml"/> +<suite.member href="elementsetidattributens12.xml"/> +<suite.member href="elementsetidattributens13.xml"/> +<suite.member href="elementsetidattributens14.xml"/> +<suite.member href="entities01.xml"/> +<suite.member href="entities02.xml"/> +<suite.member href="entities03.xml"/> +<suite.member href="entities04.xml"/> +<suite.member href="entitygetinputencoding01.xml"/> +<suite.member href="entitygetinputencoding02.xml"/> +<suite.member href="entitygetinputencoding03.xml"/> +<suite.member href="entitygetinputencoding04.xml"/> +<suite.member href="entitygetxmlencoding01.xml"/> +<suite.member href="entitygetxmlencoding02.xml"/> +<suite.member href="entitygetxmlencoding03.xml"/> +<suite.member href="entitygetxmlencoding04.xml"/> +<suite.member href="entitygetxmlversion01.xml"/> +<suite.member href="entitygetxmlversion02.xml"/> +<suite.member href="entitygetxmlversion03.xml"/> +<suite.member href="entitygetxmlversion04.xml"/> +<suite.member href="handleerror01.xml"/> +<suite.member href="handleerror02.xml"/> +<suite.member href="hasFeature01.xml"/> +<suite.member href="hasFeature02.xml"/> +<suite.member href="hasFeature03.xml"/> +<suite.member href="hasFeature04.xml"/> +<suite.member href="infoset01.xml"/> +<suite.member href="infoset02.xml"/> +<suite.member href="infoset03.xml"/> +<suite.member href="infoset04.xml"/> +<suite.member href="infoset05.xml"/> +<suite.member href="infoset06.xml"/> +<suite.member href="infoset07.xml"/> +<suite.member href="infoset08.xml"/> +<suite.member href="infoset09.xml"/> +<suite.member href="namespacedeclarations01.xml"/> +<suite.member href="namespacedeclarations02.xml"/> +<suite.member href="nodeappendchild01.xml"/> +<suite.member href="nodeappendchild02.xml"/> +<suite.member href="nodecomparedocumentposition01.xml"/> +<suite.member href="nodecomparedocumentposition02.xml"/> +<suite.member href="nodecomparedocumentposition03.xml"/> +<suite.member href="nodecomparedocumentposition04.xml"/> +<suite.member href="nodecomparedocumentposition05.xml"/> +<suite.member href="nodecomparedocumentposition06.xml"/> +<suite.member href="nodecomparedocumentposition07.xml"/> +<suite.member href="nodecomparedocumentposition08.xml"/> +<suite.member href="nodecomparedocumentposition09.xml"/> +<suite.member href="nodecomparedocumentposition10.xml"/> +<suite.member href="nodecomparedocumentposition11.xml"/> +<suite.member href="nodecomparedocumentposition12.xml"/> +<suite.member href="nodecomparedocumentposition13.xml"/> +<suite.member href="nodecomparedocumentposition14.xml"/> +<suite.member href="nodecomparedocumentposition15.xml"/> +<suite.member href="nodecomparedocumentposition16.xml"/> +<suite.member href="nodecomparedocumentposition17.xml"/> +<suite.member href="nodecomparedocumentposition18.xml"/> +<suite.member href="nodecomparedocumentposition19.xml"/> +<suite.member href="nodecomparedocumentposition20.xml"/> +<suite.member href="nodecomparedocumentposition21.xml"/> +<suite.member href="nodecomparedocumentposition22.xml"/> +<suite.member href="nodecomparedocumentposition23.xml"/> +<suite.member href="nodecomparedocumentposition24.xml"/> +<suite.member href="nodecomparedocumentposition25.xml"/> +<suite.member href="nodecomparedocumentposition26.xml"/> +<suite.member href="nodecomparedocumentposition27.xml"/> +<suite.member href="nodecomparedocumentposition28.xml"/> +<suite.member href="nodecomparedocumentposition29.xml"/> +<suite.member href="nodecomparedocumentposition30.xml"/> +<suite.member href="nodecomparedocumentposition31.xml"/> +<suite.member href="nodecomparedocumentposition32.xml"/> +<suite.member href="nodecomparedocumentposition33.xml"/> +<suite.member href="nodecomparedocumentposition34.xml"/> +<suite.member href="nodecomparedocumentposition35.xml"/> +<suite.member href="nodecomparedocumentposition36.xml"/> +<suite.member href="nodecomparedocumentposition37.xml"/> +<suite.member href="nodecomparedocumentposition38.xml"/> +<suite.member href="nodecomparedocumentposition39.xml"/> +<suite.member href="nodecomparedocumentposition40.xml"/> +<suite.member href="nodegetbaseuri01.xml"/> +<suite.member href="nodegetbaseuri02.xml"/> +<suite.member href="nodegetbaseuri03.xml"/> +<suite.member href="nodegetbaseuri04.xml"/> +<suite.member href="nodegetbaseuri05.xml"/> +<suite.member href="nodegetbaseuri06.xml"/> +<suite.member href="nodegetbaseuri07.xml"/> +<suite.member href="nodegetbaseuri09.xml"/> +<suite.member href="nodegetbaseuri10.xml"/> +<suite.member href="nodegetbaseuri11.xml"/> +<suite.member href="nodegetbaseuri12.xml"/> +<suite.member href="nodegetbaseuri13.xml"/> +<suite.member href="nodegetbaseuri14.xml"/> +<suite.member href="nodegetbaseuri15.xml"/> +<suite.member href="nodegetbaseuri16.xml"/> +<suite.member href="nodegetbaseuri17.xml"/> +<suite.member href="nodegetbaseuri18.xml"/> +<suite.member href="nodegetbaseuri19.xml"/> +<suite.member href="nodegetbaseuri20.xml"/> +<suite.member href="nodegetfeature01.xml"/> +<suite.member href="nodegetfeature02.xml"/> +<suite.member href="nodegetfeature03.xml"/> +<suite.member href="nodegetfeature04.xml"/> +<suite.member href="nodegetfeature05.xml"/> +<suite.member href="nodegetfeature06.xml"/> +<suite.member href="nodegetfeature07.xml"/> +<suite.member href="nodegetfeature08.xml"/> +<suite.member href="nodegetfeature09.xml"/> +<suite.member href="nodegetfeature10.xml"/> +<suite.member href="nodegetfeature11.xml"/> +<suite.member href="nodegetfeature12.xml"/> +<suite.member href="nodegetfeature13.xml"/> +<suite.member href="nodegettextcontent01.xml"/> +<suite.member href="nodegettextcontent02.xml"/> +<suite.member href="nodegettextcontent03.xml"/> +<suite.member href="nodegettextcontent04.xml"/> +<suite.member href="nodegettextcontent05.xml"/> +<suite.member href="nodegettextcontent06.xml"/> +<suite.member href="nodegettextcontent07.xml"/> +<suite.member href="nodegettextcontent08.xml"/> +<suite.member href="nodegettextcontent09.xml"/> +<suite.member href="nodegettextcontent10.xml"/> +<suite.member href="nodegettextcontent11.xml"/> +<suite.member href="nodegettextcontent12.xml"/> +<suite.member href="nodegettextcontent13.xml"/> +<suite.member href="nodegettextcontent14.xml"/> +<suite.member href="nodegettextcontent15.xml"/> +<suite.member href="nodegettextcontent16.xml"/> +<suite.member href="nodegettextcontent17.xml"/> +<suite.member href="nodegettextcontent18.xml"/> +<suite.member href="nodegettextcontent19.xml"/> +<suite.member href="nodegetuserdata01.xml"/> +<suite.member href="nodegetuserdata02.xml"/> +<suite.member href="nodegetuserdata03.xml"/> +<suite.member href="nodegetuserdata04.xml"/> +<suite.member href="nodegetuserdata05.xml"/> +<suite.member href="nodegetuserdata06.xml"/> +<suite.member href="nodegetuserdata07.xml"/> +<suite.member href="nodeinsertbefore01.xml"/> +<suite.member href="nodeinsertbefore02.xml"/> +<suite.member href="nodeinsertbefore03.xml"/> +<suite.member href="nodeinsertbefore04.xml"/> +<suite.member href="nodeinsertbefore05.xml"/> +<suite.member href="nodeinsertbefore06.xml"/> +<suite.member href="nodeinsertbefore07.xml"/> +<suite.member href="nodeinsertbefore08.xml"/> +<suite.member href="nodeinsertbefore09.xml"/> +<suite.member href="nodeinsertbefore10.xml"/> +<suite.member href="nodeinsertbefore11.xml"/> +<suite.member href="nodeinsertbefore12.xml"/> +<suite.member href="nodeinsertbefore13.xml"/> +<suite.member href="nodeinsertbefore14.xml"/> +<suite.member href="nodeinsertbefore15.xml"/> +<suite.member href="nodeinsertbefore16.xml"/> +<suite.member href="nodeinsertbefore17.xml"/> +<suite.member href="nodeinsertbefore18.xml"/> +<suite.member href="nodeinsertbefore19.xml"/> +<suite.member href="nodeinsertbefore20.xml"/> +<suite.member href="nodeinsertbefore21.xml"/> +<suite.member href="nodeinsertbefore22.xml"/> +<suite.member href="nodeinsertbefore23.xml"/> +<suite.member href="nodeinsertbefore24.xml"/> +<suite.member href="nodeinsertbefore25.xml"/> +<suite.member href="nodeisdefaultnamespace01.xml"/> +<suite.member href="nodeisdefaultnamespace02.xml"/> +<suite.member href="nodeisdefaultnamespace03.xml"/> +<suite.member href="nodeisdefaultnamespace04.xml"/> +<suite.member href="nodeisdefaultnamespace05.xml"/> +<suite.member href="nodeisdefaultnamespace06.xml"/> +<suite.member href="nodeisdefaultnamespace07.xml"/> +<suite.member href="nodeisdefaultnamespace08.xml"/> +<suite.member href="nodeisdefaultnamespace09.xml"/> +<suite.member href="nodeisdefaultnamespace10.xml"/> +<suite.member href="nodeisdefaultnamespace11.xml"/> +<suite.member href="nodeisdefaultnamespace13.xml"/> +<suite.member href="nodeisdefaultnamespace14.xml"/> +<suite.member href="nodeisdefaultnamespace15.xml"/> +<suite.member href="nodeisdefaultnamespace16.xml"/> +<suite.member href="nodeisequalnode01.xml"/> +<suite.member href="nodeisequalnode02.xml"/> +<suite.member href="nodeisequalnode03.xml"/> +<suite.member href="nodeisequalnode04.xml"/> +<suite.member href="nodeisequalnode05.xml"/> +<suite.member href="nodeisequalnode06.xml"/> +<suite.member href="nodeisequalnode07.xml"/> +<suite.member href="nodeisequalnode08.xml"/> +<suite.member href="nodeisequalnode09.xml"/> +<suite.member href="nodeisequalnode10.xml"/> +<suite.member href="nodeisequalnode11.xml"/> +<suite.member href="nodeisequalnode12.xml"/> +<suite.member href="nodeisequalnode13.xml"/> +<suite.member href="nodeisequalnode14.xml"/> +<suite.member href="nodeisequalnode15.xml"/> +<suite.member href="nodeisequalnode16.xml"/> +<suite.member href="nodeisequalnode17.xml"/> +<suite.member href="nodeisequalnode18.xml"/> +<suite.member href="nodeisequalnode19.xml"/> +<suite.member href="nodeisequalnode20.xml"/> +<suite.member href="nodeisequalnode21.xml"/> +<suite.member href="nodeisequalnode22.xml"/> +<suite.member href="nodeisequalnode25.xml"/> +<suite.member href="nodeisequalnode26.xml"/> +<suite.member href="nodeisequalnode27.xml"/> +<suite.member href="nodeisequalnode28.xml"/> +<suite.member href="nodeisequalnode29.xml"/> +<suite.member href="nodeisequalnode31.xml"/> +<suite.member href="nodeisequalnode32.xml"/> +<suite.member href="nodeissamenode01.xml"/> +<suite.member href="nodeissamenode02.xml"/> +<suite.member href="nodeissamenode03.xml"/> +<suite.member href="nodeissamenode04.xml"/> +<suite.member href="nodeissamenode05.xml"/> +<suite.member href="nodeissamenode06.xml"/> +<suite.member href="nodeissamenode07.xml"/> +<suite.member href="nodeissamenode08.xml"/> +<suite.member href="nodeissamenode09.xml"/> +<suite.member href="nodeissamenode10.xml"/> +<suite.member href="nodelookupnamespaceuri01.xml"/> +<suite.member href="nodelookupnamespaceuri02.xml"/> +<suite.member href="nodelookupnamespaceuri03.xml"/> +<suite.member href="nodelookupnamespaceuri04.xml"/> +<suite.member href="nodelookupnamespaceuri05.xml"/> +<suite.member href="nodelookupnamespaceuri06.xml"/> +<suite.member href="nodelookupnamespaceuri07.xml"/> +<suite.member href="nodelookupnamespaceuri08.xml"/> +<suite.member href="nodelookupnamespaceuri09.xml"/> +<suite.member href="nodelookupnamespaceuri10.xml"/> +<suite.member href="nodelookupnamespaceuri11.xml"/> +<suite.member href="nodelookupnamespaceuri13.xml"/> +<suite.member href="nodelookupnamespaceuri14.xml"/> +<suite.member href="nodelookupnamespaceuri15.xml"/> +<suite.member href="nodelookupnamespaceuri16.xml"/> +<suite.member href="nodelookupnamespaceuri17.xml"/> +<suite.member href="nodelookupnamespaceuri18.xml"/> +<suite.member href="nodelookupnamespaceuri19.xml"/> +<suite.member href="nodelookupnamespaceuri20.xml"/> +<suite.member href="nodelookupprefix01.xml"/> +<suite.member href="nodelookupprefix02.xml"/> +<suite.member href="nodelookupprefix03.xml"/> +<suite.member href="nodelookupprefix04.xml"/> +<suite.member href="nodelookupprefix05.xml"/> +<suite.member href="nodelookupprefix06.xml"/> +<suite.member href="nodelookupprefix07.xml"/> +<suite.member href="nodelookupprefix08.xml"/> +<suite.member href="nodelookupprefix09.xml"/> +<suite.member href="nodelookupprefix10.xml"/> +<suite.member href="nodelookupprefix11.xml"/> +<suite.member href="nodelookupprefix12.xml"/> +<suite.member href="nodelookupprefix13.xml"/> +<suite.member href="nodelookupprefix14.xml"/> +<suite.member href="nodelookupprefix15.xml"/> +<suite.member href="nodelookupprefix16.xml"/> +<suite.member href="nodelookupprefix17.xml"/> +<suite.member href="nodelookupprefix18.xml"/> +<suite.member href="nodelookupprefix19.xml"/> +<suite.member href="nodelookupprefix20.xml"/> +<suite.member href="noderemovechild01.xml"/> +<suite.member href="noderemovechild02.xml"/> +<suite.member href="noderemovechild03.xml"/> +<suite.member href="noderemovechild04.xml"/> +<suite.member href="noderemovechild05.xml"/> +<suite.member href="noderemovechild07.xml"/> +<suite.member href="noderemovechild08.xml"/> +<suite.member href="noderemovechild09.xml"/> +<suite.member href="noderemovechild10.xml"/> +<suite.member href="noderemovechild11.xml"/> +<suite.member href="noderemovechild12.xml"/> +<suite.member href="noderemovechild13.xml"/> +<suite.member href="noderemovechild14.xml"/> +<suite.member href="noderemovechild15.xml"/> +<suite.member href="noderemovechild16.xml"/> +<suite.member href="noderemovechild17.xml"/> +<suite.member href="noderemovechild18.xml"/> +<suite.member href="noderemovechild19.xml"/> +<suite.member href="noderemovechild20.xml"/> +<suite.member href="noderemovechild21.xml"/> +<suite.member href="noderemovechild22.xml"/> +<suite.member href="noderemovechild23.xml"/> +<suite.member href="noderemovechild24.xml"/> +<suite.member href="noderemovechild25.xml"/> +<suite.member href="noderemovechild26.xml"/> +<suite.member href="noderemovechild27.xml"/> +<suite.member href="noderemovechild28.xml"/> +<suite.member href="noderemovechild29.xml"/> +<suite.member href="noderemovechild30.xml"/> +<suite.member href="noderemovechild31.xml"/> +<suite.member href="nodereplacechild01.xml"/> +<suite.member href="nodereplacechild02.xml"/> +<suite.member href="nodereplacechild03.xml"/> +<suite.member href="nodereplacechild04.xml"/> +<suite.member href="nodereplacechild06.xml"/> +<suite.member href="nodereplacechild07.xml"/> +<suite.member href="nodereplacechild08.xml"/> +<suite.member href="nodereplacechild10.xml"/> +<suite.member href="nodereplacechild12.xml"/> +<suite.member href="nodereplacechild13.xml"/> +<suite.member href="nodereplacechild14.xml"/> +<suite.member href="nodereplacechild15.xml"/> +<suite.member href="nodereplacechild16.xml"/> +<suite.member href="nodereplacechild17.xml"/> +<suite.member href="nodereplacechild18.xml"/> +<suite.member href="nodereplacechild19.xml"/> +<suite.member href="nodereplacechild20.xml"/> +<suite.member href="nodereplacechild21.xml"/> +<suite.member href="nodereplacechild22.xml"/> +<suite.member href="nodereplacechild23.xml"/> +<suite.member href="nodereplacechild24.xml"/> +<suite.member href="nodereplacechild25.xml"/> +<suite.member href="nodereplacechild26.xml"/> +<suite.member href="nodereplacechild27.xml"/> +<suite.member href="nodereplacechild28.xml"/> +<suite.member href="nodereplacechild29.xml"/> +<suite.member href="nodereplacechild30.xml"/> +<suite.member href="nodereplacechild31.xml"/> +<suite.member href="nodereplacechild32.xml"/> +<suite.member href="nodereplacechild33.xml"/> +<suite.member href="nodereplacechild34.xml"/> +<suite.member href="nodereplacechild35.xml"/> +<suite.member href="nodereplacechild36.xml"/> +<suite.member href="nodereplacechild37.xml"/> +<suite.member href="nodereplacechild38.xml"/> +<suite.member href="nodereplacechild39.xml"/> +<suite.member href="nodereplacechild40.xml"/> +<suite.member href="nodesettextcontent01.xml"/> +<suite.member href="nodesettextcontent02.xml"/> +<suite.member href="nodesettextcontent03.xml"/> +<suite.member href="nodesettextcontent04.xml"/> +<suite.member href="nodesettextcontent05.xml"/> +<suite.member href="nodesettextcontent06.xml"/> +<suite.member href="nodesettextcontent07.xml"/> +<suite.member href="nodesettextcontent08.xml"/> +<suite.member href="nodesettextcontent10.xml"/> +<suite.member href="nodesettextcontent11.xml"/> +<suite.member href="nodesettextcontent12.xml"/> +<suite.member href="nodesettextcontent13.xml"/> +<suite.member href="nodesetuserdata01.xml"/> +<suite.member href="nodesetuserdata02.xml"/> +<suite.member href="nodesetuserdata03.xml"/> +<suite.member href="nodesetuserdata04.xml"/> +<suite.member href="nodesetuserdata05.xml"/> +<suite.member href="nodesetuserdata06.xml"/> +<suite.member href="nodesetuserdata07.xml"/> +<suite.member href="nodesetuserdata08.xml"/> +<suite.member href="nodesetuserdata09.xml"/> +<suite.member href="nodesetuserdata10.xml"/> +<suite.member href="normalizecharacters01.xml"/> +<suite.member href="normalizecharacters02.xml"/> +<suite.member href="normalizecharacters03.xml"/> +<suite.member href="normalizecharacters04.xml"/> +<suite.member href="normalizecharacters05.xml"/> +<suite.member href="normalizecharacters06.xml"/> +<suite.member href="normalizecharacters07.xml"/> +<suite.member href="normalizecharacters08.xml"/> +<suite.member href="splitcdatasections01.xml"/> +<suite.member href="textiselementcontentwhitespace01.xml"/> +<suite.member href="textiselementcontentwhitespace02.xml"/> +<suite.member href="textiselementcontentwhitespace03.xml"/> +<suite.member href="textiselementcontentwhitespace04.xml"/> +<suite.member href="textiselementcontentwhitespace05.xml"/> +<suite.member href="textiselementcontentwhitespace06.xml"/> +<suite.member href="textreplacewholetext01.xml"/> +<suite.member href="textreplacewholetext02.xml"/> +<suite.member href="textreplacewholetext03.xml"/> +<suite.member href="textreplacewholetext04.xml"/> +<suite.member href="textreplacewholetext05.xml"/> +<suite.member href="textreplacewholetext06.xml"/> +<suite.member href="textreplacewholetext07.xml"/> +<suite.member href="textreplacewholetext08.xml"/> +<suite.member href="textwholetext01.xml"/> +<suite.member href="textwholetext02.xml"/> +<suite.member href="textwholetext03.xml"/> +<suite.member href="typeinfogettypename03.xml"/> +<suite.member href="typeinfogettypename04.xml"/> +<suite.member href="typeinfogettypenamespace01.xml"/> +<suite.member href="typeinfogettypenamespace03.xml"/> +<suite.member href="typeinfogettypenamespace04.xml"/> +<suite.member href="typeinfoisderivedfrom01.xml"/> +<suite.member href="typeinfoisderivedfrom02.xml"/> +<suite.member href="typeinfoisderivedfrom03.xml"/> +<suite.member href="typeinfoisderivedfrom04.xml"/> +<suite.member href="typeinfoisderivedfrom05.xml"/> +<suite.member href="typeinfoisderivedfrom06.xml"/> +<suite.member href="typeinfoisderivedfrom07.xml"/> +<suite.member href="typeinfoisderivedfrom08.xml"/> +<suite.member href="typeinfoisderivedfrom09.xml"/> +<suite.member href="typeinfoisderivedfrom10.xml"/> +<suite.member href="typeinfoisderivedfrom11.xml"/> +<suite.member href="typeinfoisderivedfrom12.xml"/> +<suite.member href="typeinfoisderivedfrom13.xml"/> +<suite.member href="typeinfoisderivedfrom14.xml"/> +<suite.member href="typeinfoisderivedfrom15.xml"/> +<suite.member href="typeinfoisderivedfrom16.xml"/> +<suite.member href="typeinfoisderivedfrom17.xml"/> +<suite.member href="typeinfoisderivedfrom18.xml"/> +<suite.member href="typeinfoisderivedfrom19.xml"/> +<suite.member href="typeinfoisderivedfrom20.xml"/> +<suite.member href="typeinfoisderivedfrom21.xml"/> +<suite.member href="typeinfoisderivedfrom22.xml"/> +<suite.member href="typeinfoisderivedfrom23.xml"/> +<suite.member href="typeinfoisderivedfrom24.xml"/> +<suite.member href="typeinfoisderivedfrom25.xml"/> +<suite.member href="typeinfoisderivedfrom26.xml"/> +<suite.member href="typeinfoisderivedfrom27.xml"/> +<suite.member href="typeinfoisderivedfrom28.xml"/> +<suite.member href="typeinfoisderivedfrom29.xml"/> +<suite.member href="typeinfoisderivedfrom30.xml"/> +<suite.member href="typeinfoisderivedfrom31.xml"/> +<suite.member href="typeinfoisderivedfrom32.xml"/> +<suite.member href="typeinfoisderivedfrom33.xml"/> +<suite.member href="typeinfoisderivedfrom34.xml"/> +<suite.member href="typeinfoisderivedfrom35.xml"/> +<suite.member href="typeinfoisderivedfrom36.xml"/> +<suite.member href="typeinfoisderivedfrom37.xml"/> +<suite.member href="typeinfoisderivedfrom38.xml"/> +<suite.member href="typeinfoisderivedfrom39.xml"/> +<suite.member href="typeinfoisderivedfrom40.xml"/> +<suite.member href="typeinfoisderivedfrom41.xml"/> +<suite.member href="typeinfoisderivedfrom42.xml"/> +<suite.member href="typeinfoisderivedfrom43.xml"/> +<suite.member href="typeinfoisderivedfrom44.xml"/> +<suite.member href="typeinfoisderivedfrom45.xml"/> +<suite.member href="typeinfoisderivedfrom46.xml"/> +<suite.member href="typeinfoisderivedfrom47.xml"/> +<suite.member href="typeinfoisderivedfrom48.xml"/> +<suite.member href="typeinfoisderivedfrom49.xml"/> +<suite.member href="typeinfoisderivedfrom50.xml"/> +<suite.member href="typeinfoisderivedfrom51.xml"/> +<suite.member href="typeinfoisderivedfrom52.xml"/> +<suite.member href="typeinfoisderivedfrom53.xml"/> +<suite.member href="typeinfoisderivedfrom54.xml"/> +<suite.member href="typeinfoisderivedfrom55.xml"/> +<suite.member href="typeinfoisderivedfrom56.xml"/> +<suite.member href="typeinfoisderivedfrom57.xml"/> +<suite.member href="typeinfoisderivedfrom58.xml"/> +<suite.member href="typeinfoisderivedfrom59.xml"/> +<suite.member href="typeinfoisderivedfrom60.xml"/> +<suite.member href="typeinfoisderivedfrom61.xml"/> +<suite.member href="typeinfoisderivedfrom62.xml"/> +<suite.member href="typeinfoisderivedfrom63.xml"/> +<suite.member href="typeinfoisderivedfrom64.xml"/> +<suite.member href="typeinfoisderivedfrom65.xml"/> +<suite.member href="typeinfoisderivedfrom66.xml"/> +<suite.member href="typeinfoisderivedfrom67.xml"/> +<suite.member href="typeinfoisderivedfrom68.xml"/> +<suite.member href="typeinfoisderivedfrom69.xml"/> +<suite.member href="typeinfoisderivedfrom70.xml"/> +<suite.member href="typeinfoisderivedfrom71.xml"/> +<suite.member href="typeinfoisderivedfrom72.xml"/> +<suite.member href="typeinfoisderivedfrom73.xml"/> +<suite.member href="userdatahandler01.xml"/> +<suite.member href="userdatahandler02.xml"/> +<suite.member href="userdatahandler03.xml"/> +<suite.member href="userdatahandler04.xml"/> +<suite.member href="wellformed01.xml"/> +<suite.member href="wellformed02.xml"/> +<suite.member href="wellformed03.xml"/> +<suite.member href="wellformed04.xml"/> + +</suite> + diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo01.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo01.xml new file mode 100644 index 0000000..822dcdd --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo01.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo01"> +<metadata> +<title>attrgetschematypeinfo01</title> +<creator>Curt Arnold</creator> +<description> +Call getSchemaTypeInfo on title attribute for the first acronym element. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeNS" type="DOMString"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"CDATA"' ignoreCase="false" id="nameIsCDATA"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertEquals actual="typeNS" expected='"http://www.w3.org/TR/REC-xml"' ignoreCase="false" id="nsIsXML"/> +</test> diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo02.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo02.xml new file mode 100644 index 0000000..527c237 --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo02.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo02"> +<metadata> +<title>attrgetschematypeinfo02</title> +<creator>Curt Arnold</creator> +<description> +Call getSchemaTypeInfo on id attribute for the third acronym element. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeNS" type="DOMString"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"id"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"ID"' ignoreCase="false" id="nameIsID"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertEquals actual="typeNS" expected='"http://www.w3.org/TR/REC-xml"' ignoreCase="false" id="nsIsXML"/> +</test> diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo03.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo03.xml new file mode 100644 index 0000000..e472f62 --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo03.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo03"> +<metadata> +<title>attrgetschematypeinfo03</title> +<creator>Curt Arnold</creator> +<description> +Call getSchemaTypeInfo on title attribute for the first acronym element. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeNS" type="DOMString"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"string"' ignoreCase="false" id="nameIsString"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertEquals actual="typeNS" expected='"http://www.w3.org/2001/XMLSchema"' ignoreCase="false" id="nsIsXML"/> +</test> diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo04.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo04.xml new file mode 100644 index 0000000..11eb253 --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo04.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo04"> +<metadata> +<title>attrgetschematypeinfo04</title> +<creator>Curt Arnold</creator> +<description> +Call getSchemaTypeInfo on id attribute for the third acronym element. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeNS" type="DOMString"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"id"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"ID"' ignoreCase="false" id="nameIsID"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertEquals actual="typeNS" expected='"http://www.w3.org/2001/XMLSchema"' ignoreCase="false" id="nsIsXmlSchema"/> +</test> diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo05.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo05.xml new file mode 100644 index 0000000..f75d772 --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo05.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo05"> +<metadata> +<title>attrgetschematypeinfo05</title> +<creator>Curt Arnold</creator> +<description> +Call getSchemaTypeInfo on class attribute for the third acronym element. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeNS" type="DOMString"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="nameIsClassType"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertEquals actual="typeNS" expected='"http://www.w3.org/1999/xhtml"' ignoreCase="false" id="nsIsXHTML"/> +</test> diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo06.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo06.xml new file mode 100644 index 0000000..8ba58aa --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo06.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo06"> +<metadata> +<title>attrgetschematypeinfo06</title> +<creator>Curt Arnold</creator> +<description> +Attr.schemaTypeInfo should return null if not validating or schema validating. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNS" type="DOMString"/> +<load var="doc" href="hc_nodtdstaff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertNull actual="typeName" id="typeName"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertNull actual="typeNS" id="typeNS"/> +</test> diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo07.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo07.xml new file mode 100644 index 0000000..1f7ea65 --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo07.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo07"> +<metadata> +<title>attrgetschematypeinfo07</title> +<creator>IBM</creator> +<description> + The getSchemaTypeInfo method retrieves the type information associated with this attribute. + + Load a valid document with an XML Schema. + + Invoke getSchemaTypeInfo method on an attribute having [type definition] property. Expose {name} and {target namespace} + properties of the [type definition] property. Verity that the typeName and typeNamespace of the title attribute's + schemaTypeInfo are correct. getSchemaTypeInfo on the 'id' attribute of the fourth 'acronym' element +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-27</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="attrTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNamespace" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acElem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="acElem" name='"id"'/> +<schemaTypeInfo var="attrTypeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="attrTypeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="attrTypeInfo"/> +<typeNamespace var="typeNamespace" obj="attrTypeInfo"/> +<assertEquals expected='"ID"' actual="typeName" id="attrgetschematypeinfo07_typeName" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/2001/XMLSchema"' actual="typeNamespace" id="attrgetschematypeinfo07_typeNamespace" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/attrgetschematypeinfo08.xml b/test/testcases/tests/level3/core/attrgetschematypeinfo08.xml new file mode 100644 index 0000000..cc8f254 --- /dev/null +++ b/test/testcases/tests/level3/core/attrgetschematypeinfo08.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrgetschematypeinfo08"> +<metadata> +<title>attrgetschematypeinfo08</title> +<creator>IBM</creator> +<description> + The getSchemaTypeInfo method retrieves the type information associated with this attribute. + + Load a valid document with an XML Schema. + Invoke getSchemaTypeInfo method on an attribute having [type definition] property. Expose {name} and {target namespace} + properties of the [type definition] property. Verity that the typeName and typeNamespace of the 'title' attribute's (of first 'acronym' element) + schemaTypeInfo are correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-27</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="attrTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNamespace" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acElem" name='"title"'/> +<schemaTypeInfo var="attrTypeInfo" obj="attr" interface="Attr"/> +<typeName var="typeName" obj="attrTypeInfo"/> +<typeNamespace var="typeNamespace" obj="attrTypeInfo"/> +<assertEquals expected='"string"' actual="typeName" id="attrgetschematypeinfo08_typeName" ignoreCase="false"/> +<assertEquals actual="typeNamespace" expected='"http://www.w3.org/2001/XMLSchema"' id="attrgetschematypeinfo08_typeNamespace" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/attrisid01.xml b/test/testcases/tests/level3/core/attrisid01.xml new file mode 100644 index 0000000..0e777bb --- /dev/null +++ b/test/testcases/tests/level3/core/attrisid01.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid01"> +<metadata> +<title>attrisid01</title> +<creator>IBM</creator> +<description> + Retrieve the third acronyms element's class attribute, whose type is not ID. + Invoke isID on the class attribute, this should return false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="AttrIsIDFalse01"/> +</test> diff --git a/test/testcases/tests/level3/core/attrisid02.xml b/test/testcases/tests/level3/core/attrisid02.xml new file mode 100644 index 0000000..e6abd22 --- /dev/null +++ b/test/testcases/tests/level3/core/attrisid02.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid02"> +<metadata> +<title>attrisid02</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute on the third acronym element's new attribute and set + isID=true. Verify by calling isID on the new attribute and check if the + value returned is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="xmlNS" type="DOMString" value='"http://www.w3.org/XML/1998/namespace"'/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<setAttributeNS obj="acronymElem" namespaceURI='xmlNS' qualifiedName='"xml:lang"' value='"FR-fr"'/> +<setIdAttributeNS obj="acronymElem" localName='"lang"' namespaceURI='xmlNS' isId="true"/> +<getAttributeNodeNS var="attr" obj="acronymElem" namespaceURI='xmlNS' localName='"lang"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="AttrIsIDTrue02"/> +</test> diff --git a/test/testcases/tests/level3/core/attrisid03.xml b/test/testcases/tests/level3/core/attrisid03.xml new file mode 100644 index 0000000..435e3fb --- /dev/null +++ b/test/testcases/tests/level3/core/attrisid03.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid03"> +<metadata> +<title>attrisid03</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute(false) on a newly created attribute and then check Attr.isID. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="xmlNS" type="DOMString" value='"http://www.w3.org/XML/1998/namespace"'/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<setAttributeNS obj="acronymElem" namespaceURI='xmlNS' qualifiedName='"xml:lang"' value='"FR-fr"'/> +<setIdAttributeNS obj="acronymElem" localName='"lang"' namespaceURI='xmlNS' isId="false"/> +<getAttributeNodeNS var="attr" obj="acronymElem" namespaceURI='xmlNS' localName='"lang"'/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="AttrIsIDFalse03"/> +</test> diff --git a/test/testcases/tests/level3/core/attrisid04.xml b/test/testcases/tests/level3/core/attrisid04.xml new file mode 100644 index 0000000..6e52c0a --- /dev/null +++ b/test/testcases/tests/level3/core/attrisid04.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid04"> +<metadata> +<title>attrisid04</title> +<creator>IBM</creator> +<description> +Attr.isID should return true for the id attribute on the fourth acronym node +since its type is ID. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="clonedacronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"id"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="AttrIsIDTrue04"/> +</test> diff --git a/test/testcases/tests/level3/core/attrisid05.xml b/test/testcases/tests/level3/core/attrisid05.xml new file mode 100644 index 0000000..b60dd32 --- /dev/null +++ b/test/testcases/tests/level3/core/attrisid05.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid05"> +<metadata> +<title>attrisid05</title> +<creator>IBM</creator> +<description> + Retrieve the fourth acronym element's id attribute, whose type is ID. + Deep clone the element node and append it as a sibling of the acronym node. + We now have two id attributes of type ID with identical values. + Invoke isID on the class attribute, should this return true??? +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="clonedacronymElem" type="Element"/> +<var name="acronymParentElem" type="Element"/> +<var name="appendedNode" type="Node"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="3" interface="NodeList"/> +<parentNode var="acronymParentElem" obj="acronymElem" interface="Node"/> +<cloneNode var="clonedacronymElem" obj="acronymElem" deep="true"/> +<appendChild var="appendedNode" obj="acronymParentElem" newChild="clonedacronymElem"/> +<getAttributeNode var="attr" obj="acronymElem" name='"id"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="AttrIsIDTrue05"/> +</test> diff --git a/test/testcases/tests/level3/core/attrisid06.xml b/test/testcases/tests/level3/core/attrisid06.xml new file mode 100644 index 0000000..1c11c6d --- /dev/null +++ b/test/testcases/tests/level3/core/attrisid06.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid06"> +<metadata> +<title>attrisid06</title> +<creator>IBM</creator> +<description> + Invoke isId on a new Attr node. Check if the value returned is false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="AttrIsIDFalse06"/> +</test> diff --git a/test/testcases/tests/level3/core/attrisid07.xml b/test/testcases/tests/level3/core/attrisid07.xml new file mode 100644 index 0000000..7785079 --- /dev/null +++ b/test/testcases/tests/level3/core/attrisid07.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid07"> +<metadata> +<title>attrisid07</title> +<creator>IBM</creator> +<description> + The method isId returns whether this attribute is known to be of type ID or not. + + Add a new attribute of type ID to the third acronym element node of this document. Verify that the method + isId returns true. The use of Element.setIdAttributeNS() makes 'isId' a user-determined ID attribute. + Import the newly created attribute node into this document. + Since user data assocated to the imported node is not carried over, verify that the method isId + returns false on the imported attribute node. + +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="attrImported" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagNameNS var="elemList" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<setAttributeNS obj="acronymElem" namespaceURI='"http://www.w3.org/DOM"' qualifiedName='"dom3:newAttr"' value='"null"'/> +<setIdAttributeNS obj="acronymElem" localName='"newAttr"' namespaceURI='"http://www.w3.org/DOM"' isId="true"/> +<getAttributeNodeNS var="attr" obj="acronymElem" namespaceURI='"http://www.w3.org/DOM"' localName='"newAttr"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="AttrIsIDTrue07_1"/> +<importNode var="attrImported" obj="doc" importedNode="attr" deep="false"/> +<isId var="id" obj="attrImported"/> +<assertFalse actual="id" id="AttrIsID07_isFalseforImportedNode"/> +</test> diff --git a/test/testcases/tests/level3/core/canonicalform01.xml b/test/testcases/tests/level3/core/canonicalform01.xml new file mode 100644 index 0000000..8f3b2dd --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform01.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform01"> +<metadata> +<title>canonicalform01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with 'canonical-form' set to true, check that +entity references are expanded and unused entity declaration are maintained. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="childValue" type="DOMString"/> +<var name="entities" type="NamedNodeMap"/> +<var name="ent2" type="Entity"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- add an entity reference to the content of the p element --> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<createEntityReference var="entRef" obj="doc" name='"ent1"'/> +<appendChild var="child" obj="pElem" newChild="entRef"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<lastChild var="child" obj="pElem" interface="Node"/> +<assertNotNull actual="child" id="lastChildNotNull"/> +<!-- this should be a Text node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"#text"' ignoreCase="false" id="firstChildName"/> +<nodeValue var="childValue" obj="child"/> +<assertEquals actual="childValue" expected='"barfoo"' ignoreCase="false" id="firstChildValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform02.xml b/test/testcases/tests/level3/core/canonicalform02.xml new file mode 100644 index 0000000..9644e9c --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform02.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform02"> +<metadata> +<title>canonicalform02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with normalize-characters set to false, check that +characters are not normalized. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform03.xml b/test/testcases/tests/level3/core/canonicalform03.xml new file mode 100644 index 0000000..b42e09b --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform03.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform03"> +<metadata> +<title>canonicalform03</title> +<creator>Curt Arnold</creator> +<description> +Normalize a document with the 'canonical-form' parameter set to true and +check that a CDATASection has been eliminated. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="coalescing" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elemName" type="Element"/> +<var name="cdata" type="CDATASection"/> +<var name="text" type="Text"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<lastChild var="cdata" obj="elemName" interface="Node"/> +<nodeName var="nodeName" obj="cdata"/> +<assertEquals actual="nodeName" expected='"#cdata-section"' id="documentnormalizedocument02" ignoreCase="false"/> +<domConfig interface="Document" obj="doc" var="domConfig"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalization2Error"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<lastChild var="text" obj="elemName" interface="Node"/> +<nodeName var="nodeName" obj="text"/> +<assertEquals actual="nodeName" expected='"#text"' id="documentnormalizedocument02_false" ignoreCase="false"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/core/canonicalform04.xml b/test/testcases/tests/level3/core/canonicalform04.xml new file mode 100644 index 0000000..a7fb891 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform04.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform04"> +<metadata> +<title>canonicalform04</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with canonical-form set to true, check that +namespace declaration attributes are maintained. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="xmlnsAttr" type="Attr"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<documentElement var="docElem" obj="doc"/> +<getAttributeNode var="xmlnsAttr" obj="docElem" name='"xmlns"'/> +<assertNotNull actual="xmlnsAttr" id="xmlnsAttrNotNull"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform05.xml b/test/testcases/tests/level3/core/canonicalform05.xml new file mode 100644 index 0000000..fff3bd2 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform05.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform05"> +<metadata> +<title>canonicalform05</title> +<creator>Curt Arnold</creator> +<description> +Add a L1 element to a L2 namespace aware document and perform namespace normalization. Should result +in an error. +</description> +<date qualifier="created">2004-01-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms#normalizeDocumentAlgo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="newChild" type="Element"/> +<var name="retval" type="Element"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="problemNode" type="Node"/> +<var name="location" type="DOMLocator"/> +<var name="lineNumber" type="int"/> +<var name="columnNumber" type="int"/> +<var name="byteOffset" type="int"/> +<var name="utf16Offset" type="int"/> +<var name="uri" type="DOMString"/> +<var name="type" type="DOMString"/> +<var name="message" type="DOMString"/> +<var name="relatedException" type="DOMObject"/> +<var name="relatedData" type="DOMObject"/> +<var name="length" type="int"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createElement var="newChild" obj="doc" tagName='"br"'/> +<appendChild var="retval" obj="elem" newChild="newChild"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if> + <equals actual="severity" expected="2" ignoreCase="false"/> + <!-- location should have relatedNode, everything else should be -1 or null --> + <location var="location" obj="error"/> + <relatedNode var="problemNode" obj="location" interface="DOMLocator"/> + <assertSame actual="problemNode" expected="newChild" id="relatedNodeIsL1Node"/> + <lineNumber var="lineNumber" obj="location"/> + <assertEquals actual="lineNumber" expected="-1" ignoreCase="false" id="lineNumber"/> + <columnNumber var="columnNumber" obj="location"/> + <assertEquals actual="columnNumber" expected="-1" ignoreCase="false" id="columnNumber"/> + <byteOffset var="byteOffset" obj="location"/> + <assertEquals actual="byteOffset" expected="-1" ignoreCase="false" id="byteOffset"/> + <utf16Offset var="utf16Offset" obj="location"/> + <assertEquals actual="utf16Offset" expected="-1" ignoreCase="false" id="utf16Offset"/> + <uri var="uri" obj="location" interface="DOMLocator"/> + <assertNull actual="uri" id="uri"/> + <!-- message and type should be non-empty --> + <message var="message" obj="error"/> + <length var="length" obj="message" interface="DOMString"/> + <assertTrue id="messageNotEmpty"> + <greater actual="length" expected="0"/> + </assertTrue> + <!-- can't make any assertions about type, relatedData and relatedException + other than access should not raise exception --> + <type var="type" obj="error" interface="DOMError"/> + <relatedData var="relatedData" obj="error"/> + <relatedException var="relatedException" obj="error"/> + <increment var="errorCount" value="1"/> + <else> + <assertEquals actual="severity" expected="1" ignoreCase="false" id="anyOthersShouldBeWarnings"/> + </else> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/core/canonicalform06.xml b/test/testcases/tests/level3/core/canonicalform06.xml new file mode 100644 index 0000000..e672e60 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform06.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform06"> +<metadata> +<title>canonicalform06</title> +<creator>Curt Arnold</creator> +<description> +Create a document with an XML 1.1 valid but XML 1.0 invalid element and +normalize document with canonical-form set to true. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullString" type="DOMString" isNull="true"/> +<var name="nullDoctype" type="DocumentType" isNull="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="retval" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="locator" type="DOMLocator"/> +<var name="relatedNode" type="Node"/> +<var name="canSet" type="boolean"/> +<implementation var="domImpl"/> +<createDocument var="doc" obj="domImpl" + namespaceURI="nullString" + qualifiedName="nullString" + doctype="nullDoctype"/> +<assertDOMException id="xml10InvalidName"> + <INVALID_CHARACTER_ERR> + <createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed01"' + qualifiedName='"LegalNameࢎ"'/> + </INVALID_CHARACTER_ERR> +</assertDOMException> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed01"' + qualifiedName='"LegalNameࢎ"'/> +<appendChild var="retval" obj="doc" newChild="elem"/> +<xmlVersion obj="doc" value='"1.0"' interface="Document"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <assertEquals actual="severity" expected="2" ignoreCase="false" id="severity"/> + <type var="type" obj="error" interface="DOMError"/> + <assertEquals actual="type" expected='"wf-invalid-character-in-node-name"' + ignoreCase="false" id="type"/> + <location var="locator" obj="error" interface="DOMError"/> + <relatedNode var="relatedNode" obj="locator" interface="DOMLocator"/> + <assertSame actual="relatedNode" expected="elem" id="relatedNode"/> +</for-each> +<assertSize size="1" collection="errors" id="oneError"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform07.xml b/test/testcases/tests/level3/core/canonicalform07.xml new file mode 100644 index 0000000..8ee40d7 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform07.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform07"> +<metadata> +<title>canonicalform07</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with canonical-form set to true and validation set to true, check that +whitespace in element content is preserved. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="text" type="Text"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- if we discarded whitespace on parse, add some back --> +<if><implementationAttribute name="ignoringElementContentWhitespace" value="true"/> + <getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> + <item var="body" obj="bodyList" interface="NodeList" index="0"/> + <firstChild var="child" obj="body" interface="Node"/> + <createTextNode var="text" obj="doc" data='" "'/> + <insertBefore var="child" obj="body" newChild="text" refChild="child"/> +</if> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> +<item var="body" obj="bodyList" interface="NodeList" index="0"/> +<firstChild var="child" obj="body" interface="Node"/> +<assertNotNull actual="child" id="firstChildNotNull"/> +<!-- this should be a Text node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"#text"' ignoreCase="false" id="firstChild"/> +<nextSibling var="child" obj="child" interface="Node"/> +<assertNotNull actual="child" id="secondChildNotNull"/> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"p"' ignoreCase="false" id="secondChild"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform08.xml b/test/testcases/tests/level3/core/canonicalform08.xml new file mode 100644 index 0000000..45a83b1 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform08.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform08"> +<metadata> +<title>canonicalform08</title> +<creator>Curt Arnold</creator> +<description> +Normalize document based on section 3.1 with canonical-form set to true and check normalized document. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeValue" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="length" type="int"/> +<var name="text" type="Text"/> +<load var="doc" href="canonicalform01" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<firstChild var="node" obj="doc" interface="Node"/> +<nodeType var="nodeType" obj="node" interface="Node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFirstChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="36" ignoreCase="false" id="piDataLength"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisSecondChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="secondChildLength"/> +<!-- next sibling is document element --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="1" actual="nodeType" ignoreCase="false" id="ElementisThirdChild"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisFourthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="fourthChildLength"/> +<!-- next sibling is a processing instruction --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFifthChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<assertEquals actual="nodeValue" expected='""' ignoreCase="false" id="trailingPIData"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisSixthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="sixthChildLength"/> +<!-- next sibling is a comment --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="8" actual="nodeType" ignoreCase="false" id="CommentisSeventhChild"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisEighthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="eighthChildLength"/> +<!-- next sibling is a comment --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="8" actual="nodeType" ignoreCase="false" id="CommentisNinthChild"/> +<!-- next sibling is a null --> +<nextSibling interface="Node" var="node" obj="node"/> +<assertNull actual="node" id="TenthIsNull"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform09.xml b/test/testcases/tests/level3/core/canonicalform09.xml new file mode 100644 index 0000000..f60f7fe --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform09.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform09"> +<metadata> +<title>canonicalform09</title> +<creator>Curt Arnold</creator> +<description> +Normalize document based on section 3.1 with canonical-form set to true +and comments to false and check normalized document. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeValue" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="length" type="int"/> +<var name="text" type="Text"/> +<load var="doc" href="canonicalform01" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"comments"' value="false"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<firstChild var="node" obj="doc" interface="Node"/> +<nodeType var="nodeType" obj="node" interface="Node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFirstChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="36" ignoreCase="false" id="piDataLength"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisSecondChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="secondChildLength"/> +<!-- next sibling is document element --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="1" actual="nodeType" ignoreCase="false" id="ElementisThirdChild"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisFourthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="fourthChildLength"/> +<!-- next sibling is a processing instruction --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFifthChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<assertEquals actual="nodeValue" expected='""' ignoreCase="false" id="trailingPIData"/> +<!-- next sibling is a null --> +<nextSibling interface="Node" var="node" obj="node"/> +<assertNull actual="node" id="SixthIsNull"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform10.xml b/test/testcases/tests/level3/core/canonicalform10.xml new file mode 100644 index 0000000..6895bf6 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform10.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform10"> +<metadata> +<title>canonicalform10</title> +<creator>Curt Arnold</creator> +<description> +Check elimination of unnecessary namespace prefixes when +normalized with canonical-form = true. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="divList" type="NodeList"/> +<var name="div" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="node" type="Node"/> +<load var="doc" href="canonicalform03" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="divList" obj="doc" + tagname='"div"' interface="Document"/> +<item var="div" obj="divList" index="5" interface="NodeList"/> +<getAttributeNode var="node" obj="div" name='"xmlns"'/> +<assertNotNull actual="node" id="xmlnsPresent"/> +<getAttributeNode var="node" obj="div" name='"xmlns:a"'/> +<assertNull actual="node" id="xmlnsANotPresent"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform11.xml b/test/testcases/tests/level3/core/canonicalform11.xml new file mode 100644 index 0000000..8179e12 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform11.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform11"> +<metadata> +<title>canonicalform11</title> +<creator>Curt Arnold</creator> +<description> +Check that default attributes are made explicitly specified. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="attr" type="Attr"/> +<var name="attrValue" type="DOMString"/> +<var name="attrSpecified" type="boolean"/> +<load var="doc" href="canonicalform03" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="elemList" obj="doc" + tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"title"'/> +<assertNotNull actual="attr" id="titlePresent"/> +<specified var="attrSpecified" obj="attr"/> +<assertTrue actual="attrSpecified" id="titleSpecified"/> +<nodeValue var="attrValue" obj="attr"/> +<assertEquals actual="attrValue" expected='"default"' ignoreCase="false" + id="titleValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/canonicalform12.xml b/test/testcases/tests/level3/core/canonicalform12.xml new file mode 100644 index 0000000..551afc5 --- /dev/null +++ b/test/testcases/tests/level3/core/canonicalform12.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform12"> +<metadata> +<title>canonicalform12</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with 'canonical-form' set to true, check that +DocumentType nodes are removed. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<doctype var="doctype" obj="doc"/> +<assertNull actual="doctype" id="docTypeNull"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/cdatasections01.xml b/test/testcases/tests/level3/core/cdatasections01.xml new file mode 100644 index 0000000..df8218e --- /dev/null +++ b/test/testcases/tests/level3/core/cdatasections01.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="cdatasections01"> +<metadata> +<title>cdatasections01</title> +<creator>Curt Arnold</creator> +<description> +Normalize a document using Node.normalize and check that +the value of the 'cdata-sections' parameter is ignored. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newCdata" type="CDATASection"/> +<var name="cdata" type="CDATASection"/> +<var name="text" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeValue" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createCDATASection var="newCdata" obj="doc" data='"CDATA"'/> +<appendChild obj="elem" var="appendedChild" newChild="newCdata"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalize obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalizationError"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="cdata" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="cdata"/> +<assertEquals actual="nodeName" expected='"#cdata-section"' id="documentnormalizedocument03_true" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/checkcharacternormalization01.xml b/test/testcases/tests/level3/core/checkcharacternormalization01.xml new file mode 100644 index 0000000..b2ead74 --- /dev/null +++ b/test/testcases/tests/level3/core/checkcharacternormalization01.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="checkcharacternormalization01"> +<metadata> +<title>checkcharacternormalization01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with check-character-normalization set to false, check that +no errors are dispatched. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<setParameter obj="domConfig" name='"check-character-normalization"' value="false"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</test> + + diff --git a/test/testcases/tests/level3/core/checkcharacternormalization02.xml b/test/testcases/tests/level3/core/checkcharacternormalization02.xml new file mode 100644 index 0000000..d757489 --- /dev/null +++ b/test/testcases/tests/level3/core/checkcharacternormalization02.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="checkcharacternormalization02"> +<metadata> +<title>checkcharacternormalization02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with check-character-normalization set to true, check that +non-normalized characters are signaled. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="canSet" type="boolean"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="locator" type="DOMLocator"/> +<var name="relatedNode" type="Node"/> +<var name="errorCount" type="int" value="0"/> +<var name="errorType" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"check-character-normalization"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"check-character-normalization"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if><equals actual="severity" expected="2" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + <type var="errorType" obj="error" interface="DOMError"/> + <!-- type name is specified in LS spec --> + <assertEquals actual="errorType" expected='"check-character-normalization-failure"' + ignoreCase="false" id="errorType"/> + <location var="locator" obj="error"/> + <relatedNode var="relatedNode" obj="locator" interface="DOMLocator"/> + <assertSame actual="relatedNode" expected="text" id="relatedNodeSame"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/checkcharacternormalization03.xml b/test/testcases/tests/level3/core/checkcharacternormalization03.xml new file mode 100644 index 0000000..1287814 --- /dev/null +++ b/test/testcases/tests/level3/core/checkcharacternormalization03.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="checkcharacternormalization03"> +<metadata> +<title>checkcharacternormalization03</title> +<creator>Curt Arnold</creator> +<description> +Normalize document using Node.normalize checking that "check-character-normalization" +is ignored. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"check-character-normalization"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"check-character-normalization"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalize obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/comments01.xml b/test/testcases/tests/level3/core/comments01.xml new file mode 100644 index 0000000..a54c0fe --- /dev/null +++ b/test/testcases/tests/level3/core/comments01.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="comments01"> +<metadata> +<title>comments01</title> +<creator>Curt Arnold</creator> +<description> +Check that Node.normalize ignores the setting of configuration parameter 'comments'. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newComment" type="Comment"/> +<var name="lastChild" type="Node"/> +<var name="text" type="Text"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createComment var="newComment" obj="doc" data='"COMMENT_NODE"'/> +<appendChild obj="elem" var="appendedChild" newChild="newComment"/> +<domConfig interface="Document" obj="doc" var="domConfig" /> +<setParameter obj="domConfig" name='"comments"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalize obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalizationError"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="lastChild" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="lastChild"/> +<assertEquals actual="nodeName" expected='"#comment"' id="documentnormalizedocument04_true" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/datatypenormalization01.xml b/test/testcases/tests/level3/core/datatypenormalization01.xml new file mode 100644 index 0000000..cb5169e --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization01.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization01"> +<metadata> +<title>datatypenormalization01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if double values were normalized. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"double"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-31415926.00E-7 2.718"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"INF -INF"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-0"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization02.xml b/test/testcases/tests/level3/core/datatypenormalization02.xml new file mode 100644 index 0000000..f94b266 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization02.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization02"> +<metadata> +<title>datatypenormalization02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if decimal values were normalized. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"decimal"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"+0003.141592600"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"+0003.141592600"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"+10 .1"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"01"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"01"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-.001"' ignoreCase="false" id="secondList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization03.xml b/test/testcases/tests/level3/core/datatypenormalization03.xml new file mode 100644 index 0000000..dd71f57 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization03.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization03"> +<metadata> +<title>datatypenormalization03</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if boolean values were whitespace normalized. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"boolean"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"true"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"false"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"false true false"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"0"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"0 1 0"' ignoreCase="false" id="secondList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization04.xml b/test/testcases/tests/level3/core/datatypenormalization04.xml new file mode 100644 index 0000000..1af5485 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization04.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization04"> +<metadata> +<title>datatypenormalization04</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if float values were normalized. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"float"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-31415926.00E-7 2.718"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"INF -INF"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-0"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization05.xml b/test/testcases/tests/level3/core/datatypenormalization05.xml new file mode 100644 index 0000000..4e945b5 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization05.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization05"> +<metadata> +<title>datatypenormalization05</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if dateTime values were correctly normalized. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"dateTime"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00-05:00"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"2004-01-21T20:30:00-05:00"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00 2004-01-21T15:30:00Z"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0000-05:00"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0000-05:00"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0000"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0001-05:00"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0001-05:00"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0001"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization06.xml b/test/testcases/tests/level3/core/datatypenormalization06.xml new file mode 100644 index 0000000..ed76ba3 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization06.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization06"> +<metadata> +<title>datatypenormalization06</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if time values were normalized. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"time"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"15:30:00-05:00"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"15:30:00-05:00"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"15:30:00"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"15:30:00.0000-05:00"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"15:30:00.0000-05:00"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"15:30:00.0000"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"15:30:00.0001-05:00"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"15:30:00.0001-05:00"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"15:30:00.0001"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization07.xml b/test/testcases/tests/level3/core/datatypenormalization07.xml new file mode 100644 index 0000000..a478a37 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization07.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization07"> +<metadata> +<title>datatypenormalization07</title> +<creator>Curt Arnold</creator> +<description> +The default value for the double element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"double"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"3.1415926E0"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization08.xml b/test/testcases/tests/level3/core/datatypenormalization08.xml new file mode 100644 index 0000000..275e05a --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization08.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization08"> +<metadata> +<title>datatypenormalization08</title> +<creator>Curt Arnold</creator> +<description> +The default value for the decimal element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"decimal"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"3.1415926"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization09.xml b/test/testcases/tests/level3/core/datatypenormalization09.xml new file mode 100644 index 0000000..2da2979 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization09.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization09"> +<metadata> +<title>datatypenormalization09</title> +<creator>Curt Arnold</creator> +<description> +The default value for the boolean element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"boolean"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"true"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization10.xml b/test/testcases/tests/level3/core/datatypenormalization10.xml new file mode 100644 index 0000000..d31239b --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization10.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization10"> +<metadata> +<title>datatypenormalization10</title> +<creator>Curt Arnold</creator> +<description> +The default value for the float element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"float"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"3.1415926E0"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization11.xml b/test/testcases/tests/level3/core/datatypenormalization11.xml new file mode 100644 index 0000000..b20a783 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization11.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization11"> +<metadata> +<title>datatypenormalization11</title> +<creator>Curt Arnold</creator> +<description> +The default value for the dateTime element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"dateTime"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <!-- .0 would not be correct, see http://www.w3.org/2001/05/xmlschema-errata#E2-63 --> + <assertEquals actual="str" expected='"2004-01-21T20:30:00Z"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization12.xml b/test/testcases/tests/level3/core/datatypenormalization12.xml new file mode 100644 index 0000000..e462f3d --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization12.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization12"> +<metadata> +<title>datatypenormalization12</title> +<creator>Curt Arnold</creator> +<description> +Default values must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="datatype_normalization" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"time"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <!-- .0 would not be correct, see http://www.w3.org/2001/05/xmlschema-errata#E2-63 --> + <assertEquals actual="str" expected='"20:30:00Z"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization13.xml b/test/testcases/tests/level3/core/datatypenormalization13.xml new file mode 100644 index 0000000..e3edfbe --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization13.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization13"> +<metadata> +<title>datatypenormalization13</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if string values were normalized per default whitespace +facet of xsd:string. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> +<load var="doc" href="datatype_normalization2" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"em"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <assertNotNull actual="childNode" id="childNodeNotNull"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='" EMP 0001 "' ignoreCase="false" id="content"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization14.xml b/test/testcases/tests/level3/core/datatypenormalization14.xml new file mode 100644 index 0000000..c11aa82 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization14.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization14"> +<metadata> +<title>datatypenormalization14</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if string values were normalized per explicit whitespace=preserve. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> +<load var="doc" href="datatype_normalization2" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"acronym"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <assertNotNull actual="childNode" id="childNodeNotNull"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='" EMP 0001 "' ignoreCase="false" id="content"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization15.xml b/test/testcases/tests/level3/core/datatypenormalization15.xml new file mode 100644 index 0000000..574db8d --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization15.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization15"> +<metadata> +<title>datatypenormalization15</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if string values were normalized per an explicit whitespace=collapse. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> +<load var="doc" href="datatype_normalization2" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"code"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content1"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content3"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization16.xml b/test/testcases/tests/level3/core/datatypenormalization16.xml new file mode 100644 index 0000000..ee4c971 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization16.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization16"> +<metadata> +<title>datatypenormalization16</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if string values were normalized per explicit whitespace=replace. +</description> +<date qualifier="created">2004-01-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> +<load var="doc" href="datatype_normalization2" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"sup"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='" EMP 0001 "' ignoreCase="false" id="content1"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content3"/> + <item var="element" obj="elemList" interface="NodeList" index="3"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content4"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization17.xml b/test/testcases/tests/level3/core/datatypenormalization17.xml new file mode 100644 index 0000000..79a0dd6 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization17.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization17"> +<metadata> +<title>datatypenormalization17</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to false, string values +should not be normalized. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> +<load var="doc" href="datatype_normalization2" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="false"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"code"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content3"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertNotEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content1"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/datatypenormalization18.xml b/test/testcases/tests/level3/core/datatypenormalization18.xml new file mode 100644 index 0000000..a6533f6 --- /dev/null +++ b/test/testcases/tests/level3/core/datatypenormalization18.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization18"> +<metadata> +<title>datatypenormalization18</title> +<creator>Curt Arnold</creator> +<description> +Normalize document using Node.normalize which is not affected by DOMConfiguration unlike +Document.normalizeDocument. Strings should not have been normalized. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="canSetDataNorm" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> +<load var="doc" href="datatype_normalization2" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<canSetParameter var="canSetDataNorm" obj="domConfig" name='"datatype-normalization"' value="true"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + <isTrue value="canSetDataNorm"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalize obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"code"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content3"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertNotEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content1"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/documentadoptnode01.xml b/test/testcases/tests/level3/core/documentadoptnode01.xml new file mode 100644 index 0000000..47190c4 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode01.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode01"> +<metadata> +<title>documentadoptnode01</title> +<creator>IBM</creator> +<description> + Adopt the class attribute node of the fourth acronym element. Check if this attribute has been adopted successfully by verifying the + nodeName, nodeType, nodeValue, specified and ownerElement attributes of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attrOwnerElem" type="Element"/> +<var name="element" type="Element"/> +<var name="attr" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="adoptedclass" type="Node"/> +<var name="attrsParent" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="nodeValue" type="DOMString"/> +<var name="firstChild" type="Text"/> +<var name="firstChildValue" type="DOMString"/> +<var name="secondChild" type="EntityReference"/> +<var name="secondChildType" type="int"/> +<var name="secondChildName" type="DOMString"/> + + +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="element" name='"class"'/> +<adoptNode var="adoptedclass" obj="doc" source="attr"/> +<if><notNull obj="adoptedclass"/> +<nodeName var="nodeName" obj="adoptedclass"/> +<nodeValue var="nodeValue" obj="adoptedclass"/> +<nodeType var="nodeType" obj="adoptedclass"/> +<ownerElement var="attrOwnerElem" obj="adoptedclass" interface="Attr"/> +<assertEquals expected='"class"' actual="nodeName" id="documentadoptode01_nodeName" ignoreCase="false"/> +<assertEquals expected="2" actual="nodeType" id="documentadoptNode01_nodeType" ignoreCase="false"/> +<assertNull actual="attrOwnerElem" id="documentadoptnode01_ownerDoc"/> +<!-- The attribute's child list can either be a text node "Yα" or + an text node "Y" and a entity reference to "alpha" --> +<firstChild var="firstChild" obj="adoptedclass" interface="Node"/> +<assertNotNull actual="firstChild" id="firstChildNotNull"/> +<nodeValue var="firstChildValue" obj="firstChild"/> +<if> + <equals actual="firstChildValue" expected='"Y"' ignoreCase="false"/> + <nextSibling var="secondChild" obj="firstChild" interface="Node"/> + <assertNotNull actual="secondChild" id="secondChildNotNull"/> + <nodeType var="secondChildType" obj="secondChild"/> + <assertEquals actual="secondChildType" expected="5" + id="secondChildIsEntityReference" ignoreCase="false"/> + <nodeName var="secondChildName" obj="secondChild"/> + <assertEquals actual="secondChildName" expected='"alpha"' + id="secondChildIsEnt1Reference" ignoreCase="false"/> + <else> + <assertEquals expected='"Yα"' actual="nodeValue" id="documentadoptnode01_nodeValue" ignoreCase="false"/> + </else> +</if> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode02.xml b/test/testcases/tests/level3/core/documentadoptnode02.xml new file mode 100644 index 0000000..cc035ef --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode02.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode02"> +<metadata> +<title>documentadoptnode02</title> +<creator>IBM</creator> +<description> + Adopt the class attribute node of the fourth acronym element. Check if this attribute has been adopted + successfully by verifying the nodeName, nodeType, ownerElement, specified attributes and child nodes + of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="attrOwnerElem" type="Element"/> +<var name="element" type="Element"/> +<var name="attr" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="adoptedclass" type="Node"/> +<var name="attrsParent" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="nodeValue" type="DOMString"/> +<var name="isSpecified" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="firstChild" type="Text"/> +<var name="firstChildValue" type="DOMString"/> +<var name="secondChild" type="EntityReference"/> +<var name="secondChildType" type="int"/> +<var name="secondChildName" type="DOMString"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> + +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="element" name='"class"'/> +<adoptNode var="adoptedclass" obj="newDoc" source="attr"/> +<if><notNull obj="adoptedclass"/> +<nodeName var="nodeName" obj="adoptedclass"/> +<nodeValue var="nodeValue" obj="adoptedclass"/> +<nodeType var="nodeType" obj="adoptedclass"/> +<ownerElement var="attrOwnerElem" obj="adoptedclass" interface="Attr"/> +<specified var="isSpecified" obj="adoptedclass" /> +<assertEquals expected='"class"' actual="nodeName" id="documentadoptnode02_nodeName" ignoreCase="false"/> +<assertEquals expected="2" actual="nodeType" id="documentadoptnode02_nodeType" ignoreCase="false"/> +<assertNull actual="attrOwnerElem" id="documentadoptnode02_ownerDoc"/> +<assertTrue actual="isSpecified" id="documentadoptnode02_specified"/> +<!-- The attribute's child list can either be a text node "Yes" or + an text node "Y" and a entity reference to "alpha" --> +<firstChild var="firstChild" obj="adoptedclass" interface="Node"/> +<assertNotNull actual="firstChild" id="firstChildNotNull"/> +<nodeValue var="firstChildValue" obj="firstChild"/> +<if> + <equals actual="firstChildValue" expected='"Y"' ignoreCase="false"/> + <nextSibling var="secondChild" obj="firstChild" interface="Node"/> + <assertNotNull actual="secondChild" id="secondChildNotNull"/> + <nodeType var="secondChildType" obj="secondChild"/> + <assertEquals actual="secondChildType" expected="5" + id="secondChildIsEntityReference" ignoreCase="false"/> + <nodeName var="secondChildName" obj="secondChild"/> + <assertEquals actual="secondChildName" expected='"alpha"' + id="secondChildIsEnt1Reference" ignoreCase="false"/> + <else> + <assertEquals expected='"Yα"' actual="nodeValue" id="documentadoptnode02_nodeValue" ignoreCase="false"/> + </else> +</if> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode03.xml b/test/testcases/tests/level3/core/documentadoptnode03.xml new file mode 100644 index 0000000..f3a8a34 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode03.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode03"> +<metadata> +<title>documentadoptnode03</title> +<creator>IBM</creator> +<description> + Invoke adoptNode on this document to adopt the a new namespace aware attribute node. Check + if this attribute has been adopted successfully by verifying the nodeName, namespaceURI, prefix, + specified and ownerElement attributes of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newAttr" type="Attr"/> +<var name="adoptedAttr" type="Attr"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeNamespaceURI" type="DOMString"/> +<var name="nodePrefix" type="DOMString"/> +<var name="attrOwnerElem" type="Element"/> +<var name="isSpecified" type="boolean"/> +<var name="xmlNS" type="DOMString" value='"http://www.w3.org/XML/1998/namespace"'/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="newAttr" obj="doc" namespaceURI="xmlNS" qualifiedName='"xml:lang"'/> +<adoptNode var="adoptedAttr" obj="doc" source="newAttr"/> +<if><notNull obj="adoptedAttr"/> +<nodeName var="nodeName" obj="adoptedAttr"/> +<namespaceURI var="nodeNamespaceURI" obj="adoptedAttr" interface="Node"/> +<prefix var="nodePrefix" obj="adoptedAttr"/> +<ownerElement var="attrOwnerElem" obj="adoptedAttr" interface="Attr"/> +<specified var="isSpecified" obj="adoptedAttr" /> +<assertEquals expected='"xml:lang"' actual="nodeName" id="documentadoptode03_nodeName" ignoreCase="false"/> +<assertEquals expected='xmlNS' actual="nodeNamespaceURI" id="documentadoptNode03_namespaceURI" ignoreCase="false"/> +<assertEquals expected='"xml"' actual="nodePrefix" id="documentadoptnode03_prefix" ignoreCase="false"/> +<assertNull actual="attrOwnerElem" id="documentadoptnode03_ownerDoc"/> +<assertTrue actual="isSpecified" id="documentadoptnode03_specified"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode04.xml b/test/testcases/tests/level3/core/documentadoptnode04.xml new file mode 100644 index 0000000..f67060c --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode04.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode04"> +<metadata> +<title>documentadoptnode04</title> +<creator>IBM</creator> +<description> + Invoke adoptNode on a new document to adopt a new namespace aware attribute node created by + this document. Check if this attribute has been adopted successfully by verifying the nodeName, + namespaceURI, prefix, specified and ownerElement attributes of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newAttr" type="Attr"/> +<var name="adoptedAttr" type="Attr"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeNamespaceURI" type="DOMString"/> +<var name="nodePrefix" type="DOMString"/> +<var name="attrOwnerElem" type="Element"/> +<var name="isSpecified" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="xmlNS" type="DOMString" value='"http://www.w3.org/XML/1998/namespace"'/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createAttributeNS var="newAttr" obj="doc" namespaceURI="xmlNS" qualifiedName='"xml:lang"'/> +<adoptNode var="adoptedAttr" obj="newDoc" source="newAttr"/> +<if><notNull obj="adoptedAttr"/> +<nodeName var="nodeName" obj="adoptedAttr"/> +<namespaceURI var="nodeNamespaceURI" obj="adoptedAttr" interface="Node"/> +<prefix var="nodePrefix" obj="adoptedAttr"/> +<ownerElement var="attrOwnerElem" obj="adoptedAttr" interface="Attr"/> +<specified var="isSpecified" obj="adoptedAttr" /> +<assertEquals expected='"xml:lang"' actual="nodeName" id="documentadoptnode04_nodeName" ignoreCase="false"/> +<assertEquals expected="xmlNS" actual="nodeNamespaceURI" id="documentadoptnode04_namespaceURI" ignoreCase="false"/> +<assertEquals expected='"xml"' actual="nodePrefix" id="documentadoptnode04_prefix" ignoreCase="false"/> +<assertNull actual="attrOwnerElem" id="documentadoptnode04_ownerDoc"/> +<assertTrue actual="isSpecified" id="documentadoptnode04_specified"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode05.xml b/test/testcases/tests/level3/core/documentadoptnode05.xml new file mode 100644 index 0000000..4a66023 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode05.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode05"> +<metadata> +<title>documentadoptnode05</title> +<creator>IBM</creator> +<description> + Invoke adoptNode on a new document to adopt the default attribute "dir". Check if + this attribute has been adopted successfully by verifying the nodeName, namespaceURI, prefix, + specified and ownerElement attributes of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="elementEmp" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="dir" type="Attr"/> +<var name="adoptedAttr" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeNamespaceURI" type="DOMString"/> +<var name="nodePrefix" type="DOMString"/> +<var name="attrOwnerElem" type="Element"/> +<var name="isSpecified" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> + +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elementEmp" obj="childList" index="3" interface="NodeList"/> +<getAttributeNode var="dir" obj="elementEmp" name='"dir"'/> +<adoptNode var="adoptedAttr" obj="newDoc" source="dir"/> +<if><notNull obj="adoptedAttr"/> +<nodeName var="nodeName" obj="adoptedAttr"/> +<namespaceURI var="nodeNamespaceURI" obj="adoptedAttr" interface="Node"/> +<prefix var="nodePrefix" obj="adoptedAttr"/> +<ownerElement var="attrOwnerElem" obj="adoptedAttr" interface="Attr"/> +<specified var="isSpecified" obj="adoptedAttr" /> +<assertEquals expected='"dir"' actual="nodeName" id="documentadoptnode05_nodeName" ignoreCase="false"/> +<assertNull actual="nodeNamespaceURI" id="documentadoptnode05_namespaceURI"/> +<assertNull actual="nodePrefix" id="documentadoptnode05_prefix"/> +<assertNull actual="attrOwnerElem" id="documentadoptnode05_ownerDoc"/> +<assertTrue actual="isSpecified" id="documentadoptnode05_specified"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode06.xml b/test/testcases/tests/level3/core/documentadoptnode06.xml new file mode 100644 index 0000000..719f733 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode06.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode06"> +<metadata> +<title>documentadoptnode06</title> +<creator>IBM</creator> +<description> + Invoke adoptNode on a new document to adopt the a new Attribute node having a Text and an EntityReference + child. Check if this attribute has been adopted successfully by verifying the nodeName, namespaceURI, prefix, + specified and ownerElement attributes of the adopted node. Also verify the ownerDocument attribute + of the adopted node and the adopted children of the attribute node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newAttr" type="Attr"/> +<var name="newText" type="Text"/> +<var name="newEntRef" type="EntityReference"/> +<var name="adoptedAttr" type="Attr"/> +<var name="adoptText" type="Text"/> +<var name="adoptEntRef" type="EntityReference"/> +<var name="nodeList" type="NodeList"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeNamespaceURI" type="DOMString"/> +<var name="nodePrefix" type="DOMString"/> +<var name="attrOwnerElem" type="Element"/> +<var name="isSpecified" type="boolean"/> +<var name="adoptedTextNodeValue" type="DOMString"/> +<var name="adoptedEntRefNodeValue" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="appendedChild" type="Node"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="xmlNS" type="DOMString" value='"http://www.w3.org/XML/1998/namespace"'/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createAttributeNS var="newAttr" obj="doc" namespaceURI="xmlNS" qualifiedName='"xml:lang"'/> +<createTextNode var="newText" obj="doc" data='"Text Node"'/> +<createEntityReference var="newEntRef" obj="doc" name='"alpha"'/> +<appendChild obj="newAttr" var="appendedChild" newChild="newText"/> +<appendChild obj="newAttr" var="appendedChild" newChild="newEntRef"/> +<adoptNode var="adoptedAttr" obj="newDoc" source="newAttr"/> +<if><notNull obj="adoptedAttr"/> +<nodeName var="nodeName" obj="adoptedAttr"/> +<namespaceURI var="nodeNamespaceURI" obj="adoptedAttr" interface="Node"/> +<prefix var="nodePrefix" obj="adoptedAttr"/> +<ownerElement var="attrOwnerElem" obj="adoptedAttr" interface="Attr"/> +<specified var="isSpecified" obj="adoptedAttr" /> +<assertEquals expected='"xml:lang"' actual="nodeName" id="documentadoptnode06_nodeName" ignoreCase="false"/> +<assertEquals expected="xmlNS" actual="nodeNamespaceURI" id="documentadoptnode06_namespaceURI" ignoreCase="false"/> +<assertEquals expected='"xml"' actual="nodePrefix" id="documentadoptnode06_prefix" ignoreCase="false"/> +<assertNull actual="attrOwnerElem" id="documentadoptnode06_ownerDoc"/> +<assertTrue actual="isSpecified" id="documentadoptnode06_specified"/> +<childNodes var="nodeList" obj="adoptedAttr"/> +<item var="adoptText" obj="nodeList" index="0" interface="NodeList"/> +<item var="adoptEntRef" obj="nodeList" index="1" interface="NodeList"/> +<nodeValue var="adoptedTextNodeValue" obj="adoptText"/> +<nodeName var="adoptedEntRefNodeValue" obj="adoptEntRef"/> +<assertEquals expected='"Text Node"' actual="adoptedTextNodeValue" id="documentadoptnode06_TextNodeValue" ignoreCase="false"/> +<assertEquals expected='"alpha"' actual="adoptedEntRefNodeValue" id="documentadoptnode06_EntRefNodeValue" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode07.xml b/test/testcases/tests/level3/core/documentadoptnode07.xml new file mode 100644 index 0000000..4a65122 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode07.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode07"> +<metadata> +<title>documentadoptnode07</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with the value of the source parameter as itself. + Verify if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="adoptedDoc" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<adoptNode var="adoptedDoc" obj="doc" source="doc"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode08.xml b/test/testcases/tests/level3/core/documentadoptnode08.xml new file mode 100644 index 0000000..8b2d951 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode08.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode08"> +<metadata> +<title>documentadoptnode08</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with a new document as the value of the + source parameter. Verify if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="adoptedDoc" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<adoptNode var="adoptedDoc" obj="doc" source="newDoc"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode09.xml b/test/testcases/tests/level3/core/documentadoptnode09.xml new file mode 100644 index 0000000..19f4583 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode09.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode09"> +<metadata> +<title>documentadoptnode09</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on a new document with this document as the value of the + source parameter. Verify if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="adoptedDoc" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<adoptNode var="adoptedDoc" obj="newDoc" source="doc"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode10.xml b/test/testcases/tests/level3/core/documentadoptnode10.xml new file mode 100644 index 0000000..a5a0e68 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode10.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode10"> +<metadata> +<title>documentadoptnode10</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with the value of the source parameter as this + documents doctype node. Verify if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="adoptedDocType" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<adoptNode var="adoptedDocType" obj="doc" source="docType"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode11.xml b/test/testcases/tests/level3/core/documentadoptnode11.xml new file mode 100644 index 0000000..e5a7491 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode11.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode11"> +<metadata> +<title>documentadoptnode11</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with the value of the source parameter equal to a new + doctype node. Verify if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="adoptedDocType" type="Node"/> +<var name="nullPubID" type="DOMString" isNull="true"/> +<var name="nullSysID" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="docType" obj="domImpl" qualifiedName="rootName" publicId="nullPubID" systemId="nullSysID"/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<adoptNode var="adoptedDocType" obj="doc" source="docType"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode12.xml b/test/testcases/tests/level3/core/documentadoptnode12.xml new file mode 100644 index 0000000..7940057 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode12.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode12"> +<metadata> +<title>documentadoptnode12</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on a new document with the value of the source parameter equal to a new + doctype node. Verify if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="adoptedDocType" type="Node"/> +<var name="nullPubID" type="DOMString" isNull="true"/> +<var name="nullSysID" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="docType" obj="domImpl" qualifiedName="rootName" publicId="nullPubID" systemId="nullSysID"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="docType"/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<adoptNode var="adoptedDocType" obj="newDoc" source="docType"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode13.xml b/test/testcases/tests/level3/core/documentadoptnode13.xml new file mode 100644 index 0000000..93a52d9 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode13.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode13"> +<metadata> +<title>documentadoptnode13</title> +<creator>IBM</creator> +<description> + Using the method adoptNode, adopt a newly created DocumentFragment node populated with + with the first acronym element of this Document. Since the decendants of a documentFragment + are recursively adopted, check if the adopted node has children. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFragment" type="DocumentFragment"/> +<var name="childList" type="NodeList"/> +<var name="success" type="boolean"/> +<var name="acronymNode" type="Node"/> +<var name="appendedChild" type="Node"/> +<var name="adoptedDocFrag" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFragment" obj="doc"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymNode" obj="childList" index="0" interface="NodeList"/> +<appendChild obj="docFragment" var="appendedChild" newChild="acronymNode"/> +<adoptNode var="adoptedDocFrag" obj="doc" source="docFragment"/> +<if><notNull obj="adoptedDocFrag"/> +<hasChildNodes var="success" obj="adoptedDocFrag"/> +<assertTrue actual="success" id="documentadoptnode13"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode14.xml b/test/testcases/tests/level3/core/documentadoptnode14.xml new file mode 100644 index 0000000..2a1671e --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode14.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode14"> +<metadata> +<title>documentadoptnode14</title> +<creator>IBM</creator> +<description> + Using the method adoptNode in a new Document, adopt a newly created DocumentFragment node populated with + with the first acronym element of this Document as its newChild. Since the decendants of a documentFragment + are recursively adopted, check if the adopted node has children. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docFragment" type="DocumentFragment"/> +<var name="childList" type="NodeList"/> +<var name="success" type="boolean"/> +<var name="acronymNode" type="Node"/> +<var name="adoptedDocFrag" type="Node"/> +<var name="appendedChild" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="imported" type="Node"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createDocumentFragment var="docFragment" obj="newDoc"/> +<importNode obj="newDoc" var="imported" importedNode="docElem" deep="true"/> +<documentElement var="docElem" obj="newDoc"/> +<appendChild obj="docElem" var="appendedChild" newChild="imported"/> +<getElementsByTagName var="childList" obj="newDoc" tagname='"acronym"' interface="Document"/> +<item var="acronymNode" obj="childList" index="0" interface="NodeList"/> +<appendChild obj="docFragment" var="appendedChild" newChild="acronymNode"/> +<adoptNode var="adoptedDocFrag" obj="newDoc" source="docFragment"/> +<if><notNull obj="adoptedDocFrag"/> +<hasChildNodes var="success" obj="adoptedDocFrag"/> +<assertTrue actual="success" id="documentadoptnode14"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode15.xml b/test/testcases/tests/level3/core/documentadoptnode15.xml new file mode 100644 index 0000000..31bef33 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode15.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode15"> +<metadata> +<title>documentadoptnode15</title> +<creator>IBM</creator> +<description> + Using the method adoptNode, adopt a newly created DocumentFragment node without any children. + Check if the adopted node has no children. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFragment" type="DocumentFragment"/> +<var name="success" type="boolean"/> +<var name="adoptedDocFrag" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFragment" obj="doc"/> +<adoptNode var="adoptedDocFrag" obj="doc" source="docFragment"/> +<if><notNull obj="adoptedDocFrag"/> +<hasChildNodes var="success" obj="adoptedDocFrag"/> +<assertFalse actual="success" id="documentadoptnode15"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode16.xml b/test/testcases/tests/level3/core/documentadoptnode16.xml new file mode 100644 index 0000000..fd4b13e --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode16.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode16"> +<metadata> +<title>documentadoptnode16</title> +<creator>IBM</creator> +<description> +Create a document fragment with an entity reference, adopt the node and check +that the entity reference value comes from the adopting documents DTD. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFragment" type="DocumentFragment"/> +<var name="childList" type="NodeList"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="childsAttr" type="Attr"/> +<var name="entRef" type="EntityReference"/> +<var name="textNode" type="Text"/> +<var name="adopted" type="Node"/> +<var name="parentImp" type="Element"/> +<var name="childImp" type="Element"/> +<var name="attributes" type="NamedNodeMap"/> +<var name="childAttrImp" type="Attr"/> +<var name="nodeValue" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="attrNode" type="Attr"/> +<var name="firstChild" type="Node"/> +<var name="firstChildType" type="int"/> +<var name="firstChildName" type="DOMString"/> +<var name="firstChildValue" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFragment" obj="doc"/> +<createElement var="parent" obj="doc" tagName='"parent"'/> +<createElement var="child" obj="doc" tagName='"child"'/> +<createAttribute var="childsAttr" obj="doc" name='"state"'/> +<createEntityReference var="entRef" obj="doc" name='"gamma"'/> +<createTextNode var="textNode" obj="doc" data='"Test"'/> +<appendChild obj="childsAttr" var="appendedChild" newChild="entRef"/> +<setAttributeNode obj="child" var="attrNode" newAttr="childsAttr"/> +<appendChild obj="child" var="appendedChild" newChild="textNode"/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<appendChild obj="docFragment" var="appendedChild" newChild="parent"/> +<adoptNode var="adopted" obj="doc" source="docFragment"/> +<if><notNull obj="adopted"/> +<firstChild var="parentImp" obj="adopted" interface="Node"/> +<firstChild var="childImp" obj="parentImp" interface="Node"/> +<attributes var="attributes" obj="childImp"/> +<getNamedItem var="childAttrImp" obj="attributes" name='"state"'/> +<firstChild var="firstChild" obj="childAttrImp" interface="Node"/> +<assertNotNull actual="firstChild" id="firstChildNotNull"/> +<nodeName var="firstChildName" obj="firstChild"/> +<nodeValue var="firstChildValue" obj="firstChild"/> +<nodeType var="firstChildType" obj="firstChild"/> +<if> + <!-- if first child of the attribute is an + entity, then it should be for ent3 --> + <equals actual="firstChildType" expected="5"/> + <assertEquals actual="firstChildName" expected='"gamma"' + ignoreCase="false" id="firstChildEnt3Ref"/> + <else> + <!-- otherwise the value should be expanded as Texas --> + <assertEquals expected='"Texas"' actual="firstChildValue" + id="documentadoptnode16" + ignoreCase="false"/> + </else> +</if> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode17.xml b/test/testcases/tests/level3/core/documentadoptnode17.xml new file mode 100644 index 0000000..975d70b --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode17.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode17"> +<metadata> +<title>documentadoptnode17</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with the entity ent1 as the source. Since this is + read-only verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entityMap" type="NamedNodeMap"/> +<var name="ent" type="Entity"/> +<var name="adoptedEnt" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entityMap" obj="docType"/> +<getNamedItem var="ent" obj="entityMap" name='"alpha"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<adoptNode var="adoptedEnt" obj="doc" source="ent"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode18.xml b/test/testcases/tests/level3/core/documentadoptnode18.xml new file mode 100644 index 0000000..c9ad445 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode18.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode18"> +<metadata> +<title>documentadoptnode18</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on a new document with the entity ent4 as the source. Since this is + read-only verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="entityMap" type="NamedNodeMap"/> +<var name="ent" type="Entity"/> +<var name="adoptedEnt" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<doctype var="docType" obj="doc"/> +<entities var="entityMap" obj="docType"/> +<getNamedItem var="ent" obj="entityMap" name='"delta"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<adoptNode var="adoptedEnt" obj="newDoc" source="ent"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode19.xml b/test/testcases/tests/level3/core/documentadoptnode19.xml new file mode 100644 index 0000000..eecf077 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode19.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode19"> +<metadata> +<title>documentadoptnode19</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with the notation notation1 as the source. Since this is + read-only verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="notationMap" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="adoptedNotaion" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<notations var="notationMap" obj="docType"/> +<getNamedItem var="notation" obj="notationMap" name='"notation1"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<adoptNode var="adoptedNotaion" obj="doc" source="notation"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode20.xml b/test/testcases/tests/level3/core/documentadoptnode20.xml new file mode 100644 index 0000000..4f5442c --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode20.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode20"> +<metadata> +<title>documentadoptnode20</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on a new document with the notation notation2 as the source. Since this is + read-only verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="notationMap" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="adoptedNotation" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<doctype var="docType" obj="doc"/> +<notations var="notationMap" obj="docType"/> +<getNamedItem var="notation" obj="notationMap" name='"notation2"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<adoptNode var="adoptedNotation" obj="newDoc" source="notation"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode21.xml b/test/testcases/tests/level3/core/documentadoptnode21.xml new file mode 100644 index 0000000..e9ca8a1 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode21.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode21"> +<metadata> +<title>documentadoptnode21</title> +<creator>IBM</creator> +<description> + The adoptNode method changes the ownerDocument of a node, its children, as well as the + attached attribute nodes if there are any. If the node has a parent it is first removed + from its parent child list. + + Invoke the adoptNode method on this Document with the source node being an existing attribute + that is a part of this Document. Verify that the returned adopted node's nodeName, nodeValue + and nodeType are as expected and that the ownerElement attribute of the returned attribute node + was set to null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="attrOwnerElem" type="Element"/> +<var name="element" type="Element"/> +<var name="attr" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="adoptedTitle" type="Node"/> +<var name="attrsParent" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="nodeValue" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="element" name='"title"'/> +<adoptNode var="adoptedTitle" obj="doc" source="attr"/> +<nodeName var="nodeName" obj="adoptedTitle"/> +<nodeValue var="nodeValue" obj="adoptedTitle"/> +<nodeType var="nodeType" obj="adoptedTitle"/> +<ownerElement var="attrOwnerElem" obj="adoptedTitle" interface="Attr"/> +<assertEquals expected='"title"' actual="nodeName" id="documentadoptnode21_nodeName" ignoreCase="false"/> +<assertEquals expected="2" actual="nodeType" id="documentadoptnode21_nodeType" ignoreCase="false"/> +<assertEquals expected='"Yes"' actual="nodeValue" id="documentadoptnode21_nodeValue" ignoreCase="false"/> +<assertNull actual="attrOwnerElem" id="documentadoptnode21_ownerDoc"/> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode22.xml b/test/testcases/tests/level3/core/documentadoptnode22.xml new file mode 100644 index 0000000..0ea7840 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode22.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode22"> +<metadata> +<title>documentadoptnode22</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with the documentElement as the source. + Verify if the node has been adopted correctly by its nodeName. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElement" type="Element"/> +<var name="adoptedNode" type="Node"/> +<var name="success" type="boolean"/> +<var name="nodeNameOrig" type="DOMString"/> +<var name="nodeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElement" obj="doc"/> +<adoptNode var="adoptedNode" obj="doc" source="docElement"/> +<if><notNull obj="adoptedNode"/> +<hasChildNodes var="success" obj="adoptedNode"/> +<assertTrue actual="success" id="documentadoptnode22_1"/> +<nodeName var="nodeName" obj="adoptedNode"/> +<nodeName var="nodeNameOrig" obj="docElement"/> +<assertEquals actual="nodeNameOrig" expected="nodeName" id="documentadoptnode22_2" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode23.xml b/test/testcases/tests/level3/core/documentadoptnode23.xml new file mode 100644 index 0000000..696c398 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode23.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode23"> +<metadata> +<title>documentadoptnode23</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document with the first acronym element node of this + Document as the source. Verify if the node has been adopted correctly by checking the + length of the this elements childNode list before and after. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="adoptedNode" type="Node"/> +<var name="acronymElem" type="Node"/> +<var name="acronymElemLen" type="int"/> +<var name="adoptedLen" type="int"/> +<var name="acronymElemChild" type="NodeList"/> +<var name="adoptedNodeChild" type="NodeList"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="childList" index="0" interface="NodeList"/> +<adoptNode var="adoptedNode" obj="doc" source="acronymElem"/> +<if><notNull obj="adoptedNode"/> +<childNodes var="acronymElemChild" obj="acronymElem"/> +<length var="acronymElemLen" obj="acronymElemChild" interface="NodeList"/> +<childNodes var="adoptedNodeChild" obj="adoptedNode"/> +<length var="adoptedLen" obj="adoptedNodeChild" interface="NodeList"/> +<assertEquals actual="acronymElemLen" expected="adoptedLen" id="documentadoptnode23" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode24.xml b/test/testcases/tests/level3/core/documentadoptnode24.xml new file mode 100644 index 0000000..90f3901 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode24.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode24"> +<metadata> +<title>documentadoptnode24</title> +<creator>IBM</creator> +<description> + The adoptNode method changes the ownerDocument of a node, its children, as well as the + attached attribute nodes if there are any. If the node has a parent it is first removed + from its parent child list. + For Element Nodes, specified attribute nodes of the source element are adopted, Default + attributes are discarded and descendants of the source element are recursively adopted. + + Invoke the adoptNode method on a new document with the first code element node of this + Document as the source. Verify if the node has been adopted correctly by checking the + length of the this elements childNode list before and after. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="childList" type="NodeList"/> +<var name="adoptedNode" type="Node"/> +<var name="codeElem" type="Element"/> +<var name="codeElemChildren" type="NodeList"/> +<var name="adoptedChildren" type="NodeList"/> +<var name="codeElemLen" type="int"/> +<var name="adoptedLen" type="int"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom:test"' doctype="nullDocType"/> +<getElementsByTagNameNS var="childList" obj="doc" namespaceURI='"*"' localName='"code"' interface="Document"/> +<item var="codeElem" obj="childList" index="0" interface="NodeList"/> +<adoptNode var="adoptedNode" obj="newDoc" source="codeElem"/> +<childNodes var="codeElemChildren" obj="codeElem"/> +<childNodes var="adoptedChildren" obj="adoptedNode"/> +<length var="codeElemLen" obj="codeElemChildren" interface="NodeList"/> +<length var="adoptedLen" obj="adoptedChildren" interface="NodeList"/> +<assertEquals actual="codeElemLen" expected="adoptedLen" id="documentadoptnode24" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode25.xml b/test/testcases/tests/level3/core/documentadoptnode25.xml new file mode 100644 index 0000000..d18db88 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode25.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode25"> +<metadata> +<title>documentadoptnode25</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on a new document with a new Element of this + Document as the source. Verify if the node has been adopted correctly by checking the + nodeName of the adopted Element. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newElem" type="Element"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="adoptedNode" type="Node"/> +<var name="adoptedName" type="DOMString"/> +<var name="adoptedNS" type="DOMString"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<createElementNS var="newElem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"th"'/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootName' doctype="nullDocType"/> +<adoptNode var="adoptedNode" obj="newDoc" source="newElem"/> +<if><notNull obj="adoptedNode"/> +<nodeName var="adoptedName" obj="adoptedNode"/> +<namespaceURI var="adoptedNS" obj="adoptedNode" interface="Node"/> +<assertEquals actual="adoptedName" expected='"th"' id="documentadoptnode25_1" ignoreCase="false"/> +<assertEquals actual="adoptedNS" expected='"http://www.w3.org/1999/xhtml"' id="documentadoptnode25_2" ignoreCase="false"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/core/documentadoptnode26.xml b/test/testcases/tests/level3/core/documentadoptnode26.xml new file mode 100644 index 0000000..fa640b8 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode26.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode26"> +<metadata> +<title>documentadoptnode26</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using a new Element and a new attribute created in + a new Document as the source. Verify if the node has been adopted correctly by checking the + nodeName of the adopted Element and by checking if the attribute was adopted. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newElem" type="Element"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="adoptedNode" type="Node"/> +<var name="adoptedName" type="DOMString"/> +<var name="adoptedNS" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="appendedChild" type="Node"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootTagname' doctype="nullDocType"/> +<createElementNS var="newElem" obj="newDoc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"head"'/> +<setAttributeNS obj="newElem" + namespaceURI='"http://www.w3.org/XML/1998/namespace"' + qualifiedName='"xml:lang"' value='"en-US"'/> +<documentElement obj="newDoc" var="docElem"/> +<appendChild obj="docElem" var="appendedChild" newChild="newElem"/> +<adoptNode var="adoptedNode" obj="doc" source="newElem"/> +<if><notNull obj="adoptedNode"/> +<nodeName var="adoptedName" obj="adoptedNode"/> +<namespaceURI var="adoptedNS" obj="adoptedNode" interface="Node"/> +<assertEquals actual="adoptedName" expected='"head"' id="documentadoptnode26_1" ignoreCase="false"/> +<assertEquals actual="adoptedNS" expected='"http://www.w3.org/1999/xhtml"' id="documentadoptnode26_2" ignoreCase="false"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/core/documentadoptnode27.xml b/test/testcases/tests/level3/core/documentadoptnode27.xml new file mode 100644 index 0000000..0db3817 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode27.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode27"> +<metadata> +<title>documentadoptnode27</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using a new imported Element and a new attribute created in + a new Document as the source. Verify if the node has been adopted correctly by checking the + nodeName of the adopted Element and by checking if the attribute was adopted. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newElem" type="Element"/> +<var name="newImpElem" type="Element"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="adoptedNode" type="Node"/> +<var name="adoptedName" type="DOMString"/> +<var name="adoptedNS" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootTagname' doctype="nullDocType"/> +<createElementNS var="newElem" obj="newDoc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:head"'/> +<setAttributeNS obj="newElem" + namespaceURI='"http://www.w3.org/XML/1998/namespace"' + qualifiedName='"xml:lang"' value='"en-US"'/> +<documentElement obj="newDoc" var="docElem"/> +<appendChild obj="docElem" var="appendedChild" newChild="newElem"/> +<importNode var="newImpElem" obj="doc" importedNode="newElem" deep="true"/> +<adoptNode var="adoptedNode" obj="doc" source="newImpElem"/> +<if><notNull obj="adoptedNode"/> +<nodeName var="adoptedName" obj="adoptedNode"/> +<namespaceURI var="adoptedNS" obj="adoptedNode" interface="Node"/> +<assertEquals actual="adoptedName" expected='"xhtml:head"' id="documentadoptnode27_1" ignoreCase="false"/> +<assertEquals actual="adoptedNS" expected='"http://www.w3.org/1999/xhtml"' id="documentadoptnode27_2" ignoreCase="false"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/core/documentadoptnode28.xml b/test/testcases/tests/level3/core/documentadoptnode28.xml new file mode 100644 index 0000000..be64241 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode28.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode28"> +<metadata> +<title>documentadoptnode28</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using the "p" element with the default + Attribute "dir" as the source. Verify if the node has been adopted correctly by + checking the nodeName of the adopted Element and by checking if the attribute was adopted. + Note the default attribute should be adopted in this case. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="adoptedNode" type="Node"/> +<var name="employeeElem" type="Node"/> +<var name="attrImp" type="Attr"/> +<var name="nodeName" type="DOMString"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="employeeElem" obj="childList" index="3" interface="NodeList"/> +<adoptNode var="adoptedNode" obj="doc" source="employeeElem"/> +<if><notNull obj="adoptedNode"/> +<getAttributeNode var="attrImp" obj="adoptedNode" name='"dir"'/> +<nodeName var="nodeName" obj="attrImp"/> +<assertEquals actual="nodeName" expected='"dir"' id="documentadoptnode28" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode30.xml b/test/testcases/tests/level3/core/documentadoptnode30.xml new file mode 100644 index 0000000..2a08c5b --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode30.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode30"> +<metadata> +<title>documentadoptnode30</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using a new Text node as the source. Verify + if the node has been adopted correctly by checking the nodeValue of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newText" type="Text"/> +<var name="adoptedText" type="Text"/> +<var name="nodeValue" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createTextNode var="newText" obj="doc" data='"Document.adoptNode test for a TEXT_NODE"'/> +<adoptNode var="adoptedText" obj="doc" source="newText"/> +<if><notNull obj="adoptedText"/> +<nodeValue var="nodeValue" obj="adoptedText"/> +<assertEquals actual="nodeValue" expected='"Document.adoptNode test for a TEXT_NODE"' id="documentadoptnode30" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode31.xml b/test/testcases/tests/level3/core/documentadoptnode31.xml new file mode 100644 index 0000000..357ec27 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode31.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode31"> +<metadata> +<title>documentadoptnode31</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using a new Text node from a new Document as the + source. Verify if the node has been adopted correctly by checking the nodeValue of the adopted + node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="newText" type="Text"/> +<var name="adoptedText" type="Text"/> +<var name="nodeValue" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createTextNode var="newText" obj="newDoc" data='"new Document.adoptNode test for a TEXT_NODE"'/> +<adoptNode var="adoptedText" obj="doc" source="newText"/> +<if><notNull obj="adoptedText"/> +<nodeValue var="nodeValue" obj="adoptedText"/> +<assertEquals actual="nodeValue" expected='"new Document.adoptNode test for a TEXT_NODE"' id="documentadoptnode31" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode32.xml b/test/testcases/tests/level3/core/documentadoptnode32.xml new file mode 100644 index 0000000..d9a358c --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode32.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode32"> +<metadata> +<title>documentadoptnode32</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on another document using a new CDataSection node created in this + Document as the source. Verify if the node has been adopted correctly by checking the nodeValue + of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docAdopter" type="Document"/> +<var name="newCDATA" type="Node"/> +<var name="adoptedCDATA" type="Node"/> +<var name="nodeValue" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<load var="docAdopter" href="hc_staff" willBeModified="true"/> +<createCDATASection var="newCDATA" obj="doc" data='"Document.adoptNode test for a CDATASECTION_NODE"'/> +<adoptNode var="adoptedCDATA" obj="docAdopter" source="newCDATA"/> +<if><notNull obj="adoptedCDATA"/> +<nodeValue var="nodeValue" obj="adoptedCDATA"/> +<assertEquals actual="nodeValue" expected='"Document.adoptNode test for a CDATASECTION_NODE"' id="documentadoptnode32" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode33.xml b/test/testcases/tests/level3/core/documentadoptnode33.xml new file mode 100644 index 0000000..cae3139 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode33.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode33"> +<metadata> +<title>documentadoptnode33</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using a new CDataSection node created in a new + Document as the source. Verify if the node has been adopted correctly by checking the nodeValue + of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="newCDATA" type="Node"/> +<var name="adoptedCDATA" type="Node"/> +<var name="nodeValue" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createCDATASection var="newCDATA" obj="newDoc" data='"Document.adoptNode test for a CDATASECTION_NODE"'/> +<adoptNode var="adoptedCDATA" obj="doc" source="newCDATA"/> +<if><notNull obj="adoptedCDATA"/> +<nodeValue var="nodeValue" obj="adoptedCDATA"/> +<assertEquals actual="nodeValue" expected='"Document.adoptNode test for a CDATASECTION_NODE"' id="documentadoptnode33" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode34.xml b/test/testcases/tests/level3/core/documentadoptnode34.xml new file mode 100644 index 0000000..daed51e --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode34.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode34"> +<metadata> +<title>documentadoptnode34</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on a new document using a new Comment node created in it + as the source. Verify if the node has been adopted correctly by checking the nodeValue + of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="newComment" type="Node"/> +<var name="adoptedComment" type="Node"/> +<var name="nodeValue" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createComment var="newComment" obj="newDoc" data='"Document.adoptNode test for a COMMENT_NODE"'/> +<adoptNode var="adoptedComment" obj="newDoc" source="newComment"/> +<if><notNull obj="adoptedComment"/> +<nodeValue var="nodeValue" obj="adoptedComment"/> +<assertEquals actual="nodeValue" expected='"Document.adoptNode test for a COMMENT_NODE"' id="documentadoptnode34" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode35.xml b/test/testcases/tests/level3/core/documentadoptnode35.xml new file mode 100644 index 0000000..7aa73c7 --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode35.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode35"> +<metadata> +<title>documentadoptnode35</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using a new PI node created in a new doc + as the source. Verify if the node has been adopted correctly by checking the nodeValue + of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="newPI" type="ProcessingInstruction"/> +<var name="adoptedPI" type="ProcessingInstruction"/> +<var name="piTarget" type="DOMString"/> +<var name="piData" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createProcessingInstruction var="newPI" obj="newDoc" target='"PITarget"' data='"PIData"'/> +<adoptNode var="adoptedPI" obj="doc" source="newPI"/> +<if><notNull obj="adoptedPI"/> + <target var="piTarget" obj="adoptedPI" interface="ProcessingInstruction"/> + <data var="piData" obj="adoptedPI" interface="ProcessingInstruction"/> + <assertEquals actual="piTarget" expected='"PITarget"' id="documentadoptnode35_Target" ignoreCase="false"/> + <assertEquals actual="piData" expected='"PIData"' id="documentadoptnode35_Data" ignoreCase="false"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentadoptnode36.xml b/test/testcases/tests/level3/core/documentadoptnode36.xml new file mode 100644 index 0000000..c15854e --- /dev/null +++ b/test/testcases/tests/level3/core/documentadoptnode36.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentadoptnode36"> +<metadata> +<title>documentadoptnode36</title> +<creator>IBM</creator> +<description> + Invoke the adoptNode method on this document using a new PI node created in a new doc + as the source. Verify if the node has been adopted correctly by checking the nodeValue + of the adopted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="newPI1" type="ProcessingInstruction"/> +<var name="newPI2" type="ProcessingInstruction"/> +<var name="adoptedPI1" type="ProcessingInstruction"/> +<var name="adoptedPI2" type="ProcessingInstruction"/> +<var name="piTarget" type="DOMString"/> +<var name="piData" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createProcessingInstruction var="newPI1" obj="newDoc" target='"PITarget"' data='"PIData"'/> +<createProcessingInstruction var="newPI2" obj="doc" target='"PITarget"' data='"PIData"'/> +<adoptNode var="adoptedPI1" obj="newDoc" source="newPI1"/> +<if><notNull obj="adoptedPI1"/> +<adoptNode var="adoptedPI2" obj="newDoc" source="newPI2"/> +<if><notNull obj="adoptedPI2"/> +<target var="piTarget" obj="adoptedPI1" interface="ProcessingInstruction"/> +<data var="piData" obj="adoptedPI1" interface="ProcessingInstruction"/> +<assertEquals actual="piTarget" expected='"PITarget"' id="documentadoptnode36_Target1" ignoreCase="false"/> +<assertEquals actual="piData" expected='"PIData"' id="documentadoptnode36_Data1" ignoreCase="false"/> +<target var="piTarget" obj="adoptedPI2" interface="ProcessingInstruction"/> +<data var="piData" obj="adoptedPI2" interface="ProcessingInstruction"/> +<assertEquals actual="piTarget" expected='"PITarget"' id="documentadoptnode36_Target2" ignoreCase="false"/> +<assertEquals actual="piData" expected='"PIData"' id="documentadoptnode36_Data2" ignoreCase="false"/> +</if> +</if> +</test> diff --git a/test/testcases/tests/level3/core/documentgetdoctype01.xml b/test/testcases/tests/level3/core/documentgetdoctype01.xml new file mode 100644 index 0000000..b5e8d5f --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetdoctype01.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetdoctype01"> +<metadata> +<title>documentgetdoctype01</title> +<creator>IBM</creator> +<description> + Retreive the doctype node, create a new Doctype node, call replaceChild and try replacing the + docType node with a new docType node. Check if the docType node was correctly replaced with + the new one. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-B63ED1A31"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="newDocType" type="DocumentType"/> +<var name="replacedDocType" type="DocumentType"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newSysID" type="DOMString"/> +<var name="nullPubID" type="DOMString" isNull="true"/> +<var name="nullSysID" type="DOMString" isNull="true"/> +<var name="replaced" type="Node"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<name var="rootName" obj="docType" interface="DocumentType"/> +<implementation obj="doc" var="domImpl"/> +<createDocumentType obj="domImpl" var="newDocType" qualifiedName="rootName" publicId="nullPubID" systemId="nullSysID"/> +<try> + <replaceChild obj="doc" var="replaced" newChild="newDocType" oldChild="docType"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<doctype var="replacedDocType" obj="doc"/> +<systemId var="newSysID" obj="replacedDocType" interface="DocumentType"/> +<assertNull actual="newSysID" id="newSysIdNull"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetdocumenturi01.xml b/test/testcases/tests/level3/core/documentgetdocumenturi01.xml new file mode 100644 index 0000000..af36b3f --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetdocumenturi01.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetdocumenturi01"> +<metadata> +<title>documentgetdocumenturi01</title> +<creator>IBM</creator> +<description> + Retreive the documentURI of this document, and verify if it is not null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentURI var="docURI" obj="doc" /> +<assertNotNull actual="docURI" id="documentgetdocumenturi01"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetdocumenturi02.xml b/test/testcases/tests/level3/core/documentgetdocumenturi02.xml new file mode 100644 index 0000000..e993c6d --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetdocumenturi02.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetdocumenturi02"> +<metadata> +<title>documentgetdocumenturi02</title> +<creator>IBM</creator> +<description> + Create a new Document, retreive its documentURI, and verify if it is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="docURI" type="DOMString"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<documentURI var="docURI" obj="newDoc" /> +<assertNull actual="docURI" id="documentgetdocumenturi02"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetdocumenturi03.xml b/test/testcases/tests/level3/core/documentgetdocumenturi03.xml new file mode 100644 index 0000000..641015d --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetdocumenturi03.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetdocumenturi03"> +<metadata> +<title>documentgetdocumenturi03</title> +<creator>IBM</creator> +<description> + Import the documentElement node of this document into a new document. Since this node is + now owned by the importing document, its documentURI attribute value should be null +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="importedOwner" type="Document"/> +<var name="docElem" type="Element"/> +<var name="docElemImported" type="Node"/> +<var name="docURI" type="DOMString"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<importNode var="docElemImported" obj="newDoc" importedNode="docElem" deep="false" /> +<ownerDocument var="importedOwner" obj="docElemImported"/> +<documentURI var="docURI" obj="importedOwner" /> +<assertNull actual="docURI" id="documentgetdocumenturi03"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetinputencoding01.xml b/test/testcases/tests/level3/core/documentgetinputencoding01.xml new file mode 100644 index 0000000..538aa52 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetinputencoding01.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetinputencoding01"> +<metadata> +<title>documentgetinputencoding01</title> +<creator>IBM</creator> +<description> + Call the getInputEncoding method on a UTF-8 encoded document and check if the + value returned is UTF-8. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<inputEncoding obj="doc" var="encodingName" interface="Document"/> +<assertEquals expected='"UTF-8"' actual="encodingName" id="documentgetinputencoding01" ignoreCase="true"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetinputencoding02.xml b/test/testcases/tests/level3/core/documentgetinputencoding02.xml new file mode 100644 index 0000000..e04f5ad --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetinputencoding02.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetinputencoding02"> +<metadata> +<title>documentgetinputencoding02</title> +<creator>IBM</creator> +<description> + Call the getInputEncoding method on a new document and check if the value returned + is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="encodingName" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<inputEncoding obj="newDoc" var="encodingName" interface="Document"/> +<assertNull actual="encodingName" id="documentgetinputencoding02"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetinputencoding03.xml b/test/testcases/tests/level3/core/documentgetinputencoding03.xml new file mode 100644 index 0000000..bd6cd88 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetinputencoding03.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetinputencoding03"> +<metadata> +<title>documentgetinputencoding03</title> +<creator>IBM</creator> +<description> + Call the getInputEncoding method on a on a UTF-16 (BE) encoded document and check if the value returned + is UTF-16BE. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="barfoo_utf16" willBeModified="false"/> +<inputEncoding obj="doc" var="encodingName" interface="Document"/> +<assertEquals expected='"UTF-16BE"' actual="encodingName" id="documentgetinputencoding03" ignoreCase="true"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetinputencoding04.xml b/test/testcases/tests/level3/core/documentgetinputencoding04.xml new file mode 100644 index 0000000..46af623 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetinputencoding04.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetinputencoding04"> +<metadata> +<title>documentgetinputencoding04</title> +<creator>IBM</creator> +<description> + Call the getInputEncoding method on a cloned UTF-8 encoded document + and check if the value returned is UTF-8 or null (implementation dependent). +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="cloned" type="Document"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="barfoo_utf8" willBeModified="false"/> +<cloneNode var="cloned" obj="doc" deep="true"/> +<inputEncoding obj="cloned" var="encodingName" interface="Document"/> +<assertTrue id="documentgetinputencoding04"> +<or> +<equals expected='"UTF-8"' actual="encodingName" ignoreCase="true"/> +<isNull obj="encodingName" /> +</or> +</assertTrue> +</test> diff --git a/test/testcases/tests/level3/core/documentgetstricterrorchecking01.xml b/test/testcases/tests/level3/core/documentgetstricterrorchecking01.xml new file mode 100644 index 0000000..6bd6ebb --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetstricterrorchecking01.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetstricterrorchecking01"> +<metadata> +<title>documentgetstricterrorchecking01</title> +<creator>IBM</creator> +<description> + Verify if the (default) value of the strictErrorChecking attribute of this document object is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking"/> +</metadata> +<var name="doc" type="Document"/> +<var name="strictErrorCheckingValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<strictErrorChecking var="strictErrorCheckingValue" obj="doc" /> +<assertTrue actual="strictErrorCheckingValue" id="documentgetstricterrorchecking01"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetstricterrorchecking02.xml b/test/testcases/tests/level3/core/documentgetstricterrorchecking02.xml new file mode 100644 index 0000000..0c3ebb9 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetstricterrorchecking02.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetstricterrorchecking02"> +<metadata> +<title>documentgetstricterrorchecking02</title> +<creator>IBM</creator> +<description> + Verify if the (default)value of the strictErrorChecking attribute of a new Document object is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="strictErrorCheckingValue" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<strictErrorChecking var="strictErrorCheckingValue" obj="newDoc" /> +<assertTrue actual="strictErrorCheckingValue" id="documentgetstricterrorchecking02"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlencoding01.xml b/test/testcases/tests/level3/core/documentgetxmlencoding01.xml new file mode 100644 index 0000000..9f2fbe2 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlencoding01.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlencoding01"> +<metadata> +<title>documentgetxmlencoding01</title> +<creator>IBM</creator> +<description> + Call the getXmlEncoding method on a UTF-8 encoded XML document in which the encoding pseudo + attribute in its XMLDecl is UTF-8 and check if the value returned is UTF-8. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="barfoo_utf8" willBeModified="false"/> +<xmlEncoding obj="doc" var="encodingName" interface="Document"/> +<assertEquals expected='"uTf-8"' actual="encodingName" id="documentgetxmlencoding01" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlencoding02.xml b/test/testcases/tests/level3/core/documentgetxmlencoding02.xml new file mode 100644 index 0000000..3109e4c --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlencoding02.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlencoding02"> +<metadata> +<title>documentgetxmlencoding02</title> +<creator>IBM</creator> +<description> + Call the getXmlEncoding method on a new document and check if the value returned + is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="encodingName" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<xmlEncoding obj="newDoc" var="encodingName" interface="Document"/> +<assertNull actual="encodingName" id="documentgetxmlencoding02"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlencoding03.xml b/test/testcases/tests/level3/core/documentgetxmlencoding03.xml new file mode 100644 index 0000000..12485de --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlencoding03.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlencoding03"> +<metadata> +<title>documentgetxmlencoding03</title> +<creator>IBM</creator> +<description> + Call the getXmlEncoding method on a UTF-16 encoded document and check if the value returned + is UTF-16. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="barfoo_utf16" willBeModified="false"/> +<xmlEncoding obj="doc" var="encodingName" interface="Document"/> +<assertEquals expected='"uTf-16"' actual="encodingName" id="documentgetxmlencoding03" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlencoding04.xml b/test/testcases/tests/level3/core/documentgetxmlencoding04.xml new file mode 100644 index 0000000..1c27c66 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlencoding04.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlencoding04"> +<metadata> +<title>documentgetxmlencoding04</title> +<creator>IBM</creator> +<description> + Call the getXmlEncoding method on a UTF-8 encoded XML document that does not contain + the encoding pseudo attribute in its XMLDecl and check if the value returend is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<xmlEncoding obj="doc" var="encodingName" interface="Document"/> +<assertNull actual="encodingName" id="documentgetxmlencoding04"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlencoding05.xml b/test/testcases/tests/level3/core/documentgetxmlencoding05.xml new file mode 100644 index 0000000..092215a --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlencoding05.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlencoding05"> +<metadata> +<title>documentgetxmlencoding05</title> +<creator>IBM</creator> +<description> + Call the getXmlEncoding method on a cloned UTF-8 encoded document + and check if the value returned is UTF-8 or null (implementation dependent). +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="cloned" type="Document"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="barfoo_utf8" willBeModified="false"/> +<cloneNode var="cloned" obj="doc" deep="true"/> +<xmlEncoding obj="cloned" var="encodingName" interface="Document"/> +<assertTrue id="documentgetxmlencoding05"> +<or> +<equals expected='"uTf-8"' actual="encodingName" ignoreCase="false"/> +<isNull obj="encodingName" /> +</or> +</assertTrue> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlstandalone01.xml b/test/testcases/tests/level3/core/documentgetxmlstandalone01.xml new file mode 100644 index 0000000..91be2df --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlstandalone01.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlstandalone01"> +<metadata> +<title>documentgetxmlstandalone01</title> +<creator>IBM</creator> +<description> + Retreive the xmlStandalone attribute of a document for which standalone was not specified, this + should return false since the default for standalone is no when external markup decls + are present. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone"/> +</metadata> +<var name="doc" type="Document"/> +<var name="standalone" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<xmlStandalone var="standalone" obj="doc" /> +<assertFalse actual="standalone" id="documentgetxmlstandalone01"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlstandalone02.xml b/test/testcases/tests/level3/core/documentgetxmlstandalone02.xml new file mode 100644 index 0000000..ddf287c --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlstandalone02.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlstandalone02"> +<metadata> +<title>documentgetxmlstandalone02</title> +<creator>IBM</creator> +<description> + The value of the standalone pesudo-attribute for a new Document should be false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="standalone" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<xmlStandalone var="standalone" obj="newDoc" /> +<assertFalse actual="standalone" id="documentgetxmlstandalone02"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlstandalone03.xml b/test/testcases/tests/level3/core/documentgetxmlstandalone03.xml new file mode 100644 index 0000000..82db96a --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlstandalone03.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlstandalone03"> +<metadata> +<title>documentgetxmlstandalone03</title> +<creator>IBM</creator> +<description> + The value of the standalone attribute for an XML document with the standalone="no" + should be false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone"/> +</metadata> +<var name="doc" type="Document"/> +<var name="standalone" type="boolean"/> +<load var="doc" href="barfoo_standalone_no" willBeModified="false"/> +<xmlStandalone var="standalone" obj="doc" /> +<assertFalse actual="standalone" id="documentgetxmlstandalone03"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlstandalone04.xml b/test/testcases/tests/level3/core/documentgetxmlstandalone04.xml new file mode 100644 index 0000000..293f506 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlstandalone04.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlstandalone04"> +<metadata> +<title>documentgetxmlstandalone04</title> +<creator>IBM</creator> +<description> + Retreive the documentURI of a document for which standalone was specified as "yes", this + should return true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone"/> +</metadata> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="standalone" type="boolean"/> +<load var="doc" href="barfoo_standalone_yes" willBeModified="false"/> +<xmlStandalone var="standalone" obj="doc" /> +<assertTrue actual="standalone" id="documentgetxmlstandalone04"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlstandalone05.xml b/test/testcases/tests/level3/core/documentgetxmlstandalone05.xml new file mode 100644 index 0000000..df13472 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlstandalone05.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlstandalone05"> +<metadata> +<title>documentgetxmlstandalone05</title> +<creator>IBM</creator> +<description> + Cretae a new DocumentType node whose systemId is StaffNS.DTD. Create a new Document + node. Check if the value of the standalone attribute on the new Document is false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="newDocType" type="DocumentType"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="standalone" type="boolean"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="docType" type="DocumentType"/> +<var name="sysId" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<doctype var="docType" obj="doc"/> +<systemId var="sysId" obj="docType" interface="DocumentType"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="newDocType" obj="domImpl" qualifiedName="rootName" publicId="nullPubId" systemId="sysId"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="newDocType"/> +<xmlStandalone var="standalone" obj="newDoc" /> +<assertFalse actual="standalone" id="documentgetxmlstandalone05"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlversion01.xml b/test/testcases/tests/level3/core/documentgetxmlversion01.xml new file mode 100644 index 0000000..93d120a --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlversion01.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlversion01"> +<metadata> +<title>documentgetxmlversion01</title> +<creator>IBM</creator> +<description> + Check if the value of the version attribute in the XML declaration of this document + obtained by parsing staffNS.xml is "1.0". +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="versionValue" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<xmlVersion var="versionValue" obj="doc" interface="Document"/> +<assertEquals actual="versionValue" expected='"1.0"' id="documentgetxmlversion01" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentgetxmlversion02.xml b/test/testcases/tests/level3/core/documentgetxmlversion02.xml new file mode 100644 index 0000000..384a880 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlversion02.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlversion02"> +<metadata> +<title>documentgetxmlversion02</title> +<creator>IBM</creator> +<description> + Check if the value of the version attribute in the XML declaration of a new document + is "1.0". +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="versionValue" type="DOMString"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<xmlVersion var="versionValue" obj="newDoc" interface="Document"/> +<assertEquals actual="versionValue" expected='"1.0"' id="documentgetxmlversion02" ignoreCase="true"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentgetxmlversion03.xml b/test/testcases/tests/level3/core/documentgetxmlversion03.xml new file mode 100644 index 0000000..b520772 --- /dev/null +++ b/test/testcases/tests/level3/core/documentgetxmlversion03.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentgetxmlversion03"> +<metadata> +<title>documentgetxmlversion03</title> +<creator>IBM</creator> +<description> + Check if the value of the version attribute in a XML document without a XMLDecl is + is "1.0". +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="versionValue" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<xmlVersion var="versionValue" obj="doc" interface="Document"/> +<assertEquals actual="versionValue" expected='"1.0"' id="documentgetxmlversion03" ignoreCase="true"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument01.xml b/test/testcases/tests/level3/core/documentnormalizedocument01.xml new file mode 100644 index 0000000..cd62448 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument01.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument01"> +<metadata> +<title>documentnormalizedocument01</title> +<creator>IBM</creator> +<description> + Invoke the normalizeDocument method on this document. Retreive the documentElement node + and check the nodeName of this node to make sure it has not changed. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="docElemNodeName" type="DOMString"/> +<var name="origDocElemNodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<nodeName var="origDocElemNodeName" obj="docElem"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<documentElement var="docElem" obj="doc"/> +<nodeName var="docElemNodeName" obj="docElem"/> +<assertEquals actual="docElemNodeName" expected='origDocElemNodeName' id="documentnormalizedocument01" ignoreCase="false"/> +</test> + + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument02.xml b/test/testcases/tests/level3/core/documentnormalizedocument02.xml new file mode 100644 index 0000000..0e41422 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument02.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument02"> +<metadata> +<title>documentnormalizedocument02</title> +<creator>IBM</creator> +<description> +Normalize a document with the 'cdata-sections' parameter set to false and +check if the CDATASection has been preserved. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="coalescing" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elemName" type="Element"/> +<var name="cdata" type="CDATASection"/> +<var name="text" type="Text"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<lastChild var="cdata" obj="elemName" interface="Node"/> +<nodeName var="nodeName" obj="cdata"/> +<assertEquals actual="nodeName" expected='"#cdata-section"' id="documentnormalizedocument02" ignoreCase="false"/> +<domConfig interface="Document" obj="doc" var="domConfig"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalizationError"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<lastChild var="cdata" obj="elemName" interface="Node"/> +<nodeName var="nodeName" obj="cdata"/> +<assertEquals actual="nodeName" expected='"#cdata-section"' id="documentnormalizedocument02_true" ignoreCase="false"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="false"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalization2Error"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<lastChild var="text" obj="elemName" interface="Node"/> +<nodeName var="nodeName" obj="text"/> +<assertEquals actual="nodeName" expected='"#text"' id="documentnormalizedocument02_false" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument03.xml b/test/testcases/tests/level3/core/documentnormalizedocument03.xml new file mode 100644 index 0000000..e7199a9 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument03.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument03"> +<metadata> +<title>documentnormalizedocument03</title> +<creator>IBM</creator> +<description> +Normalize a document with a created CDATA section with the +'cdata-sections' parameter set to true then to false and check if +the CDATASection has been preserved and then coalesced. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=416"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newCdata" type="CDATASection"/> +<var name="cdata" type="CDATASection"/> +<var name="text" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeValue" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createCDATASection var="newCdata" obj="doc" data='"CDATA"'/> +<appendChild obj="elem" var="appendedChild" newChild="newCdata"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalizationError"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="cdata" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="cdata"/> +<assertEquals actual="nodeName" expected='"#cdata-section"' id="documentnormalizedocument03_true" ignoreCase="false"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="false"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalization2Error"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="text" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="text"/> +<assertEquals actual="nodeName" expected='"#text"' id="documentnormalizedocument03_false" ignoreCase="false"/> +<nodeValue var="nodeValue" obj="text"/> +<assertEquals actual="nodeValue" expected='"barCDATA"' id="normalizedValue" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument04.xml b/test/testcases/tests/level3/core/documentnormalizedocument04.xml new file mode 100644 index 0000000..2dd69f9 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument04.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument04"> +<metadata> +<title>documentnormalizedocument04</title> +<creator>IBM</creator> +<description> + Append a Comment node and normalize with "comments" set to false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=416"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newComment" type="Comment"/> +<var name="lastChild" type="Node"/> +<var name="text" type="Text"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createComment var="newComment" obj="doc" data='"COMMENT_NODE"'/> +<appendChild obj="elem" var="appendedChild" newChild="newComment"/> +<domConfig interface="Document" obj="doc" var="domConfig" /> +<setParameter obj="domConfig" name='"comments"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalizationError"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="lastChild" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="lastChild"/> +<assertEquals actual="nodeName" expected='"#comment"' id="documentnormalizedocument04_true" ignoreCase="false"/> +<setParameter obj="domConfig" name='"comments"' value="false"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalization2Error"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="lastChild" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="lastChild"/> +<assertEquals actual="nodeName" expected='"#text"' id="hasChildText" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument05.xml b/test/testcases/tests/level3/core/documentnormalizedocument05.xml new file mode 100644 index 0000000..8f67f68 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument05.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument05"> +<metadata> +<title>documentnormalizedocument05</title> +<creator>Curt Arnold</creator> +<description> +Add a L1 element to a L2 namespace aware document and perform namespace normalization. Should result +in an error. +</description> +<date qualifier="created">2004-01-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms#normalizeDocumentAlgo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="newChild" type="Element"/> +<var name="retval" type="Element"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="problemNode" type="Node"/> +<var name="location" type="DOMLocator"/> +<var name="lineNumber" type="int"/> +<var name="columnNumber" type="int"/> +<var name="byteOffset" type="int"/> +<var name="utf16Offset" type="int"/> +<var name="uri" type="DOMString"/> +<var name="type" type="DOMString"/> +<var name="message" type="DOMString"/> +<var name="relatedException" type="DOMObject"/> +<var name="relatedData" type="DOMObject"/> +<var name="length" type="int"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createElement var="newChild" obj="doc" tagName='"br"'/> +<appendChild var="retval" obj="elem" newChild="newChild"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"namespaces"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if> + <equals actual="severity" expected="2" ignoreCase="false"/> + <!-- location should have relatedNode, everything else should be -1 or null --> + <location var="location" obj="error"/> + <relatedNode var="problemNode" obj="location" interface="DOMLocator"/> + <assertSame actual="problemNode" expected="newChild" id="relatedNodeIsL1Node"/> + <lineNumber var="lineNumber" obj="location"/> + <assertEquals actual="lineNumber" expected="-1" ignoreCase="false" id="lineNumber"/> + <columnNumber var="columnNumber" obj="location"/> + <assertEquals actual="columnNumber" expected="-1" ignoreCase="false" id="columnNumber"/> + <byteOffset var="byteOffset" obj="location"/> + <assertEquals actual="byteOffset" expected="-1" ignoreCase="false" id="byteOffset"/> + <utf16Offset var="utf16Offset" obj="location"/> + <assertEquals actual="utf16Offset" expected="-1" ignoreCase="false" id="utf16Offset"/> + <uri var="uri" obj="location" interface="DOMLocator"/> + <assertNull actual="uri" id="uri"/> + <!-- message and type should be non-empty --> + <message var="message" obj="error"/> + <length var="length" obj="message" interface="DOMString"/> + <assertTrue id="messageNotEmpty"> + <greater actual="length" expected="0"/> + </assertTrue> + <!-- can't make any assertions about type, relatedData and relatedException + other than access should not raise exception --> + <type var="type" obj="error" interface="DOMError"/> + <relatedData var="relatedData" obj="error"/> + <relatedException var="relatedException" obj="error"/> + <increment var="errorCount" value="1"/> + <else> + <assertEquals actual="severity" expected="1" ignoreCase="false" id="anyOthersShouldBeWarnings"/> + </else> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument06.xml b/test/testcases/tests/level3/core/documentnormalizedocument06.xml new file mode 100644 index 0000000..b527b5d --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument06.xml @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument06"> +<metadata> +<title>documentnormalizedocument06</title> +<creator>Curt Arnold</creator> +<description> +Add a CDATASection containing "]]>" perform normalization with split-cdata-sections=true. Should result +in an warning. +</description> +<date qualifier="created">2004-01-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-severity"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-message"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedException"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedData"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-location"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-line-number"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-column-number"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-byteOffset"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-utf16Offset"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-node"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-uri"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=542"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="elemList" type="NodeList"/> +<var name="newChild" type="CDATASection"/> +<var name="oldChild" type="Node"/> +<var name="retval" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="splittedCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="problemNode" type="Node"/> +<var name="location" type="DOMLocator"/> +<var name="lineNumber" type="int"/> +<var name="columnNumber" type="int"/> +<var name="byteOffset" type="int"/> +<var name="utf16Offset" type="int"/> +<var name="uri" type="DOMString"/> +<var name="type" type="DOMString"/> +<var name="message" type="DOMString"/> +<var name="relatedException" type="DOMObject"/> +<var name="relatedData" type="DOMObject"/> +<var name="length" type="int"/> +<var name="nodeType" type="int"/> +<var name="nodeValue" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<createCDATASection var="newChild" obj="doc" data='"this is not ]]> good"'/> +<firstChild var="oldChild" obj="elem" interface="Node"/> +<replaceChild var="retval" obj="elem" newChild="newChild" oldChild="oldChild"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"split-cdata-sections"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<firstChild var="newChild" obj="elem" interface="Node"/> +<!-- the first child should not be a CDATASection containing a ]]> --> +<nodeValue var="nodeValue" obj="newChild"/> +<nodeType var="nodeType" obj="newChild"/> +<assertFalse id="wasSplit"> + <and> + <equals actual="nodeType" expected="4" ignoreCase="false"/> + <contains obj="nodeValue" str='"]]>"' interface="DOMString"/> + </and> +</assertFalse> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <type var="type" obj="error" interface="DOMError"/> + <severity var="severity" obj="error"/> + <if> + <equals actual="type" expected='"cdata-sections-splitted"' ignoreCase="false"/> + <!-- related data is first split node --> + <relatedData var="relatedData" obj="error"/> + <assertSame actual="relatedData" expected="newChild" id="relatedData"/> + + <!-- severity is warning --> + <assertEquals actual="severity" expected="1" ignoreCase="false" id="severity"/> + + <!-- message should be non-empty --> + <message var="message" obj="error"/> + <length var="length" obj="message" interface="DOMString"/> + <assertTrue id="messageNotEmpty"> + <greater actual="length" expected="0"/> + </assertTrue> + + <!-- can't make any assertions about relatedException + other than access should not raise exception --> + <relatedException var="relatedException" obj="error"/> + + <!-- location should have relatedNode--> + <location var="location" obj="error"/> + <relatedNode var="problemNode" obj="location" interface="DOMLocator"/> + <assertSame actual="problemNode" expected="newChild" id="relatedNode"/> + + <!-- + can't make assertions about these values + --> + <lineNumber var="lineNumber" obj="location"/> + <columnNumber var="columnNumber" obj="location"/> + <byteOffset var="byteOffset" obj="location"/> + <utf16Offset var="utf16Offset" obj="location"/> + <uri var="uri" obj="location" interface="DOMLocator"/> + <increment var="splittedCount" value="1"/> + <else> + <assertEquals actual="severity" expected="1" ignoreCase="false" id="anyOthersShouldBeWarnings"/> + </else> + </if> +</for-each> +<assertEquals actual="splittedCount" expected="1" ignoreCase="false" id="oneSplittedWarning"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument07.xml b/test/testcases/tests/level3/core/documentnormalizedocument07.xml new file mode 100644 index 0000000..98562de --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument07.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument07"> +<metadata> +<title>documentnormalizedocument07</title> +<creator>Curt Arnold</creator> +<description> +Add a CDATASection containing "]]>" and perform normalization with split-cdata-sections=false. Should result +in an error. +</description> +<date qualifier="created">2004-01-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-severity"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-message"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedException"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedData"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-location"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-line-number"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-column-number"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-byteOffset"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-utf16Offset"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-node"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-uri"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=542"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="elemList" type="NodeList"/> +<var name="newChild" type="CDATASection"/> +<var name="oldChild" type="Node"/> +<var name="retval" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="problemNode" type="Node"/> +<var name="location" type="DOMLocator"/> +<var name="lineNumber" type="int"/> +<var name="columnNumber" type="int"/> +<var name="byteOffset" type="int"/> +<var name="utf16Offset" type="int"/> +<var name="uri" type="DOMString"/> +<var name="type" type="DOMString"/> +<var name="message" type="DOMString"/> +<var name="relatedException" type="DOMObject"/> +<var name="relatedData" type="DOMObject"/> +<var name="length" type="int"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="oldChild" obj="elem" interface="Node"/> +<createCDATASection var="newChild" obj="doc" data='"this is not ]]> good"'/> +<replaceChild var="retval" obj="elem" newChild="newChild" oldChild="oldChild"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"split-cdata-sections"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if> + <equals actual="severity" expected='2' ignoreCase="false"/> + <!-- location should have relatedNode --> + <location var="location" obj="error"/> + <relatedNode var="problemNode" obj="location" interface="DOMLocator"/> + <assertSame actual="problemNode" expected="newChild" id="relatedNode"/> + + <!-- + can't make assertions about these values + --> + <lineNumber var="lineNumber" obj="location"/> + <columnNumber var="columnNumber" obj="location"/> + <byteOffset var="byteOffset" obj="location"/> + <utf16Offset var="utf16Offset" obj="location"/> + <uri var="uri" obj="location" interface="DOMLocator"/> + + <!-- message should be non-empty --> + <message var="message" obj="error"/> + <length var="length" obj="message" interface="DOMString"/> + <assertTrue id="messageNotEmpty"> + <greater actual="length" expected="0"/> + </assertTrue> + <!-- can't make any assertions about type or relatedData + other than access should not raise exception --> + <type var="type" obj="error" interface="DOMError"/> + <relatedData var="relatedData" obj="error"/> + <relatedException var="relatedException" obj="error"/> + <increment var="errorCount" value="1"/> + <else> + <assertEquals actual="severity" expected="1" ignoreCase="false" id="anyOthersShouldBeWarnings"/> + </else> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument08.xml b/test/testcases/tests/level3/core/documentnormalizedocument08.xml new file mode 100644 index 0000000..0802c3a --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument08.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument08"> +<metadata> +<title>documentnormalizedocument08</title> +<creator>Curt Arnold</creator> +<description> +Add two CDATASections containing "]]>" perform normalization with split-cdata-sections=true. +Should result in two warnings and at least 4 nodes. +</description> +<date qualifier="created">2004-01-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="elemList" type="NodeList"/> +<var name="newChild" type="CDATASection"/> +<var name="oldChild" type="Node"/> +<var name="retval" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="length" type="int"/> +<var name="childNodes" type="NodeList"/> +<var name="type" type="DOMString"/> +<var name="splittedCount" type="int" value="0"/> +<var name="severity" type="int"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<createCDATASection var="newChild" obj="doc" data='"this is not ]]> good"'/> +<firstChild var="oldChild" obj="elem" interface="Node"/> +<replaceChild var="retval" obj="elem" newChild="newChild" oldChild="oldChild"/> +<createCDATASection var="newChild" obj="doc" data='"this is not ]]> good"'/> +<appendChild var="retval" obj="elem" newChild="newChild"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"split-cdata-sections"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <type var="type" obj="error" interface="DOMError"/> + <severity var="severity" obj="error"/> + <if> + <equals actual="type" expected='"cdata-sections-splitted"' ignoreCase="false"/> + <increment var="splittedCount" value="1"/> + <else> + <assertEquals actual="severity" expected="1" ignoreCase="false" id="anyOthersShouldBeWarnings"/> + </else> + </if> +</for-each> +<assertEquals actual="splittedCount" expected="2" ignoreCase="false" id="twoSplittedWarning"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<childNodes var="childNodes" obj="elem"/> +<length var="length" obj="childNodes" interface="NodeList"/> +<assertTrue id="atLeast4ChildNodes"><greater actual="length" expected="3"/></assertTrue> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument09.xml b/test/testcases/tests/level3/core/documentnormalizedocument09.xml new file mode 100644 index 0000000..03e740f --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument09.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument09"> +<metadata> +<title>documentnormalizedocument09</title> +<creator>IBM</creator> +<description> + The normalizeDocument method method acts as if the document was going through a save + and load cycle, putting the document in a "normal" form. + + Set the validate-if-schema feature to true. Invoke the normalizeDocument method on this + document. Retreive the documentElement node and check the nodeName of this node + to make sure it has not changed. Now set validate to false and verify the same. + Register an error handler on this Document and in each case make sure that it does + not get called. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="docElemNodeName" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="errorHandler" type="DOMErrorHandler"/> +<var name="errHandler" type="DOMErrorHandler"> + <handleError> + <assertFalse actual="true" id="documentnormalizedocument09_Err"/> + <return value="true"/> + </handleError> +</var> +<var name="domConfig" type="DOMConfiguration"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"error-handler"' value="errHandler"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate-if-schema"' value="true"/> +<if> +<isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate-if-schema"' value="true"/> +<normalizeDocument obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<nodeName var="docElemNodeName" obj="docElem"/> +<assertEquals actual="docElemNodeName" expected='"html"' id="documentnormalizedocument09_True" ignoreCase="false"/> +</if> +<setParameter obj="domConfig" name='"validate-if-schema"' value="false"/> +<normalizeDocument obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<nodeName var="docElemNodeName" obj="docElem"/> +<assertEquals actual="docElemNodeName" expected='"html"' id="documentnormalizedocument09_False" ignoreCase="false"/> +</test> + + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument10.xml b/test/testcases/tests/level3/core/documentnormalizedocument10.xml new file mode 100644 index 0000000..f5186f5 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument10.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument10"> +<metadata> +<title>documentnormalizedocument10</title> +<creator>IBM</creator> +<description> + The normalizeDocument method method acts as if the document was going through a save + and load cycle, putting the document in a "normal" form. + + Create an Element and a text node and verify the nodeValue of this text node and append these to + this Document. If supported, invoke the setParameter method on this domconfiguration object to set the + "element-content-whitespace" feature to false. Invoke the normalizeDocument method and verify if + the text node has been discarded. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newText" type="Text"/> +<var name="text" type="Text"/> +<var name="nodeValue" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="appendedChild" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElement var="elem" obj="doc" tagName='"newElem"'/> +<createTextNode var="newText" obj="doc" data='"Text + Node"'/> +<appendChild obj="elem" var="appendedChild" newChild="newText"/> +<appendChild obj="doc" var="appendedChild" newChild="elem"/> +<firstChild var="text" obj="elem" interface="Node"/> +<nodeValue var="nodeValue" obj="text"/> +<assertEquals actual="nodeValue" expected='"Text + Node"' id="documentnormalizedocument10" ignoreCase="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"element-content-whitespace"' value="true"/> +<assertTrue actual="canSet" id="canSetElementContentWhitespaceTrue"/> +<setParameter obj="domConfig" name='"element-content-whitespace"' value="true"/> +<normalizeDocument obj="doc"/> +<firstChild var="text" obj="elem" interface="Node"/> +<nodeValue var="nodeValue" obj="text"/> +<assertEquals actual="nodeValue" expected='"Text + Node"' id="documentnormalizedocument10_true1" ignoreCase="false"/> +<canSetParameter var="canSet" obj="domConfig" name='"element-content-whitespace"' value="false"/> +<if> +<isTrue value="canSet"/> +<setParameter obj="domConfig" name='"element-content-whitespace"' value="false"/> +<normalizeDocument obj="doc"/> +<firstChild var="text" obj="elem" interface="Node"/> +<nodeValue var="nodeValue" obj="text"/> +<assertEquals actual="nodeValue" expected='"Text Node"' id="documentnormalizedocument10_true2" ignoreCase="false"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument11.xml b/test/testcases/tests/level3/core/documentnormalizedocument11.xml new file mode 100644 index 0000000..3e9aec9 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument11.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument11"> +<metadata> +<title>documentnormalizedocument11</title> +<creator>IBM</creator> +<description> + The normalizeDocument method method acts as if the document was going through a save + and load cycle, putting the document in a "normal" form. + The feature namespace-declarations when set to false, discards all namespace declaration attributes, + although namespace prefixes are still retained. + + Set the normalization feature "namespace-declarations" to false, invoke normalizeDocument and verify + the nodeName of element acquired by tagname. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="ignoringElementContentWhitespace" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elemName" type="Element"/> +<var name="nodeName" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="domConfig" type="DOMConfiguration"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"namespace-declarations"' value="true"/> +<normalizeDocument obj="doc"/> +<getElementsByTagNameNS var="elemList" obj="doc" namespaceURI='"*"' localName='"acronym"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<assertNotNull actual="elemName" id="documentnormalizedocument11_NotNullElem"/> +<canSetParameter var="canSet" obj="domConfig" name='"namespace-declarations"' value="false"/> + +<if> +<isTrue value="canSet"/> +<setParameter obj="domConfig" name='"namespace-declarations"' value="false"/> +<normalizeDocument obj="doc"/> +<getElementsByTagNameNS var="elemList" obj="doc" namespaceURI='"*"' localName='"acronym"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<nodeName var="nodeName" obj="elemName"/> +<assertEquals actual="nodeName" expected='"address"' id="documentnormalizedocument11_namespaceDeclarations" ignoreCase="false"/> +</if> + +</test> + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument12.xml b/test/testcases/tests/level3/core/documentnormalizedocument12.xml new file mode 100644 index 0000000..0d5db65 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument12.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument12"> +<metadata> +<title>documentnormalizedocument12</title> +<creator>IBM</creator> +<description> + The normalizeDocument method method acts as if the document was going through a save + and load cycle, putting the document in a "normal" form. + + Set the validate feature to true. Invoke the normalizeDocument method on this + document. Retreive the documentElement node and check the nodeName of this node + to make sure it has not changed. Now set validate to false and verify the same. + Register an error handler on this Document and in each case make sure that it does + not get called. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="docElemNodeName" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorHandler" type="DOMErrorHandler"/> +<var name="errHandler" type="DOMErrorHandler"> + <handleError> + <assertFalse actual="true" id="documentnormalizedocument08_Err"/> + <return value="true"/> + </handleError> +</var> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"error-handler"' value="errHandler"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate"' value="true"/> +<if> +<isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate"' value="true"/> +<normalizeDocument obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<nodeName var="docElemNodeName" obj="docElem"/> +<assertEquals actual="docElemNodeName" expected='"html"' id="documentnormalizedocument08_True" ignoreCase="false"/> +</if> +<setParameter obj="domConfig" name='"validate"' value="false"/> +<normalizeDocument obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<nodeName var="docElemNodeName" obj="docElem"/> +<assertEquals actual="docElemNodeName" expected='"html"' id="documentnormalizedocument08_False" ignoreCase="false"/> +</test> + + diff --git a/test/testcases/tests/level3/core/documentnormalizedocument13.xml b/test/testcases/tests/level3/core/documentnormalizedocument13.xml new file mode 100644 index 0000000..51d52e1 --- /dev/null +++ b/test/testcases/tests/level3/core/documentnormalizedocument13.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentnormalizedocument13"> +<metadata> +<title>documentnormalizedocument13</title> +<creator>Curt Arnold</creator> +<description> +Add a L1 attribute to a L2 namespace aware document and perform namespace normalization. Should result +in an error. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms#normalizeDocumentAlgo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="newAttr" type="Attr"/> +<var name="retval" type="Element"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="problemNode" type="Node"/> +<var name="location" type="DOMLocator"/> +<var name="lineNumber" type="int"/> +<var name="columnNumber" type="int"/> +<var name="byteOffset" type="int"/> +<var name="utf16Offset" type="int"/> +<var name="uri" type="DOMString"/> +<var name="type" type="DOMString"/> +<var name="message" type="DOMString"/> +<var name="relatedException" type="DOMObject"/> +<var name="relatedData" type="DOMObject"/> +<var name="length" type="int"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<setAttribute obj="elem" name='"title"' value='"DOM L1 Attribute"'/> +<getAttributeNode var="newAttr" obj="elem" name='"title"'/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"namespaces"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if> + <equals actual="severity" expected="2" ignoreCase="false"/> + <!-- location should have relatedNode, everything else should be -1 or null --> + <location var="location" obj="error"/> + <relatedNode var="problemNode" obj="location" interface="DOMLocator"/> + <assertSame actual="problemNode" expected="newAttr" id="relatedNodeIsL1Node"/> + <lineNumber var="lineNumber" obj="location"/> + <assertEquals actual="lineNumber" expected="-1" ignoreCase="false" id="lineNumber"/> + <columnNumber var="columnNumber" obj="location"/> + <assertEquals actual="columnNumber" expected="-1" ignoreCase="false" id="columnNumber"/> + <byteOffset var="byteOffset" obj="location"/> + <assertEquals actual="byteOffset" expected="-1" ignoreCase="false" id="byteOffset"/> + <utf16Offset var="utf16Offset" obj="location"/> + <assertEquals actual="utf16Offset" expected="-1" ignoreCase="false" id="utf16Offset"/> + <uri var="uri" obj="location" interface="DOMLocator"/> + <assertNull actual="uri" id="uri"/> + <!-- message and type should be non-empty --> + <message var="message" obj="error"/> + <length var="length" obj="message" interface="DOMString"/> + <assertTrue id="messageNotEmpty"> + <greater actual="length" expected="0"/> + </assertTrue> + <!-- can't make any assertions about type, relatedData and relatedException + other than access should not raise exception --> + <type var="type" obj="error" interface="DOMError"/> + <relatedData var="relatedData" obj="error"/> + <relatedException var="relatedException" obj="error"/> + <increment var="errorCount" value="1"/> + <else> + <assertEquals actual="severity" expected="1" ignoreCase="false" id="anyOthersShouldBeWarnings"/> + </else> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentrenamenode01.xml b/test/testcases/tests/level3/core/documentrenamenode01.xml new file mode 100644 index 0000000..0954aae --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode01.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode01"> +<metadata> +<title>documentrenamenode01</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename the class attribute node of the + second element whose localName is acronym and namespaceURI http://www.nist.gov + with the new namespaceURI as http://www.w3.org/DOM/Test and name as pre0fix:renamedNode. + Check if this attribute has been renamed successfully by verifying the + nodeName, namespaceURI, nodeType attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="attr" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="renamedclass" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="1" interface="NodeList"/> +<getAttributeNode var="attr" obj="element" name='"class"'/> +<renameNode var="renamedclass" obj="doc" n="attr" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"renamedNode"'/> +<nodeName var="nodeName" obj="renamedclass"/> +<namespaceURI var="namespaceURI" obj="renamedclass" interface="Node"/> +<nodeType var="nodeType" obj="renamedclass"/> +<assertEquals expected='"renamedNode"' actual="nodeName" id="documentrenameode01_nodeName" ignoreCase="false"/> +<assertEquals expected="2" actual="nodeType" id="documentrenameNode01_nodeType" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/DOM/Test"' actual="namespaceURI" id="documentrenamenode01_nodeValue" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode02.xml b/test/testcases/tests/level3/core/documentrenamenode02.xml new file mode 100644 index 0000000..9cb60d4 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode02.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode02"> +<metadata> +<title>documentrenamenode02</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename the class attribute node of the + second element whose localName is acronym and namespaceURI http://www.nist.gov + with the new namespaceURI as http://www.w3.org/DOM/Test and name as prefi0x:renamedNode. + Check if this attribute has been renamed successfully by verifying the + nodeName, namespaceURI, nodeType attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="attr" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="renamedclass" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="1" interface="NodeList"/> +<getAttributeNode var="attr" obj="element" name='"class"'/> +<renameNode var="renamedclass" obj="doc" n="attr" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"prefi0x:renamedNode"'/> +<nodeName var="nodeName" obj="renamedclass"/> +<namespaceURI var="namespaceURI" obj="renamedclass" interface="Node"/> +<nodeType var="nodeType" obj="renamedclass"/> +<assertEquals expected='"prefi0x:renamedNode"' actual="nodeName" id="documentrenamenode02_nodeName" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/DOM/Test"' actual="namespaceURI" id="documentrenamenode02_namespaceURI" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode03.xml b/test/testcases/tests/level3/core/documentrenamenode03.xml new file mode 100644 index 0000000..6464c04 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode03.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode03"> +<metadata> +<title>documentrenamenode03</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename a new attribute node to one whose + namespaceURI is http://www.w3.org/DOM/Test and name is pre0:fix1. + Check if this attribute has been renamed successfully by verifying the + nodeName, namespaceURI, nodeType attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr" type="Attr"/> +<var name="renamedNode" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="attr" obj="doc" namespaceURI="nullNSURI" qualifiedName='"test"'/> +<renameNode var="renamedNode" obj="doc" n="attr" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"pre0:fix1"'/> +<nodeName var="nodeName" obj="renamedNode"/> +<namespaceURI var="namespaceURI" obj="renamedNode" interface="Node"/> +<assertEquals expected='"pre0:fix1"' actual="nodeName" id="documentrenamenode03_nodeName" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/DOM/Test"' actual="namespaceURI" id="documentrenamenode02_namespaceURI" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode04.xml b/test/testcases/tests/level3/core/documentrenamenode04.xml new file mode 100644 index 0000000..bb43fd7 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode04.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode04"> +<metadata> +<title>documentrenamenode04</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename a new attribute node to one whose + namespaceURI is null and name is pf. + Check if this attribute has been renamed successfully by verifying the + nodeName, namespaceURI, nodeType attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr" type="Attr"/> +<var name="renamedNode" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<renameNode var="renamedNode" obj="doc" n="attr" namespaceURI='""' qualifiedName='"title"'/> +<nodeName var="nodeName" obj="renamedNode"/> +<namespaceURI var="namespaceURI" obj="renamedNode" interface="Node"/> +<assertEquals expected='"title"' actual="nodeName" id="documentrenamenode04_nodeName" ignoreCase="false"/> +<assertNull actual="namespaceURI" id="documentrenamenode04_namespaceURI"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode05.xml b/test/testcases/tests/level3/core/documentrenamenode05.xml new file mode 100644 index 0000000..66e3df7 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode05.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode05"> +<metadata> +<title>documentrenamenode05</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename a new attribute node to one whose + namespaceURI is null and name is rened. + Check if this attribute has been renamed successfully by verifying the + nodeName, namespaceURI, nodeType attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr" type="Attr"/> +<var name="renamedNode" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<renameNode var="renamedNode" obj="doc" n="attr" namespaceURI="nullNSURI" qualifiedName='"title"'/> +<nodeName var="nodeName" obj="renamedNode"/> +<namespaceURI var="namespaceURI" obj="renamedNode" interface="Node"/> +<assertNull actual="namespaceURI" id="documentrenamenode05_namespaceURI"/> +<assertEquals expected='"title"' actual="nodeName" id="documentrenamenode05_nodeName" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode06.xml b/test/testcases/tests/level3/core/documentrenamenode06.xml new file mode 100644 index 0000000..b689049 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode06.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode06"> +<metadata> +<title>documentrenamenode06</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename the default attribute "dir" to xsi:schemaLocation. + Check if this attribute has been renamed successfully by verifying the + nodeName, namespaceURI, nodeType attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="attr" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="renamedclass" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="element" obj="childList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="element" name='"dir"'/> +<renameNode var="renamedclass" obj="doc" n="attr" namespaceURI='"http://www.w3.org/2001/XMLSchema-instance"' qualifiedName='"xsi:schemaLocation"'/> +<nodeName var="nodeName" obj="renamedclass"/> +<namespaceURI var="namespaceURI" obj="renamedclass" interface="Node"/> +<nodeType var="nodeType" obj="renamedclass"/> +<assertEquals expected='"xsi:schemaLocation"' actual="nodeName" id="documentrenameode01_nodeName" ignoreCase="false"/> +<assertEquals expected="2" actual="nodeType" id="documentrenameNode01_nodeType" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/2001/XMLSchema-instance"' actual="namespaceURI" id="documentrenamenode01_nodeValue" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode07.xml b/test/testcases/tests/level3/core/documentrenamenode07.xml new file mode 100644 index 0000000..642a568 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode07.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode07"> +<metadata> +<title>documentrenamenode07</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method on a new document node to rename a new attribute node + to one whose namespaceURI is http://www.w3.org/XML/1998/namespace and name is xml:dom. + Check if this attribute has been renamed successfully by verifying the + nodeName and namespaceURI attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="attr" type="Attr"/> +<var name="renamedNode" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createAttributeNS var="attr" obj="newDoc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<renameNode var="renamedNode" obj="newDoc" n="attr" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:dom"'/> +<nodeName var="nodeName" obj="renamedNode"/> +<namespaceURI var="namespaceURI" obj="renamedNode" interface="Node"/> +<assertEquals expected='"xml:dom"' actual="nodeName" id="documentrenamenode07_nodeName" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/XML/1998/namespace"' actual="namespaceURI" id="documentrenamenode07_namespaceURI" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode08.xml b/test/testcases/tests/level3/core/documentrenamenode08.xml new file mode 100644 index 0000000..ca74f44 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode08.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode08"> +<metadata> +<title>documentrenamenode08</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method on a new document node and try to rename the default + attribute "dir" + Check if a WRONG_DOCUMENT_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="element" type="Element"/> +<var name="attr" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="renamedNode" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="docElemNS" type="DOMString"/> +<var name="docElemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="element" obj="childList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="element" name='"dir"'/> +<implementation var="domImpl" obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="docElemNS" obj="docElem" interface="Node"/> +<tagName var="docElemName" obj="docElem"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='docElemNS' qualifiedName='docElemName' doctype="nullDocType"/> +<assertDOMException id="documentrenamenode08_WRONG_DOCUMENT_ERR"> +<WRONG_DOCUMENT_ERR> +<renameNode var="renamedNode" obj="newDoc" n="attr" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +</WRONG_DOCUMENT_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode09.xml b/test/testcases/tests/level3/core/documentrenamenode09.xml new file mode 100644 index 0000000..fcf2240 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode09.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode09"> +<metadata> +<title>documentrenamenode09</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node. When the specified node was created + from a different document than this document, a WRONG_DOCUMENT_ERR exception is thrown. + + Invoke the renameNode method on a new Document node to rename a new attribute node + created in the original Document, but later adopted by this new document node. The + ownerDocument attribute of this attribute has now changed, such that the attribute node is considered to + be created from this new document node. Verify that no exception is thrown upon renaming and verify + the new nodeName of this attribute node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="attr" type="Attr"/> +<var name="renamedNode" type="Node"/> +<var name="adopted" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="attrNodeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom:newD"' doctype="nullDocType"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"test"'/> +<adoptNode obj="newDoc" var="adopted" source="attr"/> +<renameNode var="renamedNode" obj="newDoc" n="attr" namespaceURI='"http://www.w3.org/2000/xmlns/"' qualifiedName='"xmlns:xmlns"'/> +<nodeName var="attrNodeName" obj="renamedNode"/> +<assertEquals actual="attrNodeName" expected='"xmlns:xmlns"' id="documentrenamenode09_1" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode10.xml b/test/testcases/tests/level3/core/documentrenamenode10.xml new file mode 100644 index 0000000..3b48c24 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode10.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode10"> +<metadata> +<title>documentrenamenode10</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NAMESPACE_ERR + if the qualifiedName has a prefix and the namespaceURI is null but a + NOT_SUPPORTED_ERR should be raised since the the type of the specified node is + neither ELEMENT_NODE nor ATTRIBUTE_NODE. + + Invoke the renameNode method on a new document node to rename a node to nodes + with malformed qualifiedNames. + Check if a NOT_SUPPORTED_ERR gets thrown instead of a NAMESPACE_ERR. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="textEntry" type="DOMString" value='"hello"'/> +<var name="textNode" type="Text"/> +<var name="renamedNode" type="Node"/> +<var name="qualifiedName" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="qualifiedNames" type="List"> +<member>"_:"</member> +<member>":0"</member> +<member>":"</member> +<member>"a0:0"</member> +<member>"_:0;"</member> +<member>"a:::::c"</member> +</var> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="textNode" data="textEntry" obj="doc"/> +<for-each collection="qualifiedNames" member="qualifiedName"> +<assertDOMException id="documentrenamenode10_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="textNode" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName="qualifiedName"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode11.xml b/test/testcases/tests/level3/core/documentrenamenode11.xml new file mode 100644 index 0000000..ee20cef --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode11.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode11"> +<metadata> +<title>documentrenamenode11</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NAMESPACE_ERR + if the qualifiedName has a prefix and the namespaceURI is null but a + NOT_SUPPORTED_ERR should be raised since the the type of the specified node is + neither ELEMENT_NODE nor ATTRIBUTE_NODE. + + Invoke the renameNode method on this document node to rename a text node such that its + qualifiedName has a prefix and namespaceURI is null. + Check if a NOT_SUPPORTED_ERR gets thrown instead of a NAMESPACE_ERR. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="textEntry" type="DOMString" value='"hello"'/> +<var name="textNode" type="Text"/> +<var name="renamedNode" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="textNode" data="textEntry" obj="doc"/> +<assertDOMException id="documentrenamenode11_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="textNode" namespaceURI="nullNSURI" qualifiedName='"pre:fix"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode12.xml b/test/testcases/tests/level3/core/documentrenamenode12.xml new file mode 100644 index 0000000..10f8329 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode12.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode12"> +<metadata> +<title>documentrenamenode12</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NAMESPACE_ERR + if the qualifiedName has a prefix and the namespaceURI is null but a + NOT_SUPPORTED_ERR should be raised since the the type of the specified node is + neither ELEMENT_NODE nor ATTRIBUTE_NODE. + + Invoke the renameNode method on this document node to rename a text node such that its + qualifiedName has a prefix that is "xml" and namespaceURI is "http://www.w3.org/XML/1999/namespace". + Check if a NOT_SUPPORTED_ERR gets thrown instead of a NAMESPACE_ERR since the type of node is not valid + for this method. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="renamedNode" type="Node"/> +<var name="textEntry" type="DOMString" value='"hello"'/> +<var name="textNode" type="Text"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="textNode" data="textEntry" obj="doc"/> +<assertDOMException id="documentrenamenode12_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="textNode" namespaceURI='"http://www.w3.org/XML/1999/namespace"' qualifiedName='"xml:prefix"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode13.xml b/test/testcases/tests/level3/core/documentrenamenode13.xml new file mode 100644 index 0000000..5b9aba7 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode13.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode13"> +<metadata> +<title>documentrenamenode13</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NAMESPACE_ERR + if the qualifiedName has a prefix and the namespaceURI is null but a + NOT_SUPPORTED_ERR should be raised since the the type of the specified node is + neither ELEMENT_NODE nor ATTRIBUTE_NODE. + + Invoke the renameNode method on this document node to rename a text node such that its + qualifiedName has a prefix that is "xmlns"and namespaceURI is "http://www.w3.org/XML/1998/namespace". + Check if a NOT_SUPPORTED_ERR gets thrown instead of a NAMESPACE_ERR since the type of node is not valid + for this method. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="textEntry" type="DOMString" value='"hello"'/> +<var name="textNode" type="Text"/> +<var name="renamedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="textNode" data="textEntry" obj="doc"/> +<assertDOMException id="documentrenamenode13_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="textNode" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xmlns:prefix"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode14.xml b/test/testcases/tests/level3/core/documentrenamenode14.xml new file mode 100644 index 0000000..f74061c --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode14.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode14"> +<metadata> +<title>documentrenamenode14</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NAMESPACE_ERR + if the qualifiedName has a prefix and the namespaceURI is null but a + NOT_SUPPORTED_ERR should be raised since the the type of the specified node is + neither ELEMENT_NODE nor ATTRIBUTE_NODE. + + Invoke the renameNode method on this document node to rename a text node such that its + qualifiedName is "xmlns"and namespaceURI is "http://www.w3.org/2000/xmlns". + Check if a NOT_SUPPORTED_ERR gets thrown instead of a NAMESPACE_ERR since the type of node is + not valid for this method. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="renamedNode" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="textEntry" type="DOMString" value='"hello"'/> +<var name="textNode" type="Text"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="textNode" data="textEntry" obj="doc"/> +<assertDOMException id="documentrenamenode14_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="textNode" namespaceURI='"http://www.w3.org/2000/xmlns"' qualifiedName='"xmlns"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode15.xml b/test/testcases/tests/level3/core/documentrenamenode15.xml new file mode 100644 index 0000000..f4791d6 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode15.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode15"> +<metadata> +<title>documentrenamenode15</title> +<creator>IBM</creator> +<description> + Rename the fourth acronym element to svg:rect and verify the + nodeName, namespaceURI, nodeType attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="renamedclass" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="3" interface="NodeList"/> +<renameNode var="renamedclass" obj="doc" n="element" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"qnam:renamedNode"'/> +<nodeName var="nodeName" obj="renamedclass"/> +<namespaceURI var="namespaceURI" obj="renamedclass" interface="Node"/> +<nodeType var="nodeType" obj="renamedclass"/> +<assertEquals expected='"qnam:renamedNode"' actual="nodeName" id="documentrenamenode15_nodeName" ignoreCase="false"/> +<assertEquals expected="1" actual="nodeType" id="documentrenamenode15_nodeType" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/DOM/Test"' actual="namespaceURI" id="documentrenamenode15_nodeValue" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode16.xml b/test/testcases/tests/level3/core/documentrenamenode16.xml new file mode 100644 index 0000000..9b4ef0a --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode16.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode16"> +<metadata> +<title>documentrenamenode16</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename the fourth + acronym element with a new namespaceURI that is + null and qualifiedName that is renamedNode. + Check if this element has been renamed successfully by verifying the + nodeName, attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="renamedclass" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="3" interface="NodeList"/> +<renameNode var="renamedclass" obj="doc" n="element" namespaceURI="nullNSURI" qualifiedName='"renamedNode"'/> +<nodeName var="nodeName" obj="renamedclass"/> +<namespaceURI var="namespaceURI" obj="renamedclass" interface="Node"/> +<nodeType var="nodeType" obj="renamedclass"/> +<assertEquals expected='"renamedNode"' actual="nodeName" id="documentrenamenode16_nodeName" ignoreCase="false"/> +<assertEquals expected="1" actual="nodeType" id="documentrenamenode16_nodeType" ignoreCase="false"/> +<assertNull actual="namespaceURI" id="documentrenamenode16_nodeValue"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode17.xml b/test/testcases/tests/level3/core/documentrenamenode17.xml new file mode 100644 index 0000000..e4f9146 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode17.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode17"> +<metadata> +<title>documentrenamenode17</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to rename a new element node of a new document so that + its namespaceURI is http://www.w3.org/2000/xmlns/ and qualifiedName is xmlns:xmlns. + Check if this element has been renamed successfully by verifying the + nodeName, attributes of the renamed node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="element" type="Element"/> +<var name="renamedNode" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="namespaceURI" type="DOMString"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootTagname' doctype="nullDocType"/> +<createElementNS var="element" obj="newDoc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"body"'/> +<renameNode var="renamedNode" obj="newDoc" n="element" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:head"'/> +<nodeName var="nodeName" obj="renamedNode"/> +<namespaceURI var="namespaceURI" obj="renamedNode" interface="Node"/> +<nodeType var="nodeType" obj="renamedNode"/> +<assertEquals expected='"xhtml:head"' actual="nodeName" id="documentrenamenode16_nodeName" ignoreCase="false"/> +<assertEquals expected="1" actual="nodeType" id="documentrenamenode16_nodeType" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/1999/xhtml"' actual="namespaceURI" id="documentrenamenode16_nodeValue" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode18.xml b/test/testcases/tests/level3/core/documentrenamenode18.xml new file mode 100644 index 0000000..413a166 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode18.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode18"> +<metadata> +<title>documentrenamenode18</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method on this document and try to rename a new element + node of a new document. + Check if a WRONG_DOCUMENT_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="element" type="Element"/> +<var name="renamedNode" type="Node"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootTagname' doctype="nullDocType"/> +<createElementNS var="element" obj="newDoc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"body"'/> +<assertDOMException id="documentrenamenode18_WRONG_DOCUMENT_ERR"> +<WRONG_DOCUMENT_ERR> +<renameNode var="renamedNode" obj="doc" n="element" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"head"'/> +</WRONG_DOCUMENT_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode19.xml b/test/testcases/tests/level3/core/documentrenamenode19.xml new file mode 100644 index 0000000..b344496 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode19.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode19"> +<metadata> +<title>documentrenamenode19</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NAMESPACE_ERR + if the qualifiedName is malformed per the Namespaces in XML specification. + + Invoke the renameNode method on a new document node to rename a node to nodes + with malformed qualifiedNames. + Check if a NAMESPACE_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="element" type="Element"/> +<var name="renamedNode" type="Node"/> +<var name="qualifiedName" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="qualifiedNames" type="List"> +<member>"a_:"</member> +<member>"_:"</member> +<member>":"</member> +<member>"::0;"</member> +<member>"a:-:c"</member> +</var> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"newD"' doctype="nullDocType"/> +<createElementNS var="element" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"test"'/> +<for-each collection="qualifiedNames" member="qualifiedName"> +<assertDOMException id="documentrenamenode19_NAMESPACE_ERR"> +<NAMESPACE_ERR> +<renameNode var="renamedNode" obj="doc" n="element" namespaceURI='"http://www.w3.org/2000/XMLNS"' qualifiedName="qualifiedName"/> +</NAMESPACE_ERR> +</assertDOMException> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode20.xml b/test/testcases/tests/level3/core/documentrenamenode20.xml new file mode 100644 index 0000000..f63d9e4 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode20.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode20"> +<metadata> +<title>documentrenamenode20</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method on this document node to rename a node such that its + qualifiedName has a prefix that is "xml:html" and namespaceURI is + "http://www.example.com/namespace". + Check if a NAMESPACE_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="renamedNode" type="Node"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<createElementNS var="element" obj="doc" namespaceURI='rootNS' qualifiedName='rootTagname'/> +<assertDOMException id="throw_NAMESPACE_ERR"> +<NAMESPACE_ERR> +<renameNode var="renamedNode" obj="doc" n="element" namespaceURI='"http://www.example.com/xml"' qualifiedName='"xml:html"'/> +</NAMESPACE_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode21.xml b/test/testcases/tests/level3/core/documentrenamenode21.xml new file mode 100644 index 0000000..4b4c30d --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode21.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode21"> +<metadata> +<title>documentrenamenode21</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method on this document node to rename a node such that its + qualifiedName has a prefix that is "xmlns:xml"and namespaceURI is "http://www.w3.org/2000/XMLNS/". + Check if a NAMESPACE_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="attr" type="Attr"/> +<var name="renamedNode" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createAttributeNS var="attr" obj="newDoc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<assertDOMException id="throw_NAMESPACE_ERR"> +<NAMESPACE_ERR> +<renameNode var="renamedNode" obj="newDoc" n="attr" namespaceURI='"http://www.w3.org/2000/XMLNS/"' qualifiedName='"xmlns:xml"'/> +</NAMESPACE_ERR> +</assertDOMException> +</test> + diff --git a/test/testcases/tests/level3/core/documentrenamenode22.xml b/test/testcases/tests/level3/core/documentrenamenode22.xml new file mode 100644 index 0000000..221d124 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode22.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode22"> +<metadata> +<title>documentrenamenode22</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method on this document node to rename a node such that its + qualifiedName is "xmlns"and namespaceURI is "http://www.w3.org/1999/xmlns/". + Check if a NAMESPACE_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr" type="Attr"/> +<var name="renamedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<assertDOMException id="throw_NAMESPACE_ERR"> +<NAMESPACE_ERR> +<renameNode var="renamedNode" obj="doc" n="attr" namespaceURI='"http://www.w3.org/1999/xmlns/"' qualifiedName='"xmlns"'/> +</NAMESPACE_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode23.xml b/test/testcases/tests/level3/core/documentrenamenode23.xml new file mode 100644 index 0000000..0adc62e --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode23.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode23"> +<metadata> +<title>documentrenamenode23</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NOT_SUPPORTED_ERR + if the type of the specified node is neither ELEMENT_NODE nor ATTRIBUTE_NODE. + + Invoke the renameNode method on this document node to attempt to rename itself. + Check if a NOT_SUPPORTED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="renamedNode" type="Node"/> +<var name="docowner" type="Document"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<assertDOMException id="documentrenamenode23_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"root"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode24.xml b/test/testcases/tests/level3/core/documentrenamenode24.xml new file mode 100644 index 0000000..6b4d0cb --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode24.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode24"> +<metadata> +<title>documentrenamenode24</title> +<creator>IBM</creator> +<description> + The method renameNode renames an existing node and raises a NOT_SUPPORTED_ERR + if the type of the specified node is neither ELEMENT_NODE nor ATTRIBUTE_NODE. + + Invoke the renameNode method on this document node to attempt to rename itself. + The namespaceURI specified here is null and the name has a prefix. + Check if a NOT_SUPPORTED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="renamedNode" type="Node"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<var name="docowner" type="Document"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<assertDOMException id="documentrenamenode24_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="doc" namespaceURI="nullNSURI" qualifiedName='"doc:root"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode25.xml b/test/testcases/tests/level3/core/documentrenamenode25.xml new file mode 100644 index 0000000..93f2450 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode25.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode25"> +<metadata> +<title>documentrenamenode25</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to attempt to rename a DOcumentType node of this Document. + Check if a NOT_SUPPORTED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="renamedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<assertDOMException id="documentrenamenode25_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="docType" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"root"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> + diff --git a/test/testcases/tests/level3/core/documentrenamenode26.xml b/test/testcases/tests/level3/core/documentrenamenode26.xml new file mode 100644 index 0000000..ba797cb --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode26.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode26"> +<metadata> +<title>documentrenamenode26</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method oto attempt to rename a new DocumentFragment node + of this Document. + Check if a NOT_SUPPORTED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="renamedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<assertDOMException id="documentrenamenode26_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNode" obj="doc" n="docFrag" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"root"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> + diff --git a/test/testcases/tests/level3/core/documentrenamenode27.xml b/test/testcases/tests/level3/core/documentrenamenode27.xml new file mode 100644 index 0000000..bced06a --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode27.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode27"> +<metadata> +<title>documentrenamenode27</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to attempt to rename new Text, Comment, CDataSection, + ProcessingInstruction and EntityReference nodes of a new Document. + Check if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="text" type="Text"/> +<var name="comment" type="Comment"/> +<var name="cdata" type="CDATASection"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="entref" type="EntityReference"/> +<var name="renamedTxt" type="Node"/> +<var name="renamedComment" type="Node"/> +<var name="renamedCdata" type="Node"/> +<var name="renamedPi" type="Node"/> +<var name="renamedEntRef" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createTextNode var="text" obj="newDoc" data='"text"'/> +<createComment var="comment" obj="newDoc" data='"comment"'/> +<createCDATASection var="cdata" obj="newDoc" data='"cdata"'/> +<createProcessingInstruction var="pi" obj="newDoc" target='"pit"' data='"pid"'/> +<createEntityReference var="entref" obj="newDoc" name='"alpha"'/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR_1"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedTxt" obj="newDoc" n="text" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"text"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +<assertDOMException id="throw_NOT_SUPPORTED_ERR_2"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedComment" obj="newDoc" n="comment" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"comment"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +<assertDOMException id="throw_NOT_SUPPORTED_ERR_3"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedCdata" obj="newDoc" n="cdata" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"cdata"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +<assertDOMException id="throw_NOT_SUPPORTED_ERR_4"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedPi" obj="newDoc" n="pi" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"pi"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +<assertDOMException id="throw_NOT_SUPPORTED_ERR_5"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedEntRef" obj="newDoc" n="entref" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"entref"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> + diff --git a/test/testcases/tests/level3/core/documentrenamenode28.xml b/test/testcases/tests/level3/core/documentrenamenode28.xml new file mode 100644 index 0000000..cd838e1 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode28.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode28"> +<metadata> +<title>documentrenamenode28</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to attempt to rename a Entity and Notation nodes of this Document. + Check if a NOT_SUPPORTED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entityNodeMap" type="NamedNodeMap"/> +<var name="notationNodeMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="notation" type="Notation"/> +<var name="renamedEntityNode" type="Node"/> +<var name="renamedNotationNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entityNodeMap" obj="docType"/> +<notations var="notationNodeMap" obj="docType"/> +<getNamedItem var="entity" obj="entityNodeMap" name='"alpha"'/> +<getNamedItem var="notation" obj="notationNodeMap" name='"notation1"'/> +<assertDOMException id="documentrenamenode28_ENTITY_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedEntityNode" obj="doc" n="entity" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"beta"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +<assertDOMException id="documentrenamenode28_NOTATION_NOT_SUPPORTED_ERR"> +<NOT_SUPPORTED_ERR> +<renameNode var="renamedNotationNode" obj="doc" n="notation" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"notation2"'/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentrenamenode29.xml b/test/testcases/tests/level3/core/documentrenamenode29.xml new file mode 100644 index 0000000..ed90425 --- /dev/null +++ b/test/testcases/tests/level3/core/documentrenamenode29.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentrenamenode29"> +<metadata> +<title>documentrenamenode29</title> +<creator>IBM</creator> +<description> + Invoke the renameNode method to attempt to rename an Element node of a XML1.0 document + with a name that contains an invalid XML 1.0 character and check if a INVALID_CHARACTER_ERR + gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="renamed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<assertDOMException id="documentrenamenode29_ENTITY_NOT_SUPPORTED_ERR"> +<INVALID_CHARACTER_ERR> +<renameNode var="renamed" obj="doc" n="docElem" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"@"'/> +</INVALID_CHARACTER_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentsetdocumenturi01.xml b/test/testcases/tests/level3/core/documentsetdocumenturi01.xml new file mode 100644 index 0000000..9c964ec --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetdocumenturi01.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetdocumenturi01"> +<metadata> +<title>documentsetdocumenturi01</title> +<creator>IBM</creator> +<description> + The setDocmentURI method set the location of the document. + + Set the documentURI to a valid string and retreive the documentURI of this + document and verify if it is was correctly set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentURI obj="doc" value='"file:///test"'/> +<documentURI var="docURI" obj="doc" /> +<assertEquals actual="docURI" expected='"file:///test"' id="documentsetdocumenturi01" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentsetdocumenturi02.xml b/test/testcases/tests/level3/core/documentsetdocumenturi02.xml new file mode 100644 index 0000000..7d02526 --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetdocumenturi02.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetdocumenturi02"> +<metadata> +<title>documentsetdocumenturi02</title> +<creator>IBM</creator> +<description> + The setDocmentURI method set the location of the document. + + Set the documentURI to null and retreive the documentURI of this document and verify + if it is was set to null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docURI" type="DOMString"/> +<var name="nullValue" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentURI obj="doc" value="nullValue"/> +<documentURI var="docURI" obj="doc" /> +<assertNull actual="docURI" id="documentsetdocumenturi02"/> +</test> diff --git a/test/testcases/tests/level3/core/documentsetdocumenturi03.xml b/test/testcases/tests/level3/core/documentsetdocumenturi03.xml new file mode 100644 index 0000000..2091efd --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetdocumenturi03.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetdocumenturi03"> +<metadata> +<title>documentsetdocumenturi03</title> +<creator>IBM</creator> +<description> + The setDocmentURI method set the location of the document. + + Create a new document and set its documentURI to a valid string. Retreive the documentURI + and verify if it is was correctly set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docURI" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<documentURI obj="newDoc" value='"somestring"'/> +<documentURI var="docURI" obj="newDoc" /> +<assertEquals actual="docURI" expected='"somestring"' id="documentsetdocumenturi03" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/documentsetstricterrorchecking01.xml b/test/testcases/tests/level3/core/documentsetstricterrorchecking01.xml new file mode 100644 index 0000000..59c85f6 --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetstricterrorchecking01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetstricterrorchecking01"> +<metadata> +<title>documentsetstricterrorchecking01</title> +<creator>IBM</creator> +<description> + Set the strictErrorChecking attribute value on this documentNode to false and then to true. + Call the createAttributeNS method on this document with an illegal character in the qualifiedName + and check if the INVALID_CHARACTER_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newAttr" type="Attr"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<strictErrorChecking obj="doc" value="false"/> +<strictErrorChecking obj="doc" value="true"/> +<assertDOMException id="INVALID_CHARACTER_ERR_documentsetstricterrorchecking01"> +<INVALID_CHARACTER_ERR> +<createAttributeNS obj="doc" var="newAttr" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"@"'/> +</INVALID_CHARACTER_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentsetstricterrorchecking02.xml b/test/testcases/tests/level3/core/documentsetstricterrorchecking02.xml new file mode 100644 index 0000000..95d869d --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetstricterrorchecking02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetstricterrorchecking02"> +<metadata> +<title>documentsetstricterrorchecking02</title> +<creator>IBM</creator> +<description> + Set the strictErrorChecking attribute value on a new Document to true. + Call the createAttributeNS method on this document with a a null namespaceURI and a qualified name + with a prefix and check if the NAMESPACE_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newAttr" type="Attr"/> +<var name="nullValue" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<strictErrorChecking obj="doc" value="true"/> +<assertDOMException id="NAMESPACE_ERR_documentsetstricterrorchecking02"> +<NAMESPACE_ERR> +<createAttributeNS obj="doc" var="newAttr" namespaceURI="nullValue" qualifiedName='"dom:test"'/> +</NAMESPACE_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/documentsetstricterrorchecking03.xml b/test/testcases/tests/level3/core/documentsetstricterrorchecking03.xml new file mode 100644 index 0000000..a0adbac --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetstricterrorchecking03.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetstricterrorchecking03"> +<metadata> +<title>documentsetstricterrorchecking03</title> +<creator>IBM</creator> +<description> + Set the strictErrorChecking attribute value on a new Document to false and check if it was + correctly set using getStrictErrorChecking. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking"/> +</metadata> +<var name="doc" type="Document"/> +<var name="strictErrorCheckingValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<strictErrorChecking obj="doc" value="false"/> +<strictErrorChecking var="strictErrorCheckingValue" obj="doc" /> +<assertFalse actual="strictErrorCheckingValue" id="documentsetstricterrorchecking03"/> +</test> diff --git a/test/testcases/tests/level3/core/documentsetxmlstandalone01.xml b/test/testcases/tests/level3/core/documentsetxmlstandalone01.xml new file mode 100644 index 0000000..434a061 --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetxmlstandalone01.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetxmlstandalone01"> +<metadata> +<title>documentsetxmlstandalone01</title> +<creator>IBM</creator> +<description> + Set the standalone attribute of this document to true and verify if the attribute was correctly + set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone"/> +</metadata> +<var name="doc" type="Document"/> +<var name="standalone" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<xmlStandalone obj="doc" value="true"/> +<xmlStandalone var="standalone" obj="doc" /> +<assertTrue actual="standalone" id="documentsetxmlstandalone01"/> +</test> diff --git a/test/testcases/tests/level3/core/documentsetxmlstandalone02.xml b/test/testcases/tests/level3/core/documentsetxmlstandalone02.xml new file mode 100644 index 0000000..c541090 --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetxmlstandalone02.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetxmlstandalone02"> +<metadata> +<title>documentsetxmlstandalone02</title> +<creator>IBM</creator> +<description> + Create a new document object and set standalone to false and check if it was correctly set. + Then repeat this by setting it to true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="standalone" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<xmlStandalone obj="newDoc" value="false"/> +<xmlStandalone var="standalone" obj="newDoc"/> +<assertFalse actual="standalone" id="documentsetxmlstandalone02_false"/> +<xmlStandalone obj="newDoc" value="true"/> +<xmlStandalone var="standalone" obj="newDoc"/> +<assertTrue actual="standalone" id="documentsetxmlstandalone02_true"/> +</test> diff --git a/test/testcases/tests/level3/core/documentsetxmlversion01.xml b/test/testcases/tests/level3/core/documentsetxmlversion01.xml new file mode 100644 index 0000000..b79d1d0 --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetxmlversion01.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetxmlversion01"> +<metadata> +<title>documentsetxmlversion01</title> +<creator>IBM</creator> +<description> + Set the value of the version attribute of the XML declaration of this document to + various invalid characters and verify if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="versionValue" type="DOMString"/> +<var name="illegalVersion" type="List"> +<member>"{"</member> +<member>"}"</member> +<member>"~"</member> +<member>"'"</member> +<member>"!"</member> +<member>"@"</member> +<member>"#"</member> +<member>"$"</member> +<member>"%"</member> +<member>"^"</member> +<member>"&"</member> +<member>"*"</member> +<member>"("</member> +<member>")"</member> +<member>"+"</member> +<member>"="</member> +<member>"["</member> +<member>"]"</member> +<member>"\\"</member> +<member>"/"</member> +<member>";"</member> +<member>"`"</member> +<member>"<"</member> +<member>">"</member> +<member>","</member> +<member>"a "</member> +<member>"\""</member> +<member>"---"</member> +</var> +<load var="doc" href="hc_staff" willBeModified="true"/> +<for-each collection="illegalVersion" member="versionValue"> +<assertDOMException id="NOT_SUPPORTED_ERR_documentsetversion01"> +<NOT_SUPPORTED_ERR> +<xmlVersion obj="doc" value='versionValue' interface="Document"/> +</NOT_SUPPORTED_ERR> +</assertDOMException> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/documentsetxmlversion02.xml b/test/testcases/tests/level3/core/documentsetxmlversion02.xml new file mode 100644 index 0000000..4444b38 --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetxmlversion02.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetxmlversion02"> +<metadata> +<title>documentsetxmlversion02</title> +<creator>IBM</creator> +<description> + Set the value of the version attribute of the XML declaration of a new document to "1.0" + and check if it was correctly set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="versionValue" type="DOMString"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<xmlVersion obj="newDoc" value='"1.0"' interface="Document"/> +<xmlVersion var="versionValue" obj="newDoc" interface="Document"/> +<assertEquals actual="versionValue" expected='"1.0"' id="documentsetxmlversion02" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentsetxmlversion03.xml b/test/testcases/tests/level3/core/documentsetxmlversion03.xml new file mode 100644 index 0000000..383608d --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetxmlversion03.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetxmlversion03"> +<metadata> +<title>documentsetxmlversion03</title> +<creator>IBM</creator> +<description> + Set the value of the version attribute of the XML declaration of a new document to "1.0" + and check if it was correctly set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2003-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="versionValue" type="DOMString"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<xmlVersion obj="newDoc" value='"1.1"' interface="Document"/> +<xmlVersion var="versionValue" obj="newDoc" interface="Document"/> +<assertEquals actual="versionValue" expected='"1.1"' id="documentsetxmlversion03" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/documentsetxmlversion05.xml b/test/testcases/tests/level3/core/documentsetxmlversion05.xml new file mode 100644 index 0000000..50de4f8 --- /dev/null +++ b/test/testcases/tests/level3/core/documentsetxmlversion05.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="documentsetxmlversion05"> +<metadata> +<title>documentsetxmlversion05</title> +<creator>IBM</creator> +<description> + Set the value of the version attribute of the XML declaration of a new document to "-" + and check if a NOT_SUPPORTED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <xmlVersion obj="newDoc" value='"-"' interface="Document"/> + </NOT_SUPPORTED_ERR> +</assertDOMException> +</test> + diff --git a/test/testcases/tests/level3/core/domconfigcanonicalform1.xml b/test/testcases/tests/level3/core/domconfigcanonicalform1.xml new file mode 100644 index 0000000..e8d7239 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigcanonicalform1.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigcanonicalform1"> + <metadata> + <title>domconfigcanonicalform1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "canonical-form" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-property"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"cAnOnical-form"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be false after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setTrueNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigcdatasections1.xml b/test/testcases/tests/level3/core/domconfigcdatasections1.xml new file mode 100644 index 0000000..12b778e --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigcdatasections1.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigcdatasections1"> + <metadata> + <title>domconfigcdatasections1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "cdata-sections" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"cDaTa-sections"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigcheckcharacternormalization1.xml b/test/testcases/tests/level3/core/domconfigcheckcharacternormalization1.xml new file mode 100644 index 0000000..3f17dda --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigcheckcharacternormalization1.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigcheckcharacternormalization1"> + <metadata> + <title>domconfigcheckcharacternormalization1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "check-character-normalization" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"cHeCk-character-normalization"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be false after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setTrueNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigcomments1.xml b/test/testcases/tests/level3/core/domconfigcomments1.xml new file mode 100644 index 0000000..3958ab4 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigcomments1.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigcomments1"> + <metadata> + <title>domconfigcomments1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "comments" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"cOmments"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigdatatypenormalization1.xml b/test/testcases/tests/level3/core/domconfigdatatypenormalization1.xml new file mode 100644 index 0000000..cdf95f9 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigdatatypenormalization1.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigdatatypenormalization1"> + <metadata> + <title>domconfigdatatypenormalization1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "datatype-normalization" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"dAtAtype-normalization"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be false after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setTrueNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigdatatypenormalization2.xml b/test/testcases/tests/level3/core/domconfigdatatypenormalization2.xml new file mode 100644 index 0000000..ca3462b --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigdatatypenormalization2.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigdatatypenormalization2"> + <metadata> + <title>domconfigdatatypenormalization2</title> + <creator>Curt Arnold</creator> + <description>Setting "datatype-normalization" to true also forces "validate" to true.</description> + <date qualifier="created">2004-02-24</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"datatype-normalization"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <!-- set validate to false --> + <setParameter obj="domConfig" name='"validate"' value="false"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <if><isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name='"validate"'/> + <assertTrue actual="state" id="validateSet"/> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigelementcontentwhitespace1.xml b/test/testcases/tests/level3/core/domconfigelementcontentwhitespace1.xml new file mode 100644 index 0000000..0f5ae21 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigelementcontentwhitespace1.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigelementcontentwhitespace1"> + <metadata> + <title>domconfigelementcontentwhitespace1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "element-content-whitespace" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"eLeMent-content-whitespace"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be true after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setFalseNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="true"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigentities1.xml b/test/testcases/tests/level3/core/domconfigentities1.xml new file mode 100644 index 0000000..58103e6 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigentities1.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigentities1"> + <metadata> + <title>domconfigentities1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "entities" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"eNtIties"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigerrorhandler1.xml b/test/testcases/tests/level3/core/domconfigerrorhandler1.xml new file mode 100644 index 0000000..234e0d4 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigerrorhandler1.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigerrorhandler1"> + <metadata> + <title>domconfigerrorhandler1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "error-handler" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-error-handler"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=544"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="origHandler" type="DOMErrorHandler"/> + <var name="state" type="DOMErrorHandler"/> + <var name="parameter" type="DOMString" value='"eRrOr-handler"'/> + <var name="errorHandler" type="DOMErrorHandler"> + <handleError> + <return value="true"/> + </handleError> + </var> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="origHandler" obj="domConfig" name="parameter"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="errorHandler"/> + <assertTrue actual="canSet" id="canSetNewHandler"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="origHandler"/> + <assertTrue actual="canSet" id="canSetOrigHandler"/> + <setParameter obj="domConfig" name="parameter" value="errorHandler"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertSame expected="errorHandler" actual="state" id="setToNewHandlerEffective"/> + <setParameter obj="domConfig" name="parameter" value="origHandler"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertSame expected="origHandler" actual="state" id="setToOrigHandlerEffective"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <!-- + should return false for strongly typed languages + however if weakly typed, then should be consistent with setParameter + --> + <if><isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigerrorhandler2.xml b/test/testcases/tests/level3/core/domconfigerrorhandler2.xml new file mode 100644 index 0000000..efdac09 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigerrorhandler2.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigerrorhandler2"> + <metadata> + <title>domconfigerrorhandler2</title> + <creator>Curt Arnold</creator> + <description>Calls DOMConfiguration.setParameter("error-handler", null). Spec + does not explicitly address the case.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-error-handler"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="errorHandler" type="DOMErrorHandler" isNull="true"/> + <var name="parameter" type="DOMString" value='"error-handler"'/> + <var name="state" type="DOMErrorHandler"/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="errorHandler"/> + <assertTrue actual="canSet" id="canSetNull"/> + <setParameter obj="domConfig" name="parameter" value="errorHandler"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertNull actual="state" id="errorHandlerIsNull"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfiginfoset1.xml b/test/testcases/tests/level3/core/domconfiginfoset1.xml new file mode 100644 index 0000000..f35ed5e --- /dev/null +++ b/test/testcases/tests/level3/core/domconfiginfoset1.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfiginfoset1"> + <metadata> + <title>domconfiginfoset1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "infoset" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"iNfOset"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <!-- default for infoset is false since entities default is true --> + <assertFalse actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + + <getParameter var="state" obj="domConfig" name='"entities"'/> + <assertFalse actual="state" id="entitiesSetFalse"/> + <getParameter var="state" obj="domConfig" name='"cdata-sections"'/> + <assertFalse actual="state" id="cdataSectionsSetFalse"/> + + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setFalseIsNoOp"/> + + <setParameter obj="domConfig" name='"entities"' value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setEntitiesTrueInvalidatesInfoset"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfignamespacedeclarations1.xml b/test/testcases/tests/level3/core/domconfignamespacedeclarations1.xml new file mode 100644 index 0000000..3c1dd8f --- /dev/null +++ b/test/testcases/tests/level3/core/domconfignamespacedeclarations1.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfignamespacedeclarations1"> + <metadata> + <title>domconfigcomments1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "namespace-declarations" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"nAmEspace-declarations"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfignamespaces1.xml b/test/testcases/tests/level3/core/domconfignamespaces1.xml new file mode 100644 index 0000000..59d681f --- /dev/null +++ b/test/testcases/tests/level3/core/domconfignamespaces1.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfignamespaces1"> + <metadata> + <title>domconfignamespaces1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "namespaces" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"nAmEspaces"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be true after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setFalseNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="true"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfignamespaces2.xml b/test/testcases/tests/level3/core/domconfignamespaces2.xml new file mode 100644 index 0000000..40b213f --- /dev/null +++ b/test/testcases/tests/level3/core/domconfignamespaces2.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfignamespaces2"> + <metadata> + <title>domconfignamespaces2</title> + <creator>Curt Arnold</creator> + <description>Document.getParameter("namespaces") should be true regardles if the + parse that created the document was namespace aware.</description> + <date qualifier="created">2004-02-24</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration"/> + </metadata> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <load var="doc" href="barfoo" willBeModified="false"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name='"namespaces"'/> + <assertTrue actual="state" id="namespacesTrue"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfignormalizecharacters1.xml b/test/testcases/tests/level3/core/domconfignormalizecharacters1.xml new file mode 100644 index 0000000..5f71876 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfignormalizecharacters1.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfignormalizecharacters1"> + <metadata> + <title>domconfignormalizecharacters1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "normalize-characters" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"nOrMalize-characters"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be false after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setTrueNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigparameternames01.xml b/test/testcases/tests/level3/core/domconfigparameternames01.xml new file mode 100644 index 0000000..7ebac73 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigparameternames01.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigparameternames01"> + <metadata> + <title>domconfigparameternames01</title> + <creator>Curt Arnold</creator> + <description>Checks getParameterNames and canSetParameter for Document.domConfig.</description> + <date qualifier="created">2004-01-22</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-domConfig"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-error-handler"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="parameterNames" type="DOMStringList"/> + <var name="parameterName" type="DOMString"/> + <var name="matchCount" type="int" value="0"/> + <var name="paramValue" type="DOMUserData"/> + <var name="canSet" type="boolean"/> + <load var="doc" href="barfoo" willBeModified="false"/> + <domConfig var="config" obj="doc" interface="Document"/> + <assertNotNull actual="config" id="configNotNull"/> + <parameterNames var="parameterNames" obj="config"/> + <assertNotNull actual="parameterNames" id="parameterNamesNotNull"/> + <for-each collection="parameterNames" member="parameterName"> + <!-- get the default value of this parameter --> + <getParameter var="paramValue" obj="config" name="parameterName"/> + <!-- should be able to set to default value --> + <canSetParameter var="canSet" obj="config" name="parameterName" value="paramValue"/> + <assertTrue actual="canSet" id="canSetToDefaultValue"/> + <setParameter obj="config" name="parameterName" value="paramValue"/> + <if> + <or> + <equals actual="parameterName" expected='"canonical-form"' ignoreCase="true"/> + <equals actual="parameterName" expected='"cdata-sections"' ignoreCase="true"/> + <equals actual="parameterName" expected='"check-character-normalization"' ignoreCase="true"/> + <equals actual="parameterName" expected='"comments"' ignoreCase="true"/> + <equals actual="parameterName" expected='"datatype-normalization"' ignoreCase="true"/> + <equals actual="parameterName" expected='"entities"' ignoreCase="true"/> + <equals actual="parameterName" expected='"error-handler"' ignoreCase="true"/> + <equals actual="parameterName" expected='"infoset"' ignoreCase="true"/> + <equals actual="parameterName" expected='"namespaces"' ignoreCase="true"/> + <equals actual="parameterName" expected='"namespace-declarations"' ignoreCase="true"/> + <equals actual="parameterName" expected='"normalize-characters"' ignoreCase="true"/> + <equals actual="parameterName" expected='"split-cdata-sections"' ignoreCase="true"/> + <equals actual="parameterName" expected='"validate"' ignoreCase="true"/> + <equals actual="parameterName" expected='"validate-if-schema"' ignoreCase="true"/> + <equals actual="parameterName" expected='"well-formed"' ignoreCase="true"/> + <equals actual="parameterName" expected='"element-content-whitespace"' ignoreCase="true"/> + </or> + <increment var="matchCount" value="1"/> + </if> + </for-each> + <assertEquals actual="matchCount" expected="16" id="definedParameterCount" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigschemalocation1.xml b/test/testcases/tests/level3/core/domconfigschemalocation1.xml new file mode 100644 index 0000000..6e9a9b1 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigschemalocation1.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigschemalocation1"> + <metadata> + <title>domconfigschemalocation1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "schema-location" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-location"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="DOMString"/> + <var name="parameter" type="DOMString" value='"sChEma-location"'/> + <var name="nullSchemaLocation" type="DOMString" isNull="true"/> + <var name="sampleSchemaLocation" type="DOMString" value='"http://www.example.com/schemas/sampleschema.xsd"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertFalse actual="canSet" id="canSetTrue"/> + <try> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertNull actual="state" id="defaultSchemaLocation"/> + <catch> + <DOMException code="NOT_FOUND_ERR"> + <return/> + </DOMException> + </catch> + </try> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="sampleSchemaLocation"/> + <assertTrue actual="canSet" id="canSetURI"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="nullSchemaLocation"/> + <assertTrue actual="canSet" id="canSetNull"/> + <setParameter obj="domConfig" name="parameter" value="sampleSchemaLocation"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertEquals actual="state" expected="sampleSchemaLocation" ignoreCase="false" id="setURIEffective"/> + <setParameter obj="domConfig" name="parameter" value="nullSchemaLocation"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertNull actual="state" id="setNullEffective"/> +</test> diff --git a/test/testcases/tests/level3/core/domconfigschematype1.xml b/test/testcases/tests/level3/core/domconfigschematype1.xml new file mode 100644 index 0000000..8fc739c --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigschematype1.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigschematype1"> + <metadata> + <title>domconfigschematype1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "schema-type" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="DOMString"/> + <var name="parameter" type="DOMString" value='"sChEma-type"'/> + <var name="xmlSchemaType" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + <var name="dtdType" type="DOMString" value='"http://www.w3.org/TR/REC-xml"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertFalse actual="canSet" id="canSetTrue"/> + <try> + <getParameter var="state" obj="domConfig" name="parameter"/> + <catch> + <DOMException code="NOT_FOUND_ERR"> + <return/> + </DOMException> + </catch> + </try> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="dtdType"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="dtdType"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertEquals actual="state" expected="dtdType" ignoreCase="false" id="setDTDEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_dtd"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="dtdType"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="xmlSchemaType"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="xmlSchemaType"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertEquals actual="state" expected="xmlSchemaType" ignoreCase="false" id="setSchemaEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_schema"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="xmlSchemaType"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> diff --git a/test/testcases/tests/level3/core/domconfigsplitcdatasections1.xml b/test/testcases/tests/level3/core/domconfigsplitcdatasections1.xml new file mode 100644 index 0000000..3268929 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigsplitcdatasections1.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigsplitcdatasections1"> + <metadata> + <title>domconfigsplitcdatasections1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "split-cdata-sections" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"sPlIt-cdata-sections"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigurationcansetparameter01.xml b/test/testcases/tests/level3/core/domconfigurationcansetparameter01.xml new file mode 100644 index 0000000..264a29f --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigurationcansetparameter01.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationcansetparameter01"> +<metadata> +<title>domconfigurationcansetparameter01</title> +<creator>IBM</creator> +<description> + The parameter commments is turned on by default. Check to see if this feature can be set + to false by invoking canSetParameter method. Also check that this method does not change the + value of parameter. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-11-06</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="newCommentNode" type="Comment"/> +<var name="docElem" type="Element"/> +<var name="appendedChild" type="Node"/> +<var name="lastChild" type="Node"/> +<var name="commentValue" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createComment obj="doc" var="newCommentNode" data='"This is a new Comment node"'/> +<documentElement obj="doc" var="docElem" interface="Document"/> +<appendChild obj="docElem" var="appendedChild" newChild="newCommentNode" interface="Node"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter obj="domConfig" var="canSet" name='"comments"' value="false"/> +<assertTrue actual="canSet" id="domconfigurationcansetparameter01"/> +<normalizeDocument obj="doc"/> +<lastChild obj="docElem" var="lastChild" interface="Node"/> +<nodeValue obj="lastChild" var="commentValue" interface="Node"/> +<assertEquals actual="commentValue" expected='"This is a new Comment node"' id="domconfigurationsetparameter02_2" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/domconfigurationcansetparameter02.xml b/test/testcases/tests/level3/core/domconfigurationcansetparameter02.xml new file mode 100644 index 0000000..b183536 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigurationcansetparameter02.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationcansetparameter02"> +<metadata> +<title>domconfigurationcansetparameter02</title> +<creator>IBM</creator> +<description> +Check that canSetParameter('cdata-sections') returns true for both true and false +and that calls to the method do not actually change the parameter value. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-11-06</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="paramVal" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter obj="domConfig" var="canSet" name='"cdata-sections"' value="false"/> +<assertTrue actual="canSet" id="canSetFalse"/> +<getParameter var="paramVal" obj="domConfig" name='"cdata-sections"'/> +<assertTrue actual="paramVal" id="valueStillTrue"/> +<canSetParameter obj="domConfig" var="canSet" name='"cdata-sections"' value="true"/> +<assertTrue actual="canSet" id="canSetTrue"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="false"/> +<canSetParameter obj="domConfig" var="canSet" name='"cdata-sections"' value="true"/> +<assertTrue actual="canSet" id="canSetTrueFromFalse"/> +<getParameter var="paramVal" obj="domConfig" name='"cdata-sections"'/> +<assertFalse actual="paramVal" id="valueStillFalse"/> +<canSetParameter obj="domConfig" var="canSet" name='"cdata-sections"' value="false"/> +<assertTrue actual="canSet" id="canSetFalseFromFalse"/> +</test> diff --git a/test/testcases/tests/level3/core/domconfigurationcansetparameter03.xml b/test/testcases/tests/level3/core/domconfigurationcansetparameter03.xml new file mode 100644 index 0000000..3562c27 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigurationcansetparameter03.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationcansetparameter03"> +<metadata> +<title>domconfigurationcansetparameter03</title> +<creator>IBM</creator> +<description> + The canSetParameter method checks if setting a parameter to a specific value is supported. + + The parameter entities is turned on by default. Check to see if this feature can be set + to false by invoking canSetParameter method. Also check that this method does not change the + value of parameter by checking if entities still exist in the document. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-11-06</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/> +</metadata> +<!-- required for normalizeDocument --> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<var name="entity" type="Entity"/> +<var name="entityName" type="DOMString"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter obj="domConfig" var="canSet" name='"entities"' value="false"/> +<assertTrue actual="canSet" id="canSetFalse"/> +<normalizeDocument obj="doc"/> +<doctype obj="doc" var="docType" interface="Document"/> +<entities obj="docType" var="entitiesMap" interface="DocumentType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"epsilon"'/> +<assertNotNull actual="entity" id="entityNotNull"/> +<nodeName obj="entity" var="entityName" interface="Node"/> +<assertEquals actual="entityName" expected='"epsilon"' id="entityName" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/domconfigurationcansetparameter04.xml b/test/testcases/tests/level3/core/domconfigurationcansetparameter04.xml new file mode 100644 index 0000000..7f24039 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigurationcansetparameter04.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationcansetparameter04"> +<metadata> +<title>domconfigurationcansetparameter04</title> +<creator>IBM</creator> +<description> + The parameter entities is turned on by default. Check to see if this feature can be set + to false by invoking canSetParameter method. Also check that this method does not change the + value of parameter by checking if entity references still exist in the document. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-11-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="acronymList" type="NodeList"/> +<var name="acronymElem" type="Node"/> +<var name="nodeType" type="int"/> +<var name="first" type="Node"/> +<var name="canSet" type="boolean"/> +<var name="paramVal" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter obj="domConfig" var="canSet" name='"entities"' value="false"/> +<assertTrue actual="canSet" id="canSetFalse"/> +<!-- checking if it can be set false should not actually change it --> +<getParameter var="paramVal" obj="domConfig" name='"entities"'/> +<assertTrue actual="paramVal" id="stillTrue"/> +<!-- or change the behavior of normalize document --> +<normalizeDocument obj="doc"/> +<getElementsByTagName var="acronymList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="acronymList" index="1" interface="NodeList"/> +<firstChild var="first" obj="acronymElem" interface="Node"/> +<nodeType var="nodeType" obj="first" interface="Node"/> +<assertEquals actual="nodeType" expected="5" id="entityRefPreserved" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/domconfigurationcansetparameter06.xml b/test/testcases/tests/level3/core/domconfigurationcansetparameter06.xml new file mode 100644 index 0000000..513231c --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigurationcansetparameter06.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationcansetparameter06"> +<metadata> +<title>domconfigurationcansetparameter06</title> +<creator>IBM</creator> +<description> +Check that canSetParameter('element-content-whitespace', true) returns true +and that canSetParameter('element-content-whitespace) does not change value of +parameter. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-11-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="itemList" type="NodeList"/> +<var name="elementBody" type="Element"/> +<var name="textNode" type="Text"/> +<var name="canSet" type="boolean"/> +<var name="canSetFalse" type="boolean"/> +<var name="paramVal" type="boolean"/> +<var name="hasWhitespace" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<!-- return value may be either true or false, + but the call should success and not actually change the value --> +<canSetParameter obj="domConfig" var="canSetFalse" name='"element-content-whitespace"' value="false"/> +<getParameter var="paramVal" obj="domConfig" name='"element-content-whitespace"'/> +<assertTrue actual="paramVal" id="stillTrue"/> +<if><isTrue value="canSetFalse"/> + <!-- if it can be set false, actually set it --> + <setParameter obj="domConfig" name='"element-content-whitespace"' value="false"/> +</if> +<canSetParameter obj="domConfig" var="canSet" name='"element-content-whitespace"' value="true"/> +<assertTrue actual="canSet" id="canSetTrue"/> +<if><isTrue value="canSetFalse"/> + <getParameter var="paramVal" obj="domConfig" name='"element-content-whitespace"'/> + <assertFalse actual="paramVal" id="stillFalse"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domconfigurationgetparameter01.xml b/test/testcases/tests/level3/core/domconfigurationgetparameter01.xml new file mode 100644 index 0000000..815a061 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigurationgetparameter01.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationgetparameter01"> +<metadata> +<title>domconfigurationgetparameter01</title> +<creator>IBM</creator> +<description> + The method getParameter returns the value of a parameter if known. + + Get the DOMConfiguration object of a document and verify that the default required features are set + to true. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-11-07</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="param" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<getParameter obj="domConfig" var="param" name='"comments"'/> +<assertTrue actual="param" id="domconfigurationgetparameter01_1"/> +<getParameter obj="domConfig" var="param" name='"cdata-sections"'/> +<assertTrue actual="param" id="domconfigurationgetparameter01_2"/> +<getParameter obj="domConfig" var="param" name='"entities"'/> +<assertTrue actual="param" id="domconfigurationgetparameter01_3"/> +<getParameter obj="domConfig" var="param" name='"namespace-declarations"'/> +<assertTrue actual="param" id="domconfigurationgetparameter01_4"/> +<getParameter obj="domConfig" var="param" name='"infoset"'/> +<assertFalse actual="param" id="domconfigurationgetparameter01_5"/> +</test> diff --git a/test/testcases/tests/level3/core/domconfigurationgetparameter02.xml b/test/testcases/tests/level3/core/domconfigurationgetparameter02.xml new file mode 100644 index 0000000..e6c5838 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigurationgetparameter02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationgetparameter02"> +<metadata> +<title>domconfigurationgetparameter02</title> +<creator>IBM</creator> +<description> + The method getParameter returns the value of a parameter if known. + + Get the DOMConfiguration object of a document and verify that a NOT_FOUND_ERR is thrown if the parameter + is not found. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-11-07</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="param" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<assertDOMException id="domconfigurationgetparameter02_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<getParameter obj="domConfig" var="param" name='"not-found-param"'/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/domconfigvalidate1.xml b/test/testcases/tests/level3/core/domconfigvalidate1.xml new file mode 100644 index 0000000..0376aa1 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigvalidate1.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigvalidate1"> + <metadata> + <title>domconfigvalidate1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "validate" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"vAlIdate"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be false after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setTrueNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigvalidateifschema1.xml b/test/testcases/tests/level3/core/domconfigvalidateifschema1.xml new file mode 100644 index 0000000..c572603 --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigvalidateifschema1.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigvalidateifschema1"> + <metadata> + <title>domconfigvalidateifschema1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "validate-if-schema" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"vAlIdate-if-schema"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="true"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setTrueEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <!-- should still be false after failed attempt --> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setTrueNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domconfigwellformed1.xml b/test/testcases/tests/level3/core/domconfigwellformed1.xml new file mode 100644 index 0000000..cc9f1bc --- /dev/null +++ b/test/testcases/tests/level3/core/domconfigwellformed1.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigwellformed1"> + <metadata> + <title>domconfigwellformed1</title> + <creator>Curt Arnold</creator> + <description>Checks behavior of "well-formed" configuration parameter.</description> + <date qualifier="created">2004-01-10</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="doc" type="Document"/> + <var name="domConfig" type="DOMConfiguration"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="canSet" type="boolean"/> + <var name="state" type="boolean"/> + <var name="parameter" type="DOMString" value='"wElL-formed"'/> + <implementation var="domImpl"/> + <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> + <domConfig var="domConfig" obj="doc" interface="Document"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="defaultFalse"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="domConfig" name="parameter" value="false"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="domConfig" name="parameter" value="false"/> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertFalse actual="state" id="setFalseEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <setParameter obj="domConfig" name="parameter" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + <getParameter var="state" obj="domConfig" name="parameter"/> + <assertTrue actual="state" id="setFalseNotEffective"/> + </else> + </if> + <setParameter obj="domConfig" name="parameter" value="true"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/core/domimplementationgetfeature01.xml b/test/testcases/tests/level3/core/domimplementationgetfeature01.xml new file mode 100644 index 0000000..7575fb2 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationgetfeature01.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationgetfeature01"> +<metadata> +<title>domimplementationgetfeature01</title> +<creator>IBM</creator> +<description> + Invoke getFeature method on this DOMImplementation with the value of the feature parameter + as Core and version as 2.0. This should return a DOMImplmentation object that's not null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="domImplReturned" type="DOMImplementation"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation obj="doc" var="domImpl"/> +<getFeature var="domImplReturned" obj="domImpl" feature='"Core"' version='"2.0"' interface="DOMImplementation"/> +<assertNotNull actual="domImplReturned" id="domimplementationgetfeature01" /> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationgetfeature02.xml b/test/testcases/tests/level3/core/domimplementationgetfeature02.xml new file mode 100644 index 0000000..2e6a0b5 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationgetfeature02.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationgetfeature02"> +<metadata> +<title>domimplementationgetfeature02</title> +<creator>IBM</creator> +<description> + Invoke getFeature method on this DOMImplementation with the value of the feature parameter + as Core and version as "". This should return a DOMImplementation object that's not null. + +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="domImplReturned" type="DOMImplementation"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation obj="doc" var="domImpl"/> +<getFeature var="domImplReturned" obj="domImpl" feature='"Core"' version='""' interface="DOMImplementation"/> +<assertNotNull actual="domImplReturned" id="domimplementationgetfeature02" /> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationgetfeature03.xml b/test/testcases/tests/level3/core/domimplementationgetfeature03.xml new file mode 100644 index 0000000..6d06910 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationgetfeature03.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationgetfeature03"> +<metadata> +<title>domimplementationgetfeature03</title> +<creator>IBM</creator> +<description> + Invoke getFeature method on this DOMImplementation with the value of the feature parameter + as Core and version as null. This should return a DOMImplementation object that's not null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="domImplReturned" type="DOMImplementation"/> +<var name="nodeName" type="DOMString"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation obj="doc" var="domImpl"/> +<getFeature var="domImplReturned" obj="domImpl" feature='"Core"' version="nullVersion" interface="DOMImplementation"/> +<assertNotNull actual="domImplReturned" id="domimplementationgetfeature03" /> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationgetfeature05.xml b/test/testcases/tests/level3/core/domimplementationgetfeature05.xml new file mode 100644 index 0000000..2113dce --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationgetfeature05.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationgetfeature05"> +<metadata> +<title>domimplementationgetfeature05</title> +<creator>IBM</creator> +<description> + Invoke getFeature method on this DOMImplementation with the value of the feature parameter + as "" and version equal to null. This should return a null DOMObject. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="domImplReturned" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation obj="doc" var="domImpl"/> +<getFeature var="domImplReturned" obj="domImpl" feature='""' version="nullVersion" interface="DOMImplementation"/> +<assertNull actual="domImplReturned" id="domimplementationgetFeature05" /> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationgetfeature06.xml b/test/testcases/tests/level3/core/domimplementationgetfeature06.xml new file mode 100644 index 0000000..f34b6bd --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationgetfeature06.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationgetfeature06"> +<metadata> +<title>domimplementationgetfeature06</title> +<creator>IBM</creator> +<description> + Invoke getFeature method on this DOMImplementation with the value of the feature parameter + as "1-1" (some junk) and version equal to "*". This should return a null DOMObject. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="domImplReturned" type="DOMImplementation"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation obj="doc" var="domImpl"/> +<getFeature var="domImplReturned" obj="domImpl" feature='"1-1"' version='"*"' interface="DOMImplementation"/> +<assertNull actual="domImplReturned" id="domimplementationgetfeature06" /> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry01.xml b/test/testcases/tests/level3/core/domimplementationregistry01.xml new file mode 100644 index 0000000..9fc02aa --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry01.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry01"> +<metadata> +<title>domimplementationregistry01</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.newInstance() (Java) or DOMImplementationRegistry global variable +(ECMAScript) should not be null. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry02.xml b/test/testcases/tests/level3/core/domimplementationregistry02.xml new file mode 100644 index 0000000..0505559 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry02"> +<metadata> +<title>domimplementationregistry02</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("cOrE") should return a DOMImplementation +where hasFeature("Core", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" features='"cOrE"' interface="DOMImplementationRegistry"/> +<assertNotNull actual="domImpl" id="domImplNotNull"/> +<hasFeature var="hasFeature" obj="domImpl" feature='"Core"' version="nullVersion"/> +<assertTrue actual="hasFeature" id="hasCore"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry03.xml b/test/testcases/tests/level3/core/domimplementationregistry03.xml new file mode 100644 index 0000000..a7d2eab --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry03.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry03"> +<metadata> +<title>domimplementationregistry03</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("cOrE 3.0") should return a DOMImplementation +where hasFeature("Core", "3.0") returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" features='"cOrE 3.0"' interface="DOMImplementationRegistry"/> +<assertNotNull actual="domImpl" id="domImplNotNull"/> +<hasFeature var="hasFeature" obj="domImpl" feature='"Core"' version='"3.0"'/> +<assertTrue actual="hasFeature" id="hasCore"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry04.xml b/test/testcases/tests/level3/core/domimplementationregistry04.xml new file mode 100644 index 0000000..6d8419b --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry04.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry04"> +<metadata> +<title>domimplementationregistry04</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("+cOrE") should return a DOMImplementation +where hasFeature("+Core", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" features='"+cOrE"' interface="DOMImplementationRegistry"/> +<assertNotNull actual="domImpl" id="domImplNotNull"/> +<hasFeature var="hasFeature" obj="domImpl" feature='"+Core"' version="nullVersion"/> +<assertTrue actual="hasFeature" id="hasCore"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry05.xml b/test/testcases/tests/level3/core/domimplementationregistry05.xml new file mode 100644 index 0000000..e0dee44 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry05.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry05"> +<metadata> +<title>domimplementationregistry05</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("+cOrE 3.0") should return a DOMImplementation +where hasFeature("+Core", "3.0") returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" features='"+cOrE 3.0"' interface="DOMImplementationRegistry"/> +<assertNotNull actual="domImpl" id="domImplNotNull"/> +<hasFeature var="hasFeature" obj="domImpl" feature='"+Core"' version='"3.0"'/> +<assertTrue actual="hasFeature" id="hasCore"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry06.xml b/test/testcases/tests/level3/core/domimplementationregistry06.xml new file mode 100644 index 0000000..5e0831d --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry06.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry06"> +<metadata> +<title>domimplementationregistry06</title> +<creator>Curt Arnold</creator> +<description> +If the implementation supports "XML", DOMImplementationRegistry.getDOMImplementation("xMl 3.0 cOrE") should +return a DOMImplementation where hasFeature("XML", "3.0"), and hasFeature("Core", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<hasFeature feature='"XML"'/> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" features='"xMl 3.0 cOrE"' interface="DOMImplementationRegistry"/> +<assertNotNull actual="domImpl" id="domImplNotNull"/> +<hasFeature var="hasFeature" obj="domImpl" feature='"XML"' version='"3.0"'/> +<assertTrue actual="hasFeature" id="hasXML3"/> +<hasFeature var="hasFeature" obj="domImpl" feature='"Core"' version='nullVersion'/> +<assertTrue actual="hasFeature" id="hasCore"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry07.xml b/test/testcases/tests/level3/core/domimplementationregistry07.xml new file mode 100644 index 0000000..a8e0b20 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry07.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry07"> +<metadata> +<title>domimplementationregistry07</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("http://www.example.com/bogus-feature 99.0") should return +null. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" + features='"http://www.example.com/bogus-feature 99.0"' + interface="DOMImplementationRegistry"/> +<assertNull actual="domImpl" id="domImplNull"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry08.xml b/test/testcases/tests/level3/core/domimplementationregistry08.xml new file mode 100644 index 0000000..0e9ec23 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry08.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry08"> +<metadata> +<title>domimplementationregistry08</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("SVG") should return null or a DOMImplementation +where hasFeature("SVG", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" + features='"SVG"' + interface="DOMImplementationRegistry"/> +<if> + <isNull obj="domImpl"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"SVG"'/> + <assertFalse actual="hasFeature" id="baseImplSupportsSVG"/> + <else> + <hasFeature var="hasFeature" obj="domImpl" feature='"SVG"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry09.xml b/test/testcases/tests/level3/core/domimplementationregistry09.xml new file mode 100644 index 0000000..76367c7 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry09.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry09"> +<metadata> +<title>domimplementationregistry09</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("HTML") should return null or a DOMImplementation +where hasFeature("HTML", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" + features='"HTML"' + interface="DOMImplementationRegistry"/> +<if> + <isNull obj="domImpl"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"HTML"' version="nullVersion"/> + <assertFalse actual="hasFeature" id="baseImplSupportsHTML"/> + <else> + <hasFeature var="hasFeature" obj="domImpl" feature='"HTML"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry10.xml b/test/testcases/tests/level3/core/domimplementationregistry10.xml new file mode 100644 index 0000000..3b19ef2 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry10.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry10"> +<metadata> +<title>domimplementationregistry10</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("LS") should return null or a DOMImplementation +where hasFeature("LS", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" + features='"LS"' + interface="DOMImplementationRegistry"/> +<if> + <isNull obj="domImpl"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"LS"' version="nullVersion"/> + <assertFalse actual="hasFeature" id="baseImplSupportsLS"/> + <else> + <hasFeature var="hasFeature" obj="domImpl" feature='"LS"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry11.xml b/test/testcases/tests/level3/core/domimplementationregistry11.xml new file mode 100644 index 0000000..7636017 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry11.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry11"> +<metadata> +<title>domimplementationregistry11</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("XPath") should return null or a DOMImplementation +where hasFeature("XPath", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" + features='"XPath"' + interface="DOMImplementationRegistry"/> +<if> + <isNull obj="domImpl"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"XPath"' version="nullVersion"/> + <assertFalse actual="hasFeature" id="baseImplSupportsLS"/> + <else> + <hasFeature var="hasFeature" obj="domImpl" feature='"XPath"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry12.xml b/test/testcases/tests/level3/core/domimplementationregistry12.xml new file mode 100644 index 0000000..5c7ff6f --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry12.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry12"> +<metadata> +<title>domimplementationregistry12</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("cOrE 3.0 xMl 3.0 eVeNts 2.0 lS") should return null +or a DOMImplementation that implements the specified features. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasCore" type="boolean"/> +<var name="hasXML" type="boolean"/> +<var name="hasEvents" type="boolean"/> +<var name="hasLS" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" + features='"cOrE 3.0 xMl 3.0 eVeNts 2.0 lS"' + interface="DOMImplementationRegistry"/> +<if> + <isNull obj="domImpl"/> + <implementation var="baseImpl"/> + <hasFeature var="hasCore" obj="baseImpl" feature='"Core"' version='"3.0"'/> + <hasFeature var="hasXML" obj="baseImpl" feature='"XML"' version='"3.0"'/> + <hasFeature var="hasEvents" obj="baseImpl" feature='"Events"' version='"2.0"'/> + <hasFeature var="hasLS" obj="baseImpl" feature='"LS"' version='nullVersion'/> + <assertFalse id="baseImplFeatures"> + <and> + <isTrue value="hasCore"/> + <isTrue value="hasXML"/> + <isTrue value="hasEvents"/> + <isTrue value="hasLS"/> + </and> + </assertFalse> + <else> + <hasFeature var="hasCore" obj="domImpl" feature='"Core"' version='"3.0"'/> + <assertTrue actual="hasCore" id="hasCore"/> + <hasFeature var="hasXML" obj="domImpl" feature='"XML"' version='"3.0"'/> + <assertTrue actual="hasXML" id="hasXML"/> + <hasFeature var="hasEvents" obj="domImpl" feature='"Events"' version='"2.0"'/> + <assertTrue actual="hasEvents" id="hasEvents"/> + <hasFeature var="hasLS" obj="domImpl" feature='"LS"' version='nullVersion'/> + <assertTrue actual="hasLS" id="hasLS"/> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry13.xml b/test/testcases/tests/level3/core/domimplementationregistry13.xml new file mode 100644 index 0000000..6ad3334 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry13.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry13"> +<metadata> +<title>domimplementationregistry13</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("cOrE") should return a +list of at least one DOMImplementation +where hasFeature("Core", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementationList-item"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementationList-length"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="hasFeature" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" features='"cOrE"' interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<item var="domImpl" obj="domImplList" index="length" interface="DOMImplementationList"/> +<assertNull actual="domImpl" id="item_Length_shouldBeNull"/> +<assertTrue id="atLeastOne"> + <greater actual="length" expected="0"/> +</assertTrue> +<for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"Core"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry14.xml b/test/testcases/tests/level3/core/domimplementationregistry14.xml new file mode 100644 index 0000000..81e7f90 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry14.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry14"> +<metadata> +<title>domimplementationregistry14</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("cOrE 3.0") should return +a list of DOMImplementation +where hasFeature("Core", "3.0") returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" features='"cOrE 3.0"' interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<assertTrue id="atLeastOne"> + <greater actual="length" expected="0"/> +</assertTrue> +<for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"Core"' version='"3.0"'/> + <assertTrue actual="hasFeature" id="hasCore"/> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry15.xml b/test/testcases/tests/level3/core/domimplementationregistry15.xml new file mode 100644 index 0000000..17c5d6b --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry15.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry15"> +<metadata> +<title>domimplementationregistry15</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("+cOrE") should return +list of DOMImplementation +where hasFeature("+Core", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" features='"+cOrE"' interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<assertTrue id="atLeastOne"> + <greater actual="length" expected="0"/> +</assertTrue> +<for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"+Core"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry16.xml b/test/testcases/tests/level3/core/domimplementationregistry16.xml new file mode 100644 index 0000000..56af99a --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry16.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry16"> +<metadata> +<title>domimplementationregistry16</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("+cOrE 3.0") should return +a list of DOMImplementation +where hasFeature("+Core", "3.0") returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" features='"+cOrE 3.0"' interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<assertTrue id="atLeastOne"> + <greater actual="length" expected="0"/> +</assertTrue> +<for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"+Core"' version='"3.0"'/> + <assertTrue actual="hasFeature" id="hasCore"/> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry17.xml b/test/testcases/tests/level3/core/domimplementationregistry17.xml new file mode 100644 index 0000000..310d4e7 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry17.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry17"> +<metadata> +<title>domimplementationregistry17</title> +<creator>Curt Arnold</creator> +<description> +If the implementation supports "XML", DOMImplementationRegistry.getDOMImplementationList("xMl 3.0 cOrE") should +return a list of DOMImplementation where hasFeature("XML", "3.0"), and hasFeature("Core", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<hasFeature feature='"XML"'/> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" features='"xMl 3.0 cOrE"' interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<assertTrue id="atLeastOne"> + <greater actual="length" expected="0"/> +</assertTrue> +<for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"XML"' version='"3.0"'/> + <assertTrue actual="hasFeature" id="hasXML3"/> + <hasFeature var="hasFeature" obj="domImpl" feature='"Core"' version='nullVersion'/> + <assertTrue actual="hasFeature" id="hasCore"/> +</for-each> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry18.xml b/test/testcases/tests/level3/core/domimplementationregistry18.xml new file mode 100644 index 0000000..9217ba0 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry18.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry18"> +<metadata> +<title>domimplementationregistry18</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("http://www.example.com/bogus-feature 99.0") +should return a zero-length list. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" + features='"http://www.example.com/bogus-feature 99.0"' + interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<assertEquals actual="length" expected="0" ignoreCase="false" id="emptyList"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry19.xml b/test/testcases/tests/level3/core/domimplementationregistry19.xml new file mode 100644 index 0000000..6086e9b --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry19.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry19"> +<metadata> +<title>domimplementationregistry19</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("SVG") should return +zero-length list or a list of DOMImplementation +where hasFeature("SVG", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" + features='"SVG"' + interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<if> + <equals actual="length" expected="0" ignoreCase="false"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"SVG"'/> + <assertFalse actual="hasFeature" id="baseImplSupportsSVG"/> + <else> + <for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"SVG"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </for-each> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry20.xml b/test/testcases/tests/level3/core/domimplementationregistry20.xml new file mode 100644 index 0000000..12233e4 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry20.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry20"> +<metadata> +<title>domimplementationregistry20</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("HTML") should return +an empty list or a list of DOMImplementation +where hasFeature("HTML", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" + features='"HTML"' + interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<if> + <equals actual="length" expected="0" ignoreCase="false"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"HTML"' version="nullVersion"/> + <assertFalse actual="hasFeature" id="baseImplSupportsHTML"/> + <else> + <for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"HTML"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </for-each> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry21.xml b/test/testcases/tests/level3/core/domimplementationregistry21.xml new file mode 100644 index 0000000..9f9e7d9 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry21.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry21"> +<metadata> +<title>domimplementationregistry21</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("LS") should return +a empty list or a list of DOMImplementation +where hasFeature("LS", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" + features='"LS"' + interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<if> + <equals actual="length" expected="0" ignoreCase="false"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"LS"' version="nullVersion"/> + <assertFalse actual="hasFeature" id="baseImplSupportsLS"/> + <else> + <for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"LS"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </for-each> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry22.xml b/test/testcases/tests/level3/core/domimplementationregistry22.xml new file mode 100644 index 0000000..405c7ab --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry22.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry22"> +<metadata> +<title>domimplementationregistry22</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("XPath") should return +an empty list or a list of DOMImplementation +where hasFeature("XPath", null) returns true. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasFeature" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" + features='"XPath"' + interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<if> + <equals actual="length" expected="0" ignoreCase="false"/> + <implementation var="baseImpl"/> + <hasFeature var="hasFeature" feature='"XPath"' version="nullVersion"/> + <assertFalse actual="hasFeature" id="baseImplSupportsLS"/> + <else> + <for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasFeature" obj="domImpl" feature='"XPath"' version="nullVersion"/> + <assertTrue actual="hasFeature" id="hasCore"/> + </for-each> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry23.xml b/test/testcases/tests/level3/core/domimplementationregistry23.xml new file mode 100644 index 0000000..cb7f5fa --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry23.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry23"> +<metadata> +<title>domimplementationregistry23</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("cOrE 3.0 xMl 3.0 eVeNts 2.0 lS") +should return an empty list or a list of DOMImplementation that implements the specified features. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="hasCore" type="boolean"/> +<var name="hasXML" type="boolean"/> +<var name="hasEvents" type="boolean"/> +<var name="hasLS" type="boolean"/> +<var name="baseImpl" type="DOMImplementation"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" + features='"cOrE 3.0 xMl 3.0 eVeNts 2.0 lS"' + interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<if> + <equals actual="length" expected="0" ignoreCase="false"/> + <implementation var="baseImpl"/> + <hasFeature var="hasCore" obj="baseImpl" feature='"Core"' version='"3.0"'/> + <hasFeature var="hasXML" obj="baseImpl" feature='"XML"' version='"3.0"'/> + <hasFeature var="hasEvents" obj="baseImpl" feature='"Events"' version='"2.0"'/> + <hasFeature var="hasLS" obj="baseImpl" feature='"LS"' version='nullVersion'/> + <assertFalse id="baseImplFeatures"> + <and> + <isTrue value="hasCore"/> + <isTrue value="hasXML"/> + <isTrue value="hasEvents"/> + <isTrue value="hasLS"/> + </and> + </assertFalse> + <else> + <for-each collection="domImplList" member="domImpl"> + <hasFeature var="hasCore" obj="domImpl" feature='"Core"' version='"3.0"'/> + <assertTrue actual="hasCore" id="hasCore"/> + <hasFeature var="hasXML" obj="domImpl" feature='"XML"' version='"3.0"'/> + <assertTrue actual="hasXML" id="hasXML"/> + <hasFeature var="hasEvents" obj="domImpl" feature='"Events"' version='"2.0"'/> + <assertTrue actual="hasEvents" id="hasEvents"/> + <hasFeature var="hasLS" obj="domImpl" feature='"LS"' version='nullVersion'/> + <assertTrue actual="hasLS" id="hasLS"/> + </for-each> + </else> +</if> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry24.xml b/test/testcases/tests/level3/core/domimplementationregistry24.xml new file mode 100644 index 0000000..e6d0622 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry24.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry24"> +<metadata> +<title>domimplementationregistry24</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementation("") should return an implementation. +</description> +<date qualifier="created">2004-03-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom/2004JanMar/0111.html"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImpl" type="DOMImplementation"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementation var="domImpl" obj="domImplRegistry" + features='""' + interface="DOMImplementationRegistry"/> +<assertNotNull actual="domImpl" id="domImplNotNull"/> +</test> diff --git a/test/testcases/tests/level3/core/domimplementationregistry25.xml b/test/testcases/tests/level3/core/domimplementationregistry25.xml new file mode 100644 index 0000000..5640043 --- /dev/null +++ b/test/testcases/tests/level3/core/domimplementationregistry25.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry25"> +<metadata> +<title>domimplementationregistry25</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementationRegistry.getDOMImplementationList("cOrE 3.0 xMl 3.0 eVeNts 2.0 lS") +should return an empty list or a list of DOMImplementation that implements the specified features. +</description> +<date qualifier="created">2004-03-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom/2004JanMar/0111.html"/> +</metadata> +<var name="domImplRegistry" type="DOMImplementationRegistry"/> +<var name="domImplList" type="DOMImplementationList"/> +<var name="length" type="int"/> +<DOMImplementationRegistry.newInstance var="domImplRegistry"/> +<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/> +<getDOMImplementationList var="domImplList" obj="domImplRegistry" + features='""' + interface="DOMImplementationRegistry"/> +<length var="length" obj="domImplList" interface="DOMImplementationList"/> +<assertTrue id="atLeastOne"><greater actual="length" expected="0"/></assertTrue> +</test> diff --git a/test/testcases/tests/level3/core/domstringlistcontains01.xml b/test/testcases/tests/level3/core/domstringlistcontains01.xml new file mode 100644 index 0000000..5f7c62f --- /dev/null +++ b/test/testcases/tests/level3/core/domstringlistcontains01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domstringlistcontains01"> +<metadata> +<title>domstringlistcontains01</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of DOMStringList.contains by searching DOMConfig parameter +names for "comments" and "". +</description> +<date qualifier="created">2004-01-12</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-contains"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames"/> +</metadata> +<var name="doc" type="Document"/> +<var name="paramList" type="DOMStringList"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="contains" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<parameterNames obj="domConfig" var="paramList"/> +<contains var="contains" obj="paramList" str='"comments"' interface="DOMStringList"/> +<assertTrue actual="contains" id="paramsContainComments"/> +<contains var="contains" obj="paramList" str='""' interface="DOMStringList"/> +<assertFalse actual="contains" id="paramsDoesntContainEmpty"/> +</test> + diff --git a/test/testcases/tests/level3/core/domstringlistcontains02.xml b/test/testcases/tests/level3/core/domstringlistcontains02.xml new file mode 100644 index 0000000..74a2279 --- /dev/null +++ b/test/testcases/tests/level3/core/domstringlistcontains02.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domstringlistcontains02"> +<metadata> +<title>domstringlistcontains02</title> +<creator>IBM</creator> +<description> + The contains method of the DOMStringList tests if a string is part of this DOMStringList. + + Invoke the contains method on the list searching for several of the parameters recognized by the + DOMConfiguration object. + Verify that the list contains features that are required and supported by this DOMConfiguration object. + Verify that the contains method returns false for a string that is not contained in this DOMStringList. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-contains"/> +</metadata> +<var name="doc" type="Document"/> +<var name="paramList" type="DOMStringList"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="contain" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<parameterNames obj="domConfig" var="paramList"/> + +<contains obj="paramList" var="contain" str='"comments"' interface="DOMStringList"/> +<assertTrue actual="contain" id="domstringlistcontains02_1"/> +<contains obj="paramList" var="contain" str='"cdata-sections"' interface="DOMStringList"/> +<assertTrue actual="contain" id="domstringlistcontains02_2"/> +<contains obj="paramList" var="contain" str='"entities"' interface="DOMStringList"/> +<assertTrue actual="contain" id="domstringlistcontains02_3"/> +<contains obj="paramList" var="contain" str='"error-handler"' interface="DOMStringList"/> +<assertTrue actual="contain" id="domstringlistcontains02_4"/> +<contains obj="paramList" var="contain" str='"infoset"' interface="DOMStringList"/> +<assertTrue actual="contain" id="domstringlistcontains02_5"/> +<contains obj="paramList" var="contain" str='"namespace-declarations"' interface="DOMStringList"/> +<assertTrue actual="contain" id="domstringlistcontains02_6"/> +<contains obj="paramList" var="contain" str='"element-content-whitespace"' interface="DOMStringList"/> +<assertTrue actual="contain" id="domstringlistcontains02_7"/> +<contains obj="paramList" var="contain" str='"test"' interface="DOMStringList"/> +<assertFalse actual="contain" id="domstringlistcontains02_8"/> +</test> + diff --git a/test/testcases/tests/level3/core/domstringlistgetlength01.xml b/test/testcases/tests/level3/core/domstringlistgetlength01.xml new file mode 100644 index 0000000..3850874 --- /dev/null +++ b/test/testcases/tests/level3/core/domstringlistgetlength01.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domstringlistgetlength01"> +<metadata> +<title>domstringlistgetlength01</title> +<creator>IBM</creator> +<description> + The length attribute of the DOMStringList returns the number of DOMStrings in the list. + The range of valid child node indices is 0 to length-1 inclusive. + + Invoke the length on the list of parameters returned by the DOMConfiguration object. + Verify that the list is not null and length is not 0. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-length"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames"/> +</metadata> +<var name="doc" type="Document"/> +<var name="paramList" type="DOMStringList"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="listSize" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<parameterNames obj="domConfig" var="paramList"/> +<assertNotNull actual="paramList" id="domstringlistgetlength01_notNull"/> +<length obj="paramList" var="listSize" interface="DOMStringList"/> +<assertNotEquals actual="listSize" expected="0" id="domstringlistgetlength01_notZero" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/domstringlistitem01.xml b/test/testcases/tests/level3/core/domstringlistitem01.xml new file mode 100644 index 0000000..a9187d2 --- /dev/null +++ b/test/testcases/tests/level3/core/domstringlistitem01.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domstringlistitem01"> +<metadata> +<title>domstringlistitem01</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of DOMStringList.item by accessing items 0 and length-1 and expecting +a string and accessing items out of range and expecting null. +</description> +<date qualifier="created">2004-01-12</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-item"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames"/> +</metadata> +<var name="doc" type="Document"/> +<var name="paramList" type="DOMStringList"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="contains" type="boolean"/> +<var name="length" type="int"/> +<var name="index" type="int"/> +<var name="parameter" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<parameterNames obj="domConfig" var="paramList"/> +<length var="length" obj="paramList" interface="DOMStringList"/> +<item var="parameter" obj="paramList" index="0" interface="DOMStringList"/> +<assertNotNull actual="parameter" id="item0NotNull"/> +<item var="parameter" obj="paramList" index="length" interface="DOMStringList"/> +<assertNull actual="parameter" id="itemLengthNull"/> +<decrement var="length" value="1"/> +<item var="parameter" obj="paramList" index="length" interface="DOMStringList"/> +<assertNotNull actual="parameter" id="itemLengthMinus1NotNull"/> +</test> + diff --git a/test/testcases/tests/level3/core/domstringlistitem02.xml b/test/testcases/tests/level3/core/domstringlistitem02.xml new file mode 100644 index 0000000..7180a78 --- /dev/null +++ b/test/testcases/tests/level3/core/domstringlistitem02.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domstringlistitem02"> +<metadata> +<title>domstringlistitem02</title> +<creator>IBM</creator> +<description> + The item method of the DOMStringList Returns the indexth item in the collection. + If index is greater than or equal to the number of DOMStrings in the list, this returns null. + + Invoke the first item on the list of parameters returned by the DOMConfiguration object and + make sure it is not null. Then invoke the 100th item and verify that null is returned. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-item"/> +</metadata> +<var name="doc" type="Document"/> +<var name="paramList" type="DOMStringList"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="listSize" type="int"/> +<var name="retStr" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<parameterNames obj="domConfig" var="paramList"/> +<item obj="paramList" var="retStr" index="0" interface="DOMStringList"/> +<assertNotNull actual="retStr" id="domstringlistitem02_notNull"/> +<item obj="paramList" var="retStr" index="100" interface="DOMStringList"/> +<assertNull actual="retStr" id="domstringlistitem02_null"/> +</test> + diff --git a/test/testcases/tests/level3/core/elementcontentwhitespace01.xml b/test/testcases/tests/level3/core/elementcontentwhitespace01.xml new file mode 100644 index 0000000..a82f071 --- /dev/null +++ b/test/testcases/tests/level3/core/elementcontentwhitespace01.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementcontentwhitespace01"> +<metadata> +<title>elementcontentwhitespace01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with element-content-whitespace set to true, check that +whitespace in element content is preserved. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> +</metadata> +<!-- required for normalizationDocument --> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Node"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="childType" type="int"/> +<var name="text" type="Text"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"element-content-whitespace"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> +<item var="body" obj="bodyList" interface="NodeList" index="0"/> +<firstChild var="child" obj="body" interface="Node"/> +<nodeType var="childType" obj="child"/> +<!-- if first child was an element + whitespace has been eliminated, add some back --> +<if><equals actual="childType" expected="1" ignoreCase="false"/> + <createTextNode var="text" obj="doc" data='" "'/> + <insertBefore var="child" obj="body" newChild="text" refChild="child"/> +</if> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> +<item var="body" obj="bodyList" interface="NodeList" index="0"/> +<firstChild var="child" obj="body" interface="Node"/> +<assertNotNull actual="child" id="firstChildNotNull"/> +<!-- this should be a Text node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"#text"' ignoreCase="false" id="firstChild"/> +<nextSibling var="child" obj="child" interface="Node"/> +<assertNotNull actual="child" id="secondChildNotNull"/> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"p"' ignoreCase="false" id="secondChild"/> +</test> + + diff --git a/test/testcases/tests/level3/core/elementcontentwhitespace02.xml b/test/testcases/tests/level3/core/elementcontentwhitespace02.xml new file mode 100644 index 0000000..15f2153 --- /dev/null +++ b/test/testcases/tests/level3/core/elementcontentwhitespace02.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementcontentwhitespace02"> +<metadata> +<title>elementcontentwhitespace02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with element-content-whitespace set to false and validation set to true, check that +whitespace in element content is eliminated. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"element-content-whitespace"' value="false"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSet"/> + </and> + <setParameter obj="domConfig" name='"element-content-whitespace"' value="false"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> + <item var="body" obj="bodyList" interface="NodeList" index="0"/> + <firstChild var="child" obj="body" interface="Node"/> + <assertNotNull actual="child" id="firstChildNotNull"/> + <!-- if normalization was successful this should be a "p" element --> + <nodeName var="childName" obj="child"/> + <assertEquals actual="childName" expected='"p"' ignoreCase="false" id="firstChild"/> + <nextSibling var="child" obj="child" interface="Node"/> + <assertNull actual="child" id="secondChild"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/elementcontentwhitespace03.xml b/test/testcases/tests/level3/core/elementcontentwhitespace03.xml new file mode 100644 index 0000000..7360ba3 --- /dev/null +++ b/test/testcases/tests/level3/core/elementcontentwhitespace03.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementcontentwhitespace03"> +<metadata> +<title>elementcontentwhitespace03</title> +<creator>Curt Arnold</creator> +<description> +Normalize document using Node.normalize with element-content-whitespace set to false and validation set to true, check that +whitespace in element content is preserved. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="text" type="Text"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<!-- if we discarded whitespace on parse, add some back --> +<if><implementationAttribute name="ignoringElementContentWhitespace" value="true"/> + <getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> + <item var="body" obj="bodyList" interface="NodeList" index="0"/> + <firstChild var="child" obj="body" interface="Node"/> + <createTextNode var="text" obj="doc" data='" "'/> + <insertBefore var="child" obj="body" newChild="text" refChild="child"/> +</if> +<canSetParameter var="canSet" obj="domConfig" name='"element-content-whitespace"' value="false"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"element-content-whitespace"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalize obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> +<item var="body" obj="bodyList" interface="NodeList" index="0"/> +<firstChild var="child" obj="body" interface="Node"/> +<assertNotNull actual="child" id="firstChildNotNull"/> +<!-- this should be a Text node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"#text"' ignoreCase="false" id="firstChild"/> +<nextSibling var="child" obj="child" interface="Node"/> +<assertNotNull actual="child" id="secondChildNotNull"/> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"p"' ignoreCase="false" id="secondChild"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/elementgetschematypeinfo01.xml b/test/testcases/tests/level3/core/elementgetschematypeinfo01.xml new file mode 100644 index 0000000..e8f9816 --- /dev/null +++ b/test/testcases/tests/level3/core/elementgetschematypeinfo01.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementgetschematypeinfo01"> +<metadata> +<title>elementgetschematypeinfo01</title> +<creator>Curt Arnold</creator> +<description> +Call getSchemaTypeInfo on title attribute for the first "em" element from DTD validated document. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeNS" type="DOMString"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertNull actual="typeName" id="nameIsNull"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertNull actual="typeNS" id="nsIsNull"/> + +</test> diff --git a/test/testcases/tests/level3/core/elementgetschematypeinfo02.xml b/test/testcases/tests/level3/core/elementgetschematypeinfo02.xml new file mode 100644 index 0000000..d5cc405 --- /dev/null +++ b/test/testcases/tests/level3/core/elementgetschematypeinfo02.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementgetschematypeinfo02"> +<metadata> +<title>elementgetschematypeinfo02</title> +<creator>Curt Arnold</creator> +<description> +Call getSchemaTypeInfo on title attribute for the first "em" element from schema-validated document. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeNS" type="DOMString"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="nameIsEmType"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertEquals actual="typeNS" expected='"http://www.w3.org/1999/xhtml"' ignoreCase="false" id="nsIsXML"/> +</test> diff --git a/test/testcases/tests/level3/core/elementgetschematypeinfo03.xml b/test/testcases/tests/level3/core/elementgetschematypeinfo03.xml new file mode 100644 index 0000000..3a862f6 --- /dev/null +++ b/test/testcases/tests/level3/core/elementgetschematypeinfo03.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementgetschematypeinfo03"> +<metadata> +<title>elementgetschematypeinfo03</title> +<creator>Curt Arnold</creator> +<description> +Element.schemaTypeInfo should return null if not validating or schema validating. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNS" type="DOMString"/> +<load var="doc" href="hc_nodtdstaff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertNull actual="typeName" id="typeName"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<assertNull actual="typeNS" id="typeNS"/> +</test> diff --git a/test/testcases/tests/level3/core/elementgetschematypeinfo04.xml b/test/testcases/tests/level3/core/elementgetschematypeinfo04.xml new file mode 100644 index 0000000..f2a468c --- /dev/null +++ b/test/testcases/tests/level3/core/elementgetschematypeinfo04.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementgetschematypeinfo04"> +<metadata> +<title>elementgetschematypeinfo04</title> +<creator>IBM</creator> +<description> + The getSchemaTypeInfo method retrieves the type information associated with this element. + + Load a valid document with an XML Schema. + Invoke getSchemaTypeInfo method on an element having [type definition] property. Expose {name} and {target namespace} + properties of the [type definition] property. Verity that the typeName and typeNamespace of the code element's + schemaTypeInfo are correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-28</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="codeElem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNamespace" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="docElemNodeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"code"' interface="Document"/> +<item var="codeElem" obj="elemList" index="1" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="codeElem" interface="Element"/> +<typeName var="typeName" obj="elemTypeInfo"/> +<typeNamespace var="typeNamespace" obj="elemTypeInfo"/> +<assertEquals expected='"code"' actual="typeName" id="elementgetschematypeinfo04_typeName" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/1999/xhtml"' actual="typeNamespace" id="elementgetschematypeinfo04_typeNamespace" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementgetschematypeinfo05.xml b/test/testcases/tests/level3/core/elementgetschematypeinfo05.xml new file mode 100644 index 0000000..b13fea6 --- /dev/null +++ b/test/testcases/tests/level3/core/elementgetschematypeinfo05.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementgetschematypeinfo05"> +<metadata> +<title>elementgetschematypeinfo05</title> +<creator>IBM</creator> +<description> + The getSchemaTypeInfo method retrieves the type information associated with this element. + + Load a valid document with an XML Schema. + Invoke getSchemaTypeInfo method on an element having [type definition] property. Expose {name} and {target namespace} + properties of the [type definition] property. Verity that the typeName and typeNamespace of the acronym element's + schemaTypeInfo are correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-28</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="acElem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNamespace" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="docElemNodeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"span"' interface="Document"/> +<item var="acElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="acElem" interface="Element"/> +<typeName var="typeName" obj="elemTypeInfo"/> +<typeNamespace var="typeNamespace" obj="elemTypeInfo"/> +<assertEquals expected='"string"' actual="typeName" id="typeNameString" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/2001/XMLSchema"' actual="typeNamespace" id="typeNsXSD" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementgetschematypeinfo06.xml b/test/testcases/tests/level3/core/elementgetschematypeinfo06.xml new file mode 100644 index 0000000..ae51e59 --- /dev/null +++ b/test/testcases/tests/level3/core/elementgetschematypeinfo06.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementgetschematypeinfo06"> +<metadata> +<title>elementgetschematypeinfo06</title> +<creator>IBM</creator> +<description> + The getSchemaTypeInfo method retrieves the type information associated with this element. + + Load a valid document with an XML Schema. + Invoke getSchemaTypeInfo method on an element having [type definition] property. Expose {name} and {target namespace} + properties of the [type definition] property. Verity that the typeName and typeNamespace of the strong element's + schemaTypeInfo are correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-28</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="strongElem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNamespace" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="docElemNodeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="strongElem" obj="elemList" index="1" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="strongElem" interface="Element"/> +<typeName var="typeName" obj="elemTypeInfo"/> +<typeNamespace var="typeNamespace" obj="elemTypeInfo"/> +<assertEquals expected='"strongType"' actual="typeName" id="elementgetschematypeinfo06_typeName" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/1999/xhtml"' actual="typeNamespace" id="elementgetschematypeinfo06_typeNamespace" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementgetschematypeinfo07.xml b/test/testcases/tests/level3/core/elementgetschematypeinfo07.xml new file mode 100644 index 0000000..44508b7 --- /dev/null +++ b/test/testcases/tests/level3/core/elementgetschematypeinfo07.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementgetschematypeinfo07"> +<metadata> +<title>elementgetschematypeinfo07</title> +<creator>IBM</creator> +<description> + The getSchemaTypeInfo method retrieves the type information associated with this element. + + Load a valid document with an XML Schema. + Invoke getSchemaTypeInfo method on an element having [type definition] property. Expose {name} and {target namespace} + properties of the [type definition] property. Verity that the typeName and typeNamespace of the name element's + schemaTypeInfo are correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-28</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="supElem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="typeNamespace" type="DOMString"/> +<var name="docElemNodeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"sup"' interface="Document"/> +<item var="supElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="supElem" interface="Element"/> +<typeName var="typeName" obj="elemTypeInfo"/> +<typeNamespace var="typeNamespace" obj="elemTypeInfo"/> +<assertEquals expected='"sup"' actual="typeName" id="elementgetschematypeinfo07_typeName" ignoreCase="false"/> +<assertEquals expected='"http://www.w3.org/1999/xhtml"' actual="typeNamespace" id="elementgetschematypeinfo07_typeNamespace" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute01.xml b/test/testcases/tests/level3/core/elementsetidattribute01.xml new file mode 100644 index 0000000..d4d9bc3 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute01.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute01"> +<metadata> +<title>elementsetidattribute01</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute on the third acronym element's class attribute. Verify by calling isID + on the class attribute and getElementById on document. Invoke setIdAttribute again to reset. + Calling isID should return false. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="true"/> +<attributes var="attributesMap" obj="acronymElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsIdTrue01"/> +<getElementById obj="doc" var="elem" elementId='"No"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributeGetElementById01" ignoreCase="false"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="false"/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="elementsetidattributeIsIdFalse01"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute03.xml b/test/testcases/tests/level3/core/elementsetidattribute03.xml new file mode 100644 index 0000000..0af56b6 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute03.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute03"> +<metadata> +<title>elementsetidattribute03</title> +<creator>IBM</creator> +<description> + First use setAttribute to change the class attribute of the third acronym element. Invoke setIdAttribute + on the newly set attribute. Verify by calling isID on the new attribute and getElementById on document. + Invoke setIdAttribute again to reset. Calling isID should return false. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<setAttribute obj="acronymElem" name= '"class"' value='"Maybe"'/> +<setIdAttribute obj="acronymElem" name='"class"' isId="true"/> +<attributes var="attributesMap" obj="acronymElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsIdTrue03"/> +<getElementById obj="doc" var="elem" elementId='"Maybe"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributeGetElementById03" ignoreCase="false"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="false"/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="elementsetidattributeIsIdFalse03"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute04.xml b/test/testcases/tests/level3/core/elementsetidattribute04.xml new file mode 100644 index 0000000..57b90a7 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute04.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute04"> +<metadata> +<title>elementsetidattribute04</title> +<creator>IBM</creator> +<description> + First use setAttribute to create a new attribute on the third strong element. Invoke setIdAttribute + on the new attribute. Verify by calling isID on the new attribute and getElementById on document. + Invoke setIdAttribute again to reset. Calling isID should return false. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="nameElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="nameElem" obj="elemList" index="2" interface="NodeList"/> +<setAttribute obj="nameElem" name= '"hasMiddleName"' value='"Antoine"'/> +<setIdAttribute obj="nameElem" name='"hasMiddleName"' isId="true"/> +<attributes var="attributesMap" obj="nameElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"hasMiddleName"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsIdTrue03"/> +<getElementById obj="doc" var="elem" elementId='"Antoine"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"strong"' id="elementsetidattributeGetElementById03" ignoreCase="false"/> +<setIdAttribute obj="nameElem" name='"hasMiddleName"' isId="false"/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="elementsetidattributeIsIdFalse03"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute05.xml b/test/testcases/tests/level3/core/elementsetidattribute05.xml new file mode 100644 index 0000000..4a541f3 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute05.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute05"> +<metadata> +<title>elementsetidattribute05</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute on the third strong element with a non-existing attribute name. Verify that + NOT_FOUND_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="nameElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="nameElem" obj="elemList" index="2" interface="NodeList"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<setIdAttribute obj="nameElem" name='"hasMiddleName"' isId="true"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute06.xml b/test/testcases/tests/level3/core/elementsetidattribute06.xml new file mode 100644 index 0000000..ecefbe3 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute06.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute06"> +<metadata> +<title>elementsetidattribute06</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute on the third strong element with an attribute name of the acronym element. + Verify that NOT_FOUND_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="nameElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="nameElem" obj="elemList" index="2" interface="NodeList"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<setIdAttribute obj="nameElem" name='"class"' isId="true"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute07.xml b/test/testcases/tests/level3/core/elementsetidattribute07.xml new file mode 100644 index 0000000..8f77de2 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute07.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute07"> +<metadata> +<title>elementsetidattribute07</title> +<creator>IBM</creator> +<description> + First use setAttribute to create two new attribute of the second and third strong element with different values. + Invoke setIdAttribute on the new attributes. Verify by calling isID on the new attributes and getElementById + with two different values on document. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="nameElem1" type="Element"/> +<var name="nameElem2" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="nameElem1" obj="elemList" index="2" interface="NodeList"/> +<item var="nameElem2" obj="elemList" index="3" interface="NodeList"/> +<setAttribute obj="nameElem1" name= '"hasMiddleName"' value='"Antoine"'/> +<setIdAttribute obj="nameElem1" name='"hasMiddleName"' isId="true"/> +<setAttribute obj="nameElem2" name= '"hasMiddleName"' value='"Neeya"'/> +<setIdAttribute obj="nameElem2" name='"hasMiddleName"' isId="true"/> +<attributes var="attributesMap" obj="nameElem1"/> +<getNamedItem var="attr" obj="attributesMap" name='"hasMiddleName"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId1True07"/> +<attributes var="attributesMap" obj="nameElem2"/> +<getNamedItem var="attr" obj="attributesMap" name='"hasMiddleName"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId2True07"/> +<getElementById obj="doc" var="elem" elementId='"Antoine"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"strong"' id="elementsetidattribute1GetElementById07" ignoreCase="false"/> +<getElementById obj="doc" var="elem" elementId='"Neeya"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"strong"' id="elementsetidattribute2GetElementById07" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute08.xml b/test/testcases/tests/level3/core/elementsetidattribute08.xml new file mode 100644 index 0000000..593cc1b --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute08.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute08"> +<metadata> +<title>elementsetidattribute08</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute class attribute on the second, third, and the fifth acronym element. + Verify by calling isID on the attributes and getElementById with the unique value "No" on document. + </description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem1" type="Element"/> +<var name="acronymElem2" type="Element"/> +<var name="acronymElem3" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem1" obj="elemList" index="1" interface="NodeList"/> +<item var="acronymElem2" obj="elemList" index="2" interface="NodeList"/> +<item var="acronymElem3" obj="elemList" index="4" interface="NodeList"/> +<setIdAttribute obj="acronymElem1" name='"class"' isId="true"/> +<setIdAttribute obj="acronymElem2" name='"class"' isId="true"/> +<setIdAttribute obj="acronymElem3" name='"class"' isId="true"/> +<attributes var="attributesMap" obj="acronymElem1"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId1True08"/> +<attributes var="attributesMap" obj="acronymElem2"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId2True08"/> +<attributes var="attributesMap" obj="acronymElem3"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId3True08"/> +<getElementById obj="doc" var="elem" elementId='"No"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributeGetElementById08" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute09.xml b/test/testcases/tests/level3/core/elementsetidattribute09.xml new file mode 100644 index 0000000..60dc035 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute09.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute09"> +<metadata> +<title>elementsetidattribute09</title> +<creator>IBM</creator> +<description> + First use setAttribute to create two new attributes on the second strong element and sup element. + Invoke setIdAttribute on the new attributes. Verify by calling isID on the new attributes and getElementById + with two different values on document. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList1" type="NodeList"/> +<var name="elemList2" type="NodeList"/> +<var name="nameElem" type="Element"/> +<var name="salaryElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList1" obj="doc" tagname='"strong"' interface="Document"/> +<getElementsByTagName var="elemList2" obj="doc" tagname='"sup"' interface="Document"/> +<item var="nameElem" obj="elemList1" index="2" interface="NodeList"/> +<item var="salaryElem" obj="elemList2" index="2" interface="NodeList"/> +<setAttribute obj="nameElem" name= '"hasMiddleName"' value='"Antoine"'/> +<setAttribute obj="salaryElem" name= '"annual"' value='"2002"'/> +<setIdAttribute obj="nameElem" name='"hasMiddleName"' isId="true"/> +<setIdAttribute obj="salaryElem" name='"annual"' isId="true"/> +<attributes var="attributesMap" obj="nameElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"hasMiddleName"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId1True09"/> +<attributes var="attributesMap" obj="salaryElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"annual"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId2True09"/> +<getElementById obj="doc" var="elem" elementId='"Antoine"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"strong"' id="elementsetidattribute1GetElementById09" ignoreCase="false"/> +<getElementById obj="doc" var="elem" elementId='"2002"'/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"sup"' id="elementsetidattribute2GetElementById09" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute10.xml b/test/testcases/tests/level3/core/elementsetidattribute10.xml new file mode 100644 index 0000000..cce49e9 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute10.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute10"> +<metadata> +<title>elementsetidattribute10</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute on the third acronym element's class attribute consecutively with different + isId values. Verify by calling isId on the attribute. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="true"/> +<attributes var="attributesMap" obj="acronymElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId1True10"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="true"/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsId2True10"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="false"/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="elementsetidattributeIsIdFalse10"/> +<getElementById obj="doc" var="elem" elementId='"No"'/> +<assertNull actual="elem" id="elementsetidattributeGetElementByIdNull10"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattribute11.xml b/test/testcases/tests/level3/core/elementsetidattribute11.xml new file mode 100644 index 0000000..cba51cb --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattribute11.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattribute11"> +<metadata> +<title>elementsetidattribute11</title> +<creator>IBM</creator> +<description> + Invoke setIdAttribute on the 4th acronym element's class attribute which contains + an entity reference. Verify by calling isID on the class attribute and getElementById + on document. Invoke setIdAttribute again to reset. Calling isID should return false. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="id" type="boolean" value="false"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="3" interface="NodeList"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="true"/> +<attributes var="attributesMap" obj="acronymElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<isId var="id" obj="attr"/> +<assertTrue actual="id" id="elementsetidattributeIsIdTrue01"/> +<getElementById obj="doc" var="elem" elementId='"Yα"'/> +<assertNotNull actual="elem" id="elemByIDNotNull"/> +<tagName obj="elem" var="elemName"/> +<assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributeGetElementById11" ignoreCase="false"/> +<setIdAttribute obj="acronymElem" name='"class"' isId="false"/> +<isId var="id" obj="attr"/> +<assertFalse actual="id" id="elementsetidattributeIsIdFalse11"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode01.xml b/test/testcases/tests/level3/core/elementsetidattributenode01.xml new file mode 100644 index 0000000..a98a85f --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode01.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode01"> + <metadata> + <title>elementsetidattributenode01</title> + <creator>IBM</creator> + <description> + Invoke setIdAttributeNode on the 3rd p element using the title attribute as a parameter . Verify by calling + isID on the attribute node and getElementById on document node. Call setIdAttributeNode again with isId=false + to reset. Invoke isId on the attribute node should return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-27</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> + </metadata> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="employeeElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> + <item var="employeeElem" obj="elemList" index="2" interface="NodeList"/> + <attributes var="attributesMap" obj="employeeElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:dmstc"'/> + <setIdAttributeNode obj="employeeElem" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsIdTrue01"/> + <getElementById obj="doc" var="elem" elementId='"http://www.netzero.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributenodeGetElementById01" ignoreCase="false"/> + <setIdAttributeNode obj="elem" idAttr="attr" isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributenodeIsIdFalse01"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode02.xml b/test/testcases/tests/level3/core/elementsetidattributenode02.xml new file mode 100644 index 0000000..dcf0d05 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode02.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode02"> + <metadata> + <title>elementsetidattributenode02</title> + <creator>IBM</creator> + <description> + Invoke setIdAttributeNode on the 3rd acronym element using the class attribute as a parameter . Verify by calling + isID on the attribute node and getElementById on document node. Call setIdAttributeNode again with isId=false + to reset. Invoke isId on the attribute node should return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-27</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> + </metadata> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="acronymElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> + <item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> + <attributes var="attributesMap" obj="acronymElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"class"'/> + <setIdAttributeNode obj="acronymElem" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsIdTrue02"/> + <getElementById obj="doc" var="elem" elementId='"No"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributenodeGetElementById02" ignoreCase="false"/> + <setIdAttributeNode obj="elem" idAttr="attr" isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributenodeIsIdFalse02"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode03.xml b/test/testcases/tests/level3/core/elementsetidattributenode03.xml new file mode 100644 index 0000000..d6bb402 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode03.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode03"> + <metadata> + <title>elementsetidattributenode03</title> + <creator>IBM</creator> + <description> + Create a new attribute node on the second strong element. Invoke setIdAttributeNode on a newly created + attribute node. Verify by calling isID on the attribute node and getElementById on document node. + Call setIdAttributeNode again with isId=false to reset. Invoke isId on the attribute node should return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-27</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> + </metadata> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="nameElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="newAttr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> + <item var="nameElem" obj="elemList" index="1" interface="NodeList"/> + <setAttribute obj="nameElem" name='"title"' value='"Karen"'/> + <attributes var="attributesMap" obj="nameElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"title"'/> + <setIdAttributeNode obj="nameElem" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsIdTrue03"/> + <getElementById obj="doc" var="elem" elementId='"Karen"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"strong"' id="elementsetidattributenodeGetElementById03" ignoreCase="false"/> + <setIdAttributeNode obj="elem" idAttr="attr" isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributenodeIsIdFalse03"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode04.xml b/test/testcases/tests/level3/core/elementsetidattributenode04.xml new file mode 100644 index 0000000..99ee8c4 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode04.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode04"> + <metadata> + <title>elementsetidattributenode04</title> + <creator>IBM</creator> + <description> + Create a new namespace attribute on the second strong element. Invoke setIdAttributeNode on a newly created + attribute node. Verify by calling isID on the attribute node and getElementById on document node. + Call setIdAttributeNode again with isId=false to reset. Invoke isId on the attribute node should return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-27</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> + </metadata> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="nameElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="newAttr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> + <item var="nameElem" obj="elemList" index="1" interface="NodeList"/> + <setAttributeNS obj="nameElem" namespaceURI='"http://www.w3.org/2000/xmlns/"' qualifiedName='"xmlns:middle"' value='"http://www.example.com/middle"'/> + <attributes var="attributesMap" obj="nameElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:middle"'/> + <setIdAttributeNode obj="nameElem" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsIdTrue04"/> + <getElementById obj="doc" var="elem" elementId='"http://www.example.com/middle"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"strong"' id="elementsetidattributenodeGetElementById04" ignoreCase="false"/> + <setIdAttributeNode obj="elem" idAttr="attr" isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributenodeIsIdFalse04"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode05.xml b/test/testcases/tests/level3/core/elementsetidattributenode05.xml new file mode 100644 index 0000000..7b8fef6 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode05.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode05"> +<metadata> +<title>elementsetidattributenode05</title> +<creator>IBM</creator> +<description> + Invoke setIdAttributeNode on the third strong element but with the class attribute of the acronym + element as a parameter. Verify that NOT_FOUND_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-27</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList1" type="NodeList"/> +<var name="elemList2" type="NodeList"/> +<var name="nameElem" type="Element"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList1" obj="doc" tagname='"strong"' interface="Document"/> +<getElementsByTagName var="elemList2" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="nameElem" obj="elemList1" index="1" interface="NodeList"/> +<item var="acronymElem" obj="elemList2" index="1" interface="NodeList"/> +<attributes var="attributesMap" obj="acronymElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<setIdAttributeNode obj="nameElem" idAttr="attr" isId="true"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode06.xml b/test/testcases/tests/level3/core/elementsetidattributenode06.xml new file mode 100644 index 0000000..3992984 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode06.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode06"> +<metadata> +<title>elementsetidattributenode06</title> +<creator>IBM</creator> +<description> + Invoke setIdAttributeNode on the third strong element but with the title attribute of the acronym + element as a parameter. Verify that NOT_FOUND_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-27</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList1" type="NodeList"/> +<var name="elemList2" type="NodeList"/> +<var name="nameElem" type="Element"/> +<var name="acronymElem" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> + <var name="nameElement" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList1" obj="doc" tagname='"strong"' interface="Document"/> +<getElementsByTagName var="elemList2" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="nameElem" obj="elemList1" index="1" interface="NodeList"/> +<item var="acronymElem" obj="elemList2" index="1" interface="NodeList"/> +<attributes var="attributesMap" obj="acronymElem"/> +<getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<setIdAttributeNode obj="nameElem" idAttr="attr" isId="true"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode07.xml b/test/testcases/tests/level3/core/elementsetidattributenode07.xml new file mode 100644 index 0000000..d0d2f7c --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode07.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode07"> + <metadata> + <title>elementsetidattributenode07</title> + <creator>IBM</creator> + <description> + Invoke setIdAttributeNode on the 2nd and 3rd acronym element using the class attribute as a parameter . Verify by calling + isID on the attribute node and getElementById on document node. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-27</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> + </metadata> + <var name="doc" type="Document"/> + <var name="elemList1" type="NodeList"/> + <var name="elemList2" type="NodeList"/> + <var name="acronymElem1" type="Element"/> + <var name="acronymElem2" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList1" obj="doc" tagname='"acronym"' interface="Document"/> + <getElementsByTagName var="elemList2" obj="doc" tagname='"acronym"' interface="Document"/> + <item var="acronymElem1" obj="elemList1" index="1" interface="NodeList"/> + <item var="acronymElem2" obj="elemList2" index="2" interface="NodeList"/> + <attributes var="attributesMap" obj="acronymElem1"/> + <getNamedItem var="attr" obj="attributesMap" name='"class"'/> + <setIdAttributeNode obj="acronymElem1" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsId1True07"/> + <attributes var="attributesMap" obj="acronymElem2"/> + <getNamedItem var="attr" obj="attributesMap" name='"class"'/> + <setIdAttributeNode obj="acronymElem2" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsId2True07"/> + <getElementById obj="doc" var="elem" elementId='"No"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributenode1GetElementById07" ignoreCase="false"/> + <getElementById obj="doc" var="elem" elementId='"Yes"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributenode2GetElementById07" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode08.xml b/test/testcases/tests/level3/core/elementsetidattributenode08.xml new file mode 100644 index 0000000..41400a5 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode08.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode08"> + <metadata> + <title>elementsetidattributenode08</title> + <creator>IBM</creator> + <description> + This method declares the attribute specified by node to be of type ID. If the value of the specified attribute + is unique then this element node can later be retrieved using getElementById on Document. Note, however, + that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNode on the 2nd acronym element and 3rd p element using the title and xmlns:dmstc attributes respectively + as parameters . Verify by calling isID on the attribute node and getElementById on document node. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-27</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList1" type="NodeList"/> + <var name="elemList2" type="NodeList"/> + <var name="acronymElem" type="Element"/> + <var name="pElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList1" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/> + <getElementsByTagNameNS var="elemList2" obj="doc" localName='"p"' namespaceURI='"*"' interface="Document"/> + <item var="acronymElem" obj="elemList1" index="1" interface="NodeList"/> + <item var="pElem" obj="elemList2" index="2" interface="NodeList"/> + <attributes var="attributesMap" obj="acronymElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"title"'/> + <setIdAttributeNode obj="acronymElem" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsId1True08"/> + <attributes var="attributesMap" obj="pElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:dmstc"'/> + <setIdAttributeNode obj="pElem" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsId2True08"/> + <getElementById obj="doc" var="elem" elementId='"Yes"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributenode1GetElementById08" ignoreCase="false"/> + <getElementById obj="doc" var="elem" elementId='"http://www.netzero.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributenode2GetElementById08" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode09.xml b/test/testcases/tests/level3/core/elementsetidattributenode09.xml new file mode 100644 index 0000000..e0fb8e6 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode09.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode09"> +<metadata> +<title>elementsetidattributenode09</title> +<creator>IBM</creator> +<description> + This method declares the attribute specified by node to be of type ID. If the value of the specified attribute + is unique then this element node can later be retrieved using getElementById on Document. Note, however, + that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNode with the xmlns attribute of ent4. Verify that NO_MODIFICATION_ALLOWED_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="varElem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="entElement" type="Element"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="domConfig" type="DOMConfiguration"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<setParameter obj="domConfig" name='"entities"' value="true" interface="DOMConfiguration"/> +<normalizeDocument obj="doc" interface="Document"/> +<getElementsByTagNameNS var="elemList" obj="doc" localName='"var"' namespaceURI='"*"' interface="Document"/> +<item interface="NodeList" obj="elemList" var="varElem" index="2"/> +<firstChild interface="Node" var="entRef" obj="varElem"/> +<firstChild interface="Node" var="entElement" obj="entRef"/> +<attributes var="attributesMap" obj="entElement"/> +<getNamedItem var="attr" obj="attributesMap" name='"xmlns"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<setIdAttributeNode obj="entElement" idAttr="attr" isId="true"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributenode10.xml b/test/testcases/tests/level3/core/elementsetidattributenode10.xml new file mode 100644 index 0000000..8f0666a --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributenode10.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributenode10"> + <metadata> + <title>elementsetidattributenode10</title> + <creator>IBM</creator> + <description> + This method declares the attribute specified by node to be of type ID. If the value of the specified attribute + is unique then this element node can later be retrieved using getElementById on Document. Note, however, + that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNode on the 4th acronym element using the class attribute (containing entity reference) + as a parameter . Verify by calling isId on the attribute node and getElementById on document node. + Reset by invoking setIdAttributeNode with isId=false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-27</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="acronymElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/> + <item var="acronymElem" obj="elemList" index="3" interface="NodeList"/> + <attributes var="attributesMap" obj="acronymElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"class"'/> + <setIdAttributeNode obj="acronymElem" idAttr="attr" isId="true"/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributenodeIsIdTrue10"/> + <getElementById obj="doc" var="elem" elementId='"Yα"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributenodeGetElementById10" ignoreCase="false"/> + <setIdAttributeNode obj="acronymElem" idAttr="attr" isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributenodeIsIdFalse10"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens01.xml b/test/testcases/tests/level3/core/elementsetidattributens01.xml new file mode 100644 index 0000000..31daa6c --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens01.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens01"> + <metadata> + <title>elementsetidattributens01</title> + <creator>IBM</creator> + <description> + Invoke setIdAttributeNS on an existing namespace attribute with a namespace URI and a qualified name. Verify by calling + isId on the attribute node and getElementById on document node. Call setIdAttributeNS with isId=false to reset. + isId should now return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="employeeElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> + <item var="employeeElem" obj="elemList" index="2" interface="NodeList"/> + <setIdAttributeNS obj="employeeElem" localName='"dmstc"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <attributes var="attributesMap" obj="employeeElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:dmstc"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsIdTrue01"/> + <getElementById obj="doc" var="elem" elementId='"http://www.netzero.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributensGetElementById01" ignoreCase="false"/> + <setIdAttributeNS obj="employeeElem" localName='"dmstc"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributensIsIdFalse01"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens02.xml b/test/testcases/tests/level3/core/elementsetidattributens02.xml new file mode 100644 index 0000000..e174f80 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens02.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens02"> + <metadata> + <title>elementsetidattributens02</title> + <creator>IBM</creator> + <description> + Invoke setIdAttributeNS on an existing attribute with a namespace URI and a qualified name. Verify by calling + isID on the attribute node and getElementById on document node. Assume the grammar has not defined any + element of typeID. Call setIdAttributeNS with isId=false to reset. Method isId should now return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="addressElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <var name="xsiNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema-instance"'/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/> + <item var="addressElem" obj="elemList" index="2" interface="NodeList"/> + <setIdAttributeNS obj="addressElem" localName='"noNamespaceSchemaLocation"' namespaceURI='xsiNS' isId="true"/> + <attributes var="attributesMap" obj="addressElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsIdTrue02"/> + <getElementById obj="doc" var="elem" elementId='"Yes"'/> + <assertNotNull actual="elem" id="getElementByIDNotNull"/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributensGetElementById01" ignoreCase="false"/> + <setIdAttributeNS obj="addressElem" localName='"noNamespaceSchemaLocation"' namespaceURI='xsiNS' isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributensIsIdFalse02"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens03.xml b/test/testcases/tests/level3/core/elementsetidattributens03.xml new file mode 100644 index 0000000..b9b3db7 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens03.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens03"> + <metadata> + <title>elementsetidattributens03</title> + <creator>IBM</creator> + <description> + Invoke setIdAttributeNS on a newly added namespace attribute on the first em element. Verify by calling + isID on the attribute node and getElementById on document node. Call setIdAttributeNS with isId=false to reset. + Method isId should now return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="employeeIdElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> + <item var="employeeIdElem" obj="elemList" index="0" interface="NodeList"/> + <setAttributeNS obj="employeeIdElem" qualifiedName='"xmlns:newAttr"' namespaceURI='"http://www.w3.org/2000/xmlns/"' value='"newValue"'/> + <setIdAttributeNS obj="employeeIdElem" localName='"newAttr"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <attributes var="attributesMap" obj="employeeIdElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:newAttr"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsIdTrue03"/> + <getElementById obj="doc" var="elem" elementId='"newValue"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"em"' id="elementsetidattributensGetElementById03" ignoreCase="false"/> + <setIdAttributeNS obj="employeeIdElem" localName='"newAttr"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributensIsIdFalse03"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens04.xml b/test/testcases/tests/level3/core/elementsetidattributens04.xml new file mode 100644 index 0000000..0566ea5 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens04.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens04"> + <metadata> + <title>elementsetidattributens04</title> + <creator>IBM</creator> + <description> + The method setIdAttributeNS declares the attribute specified by local name and namespace URI to be of type ID. + If the value of the specified attribute is unique then this element node can later be retrieved using getElementById on Document. + Note, however, that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNS on newly added attribute on the third strong element. Verify by calling + isID on the attribute node and getElementById on document node. + Call setIdAttributeNS with isId=false to reset. Method isId should now return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="strongElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"strong"' namespaceURI='"*"' interface="Document"/> + <item var="strongElem" obj="elemList" index="2" interface="NodeList"/> + <setAttributeNS obj="strongElem" qualifiedName='"dmstc:newAttr"' namespaceURI='"http://www.netzero.com"' value='"newValue"'/> + <setIdAttributeNS obj="strongElem" localName='"newAttr"' namespaceURI='"http://www.netzero.com"' isId="true"/> + <attributes var="attributesMap" obj="strongElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"dmstc:newAttr"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsIdTrue04"/> + <getElementById obj="doc" var="elem" elementId='"newValue"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"strong"' id="elementsetidattributensGetElementById04" ignoreCase="false"/> + <setIdAttributeNS obj="strongElem" localName='"newAttr"' namespaceURI='"http://www.netzero.com"' isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributensIsIdFalse04"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens05.xml b/test/testcases/tests/level3/core/elementsetidattributens05.xml new file mode 100644 index 0000000..59b16e8 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens05.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens05"> + <metadata> + <title>elementsetidattributens05</title> + <creator>IBM</creator> + <description> + The method setIdAttributeNS declares the attribute specified by local name and namespace URI to be of type ID. + If the value of the specified attribute is unique then this element node can later be retrieved using getElementById on Document. + Note, however, that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNS on a changed attribute of the third acronym element. Verify by calling + isID on the attribute node and getElementById on document node. + Call setIdAttributeNS with isId=false to reset. Method isId should now return false. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="acronymElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/> + <item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> + <setAttributeNS obj="acronymElem" qualifiedName='"title"' namespaceURI='"*"' value='"newValue"'/> + <setIdAttributeNS obj="acronymElem" localName='"title"' namespaceURI='"*"' isId="true"/> + <attributes var="attributesMap" obj="acronymElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"title"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsIdTrue05"/> + <getElementById obj="doc" var="elem" elementId='"newValue"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributensGetElementById05" ignoreCase="false"/> + <setIdAttributeNS obj="acronymElem" localName='"title"' namespaceURI='"*"' isId="false"/> + <isId var="id" obj="attr"/> + <assertFalse actual="id" id="elementsetidattributensIsIdFalse05"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens06.xml b/test/testcases/tests/level3/core/elementsetidattributens06.xml new file mode 100644 index 0000000..5b90d5d --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens06.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens06"> +<metadata> +<title>elementsetidattributens06</title> +<creator>IBM</creator> +<description> + Invoke setIdAttributeNS on the third strong element with a non-existing attribute name. Verify that + NOT_FOUND_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="nameElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="nameElem" obj="elemList" index="2" interface="NodeList"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<setIdAttributeNS obj="nameElem" localName='"hasMiddleName"' namespaceURI='"http://www.netzero.com"' isId="true"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens07.xml b/test/testcases/tests/level3/core/elementsetidattributens07.xml new file mode 100644 index 0000000..448db33 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens07.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens07"> +<metadata> +<title>elementsetidattributens07</title> +<creator>IBM</creator> +<description> + Invoke setIdAttributeNS on the second p element with a non-existing attribute. Verify that + NOT_FOUND_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="employeeElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="employeeElem" obj="elemList" index="1" interface="NodeList"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<setIdAttributeNS obj="employeeElem" localName='"xsi"' namespaceURI='"http://www.netzero.com"' isId="true"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens08.xml b/test/testcases/tests/level3/core/elementsetidattributens08.xml new file mode 100644 index 0000000..18c5640 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens08.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens08"> +<metadata> +<title>elementsetidattributens08</title> +<creator>IBM</creator> +<description> + Invoke setIdAttributeNS on the second p element with a non-existing attribute. Verify that + NOT_FOUND_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="employeeElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="employeeElem" obj="elemList" index="1" interface="NodeList"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<setIdAttributeNS obj="employeeElem" localName='"usa"' namespaceURI='"http://www.usa.com"' isId="true"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens09.xml b/test/testcases/tests/level3/core/elementsetidattributens09.xml new file mode 100644 index 0000000..769592e --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens09.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens09"> +<metadata> +<title>elementsetidattributens09</title> +<creator>IBM</creator> +<description> + The method setIdAttributeNS declares the attribute specified by local name and namespace URI to be of type ID. + If the value of the specified attribute is unique then this element node can later be retrieved using getElementById on Document. + Note, however, that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNS on the xmlns attribute of ent4. Verify that NO_MODIFICATION_ALLOWED_ERR is raised. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="varElem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="entElement" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagNameNS var="elemList" obj="doc" localName='"var"' namespaceURI='"*"' interface="Document"/> +<item interface="NodeList" obj="elemList" var="varElem" index="2"/> +<firstChild interface="Node" var="entRef" obj="varElem"/> +<firstChild interface="Node" var="entElement" obj="entRef"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<setIdAttributeNS obj="entElement" localName='"xmlns"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens10.xml b/test/testcases/tests/level3/core/elementsetidattributens10.xml new file mode 100644 index 0000000..68b4038 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens10.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens10"> + <metadata> + <title>elementsetidattributens10</title> + <creator>IBM</creator> + <description> + Declares the attribute specified by local name and namespace URI to be of type ID. If the value of the + specified attribute is unique then this element node can later be retrieved using getElementById on Document. + Note, however, that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNS on two existing namespace attributes with different values. Verify by calling + isId on the attributes and getElementById with different values on document node. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="pElem1" type="Element"/> + <var name="pElem2" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"p"' namespaceURI='"*"' interface="Document"/> + <item var="pElem1" obj="elemList" index="2" interface="NodeList"/> + <item var="pElem2" obj="elemList" index="3" interface="NodeList"/> + <setIdAttributeNS obj="pElem1" localName='"dmstc"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <setIdAttributeNS obj="pElem2" localName='"nm"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <attributes var="attributesMap" obj="pElem1"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:dmstc"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId1True10"/> + <attributes var="attributesMap" obj="pElem2"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:nm"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId2True10"/> + <getElementById obj="doc" var="elem" elementId='"http://www.netzero.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributens1GetElementById10" ignoreCase="false"/> + <getElementById obj="doc" var="elem" elementId='"http://www.altavista.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributens2GetElementById10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens11.xml b/test/testcases/tests/level3/core/elementsetidattributens11.xml new file mode 100644 index 0000000..91aa8df --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens11.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens11"> + <metadata> + <title>elementsetidattributens11</title> + <creator>IBM</creator> + <description> + Declares the attribute specified by local name and namespace URI to be of type ID. If the value of the + specified attribute is unique then this element node can later be retrieved using getElementById on Document. + Note, however, that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNS on two existing namespace attributes with same local name but different values. Verify by calling + isId on the attributes node and getElementById with different values on document node. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="pElem1" type="Element"/> + <var name="pElem2" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"p"' namespaceURI='"*"' interface="Document"/> + <item var="pElem1" obj="elemList" index="1" interface="NodeList"/> + <item var="pElem2" obj="elemList" index="2" interface="NodeList"/> + <setIdAttributeNS obj="pElem1" localName='"dmstc"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <setIdAttributeNS obj="pElem2" localName='"dmstc"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <attributes var="attributesMap" obj="pElem1"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:dmstc"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId1True11"/> + <attributes var="attributesMap" obj="pElem2"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:dmstc"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId2True11"/> + <getElementById obj="doc" var="elem" elementId='"http://www.netzero.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributens1GetElementById11" ignoreCase="false"/> + <getElementById obj="doc" var="elem" elementId='"http://www.usa.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributens2GetElementById11" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens12.xml b/test/testcases/tests/level3/core/elementsetidattributens12.xml new file mode 100644 index 0000000..1226f2d --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens12.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens12"> + <metadata> + <title>elementsetidattributens12</title> + <creator>IBM</creator> + <description> + Declares the attribute specified by local name and namespace URI to be of type ID. If the value of the + specified attribute is unique then this element node can later be retrieved using getElementById on Document. + Note, however, that this simply affects this node and does not change any grammar that may be in use. + + Set the noNamespaceSchemaLocation attribute on the first acronym element to "No". Invoke setIdAttributeNS on the + noNamespaceSchemaLocation attribute of the first, second and third acronym element. Verify by calling isId on + the attributes. Calling getElementById with "No" as a value should return the acronym element. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="acronymElem1" type="Element"/> + <var name="acronymElem2" type="Element"/> + <var name="acronymElem3" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/> + <item var="acronymElem1" obj="elemList" index="0" interface="NodeList"/> + <item var="acronymElem2" obj="elemList" index="1" interface="NodeList"/> + <item var="acronymElem3" obj="elemList" index="2" interface="NodeList"/> + <setAttributeNS obj="acronymElem1" qualifiedName='"xsi:noNamespaceSchemaLocation"' namespaceURI='"http://www.w3.org/2001/XMLSchema-instance"' value='"No"'/> + <setIdAttributeNS obj="acronymElem1" localName='"noNamespaceSchemaLocation"' namespaceURI='"http://www.w3.org/2001/XMLSchema-instance"' isId="true"/> + <setIdAttributeNS obj="acronymElem2" localName='"noNamespaceSchemaLocation"' namespaceURI='"http://www.w3.org/2001/XMLSchema-instance"' isId="true"/> + <setIdAttributeNS obj="acronymElem3" localName='"noNamespaceSchemaLocation"' namespaceURI='"http://www.w3.org/2001/XMLSchema-instance"' isId="true"/> + <attributes var="attributesMap" obj="acronymElem1"/> + <getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId1True12"/> + <attributes var="attributesMap" obj="acronymElem2"/> + <getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId2True12"/> + <attributes var="attributesMap" obj="acronymElem3"/> + <getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId3True12"/> + <getElementById obj="doc" var="elem" elementId='"No"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributensGetElementById10" ignoreCase="false"/> + </test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens13.xml b/test/testcases/tests/level3/core/elementsetidattributens13.xml new file mode 100644 index 0000000..6958429 --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens13.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens13"> + <metadata> + <title>elementsetidattributens13</title> + <creator>IBM</creator> + <description> + Invoke setIdAttributeNS on newly added attribute on the third strong element. Verify by calling + isID on the attribute node and getElementById on document node. + Call setIdAttributeNS on the same element to reset ID but with a non-existing attribute should generate + NOT_FOUND_ERR + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="nameElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="true"/> + <getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> + <item var="nameElem" obj="elemList" index="2" interface="NodeList"/> + <setAttributeNS obj="nameElem" qualifiedName='"xmlns:newAttr"' namespaceURI='"http://www.w3.org/2000/xmlns/"' value='"newValue"'/> + <setIdAttributeNS obj="nameElem" localName='"newAttr"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <attributes var="attributesMap" obj="nameElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:newAttr"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsIdTrue13"/> + <getElementById obj="doc" var="elem" elementId='"newValue"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"strong"' id="elementsetidattributensGetElementById13" ignoreCase="false"/> + <assertDOMException id="throw_NOT_FOUND_ERR"> + <NOT_FOUND_ERR> + <setIdAttributeNS obj="nameElem" localName='"lang"' namespaceURI='"http://www.w3.org/XML/1998/namespace"' isId="false"/> + </NOT_FOUND_ERR> + </assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/elementsetidattributens14.xml b/test/testcases/tests/level3/core/elementsetidattributens14.xml new file mode 100644 index 0000000..2fe42fa --- /dev/null +++ b/test/testcases/tests/level3/core/elementsetidattributens14.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementsetidattributens14"> + <metadata> + <title>elementsetidattributens14</title> + <creator>IBM</creator> + <description> + Declares the attribute specified by local name and namespace URI to be of type ID. If the value of the + specified attribute is unique then this element node can later be retrieved using getElementById on Document. + Note, however, that this simply affects this node and does not change any grammar that may be in use. + + Invoke setIdAttributeNS on two existing attributes of the second p element and the third + acronym element. Verify by calling isId on the attributes and getElementById with different values on document node. + </description> + <contributor>Jenny Hsu</contributor> + <date qualifier="created">2003-02-26</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + <var name="doc" type="Document"/> + <var name="elemList" type="NodeList"/> + <var name="pElem" type="Element"/> + <var name="acronymElem" type="Element"/> + <var name="attributesMap" type="NamedNodeMap"/> + <var name="attr" type="Attr"/> + <var name="id" type="boolean" value="false"/> + <var name="elem" type="Element"/> + <var name="elemName" type="DOMString"/> + <load var="doc" href="hc_staff" willBeModified="false"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"p"' namespaceURI='"*"' interface="Document"/> + <item var="pElem" obj="elemList" index="1" interface="NodeList"/> + <getElementsByTagNameNS var="elemList" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/> + <item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> + <setIdAttributeNS obj="pElem" localName='"dmstc"' namespaceURI='"http://www.w3.org/2000/xmlns/"' isId="true"/> + <setIdAttributeNS obj="acronymElem" localName='"noNamespaceSchemaLocation"' namespaceURI='"http://www.w3.org/2001/XMLSchema-instance"' isId="true"/> + <attributes var="attributesMap" obj="pElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xmlns:dmstc"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId1True14"/> + <attributes var="attributesMap" obj="acronymElem"/> + <getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> + <isId var="id" obj="attr"/> + <assertTrue actual="id" id="elementsetidattributensIsId2True14"/> + <getElementById obj="doc" var="elem" elementId='"Yes"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"acronym"' id="elementsetidattributens1GetElementById14" ignoreCase="false"/> + <getElementById obj="doc" var="elem" elementId='"http://www.usa.com"'/> + <tagName obj="elem" var="elemName"/> + <assertEquals actual="elemName" expected='"p"' id="elementsetidattributens2GetElementById14" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/entities01.xml b/test/testcases/tests/level3/core/entities01.xml new file mode 100644 index 0000000..ea11f68 --- /dev/null +++ b/test/testcases/tests/level3/core/entities01.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities01"> +<metadata> +<title>entities01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with entities set to true, check that +entity references and unused entity declaration are maintained. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="entities" type="NamedNodeMap"/> +<var name="ent2" type="Entity"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"entities"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- add an entity reference to the content of the p element --> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<createEntityReference var="entRef" obj="doc" name='"ent1"'/> +<appendChild var="child" obj="pElem" newChild="entRef"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<lastChild var="child" obj="pElem" interface="Node"/> +<assertNotNull actual="child" id="lastChildNotNull"/> +<!-- this should be a Entity Reference node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"ent1"' ignoreCase="false" id="firstChild"/> +<!-- early drafts would have removed unused entity declarations too --> +<doctype var="doctype" obj="doc"/> +<entities var="entities" obj="doctype"/> +<getNamedItem var="ent2" obj="entities" name='"ent2"'/> +<assertNotNull actual="ent2" id="ent2NotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/core/entities02.xml b/test/testcases/tests/level3/core/entities02.xml new file mode 100644 index 0000000..ef3d553 --- /dev/null +++ b/test/testcases/tests/level3/core/entities02.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities02"> +<metadata> +<title>entities02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with entities set to false, check that +entity references are expanded and unused entity declaration are maintained. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="childValue" type="DOMString"/> +<var name="entities" type="NamedNodeMap"/> +<var name="ent2" type="Entity"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- add an entity reference to the content of the p element --> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<createEntityReference var="entRef" obj="doc" name='"ent1"'/> +<appendChild var="child" obj="pElem" newChild="entRef"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<lastChild var="child" obj="pElem" interface="Node"/> +<assertNotNull actual="child" id="lastChildNotNull"/> +<!-- this should be a Text node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"#text"' ignoreCase="false" id="firstChildName"/> +<nodeValue var="childValue" obj="child"/> +<assertEquals actual="childValue" expected='"barfoo"' ignoreCase="false" id="firstChildValue"/> +<!-- early drafts would have removed unused entity declarations too --> +<doctype var="doctype" obj="doc"/> +<entities var="entities" obj="doctype"/> +<getNamedItem var="ent2" obj="entities" name='"ent2"'/> +<assertNotNull actual="ent2" id="ent2NotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/core/entities03.xml b/test/testcases/tests/level3/core/entities03.xml new file mode 100644 index 0000000..f02fd9f --- /dev/null +++ b/test/testcases/tests/level3/core/entities03.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities03"> +<metadata> +<title>entities03</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with entities set to false, check that +unbound entity references are preserved. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="childType" type="int"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- add an entity reference to the content of the p element --> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<createEntityReference var="entRef" obj="doc" name='"ent3"'/> +<appendChild var="child" obj="pElem" newChild="entRef"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<lastChild var="child" obj="pElem" interface="Node"/> +<assertNotNull actual="child" id="lastChildNotNull"/> +<!-- this should be a Entity Reference node --> +<nodeType var="childType" obj="child"/> +<assertEquals actual="childType" expected="5" ignoreCase="false" id="lastChildEntRef"/> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"ent3"' ignoreCase="false" id="lastChildName"/> +</test> + + diff --git a/test/testcases/tests/level3/core/entities04.xml b/test/testcases/tests/level3/core/entities04.xml new file mode 100644 index 0000000..2daaa4f --- /dev/null +++ b/test/testcases/tests/level3/core/entities04.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities04"> +<metadata> +<title>entities04</title> +<creator>Curt Arnold</creator> +<description> +Normalize document using Node.normalize checking that "entities" parameter is ignored. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="entities" type="NamedNodeMap"/> +<var name="ent2" type="Entity"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- add an entity reference to the content of the p element --> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<createEntityReference var="entRef" obj="doc" name='"ent1"'/> +<appendChild var="child" obj="pElem" newChild="entRef"/> +<normalize obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<lastChild var="child" obj="pElem" interface="Node"/> +<assertNotNull actual="child" id="lastChildNotNull"/> +<!-- this should be a Entity Reference node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"ent1"' ignoreCase="false" id="firstChild"/> +<!-- early drafts would have removed unused entity declarations too --> +<doctype var="doctype" obj="doc"/> +<entities var="entities" obj="doctype"/> +<getNamedItem var="ent2" obj="entities" name='"ent2"'/> +<assertNotNull actual="ent2" id="ent2NotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/core/entitygetinputencoding01.xml b/test/testcases/tests/level3/core/entitygetinputencoding01.xml new file mode 100644 index 0000000..0bf9701 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetinputencoding01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetinputencoding01"> +<metadata> +<title>entitygetinputencoding01</title> +<creator>IBM</creator> +<description> + Call the getInputEncoding method on a UTF-8 encoded document and check if the + value returned is null for a internal general entity. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<inputEncoding obj="entity" var="encodingName" interface="Entity"/> +<assertNull actual="encodingName" id="entitygetinputencoding01"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetinputencoding02.xml b/test/testcases/tests/level3/core/entitygetinputencoding02.xml new file mode 100644 index 0000000..528b642 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetinputencoding02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetinputencoding02"> +<metadata> +<title>entitygetinputencoding02</title> +<creator>IBM</creator> +<description> + Call the getInputEncoding method on a UTF-16 encoded document that contains an external + unparsed entity and check if the value returned is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="barfoo_utf16" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent5"'/> +<inputEncoding obj="entity" var="encodingName" interface="Entity"/> +<assertNull actual="encodingName" id="entitygetinputencoding02" /> +</test> diff --git a/test/testcases/tests/level3/core/entitygetinputencoding03.xml b/test/testcases/tests/level3/core/entitygetinputencoding03.xml new file mode 100644 index 0000000..2ed67a4 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetinputencoding03.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetinputencoding03"> +<metadata> +<title>entitygetinputencoding03</title> +<creator>IBM</creator> +<description> +Check the value of Entity.inputEncoding on an UTF-16 external entity +is either UTF-16 or UTF-16LE +</description> +<contributor>Neil Delima</contributor> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent1"'/> +<inputEncoding obj="entity" var="encodingName" interface="Entity"/> +<!-- accept UTF-16LE and UTF-16 as encoding values --> +<if> + <notEquals actual="encodingName" expected='"UTF-16LE"' ignoreCase="true"/> + <assertEquals id="entityIsUTF16orUTF16LE" actual="encodingName" expected='"UTF-16"' ignoreCase="true"/> +</if> +<!-- check that document's encoding is UTF-8 --> +<inputEncoding obj="doc" var="encodingName" interface="Document"/> +<assertEquals id="documentIsUTF8" actual="encodingName" expected='"UTF-8"' ignoreCase="true"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetinputencoding04.xml b/test/testcases/tests/level3/core/entitygetinputencoding04.xml new file mode 100644 index 0000000..5b1af25 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetinputencoding04.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetinputencoding04"> +<metadata> +<title>entitygetinputencoding04</title> +<creator>IBM</creator> +<description> +Check the value of Entity.inputEncoding on an UTF-8 external entity +is UTF-8. +</description> +<contributor>Neil Delima</contributor> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent2"'/> +<inputEncoding obj="entity" var="encodingName" interface="Entity"/> +<assertEquals id="entityIsUTF8" actual="encodingName" expected='"UTF-8"' ignoreCase="true"/> +<!-- check that document's encoding is UTF-8 --> +<inputEncoding obj="doc" var="encodingName" interface="Document"/> +<assertEquals id="documentIsUTF8" actual="encodingName" expected='"UTF-8"' ignoreCase="true"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlencoding01.xml b/test/testcases/tests/level3/core/entitygetxmlencoding01.xml new file mode 100644 index 0000000..b7394f9 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlencoding01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlencoding01"> +<metadata> +<title>entitygetxmlencoding01</title> +<creator>IBM</creator> +<description> + Call the getXmlEncoding method on a UTF-8 encoded entity of a document that is not an + external parsed entity and check if the value returned is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<xmlEncoding obj="entity" var="encodingName" interface="Entity"/> +<assertNull actual="encodingName" id="entitygetxmlencoding01"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlencoding02.xml b/test/testcases/tests/level3/core/entitygetxmlencoding02.xml new file mode 100644 index 0000000..5bc51ad --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlencoding02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlencoding02"> +<metadata> +<title>entitygetxmlencoding02</title> +<creator>IBM</creator> +<description> + Call the getencoding method on a document that contains an external + unparsed entity and check if the value returned is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent5"'/> +<xmlEncoding obj="entity" var="encodingName" interface="Entity"/> +<assertNull actual="encodingName" id="entitygetxmlencoding02"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlencoding03.xml b/test/testcases/tests/level3/core/entitygetxmlencoding03.xml new file mode 100644 index 0000000..ea24f24 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlencoding03.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlencoding03"> +<metadata> +<title>entitygetxmlencoding03</title> +<creator>IBM</creator> +<description> +Check the value of Entity.xmlEncoding on an external entity with an encoding +declaration precisely matches the specified value. +</description> +<contributor>Neil Delima</contributor> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent1"'/> +<xmlEncoding obj="entity" var="encodingName" interface="Entity"/> +<assertEquals expected='"uTf-16"' actual="encodingName" id="xmlEncoding" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlencoding04.xml b/test/testcases/tests/level3/core/entitygetxmlencoding04.xml new file mode 100644 index 0000000..db26480 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlencoding04.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlencoding04"> +<metadata> +<title>entitygetxmlencoding04</title> +<creator>IBM</creator> +<description> +Check the value of Entity.xmlEncoding on an external entity without an encoding +declaration is null. +</description> +<contributor>Neil Delima</contributor> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="encodingName" type="DOMString"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent2"'/> +<xmlEncoding obj="entity" var="encodingName" interface="Entity"/> +<assertNull actual="encodingName" id="xmlEncoding"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlversion01.xml b/test/testcases/tests/level3/core/entitygetxmlversion01.xml new file mode 100644 index 0000000..6526f2b --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlversion01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlversion01"> +<metadata> +<title>entitygetxmlversion01</title> +<creator>IBM</creator> +<description> + Call the getXmlVersion method on entity that is not an external entity and check if + the value returned is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="entityVersion" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"epsilon"'/> +<xmlVersion obj="entity" var="entityVersion" interface="Entity"/> +<assertNull actual="entityVersion" id="entitygetxmlversion01"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlversion02.xml b/test/testcases/tests/level3/core/entitygetxmlversion02.xml new file mode 100644 index 0000000..3136762 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlversion02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlversion02"> +<metadata> +<title>entitygetxmlversion02</title> +<creator>IBM</creator> +<description> + Call the getXmlVersion method on a UTF-16 encoded document that contains an external + unparsed entity declaration and check if the value returned is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="entityVersion" type="DOMString"/> +<load var="doc" href="barfoo_utf16" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent5"'/> +<xmlVersion obj="entity" var="entityVersion" interface="Entity"/> +<assertNull actual="entityVersion" id="entitygetxmlversion02"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlversion03.xml b/test/testcases/tests/level3/core/entitygetxmlversion03.xml new file mode 100644 index 0000000..0e2adb4 --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlversion03.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlversion03"> +<metadata> +<title>entitygetxmlversion03</title> +<creator>IBM</creator> +<description> + Check that the value of Entity.xmlVersion on an external entity without + a version declaration is null. +</description> +<contributor>Neil Delima</contributor> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="entityVersion" type="DOMString"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent2"'/> +<xmlVersion obj="entity" var="entityVersion" interface="Entity"/> +<assertNull actual="entityVersion" id="xmlVersionNull"/> +</test> diff --git a/test/testcases/tests/level3/core/entitygetxmlversion04.xml b/test/testcases/tests/level3/core/entitygetxmlversion04.xml new file mode 100644 index 0000000..391d76a --- /dev/null +++ b/test/testcases/tests/level3/core/entitygetxmlversion04.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entitygetxmlversion04"> +<metadata> +<title>entitygetxmlversion04</title> +<creator>IBM</creator> +<description> + Check that the value of Entity.xmlVersion on an external entity with + a version declaration is "1.0". +</description> +<contributor>Neil Delima</contributor> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version"/> +<subject resource="http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="entityVersion" type="DOMString"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"ent1"'/> +<xmlVersion obj="entity" var="entityVersion" interface="Entity"/> +<assertEquals expected='"1.0"' actual="entityVersion" id="xmlVersion10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/files/.cvsignore b/test/testcases/tests/level3/core/files/.cvsignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/core/files/.cvsignore diff --git a/test/testcases/tests/level3/core/files/CVS/Entries b/test/testcases/tests/level3/core/files/CVS/Entries new file mode 100644 index 0000000..2634cf9 --- /dev/null +++ b/test/testcases/tests/level3/core/files/CVS/Entries @@ -0,0 +1,71 @@ +/.cvsignore/1.2/Fri Apr 3 02:47:59 2009// +/Yes/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo.svg/1.2/Fri Apr 3 02:47:59 2009// +/barfoo.xhtml/1.4/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo.xml/1.5/Fri Apr 3 02:47:59 2009// +/barfoo_base.svg/1.3/Fri Apr 3 02:47:59 2009// +/barfoo_base.xhtml/1.3/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_base.xml/1.4/Fri Apr 3 02:47:59 2009// +/barfoo_nodefaultns.svg/1.1/Fri Apr 3 02:47:59 2009// +/barfoo_nodefaultns.xhtml/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_nodefaultns.xml/1.2/Fri Apr 3 02:47:59 2009// +/barfoo_standalone_no.svg/1.1/Fri Apr 3 02:47:59 2009// +/barfoo_standalone_no.xhtml/1.4/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_standalone_no.xml/1.4/Fri Apr 3 02:47:59 2009// +/barfoo_standalone_yes.svg/1.1/Fri Apr 3 02:47:59 2009// +/barfoo_standalone_yes.xhtml/1.4/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_standalone_yes.xml/1.4/Fri Apr 3 02:47:59 2009// +/barfoo_utf16.svg/1.3/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_utf16.xhtml/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_utf16.xml/1.3/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_utf8.svg/1.1/Fri Apr 3 02:47:59 2009// +/barfoo_utf8.xhtml/1.4/Fri Apr 3 02:47:59 2009/-kb/ +/barfoo_utf8.xml/1.4/Fri Apr 3 02:47:59 2009// +/canonicalform01.svg/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform01.xhtml/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform01.xml/1.2/Fri Apr 3 02:47:59 2009// +/canonicalform02.svg/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform02.xhtml/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform02.xml/1.2/Fri Apr 3 02:47:59 2009// +/canonicalform03.svg/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform03.xhtml/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform03.xml/1.2/Fri Apr 3 02:47:59 2009// +/canonicalform04.svg/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform04.xhtml/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform04.xml/1.2/Fri Apr 3 02:47:59 2009// +/canonicalform05.svg/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform05.xhtml/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/canonicalform05.xml/1.2/Fri Apr 3 02:47:59 2009// +/datatype_normalization.svg/1.3/Fri Apr 3 02:47:59 2009/-kb/ +/datatype_normalization.svg.xsd/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/datatype_normalization.xml/1.3/Fri Apr 3 02:47:59 2009// +/datatype_normalization.xsd/1.3/Fri Apr 3 02:47:59 2009/-kb/ +/datatype_normalization2.svg/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/datatype_normalization2.svg.xsd/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/datatype_normalization2.xhtml/1.3/Fri Apr 3 02:47:59 2009/-kb/ +/datatype_normalization2.xml/1.3/Fri Apr 3 02:47:59 2009// +/datatype_normalization2.xsd/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/external_barfoo.svg/1.2/Fri Apr 3 02:47:59 2009// +/external_barfoo.xhtml/1.4/Fri Apr 3 02:47:59 2009/-kb/ +/external_barfoo.xml/1.5/Fri Apr 3 02:47:59 2009// +/external_foo.ent/1.1/Fri Apr 3 02:47:59 2009// +/external_foobr.ent/1.1/Fri Apr 3 02:47:59 2009// +/external_widget.ent/1.1/Fri Apr 3 02:47:59 2009// +/hc_nodtdstaff.html/1.2/Fri Apr 3 02:47:59 2009// +/hc_nodtdstaff.svg/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/hc_nodtdstaff.xhtml/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/hc_nodtdstaff.xml/1.2/Fri Apr 3 02:47:59 2009// +/hc_staff.svg/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/hc_staff.svg.xsd/1.1/Fri Apr 3 02:47:59 2009/-kb/ +/hc_staff.xhtml/1.5/Fri Apr 3 02:47:59 2009/-kb/ +/hc_staff.xml/1.6/Fri Apr 3 02:47:59 2009// +/hc_staff.xsd/1.8/Fri Apr 3 02:47:59 2009/-kb/ +/svgtest.js/1.1/Fri Apr 3 02:47:59 2009// +/svgunit.js/1.1/Fri Apr 3 02:47:59 2009// +/typeinfo.svg/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/typeinfo.svg.xsd/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/typeinfo.xhtml/1.3/Fri Apr 3 02:47:59 2009/-kb/ +/typeinfo.xml/1.3/Fri Apr 3 02:47:59 2009// +/typeinfo.xsd/1.2/Fri Apr 3 02:47:59 2009/-kb/ +/xhtml1-strict.dtd/1.4/Fri Apr 3 02:47:59 2009/-kb/ +D diff --git a/test/testcases/tests/level3/core/files/CVS/Repository b/test/testcases/tests/level3/core/files/CVS/Repository new file mode 100644 index 0000000..1efd590 --- /dev/null +++ b/test/testcases/tests/level3/core/files/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/core/files diff --git a/test/testcases/tests/level3/core/files/CVS/Root b/test/testcases/tests/level3/core/files/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/core/files/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/core/files/CVS/Template b/test/testcases/tests/level3/core/files/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/core/files/CVS/Template diff --git a/test/testcases/tests/level3/core/files/Yes b/test/testcases/tests/level3/core/files/Yes new file mode 100644 index 0000000..b2019bc --- /dev/null +++ b/test/testcases/tests/level3/core/files/Yes @@ -0,0 +1,28 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+xsi:noNamespaceSchemaLocation="Yes" appears in hc_staff.xml
+but it was not anticipated that "Yes" would be resolved since
+there were no elements without a namespace. However, since
+at least one processor does attempt to load "Yes", this file
+is here to satisfy that request.
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="bogus" type="xsd:string"/>
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/barfoo.svg b/test/testcases/tests/level3/core/files/barfoo.svg new file mode 100644 index 0000000..a513594 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo.svg @@ -0,0 +1,27 @@ +<!DOCTYPE svg [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT svg (rect,script,body)>
+<!ATTLIST svg xmlns CDATA #IMPLIED>
+<!ELEMENT rect EMPTY>
+<!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ fill CDATA #REQUIRED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT body (p)>
+<!ATTLIST body xmlns CDATA #IMPLIED>
+<!ELEMENT br EMPTY>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script type CDATA #IMPLIED>
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+<body xmlns='http://www.w3.org/1999/xhtml'>
+<p>bar</p>
+</body>
+</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/barfoo.xhtml b/test/testcases/tests/level3/core/files/barfoo.xhtml new file mode 100644 index 0000000..51c8c07 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo.xhtml @@ -0,0 +1,25 @@ +<!DOCTYPE html [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT html (head, body)>
+<!ATTLIST html xmlns CDATA #IMPLIED>
+<!ELEMENT head (title,script*)>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT body (p)>
+<!ATTLIST body onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT br EMPTY>
+]>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>replaceWholeText sample</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/barfoo.xml b/test/testcases/tests/level3/core/files/barfoo.xml new file mode 100644 index 0000000..9d055dc --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo.xml @@ -0,0 +1,25 @@ +<!DOCTYPE html [ +<!ENTITY ent1 'foo'> +<!ENTITY ent2 'foo<br/>'> +<!ELEMENT html (head, body)> +<!ATTLIST html xmlns CDATA #IMPLIED> +<!ELEMENT head (title,script*)> +<!ELEMENT script (#PCDATA)> +<!ATTLIST script + src CDATA #IMPLIED + type CDATA #IMPLIED + charset CDATA #IMPLIED> +<!ELEMENT title (#PCDATA)> +<!ELEMENT body (p)> +<!ATTLIST body onload CDATA #IMPLIED> +<!ELEMENT p (#PCDATA|br)*> +<!ELEMENT br EMPTY> +]> +<html xmlns='http://www.w3.org/1999/xhtml'> +<head> +<title>replaceWholeText sample</title> +</head> +<body onload="parent.loadComplete()"> +<p>bar</p> +</body> +</html> diff --git a/test/testcases/tests/level3/core/files/barfoo_base.svg b/test/testcases/tests/level3/core/files/barfoo_base.svg new file mode 100644 index 0000000..e905cc8 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_base.svg @@ -0,0 +1,37 @@ +<!DOCTYPE svg [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT svg (rect,script,head,body)>
+<!ATTLIST svg xmlns CDATA #IMPLIED
+ xml:base CDATA #IMPLIED>
+<!ELEMENT rect EMPTY>
+<!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ fill CDATA #REQUIRED>
+<!ELEMENT body (p)>
+<!ATTLIST body
+ xml:base CDATA #IMPLIED
+ xmlns CDATA #IMPLIED
+ id ID #IMPLIED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT br EMPTY>
+<!ELEMENT head (title)>
+<!ATTLIST head xmlns CDATA #IMPLIED>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script type CDATA #IMPLIED>
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg" xml:base="http://www.w3.org/DOM/L3Test">
+<rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+<head xmlns='http://www.w3.org/1999/xhtml'>
+<title>XML Base sample</title>
+</head>
+<body xmlns='http://www.w3.org/1999/xhtml' xml:base="http://www.w3.org/DOM/EmployeeID" id="body">
+<p>bar</p><!-- keep comment adjacent to p -->
+</body>
+</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/barfoo_base.xhtml b/test/testcases/tests/level3/core/files/barfoo_base.xhtml new file mode 100644 index 0000000..4c79469 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_base.xhtml @@ -0,0 +1,29 @@ +<!DOCTYPE html [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ xmlns CDATA #IMPLIED
+ xml:base CDATA #IMPLIED>
+<!ELEMENT head (title,script*)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED>
+<!ELEMENT body (p)>
+<!ATTLIST body xml:base CDATA #IMPLIED
+ id ID #IMPLIED
+ onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT br EMPTY>
+]>
+<html xmlns='http://www.w3.org/1999/xhtml' xml:base="http://www.w3.org/DOM/L3Test">
+<head>
+<title>XML Base sample</title>
+</head>
+<body xml:base="http://www.w3.org/DOM/EmployeeID" id="body">
+<p>bar</p><!-- keep comment adjacent to p -->
+</body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/barfoo_base.xml b/test/testcases/tests/level3/core/files/barfoo_base.xml new file mode 100644 index 0000000..4079a3b --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_base.xml @@ -0,0 +1,29 @@ +<!DOCTYPE html [ +<!ENTITY ent1 'foo'> +<!ENTITY ent2 'foo<br/>'> +<!ELEMENT html (head, body)> +<!ATTLIST html + xmlns CDATA #IMPLIED + xml:base CDATA #IMPLIED> +<!ELEMENT head (title,script*)> +<!ELEMENT title (#PCDATA)> +<!ELEMENT script (#PCDATA)> +<!ATTLIST script + src CDATA #IMPLIED + type CDATA #IMPLIED + charset CDATA #IMPLIED> +<!ELEMENT body (p)> +<!ATTLIST body xml:base CDATA #IMPLIED + id ID #IMPLIED + onload CDATA #IMPLIED> +<!ELEMENT p (#PCDATA|br)*> +<!ELEMENT br EMPTY> +]> +<html xmlns='http://www.w3.org/1999/xhtml' xml:base="http://www.w3.org/DOM/L3Test"> +<head> +<title>XML Base sample</title> +</head> +<body xml:base="http://www.w3.org/DOM/EmployeeID" id="body"> +<p>bar</p><!-- keep comment adjacent to p --> +</body> +</html> diff --git a/test/testcases/tests/level3/core/files/barfoo_nodefaultns.svg b/test/testcases/tests/level3/core/files/barfoo_nodefaultns.svg new file mode 100644 index 0000000..dbb156c --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_nodefaultns.svg @@ -0,0 +1,28 @@ +<!DOCTYPE svg:svg [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT svg:svg (svg:rect,svg:script,html:body)>
+<!ATTLIST svg:svg xmlns:svg CDATA #IMPLIED>
+<!ELEMENT svg:rect EMPTY>
+<!ATTLIST svg:rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ fill CDATA #REQUIRED>
+<!ELEMENT html:p (#PCDATA|html:br)*>
+<!ATTLIST html:p class CDATA #IMPLIED>
+<!ELEMENT html:body (html:p)>
+<!ATTLIST html:body xmlns:html CDATA #IMPLIED>
+<!ELEMENT html:br EMPTY>
+<!ELEMENT svg:script (#PCDATA)>
+<!ATTLIST svg:script type CDATA #IMPLIED>
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg:svg xmlns:svg="http://www.w3.org/2000/svg">
+<svg:rect x="0" y="0" width="100" height="100" fill="blue"/><svg:script type="text/ecmascript">&svgtest;&svgunit;</svg:script>
+<html:body xmlns:html='http://www.w3.org/1999/xhtml'>
+<html:p class="visible:false">bar</html:p>
+</html:body>
+</svg:svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/barfoo_nodefaultns.xhtml b/test/testcases/tests/level3/core/files/barfoo_nodefaultns.xhtml new file mode 100644 index 0000000..8c2c151 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_nodefaultns.xhtml @@ -0,0 +1,26 @@ +<!DOCTYPE html:html [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT html:html (html:head, html:body)>
+<!ATTLIST html:html xmlns:html CDATA #IMPLIED>
+<!ELEMENT html:head (html:title,script*)>
+<!ATTLIST html:head xmlns CDATA #IMPLIED>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED>
+<!ELEMENT html:title (#PCDATA)>
+<!ELEMENT html:body (html:p)>
+<!ELEMENT html:p (#PCDATA|html:br)*>
+<!ATTLIST html:p class CDATA #IMPLIED>
+<!ELEMENT html:br EMPTY>
+]>
+<html:html xmlns:html='http://www.w3.org/1999/xhtml'>
+<html:head xmlns='http://www.w3.org/1999/xhtml'>
+<html:title>test file</html:title>
+</html:head>
+<html:body>
+<html:p class="visible:false">bar</html:p>
+</html:body>
+</html:html>
diff --git a/test/testcases/tests/level3/core/files/barfoo_nodefaultns.xml b/test/testcases/tests/level3/core/files/barfoo_nodefaultns.xml new file mode 100644 index 0000000..dc7220c --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_nodefaultns.xml @@ -0,0 +1,26 @@ +<!DOCTYPE html:html [ +<!ENTITY ent1 'foo'> +<!ENTITY ent2 'foo<br/>'> +<!ELEMENT html:html (html:head, html:body)> +<!ATTLIST html:html xmlns:html CDATA #IMPLIED> +<!ELEMENT html:head (html:title,script*)> +<!ATTLIST html:head xmlns CDATA #IMPLIED> +<!ELEMENT html:title (#PCDATA)> +<!ELEMENT script (#PCDATA)> +<!ATTLIST script + src CDATA #IMPLIED + type CDATA #IMPLIED + charset CDATA #IMPLIED> +<!ELEMENT html:body (html:p)> +<!ELEMENT html:p (#PCDATA|html:br)*> +<!ATTLIST html:p class CDATA #IMPLIED> +<!ELEMENT html:br EMPTY> +]> +<html:html xmlns:html='http://www.w3.org/1999/xhtml'> +<html:head xmlns='http://www.w3.org/1999/xhtml'> +<html:title>test file</html:title> +</html:head> +<html:body> +<html:p class="visible:false">bar</html:p> +</html:body> +</html:html> diff --git a/test/testcases/tests/level3/core/files/barfoo_standalone_no.svg b/test/testcases/tests/level3/core/files/barfoo_standalone_no.svg new file mode 100644 index 0000000..ad183a3 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_standalone_no.svg @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT svg (rect,script,body)>
+<!ATTLIST svg xmlns CDATA #IMPLIED>
+<!ELEMENT rect EMPTY>
+<!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ fill CDATA #REQUIRED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT body (p)>
+<!ATTLIST body xmlns CDATA #IMPLIED>
+<!ELEMENT br EMPTY>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script type CDATA #IMPLIED>
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+<body xmlns='http://www.w3.org/1999/xhtml'>
+<p>bar</p>
+</body>
+</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/barfoo_standalone_no.xhtml b/test/testcases/tests/level3/core/files/barfoo_standalone_no.xhtml new file mode 100644 index 0000000..e41c526 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_standalone_no.xhtml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT html (head, body)>
+<!ATTLIST html xmlns CDATA #IMPLIED>
+<!ELEMENT head (title,script*)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED>
+<!ELEMENT body (p)>
+<!ATTLIST body onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT br EMPTY>
+]>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>replaceWholeText sample</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/barfoo_standalone_no.xml b/test/testcases/tests/level3/core/files/barfoo_standalone_no.xml new file mode 100644 index 0000000..6723dfa --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_standalone_no.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE html [ +<!ENTITY ent1 'foo'> +<!ENTITY ent2 'foo<br/>'> +<!ELEMENT html (head, body)> +<!ATTLIST html xmlns CDATA #IMPLIED> +<!ELEMENT head (title,script*)> +<!ELEMENT title (#PCDATA)> +<!ELEMENT script (#PCDATA)> +<!ATTLIST script + src CDATA #IMPLIED + type CDATA #IMPLIED + charset CDATA #IMPLIED> +<!ELEMENT body (p)> +<!ATTLIST body onload CDATA #IMPLIED> +<!ELEMENT p (#PCDATA|br)*> +<!ELEMENT br EMPTY> +]> +<html xmlns='http://www.w3.org/1999/xhtml'> +<head> +<title>replaceWholeText sample</title> +</head> +<body onload="parent.loadComplete()"> +<p>bar</p> +</body> +</html> diff --git a/test/testcases/tests/level3/core/files/barfoo_standalone_yes.svg b/test/testcases/tests/level3/core/files/barfoo_standalone_yes.svg new file mode 100644 index 0000000..1d76949 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_standalone_yes.svg @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE svg [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT svg (rect,body)>
+<!ATTLIST svg xmlns CDATA #IMPLIED>
+<!ELEMENT rect EMPTY>
+<!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ fill CDATA #REQUIRED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT body (p)>
+<!ATTLIST body xmlns CDATA #IMPLIED>
+<!ELEMENT br EMPTY>
+]>
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="0" y="0" width="100" height="100" fill="blue"/>
+<body xmlns='http://www.w3.org/1999/xhtml'>
+<p>bar</p>
+</body>
+</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/barfoo_standalone_yes.xhtml b/test/testcases/tests/level3/core/files/barfoo_standalone_yes.xhtml new file mode 100644 index 0000000..49f389e --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_standalone_yes.xhtml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE html [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT html (head, body)>
+<!ATTLIST html xmlns CDATA #IMPLIED>
+<!ELEMENT head (title,script*)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED>
+<!ELEMENT body (p)>
+<!ATTLIST body onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT br EMPTY>
+]>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>getXmlStandalone test doc</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/barfoo_standalone_yes.xml b/test/testcases/tests/level3/core/files/barfoo_standalone_yes.xml new file mode 100644 index 0000000..0adf126 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_standalone_yes.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!DOCTYPE html [ +<!ENTITY ent1 'foo'> +<!ENTITY ent2 'foo<br/>'> +<!ELEMENT html (head, body)> +<!ATTLIST html xmlns CDATA #IMPLIED> +<!ELEMENT head (title,script*)> +<!ELEMENT title (#PCDATA)> +<!ELEMENT script (#PCDATA)> +<!ATTLIST script + src CDATA #IMPLIED + type CDATA #IMPLIED + charset CDATA #IMPLIED> +<!ELEMENT body (p)> +<!ATTLIST body onload CDATA #IMPLIED> +<!ELEMENT p (#PCDATA|br)*> +<!ELEMENT br EMPTY> +]> +<html xmlns='http://www.w3.org/1999/xhtml'> +<head> +<title>getXmlStandalone test doc</title> +</head> +<body onload="parent.loadComplete()"> +<p>bar</p> +</body> +</html> diff --git a/test/testcases/tests/level3/core/files/barfoo_utf16.svg b/test/testcases/tests/level3/core/files/barfoo_utf16.svg Binary files differnew file mode 100644 index 0000000..40f8314 --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_utf16.svg diff --git a/test/testcases/tests/level3/core/files/barfoo_utf16.xhtml b/test/testcases/tests/level3/core/files/barfoo_utf16.xhtml Binary files differnew file mode 100644 index 0000000..260282d --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_utf16.xhtml diff --git a/test/testcases/tests/level3/core/files/barfoo_utf16.xml b/test/testcases/tests/level3/core/files/barfoo_utf16.xml Binary files differnew file mode 100644 index 0000000..e6706ab --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_utf16.xml diff --git a/test/testcases/tests/level3/core/files/barfoo_utf8.svg b/test/testcases/tests/level3/core/files/barfoo_utf8.svg new file mode 100644 index 0000000..8ebb45d --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_utf8.svg @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="uTf-8"?>
+<!DOCTYPE svg [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT svg (rect,script,body)>
+<!ATTLIST svg xmlns CDATA #IMPLIED>
+<!ELEMENT rect EMPTY>
+<!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ fill CDATA #REQUIRED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT body (p)>
+<!ATTLIST body xmlns CDATA #IMPLIED>
+<!ELEMENT br EMPTY>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script type CDATA #IMPLIED>
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+<!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>
+<!NOTATION notation1 PUBLIC "notation1File">
+]>
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+<body xmlns='http://www.w3.org/1999/xhtml'>
+<p>bar</p>
+</body>
+</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/barfoo_utf8.xhtml b/test/testcases/tests/level3/core/files/barfoo_utf8.xhtml new file mode 100644 index 0000000..5a7e3fc --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_utf8.xhtml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="uTf-8"?>
+<!DOCTYPE html [
+<!ENTITY ent1 'foo'>
+<!ENTITY ent2 'foo<br/>'>
+<!ELEMENT html (head, body)>
+<!ATTLIST html xmlns CDATA #IMPLIED>
+<!ELEMENT head (title,script*)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED>
+<!ELEMENT body (p)>
+<!ATTLIST body onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ELEMENT br EMPTY>
+<!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>
+<!NOTATION notation1 PUBLIC "notation1File">
+]>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>test file</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/barfoo_utf8.xml b/test/testcases/tests/level3/core/files/barfoo_utf8.xml new file mode 100644 index 0000000..414340c --- /dev/null +++ b/test/testcases/tests/level3/core/files/barfoo_utf8.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="uTf-8"?> +<!DOCTYPE html [ +<!ENTITY ent1 'foo'> +<!ENTITY ent2 'foo<br/>'> +<!ELEMENT html (head, body)> +<!ATTLIST html xmlns CDATA #IMPLIED> +<!ELEMENT head (title,script*)> +<!ELEMENT title (#PCDATA)> +<!ELEMENT script (#PCDATA)> +<!ATTLIST script + src CDATA #IMPLIED + type CDATA #IMPLIED + charset CDATA #IMPLIED> +<!ELEMENT body (p)> +<!ATTLIST body onload CDATA #IMPLIED> +<!ELEMENT p (#PCDATA|br)*> +<!ELEMENT br EMPTY> +<!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1> +<!NOTATION notation1 PUBLIC "notation1File"> +]> +<html xmlns='http://www.w3.org/1999/xhtml'> +<head> +<title>test file</title> +</head> +<body onload="parent.loadComplete()"> +<p>bar</p> +</body> +</html> diff --git a/test/testcases/tests/level3/core/files/canonicalform01.svg b/test/testcases/tests/level3/core/files/canonicalform01.svg new file mode 100644 index 0000000..ea1a91e --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform01.svg @@ -0,0 +1,17 @@ +<?xml version="1.0"?>
+
+<?xml-stylesheet href="doc.xsl"
+ type="text/xsl" ?>
+
+<!DOCTYPE svg SYSTEM "xhtml1-strict.dtd"[
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns='http://www.w3.org/1999/xhtml'>
+<p>Hello, world!<!-- Comment 1 --></p></body></svg>
+
+<?pi-without-data ?>
+
+<!-- Comment 2 -->
+
+<!-- Comment 3 -->
diff --git a/test/testcases/tests/level3/core/files/canonicalform01.xhtml b/test/testcases/tests/level3/core/files/canonicalform01.xhtml new file mode 100644 index 0000000..35a0979 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform01.xhtml @@ -0,0 +1,14 @@ +<?xml version="1.0"?>
+
+<?xml-stylesheet href="doc.xsl"
+ type="text/xsl" ?>
+
+<!DOCTYPE html SYSTEM "xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform01</title></head><body onload="parent.loadComplete()">
+<p>Hello, world!<!-- Comment 1 --></p></body></html>
+
+<?pi-without-data ?>
+
+<!-- Comment 2 -->
+
+<!-- Comment 3 -->
diff --git a/test/testcases/tests/level3/core/files/canonicalform01.xml b/test/testcases/tests/level3/core/files/canonicalform01.xml new file mode 100644 index 0000000..ac9b7c8 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform01.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> + +<?xml-stylesheet href="doc.xsl" + type="text/xsl" ?> + +<!DOCTYPE html SYSTEM "xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform01</title></head><body onload="parent.loadComplete()"> +<p>Hello, world!<!-- Comment 1 --></p></body></html> + +<?pi-without-data ?> + +<!-- Comment 2 --> + +<!-- Comment 3 --> diff --git a/test/testcases/tests/level3/core/files/canonicalform02.svg b/test/testcases/tests/level3/core/files/canonicalform02.svg new file mode 100644 index 0000000..132c460 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform02.svg @@ -0,0 +1,14 @@ +<!DOCTYPE svg SYSTEM "xhtml1-strict.dtd"[
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]><svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns='http://www.w3.org/1999/xhtml'>
+ <acronym> </acronym>
+ <em> A B </em>
+ <p>
+ A
+ <acronym> </acronym>
+ B
+ <em> A B </em>
+ C
+ </p>
+</body></svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/canonicalform02.xhtml b/test/testcases/tests/level3/core/files/canonicalform02.xhtml new file mode 100644 index 0000000..270d698 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform02.xhtml @@ -0,0 +1,11 @@ +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform02</title></head><body onload="parent.loadComplete()">
+ <acronym> </acronym>
+ <em> A B </em>
+ <p>
+ A
+ <acronym> </acronym>
+ B
+ <em> A B </em>
+ C
+ </p>
+</body></html>
diff --git a/test/testcases/tests/level3/core/files/canonicalform02.xml b/test/testcases/tests/level3/core/files/canonicalform02.xml new file mode 100644 index 0000000..f949cfc --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform02.xml @@ -0,0 +1,11 @@ +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform02</title></head><body onload="parent.loadComplete()"> + <acronym> </acronym> + <em> A B </em> + <p> + A + <acronym> </acronym> + B + <em> A B </em> + C + </p> +</body></html> diff --git a/test/testcases/tests/level3/core/files/canonicalform03.svg b/test/testcases/tests/level3/core/files/canonicalform03.svg new file mode 100644 index 0000000..e6ea9a4 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform03.svg @@ -0,0 +1,22 @@ +<!DOCTYPE svg SYSTEM "xhtml1-strict.dtd"[
+<!ATTLIST acronym title CDATA "default">
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns='http://www.w3.org/1999/xhtml'>
+ <br />
+ <br ></br>
+ <div name = "elem3" id="elem3" />
+ <div name="elem4" id="elem4" ></div>
+ <div a:attr="out" b:attr="sorted" name="all" class="I'm"
+ xmlns:b="http://www.ietf.org"
+ xmlns:a="http://www.w3.org"
+ xmlns="http://example.org"/>
+ <div xmlns="" xmlns:a="http://www.w3.org">
+ <div xmlns="http://www.ietf.org">
+ <div xmlns="" xmlns:a="http://www.w3.org">
+ <acronym xmlns="" xmlns:a="http://www.ietf.org"/>
+ </div>
+ </div>
+ </div>
+</body></svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/canonicalform03.xhtml b/test/testcases/tests/level3/core/files/canonicalform03.xhtml new file mode 100644 index 0000000..4caa90d --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform03.xhtml @@ -0,0 +1,18 @@ +<!DOCTYPE html [<!ATTLIST acronym title CDATA "default">]>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform03</title></head><body onload="parent.loadComplete()">
+ <br />
+ <br ></br>
+ <div name = "elem3" id="elem3" />
+ <div name="elem4" id="elem4" ></div>
+ <div a:attr="out" b:attr="sorted" name="all" class="I'm"
+ xmlns:b="http://www.ietf.org"
+ xmlns:a="http://www.w3.org"
+ xmlns="http://example.org"/>
+ <div xmlns="" xmlns:a="http://www.w3.org">
+ <div xmlns="http://www.ietf.org">
+ <div xmlns="" xmlns:a="http://www.w3.org">
+ <acronym xmlns="" xmlns:a="http://www.ietf.org"/>
+ </div>
+ </div>
+ </div>
+</body></html>
diff --git a/test/testcases/tests/level3/core/files/canonicalform03.xml b/test/testcases/tests/level3/core/files/canonicalform03.xml new file mode 100644 index 0000000..d1257bc --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform03.xml @@ -0,0 +1,18 @@ +<!DOCTYPE html [<!ATTLIST acronym title CDATA "default">]> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform03</title></head><body onload="parent.loadComplete()"> + <br /> + <br ></br> + <div name = "elem3" id="elem3" /> + <div name="elem4" id="elem4" ></div> + <div a:attr="out" b:attr="sorted" name="all" class="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://example.org"/> + <div xmlns="" xmlns:a="http://www.w3.org"> + <div xmlns="http://www.ietf.org"> + <div xmlns="" xmlns:a="http://www.w3.org"> + <acronym xmlns="" xmlns:a="http://www.ietf.org"/> + </div> + </div> + </div> +</body></html> diff --git a/test/testcases/tests/level3/core/files/canonicalform04.svg b/test/testcases/tests/level3/core/files/canonicalform04.svg new file mode 100644 index 0000000..0b5a1d1 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform04.svg @@ -0,0 +1,15 @@ +<!DOCTYPE svg [
+<!ATTLIST div id ID #IMPLIED>
+<!ATTLIST div class NMTOKENS #IMPLIED>
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns='http://www.w3.org/1999/xhtml'>
+ <em>First line
 Second line</em>
+ <acronym>2</acronym>
+ <code><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></code>
+ <code title='value>"0" && value<"10" ?"valid":"error"'>valid</code>
+ <div title=' '   
	 ' '/>
+ <div class=' A   
	 B '/>
+ <div id=' '   
	 ' '/>
+</body></svg>
diff --git a/test/testcases/tests/level3/core/files/canonicalform04.xhtml b/test/testcases/tests/level3/core/files/canonicalform04.xhtml new file mode 100644 index 0000000..53a51ca --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform04.xhtml @@ -0,0 +1,13 @@ +<!DOCTYPE html [
+<!ATTLIST div id ID #IMPLIED>
+<!ATTLIST div class NMTOKENS #IMPLIED>
+]>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform04</title></head><body onload="parent.loadComplete()">
+ <em>First line
 Second line</em>
+ <acronym>2</acronym>
+ <code><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></code>
+ <code title='value>"0" && value<"10" ?"valid":"error"'>valid</code>
+ <div title=' '   
	 ' '/>
+ <div class=' A   
	 B '/>
+ <div id=' '   
	 ' '/>
+</body></html>
diff --git a/test/testcases/tests/level3/core/files/canonicalform04.xml b/test/testcases/tests/level3/core/files/canonicalform04.xml new file mode 100644 index 0000000..41f59bf --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform04.xml @@ -0,0 +1,13 @@ +<!DOCTYPE html [ +<!ATTLIST div id ID #IMPLIED> +<!ATTLIST div class NMTOKENS #IMPLIED> +]> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform04</title></head><body onload="parent.loadComplete()"> + <em>First line
 Second line</em> + <acronym>2</acronym> + <code><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></code> + <code title='value>"0" && value<"10" ?"valid":"error"'>valid</code> + <div title=' '   
	 ' '/> + <div class=' A   
	 B '/> + <div id=' '   
	 ' '/> +</body></html> diff --git a/test/testcases/tests/level3/core/files/canonicalform05.svg b/test/testcases/tests/level3/core/files/canonicalform05.svg new file mode 100644 index 0000000..c52d5a8 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform05.svg @@ -0,0 +1,15 @@ +<!DOCTYPE svg [
+<!ATTLIST p attrExtEnt ENTITY #IMPLIED>
+<!ENTITY ent1 "Hello">
+<!ENTITY ent2 SYSTEM "world.txt">
+<!ENTITY entExt SYSTEM "earth.gif" NDATA gif>
+<!NOTATION gif SYSTEM "viewgif.exe">
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100" fill="blue"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns='http://www.w3.org/1999/xhtml'>
+<p attrExtEnt="entExt">
+ &ent1;, &ent2;!
+</p></body></svg>
+
+<!-- Let world.txt contain "world" (excluding the quotes) -->
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/canonicalform05.xhtml b/test/testcases/tests/level3/core/files/canonicalform05.xhtml new file mode 100644 index 0000000..722d017 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform05.xhtml @@ -0,0 +1,13 @@ +<!DOCTYPE html [
+<!ATTLIST p attrExtEnt ENTITY #IMPLIED>
+<!ENTITY ent1 "Hello">
+<!ENTITY ent2 SYSTEM "world.txt">
+<!ENTITY entExt SYSTEM "earth.gif" NDATA gif>
+<!NOTATION gif SYSTEM "viewgif.exe">
+]>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform05</title></head><body onload="parent.loadComplete()">
+<p attrExtEnt="entExt">
+ &ent1;, &ent2;!
+</p></body></html>
+
+<!-- Let world.txt contain "world" (excluding the quotes) -->
diff --git a/test/testcases/tests/level3/core/files/canonicalform05.xml b/test/testcases/tests/level3/core/files/canonicalform05.xml new file mode 100644 index 0000000..8e7a345 --- /dev/null +++ b/test/testcases/tests/level3/core/files/canonicalform05.xml @@ -0,0 +1,13 @@ +<!DOCTYPE html [ +<!ATTLIST p attrExtEnt ENTITY #IMPLIED> +<!ENTITY ent1 "Hello"> +<!ENTITY ent2 SYSTEM "world.txt"> +<!ENTITY entExt SYSTEM "earth.gif" NDATA gif> +<!NOTATION gif SYSTEM "viewgif.exe"> +]> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform05</title></head><body onload="parent.loadComplete()"> +<p attrExtEnt="entExt"> + &ent1;, &ent2;! +</p></body></html> + +<!-- Let world.txt contain "world" (excluding the quotes) --> diff --git a/test/testcases/tests/level3/core/files/datatype_normalization.svg b/test/testcases/tests/level3/core/files/datatype_normalization.svg new file mode 100644 index 0000000..77f4988 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization.svg @@ -0,0 +1,89 @@ +<!DOCTYPE svg [
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+<!ELEMENT svg (rect, script, data)>
+<!ATTLIST svg
+ xmlns CDATA #IMPLIED
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ELEMENT script (#PCDATA)>
+ <!ATTLIST script type CDATA #IMPLIED>
+ <!ELEMENT data (double*, boolean*, decimal*, float*, dateTime*, time*)>
+ <!ATTLIST data xmlns CDATA #IMPLIED>
+ <!ELEMENT double (#PCDATA)>
+ <!ATTLIST double
+ value CDATA #IMPLIED
+ union CDATA #IMPLIED>
+ <!ELEMENT boolean (#PCDATA)>
+ <!ATTLIST boolean
+ value CDATA #IMPLIED
+ union CDATA #IMPLIED>
+ <!ELEMENT decimal (#PCDATA)>
+ <!ATTLIST decimal
+ value CDATA #IMPLIED
+ union CDATA #IMPLIED>
+ <!ELEMENT float (#PCDATA)>
+ <!ATTLIST float
+ value CDATA #IMPLIED
+ union CDATA #IMPLIED>
+ <!ELEMENT dateTime (#PCDATA)>
+ <!ATTLIST dateTime
+ value CDATA #IMPLIED
+ union CDATA #IMPLIED>
+ <!ELEMENT time (#PCDATA)>
+ <!ATTLIST time
+ value CDATA #IMPLIED
+ union CDATA #IMPLIED>
+]>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2000/svg datatype_normalization.svg.xsd">
+<rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+<data xmlns='http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization'>
+<double value="
+ +0003.141592600E+0000 " union=" +0003.141592600E+0000
+ "> -31415926.00E-7
+2.718</double>
+<double value=" NaN" union="NaN "> INF -INF </double>
+<double value="
+1 " union="1
+"> -0</double>
+<boolean value="
+ true" union="false
+ "> false true false </boolean>
+<boolean value="
+ 1" union=" 0
+ ">0 1 0 </boolean>
+<decimal value=" +0003.141592600 " union=" +0003.141592600 "> +10 .1 </decimal>
+<decimal value=" 01 " union=" 01 "> -.001 </decimal>
+<float value=" +0003.141592600E+0000 " union=" +0003.141592600E+0000 "> -31415926.00E-7
+2.718</float>
+<float value=" NaN " union=" NaN "> INF -INF </float>
+<float value="
+1 " union="1
+">-0</float>
+<dateTime value="
+2004-01-21T15:30:00-05:00" union="2004-01-21T20:30:00-05:00
+">2004-01-21T15:30:00
+2004-01-21T15:30:00Z</dateTime>
+<dateTime value="
+2004-01-21T15:30:00.0000-05:00" union="2004-01-21T15:30:00.0000-05:00
+"> 2004-01-21T15:30:00.0000 </dateTime>
+<dateTime value="2004-01-21T15:30:00.0001-05:00" union="2004-01-21T15:30:00.0001-05:00">2004-01-21T15:30:00.0001</dateTime>
+<time value="
+15:30:00-05:00" union="15:30:00-05:00
+"> 15:30:00 </time>
+<time value="
+ 15:30:00.0000-05:00" union=" 15:30:00.0000-05:00
+ ">15:30:00.0000</time>
+<time value="
+ 15:30:00.0001-05:00" union="15:30:00.0001-05:00
+ ">15:30:00.0001</time>
+</data>
+</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/datatype_normalization.svg.xsd b/test/testcases/tests/level3/core/files/datatype_normalization.svg.xsd new file mode 100644 index 0000000..e2cdde3 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization.svg.xsd @@ -0,0 +1,60 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for SVG
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:data="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization">
+
+ <xsd:import namespace="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization" schemaLocation="datatype_normalization.xsd"/>
+
+ <xsd:element name="svg">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="rect"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="data:data"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="rect">
+ <xsd:complexType>
+ <xsd:attribute name="x" type="xsd:double" use="required"/>
+ <xsd:attribute name="y" type="xsd:double" use="required"/>
+ <xsd:attribute name="height" type="xsd:double" use="required"/>
+ <xsd:attribute name="width" type="xsd:double" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/datatype_normalization.xml b/test/testcases/tests/level3/core/files/datatype_normalization.xml new file mode 100644 index 0000000..cced1b9 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization.xml @@ -0,0 +1,90 @@ +<!DOCTYPE svg [ +<!ENTITY svgunit SYSTEM "svgunit.js"> +<!ENTITY svgtest SYSTEM "svgtest.js"> +<!ELEMENT svg (rect, script, data)> +<!ATTLIST svg + xmlns CDATA #IMPLIED + xmlns:xsi CDATA #IMPLIED + xsi:schemaLocation CDATA #IMPLIED> + <!ELEMENT rect EMPTY> + <!ATTLIST rect + x CDATA #REQUIRED + y CDATA #REQUIRED + width CDATA #REQUIRED + height CDATA #REQUIRED> + <!ELEMENT script (#PCDATA)> + <!ATTLIST script type CDATA #IMPLIED> + <!ELEMENT data (double*, boolean*, decimal*, float*, dateTime*, time*)> + <!ATTLIST data xmlns CDATA #IMPLIED> + <!ELEMENT double (#PCDATA)> + <!ATTLIST double + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT boolean (#PCDATA)> + <!ATTLIST boolean + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT decimal (#PCDATA)> + <!ATTLIST decimal + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT float (#PCDATA)> + <!ATTLIST float + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT dateTime (#PCDATA)> + <!ATTLIST dateTime + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT time (#PCDATA)> + <!ATTLIST time + value CDATA #IMPLIED + union CDATA #IMPLIED> + +]> +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.w3.org/2000/svg datatype_normalization.svg.xsd"> +<rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script> +<data xmlns='http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization'> +<double value=" + +0003.141592600E+0000 " union=" +0003.141592600E+0000 + "> -31415926.00E-7 +2.718</double> +<double value=" NaN" union="NaN "> INF -INF </double> +<double value=" +1 " union="1 +"> -0</double> +<boolean value=" + true" union="false + "> false true false </boolean> +<boolean value=" + 1" union=" 0 + ">0 1 0 </boolean> +<decimal value=" +0003.141592600 " union=" +0003.141592600 "> +10 .1 </decimal> +<decimal value=" 01 " union=" 01 "> -.001 </decimal> +<float value=" +0003.141592600E+0000 " union=" +0003.141592600E+0000 "> -31415926.00E-7 +2.718</float> +<float value=" NaN " union=" NaN "> INF -INF </float> +<float value=" +1 " union="1 +">-0</float> +<dateTime value=" +2004-01-21T15:30:00-05:00" union="2004-01-21T20:30:00-05:00 +">2004-01-21T15:30:00 +2004-01-21T15:30:00Z</dateTime> +<dateTime value=" +2004-01-21T15:30:00.0000-05:00" union="2004-01-21T15:30:00.0000-05:00 +"> 2004-01-21T15:30:00.0000 </dateTime> +<dateTime value="2004-01-21T15:30:00.0001-05:00" union="2004-01-21T15:30:00.0001-05:00">2004-01-21T15:30:00.0001</dateTime> +<time value=" +15:30:00-05:00" union="15:30:00-05:00 +"> 15:30:00 </time> +<time value=" + 15:30:00.0000-05:00" union=" 15:30:00.0000-05:00 + ">15:30:00.0000</time> +<time value=" + 15:30:00.0001-05:00" union="15:30:00.0001-05:00 + ">15:30:00.0001</time> +</data> +</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/datatype_normalization.xsd b/test/testcases/tests/level3/core/files/datatype_normalization.xsd new file mode 100644 index 0000000..2b3a789 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization.xsd @@ -0,0 +1,212 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"
+ xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization">
+
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="double"/>
+ <xsd:element ref="boolean"/>
+ <xsd:element ref="decimal"/>
+ <xsd:element ref="float"/>
+ <xsd:element ref="dateTime"/>
+ <xsd:element ref="time"/>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="myDouble">
+ <xsd:restriction base="xsd:double"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDoubleList">
+ <xsd:list itemType="myDouble"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDoubleUnion">
+ <xsd:union memberTypes="myDouble xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="double">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myDoubleList">
+ <xsd:attribute name="value" type="myDouble" use="required"/>
+ <xsd:attribute name="union" type="myDoubleUnion" use="required"/>
+ <xsd:attribute name="default" type="myDouble"
+ default="+0003.141592600E+0000" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myBoolean">
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myBooleanList">
+ <xsd:list itemType="myBoolean"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myBooleanUnion">
+ <xsd:union memberTypes="myBoolean xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="boolean">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myBooleanList">
+ <xsd:attribute name="value" type="myBoolean" use="required"/>
+ <xsd:attribute name="union" type="myDoubleUnion" use="required"/>
+ <xsd:attribute name="default" type="myBoolean"
+ default="1" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myDecimal">
+ <xsd:restriction base="xsd:decimal"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDecimalList">
+ <xsd:list itemType="myDecimal"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDecimalUnion">
+ <xsd:union memberTypes="myDecimal xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="decimal">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myDecimalList">
+ <xsd:attribute name="value" type="myDecimal" use="required"/>
+ <xsd:attribute name="union" type="myDecimalUnion" use="required"/>
+ <xsd:attribute name="default" type="myDecimal"
+ default="+0003.141592600" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="myFloat">
+ <xsd:restriction base="xsd:float"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myFloatList">
+ <xsd:list itemType="myFloat"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myFloatUnion">
+ <xsd:union memberTypes="myFloat xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="float">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myFloatList">
+ <xsd:attribute name="value" type="myFloat" use="required"/>
+ <xsd:attribute name="union" type="myFloatUnion" use="required"/>
+ <xsd:attribute name="default" type="myDouble"
+ default="+0003.141592600E+0000" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myDateTime">
+ <xsd:restriction base="xsd:dateTime"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDateTimeList">
+ <xsd:list itemType="myDateTime"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDateTimeUnion">
+ <xsd:union memberTypes="myDateTime xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="dateTime">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myDateTimeList">
+ <xsd:attribute name="value" type="myDateTime" use="required"/>
+ <xsd:attribute name="union" type="myDateTimeUnion" use="required"/>
+ <xsd:attribute name="default" type="myDateTime"
+ default="2004-01-21T15:30:00-05:00" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myTime">
+ <xsd:restriction base="xsd:time"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myTimeList">
+ <xsd:list itemType="myTime"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myTimeUnion">
+ <xsd:union memberTypes="myTime xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="time">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myTimeList">
+ <xsd:attribute name="value" type="myTime" use="required"/>
+ <xsd:attribute name="union" type="myTimeUnion" use="required"/>
+ <xsd:attribute name="default" type="myTime"
+ default="15:30:00-05:00" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myUnion">
+ <xsd:union memberTypes="xsd:integer xsd:string"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myUnionList">
+ <xsd:list itemType="myUnion"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myUnionUnion">
+ <xsd:union memberTypes="myUnion xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="union">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myUnionList">
+ <xsd:attribute name="value" type="myUnion" use="required"/>
+ <xsd:attribute name="union" type="myUnionUnion" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/datatype_normalization2.svg b/test/testcases/tests/level3/core/files/datatype_normalization2.svg new file mode 100644 index 0000000..14e5dd7 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization2.svg @@ -0,0 +1,45 @@ +<?xml version="1.0"?>
+<!DOCTYPE svg
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+ <!ELEMENT svg (rect, script, body)>
+ <!ATTLIST svg
+ xmlns CDATA #IMPLIED
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ATTLIST body xmlns CDATA #IMPLIED>
+]>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2000/svg datatype_normalization2.svg.xsd">
+<rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ <!-- preserve, string default -->
+ <em> EMP 0001 </em>
+ <!-- explicit preserve -->
+ <acronym> EMP 0001 </acronym>
+ <!-- explicit collapse -->
+ <code>
+ EMP 0001
+</code>
+ <code>EMP 0001</code>
+ <code>EMP 0001</code>
+ <!-- explicit replace -->
+ <sup>
+ EMP 0001
+</sup>
+ <sup>EMP 0001</sup>
+ <sup>EMP 0001</sup>
+ <sup>EMP
+0001</sup>
+ </p>
+</body>
+</svg>
diff --git a/test/testcases/tests/level3/core/files/datatype_normalization2.svg.xsd b/test/testcases/tests/level3/core/files/datatype_normalization2.svg.xsd new file mode 100644 index 0000000..0df77aa --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization2.svg.xsd @@ -0,0 +1,60 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for SVG
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+ <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="datatype_normalization2.xsd"/>
+
+ <xsd:element name="svg">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="rect"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="xhtml:body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="rect">
+ <xsd:complexType>
+ <xsd:attribute name="x" type="xsd:double" use="required"/>
+ <xsd:attribute name="y" type="xsd:double" use="required"/>
+ <xsd:attribute name="height" type="xsd:double" use="required"/>
+ <xsd:attribute name="width" type="xsd:double" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/datatype_normalization2.xhtml b/test/testcases/tests/level3/core/files/datatype_normalization2.xhtml new file mode 100644 index 0000000..3b93b18 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization2.xhtml @@ -0,0 +1,33 @@ +<?xml version="1.0"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ATTLIST html
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+]>
+<html xmlns='http://www.w3.org/1999/xhtml'
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/1999/xhtml datatype_normalization2.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>datatype_normalization2</title></head><body onload="parent.loadComplete()">
+ <p>
+ <!-- preserve, string default -->
+ <em> EMP 0001 </em>
+ <!-- explicit preserve -->
+ <acronym> EMP 0001 </acronym>
+ <!-- explicit collapse -->
+ <code>
+ EMP 0001
+</code>
+ <code>EMP 0001</code>
+ <code>EMP 0001</code>
+ <!-- explicit replace -->
+ <sup>
+ EMP 0001
+</sup>
+ <sup>EMP 0001</sup>
+ <sup>EMP 0001</sup>
+ <sup>EMP
+0001</sup>
+ </p>
+</body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/datatype_normalization2.xml b/test/testcases/tests/level3/core/files/datatype_normalization2.xml new file mode 100644 index 0000000..19d9415 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization2.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "xhtml1-strict.dtd" [ + <!ATTLIST html + xmlns:xsi CDATA #IMPLIED + xsi:schemaLocation CDATA #IMPLIED> +]> +<html xmlns='http://www.w3.org/1999/xhtml' + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.w3.org/1999/xhtml datatype_normalization2.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>datatype_normalization2</title></head><body onload="parent.loadComplete()"> + <p> + <!-- preserve, string default --> + <em> EMP 0001 </em> + <!-- explicit preserve --> + <acronym> EMP 0001 </acronym> + <!-- explicit collapse --> + <code> + EMP 0001 +</code> + <code>EMP 0001</code> + <code>EMP 0001</code> + <!-- explicit replace --> + <sup> + EMP 0001 +</sup> + <sup>EMP 0001</sup> + <sup>EMP 0001</sup> + <sup>EMP +0001</sup> + </p> +</body> +</html> diff --git a/test/testcases/tests/level3/core/files/datatype_normalization2.xsd b/test/testcases/tests/level3/core/files/datatype_normalization2.xsd new file mode 100644 index 0000000..c7a7903 --- /dev/null +++ b/test/testcases/tests/level3/core/files/datatype_normalization2.xsd @@ -0,0 +1,99 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is intended to support specific DOM L3 tests is no way intended to
+be a general purpose schema for XHTML
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsd:element name="html">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="head"/>
+ <xsd:element ref="body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="head">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="meta"/>
+ <xsd:element ref="title"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="title" type="xsd:string"/>
+ <xsd:element name="meta">
+ <xsd:complexType>
+ <xsd:attribute name="http-equiv" type="xsd:string" use="required"/>
+ <xsd:attribute name="content" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="body">
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="p"/>
+ </xsd:sequence>
+ <xsd:attribute name="onload" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="p">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="em"/>
+ <xsd:element ref="code"/>
+ <xsd:element ref="sup"/>
+ <xsd:element ref="acronym"/>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="em" type="xsd:string"/>
+
+ <xsd:simpleType name="acronym">
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="preserve"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="acronym" type="acronym"/>
+
+ <xsd:simpleType name="code">
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="code" type="code"/>
+
+ <xsd:simpleType name="sup">
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="replace"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="sup" type="sup"/>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/external_barfoo.svg b/test/testcases/tests/level3/core/files/external_barfoo.svg new file mode 100644 index 0000000..98afcde --- /dev/null +++ b/test/testcases/tests/level3/core/files/external_barfoo.svg @@ -0,0 +1,31 @@ +<!DOCTYPE svg [
+<!ENTITY ent1 SYSTEM 'external_foo.ent'>
+<!ENTITY ent2 SYSTEM 'external_foobr.ent'>
+<!ENTITY ent3 SYSTEM 'external_widget.ent'>
+<!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>
+<!ELEMENT svg (rect,script,p*)>
+<!ATTLIST svg xmlns CDATA #IMPLIED>
+<!ELEMENT rect EMPTY>
+<!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ fill CDATA #REQUIRED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ATTLIST p xmlns CDATA #IMPLIED
+ xml:base CDATA #IMPLIED>
+<!ELEMENT br EMPTY>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script type CDATA #IMPLIED>
+<!ENTITY svgunit SYSTEM "svgunit.js">
+<!ENTITY svgtest SYSTEM "svgtest.js">
+<!NOTATION notation1 PUBLIC "notation1File">
+]>
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="0" y="0" width="100" height="100" fill="blue"/>
+<script type="text/ecmascript">&svgtest;&svgunit;</script>
+<p xmlns='http://www.w3.org/1999/xhtml'>bar&ent2;&ent1;</p>
+<p xmlns='http://www.w3.org/1999/xhtml' xml:base="http://www.example.com/bogus_base">bar&ent2;&ent1;</p>
+&ent3;
+</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/external_barfoo.xhtml b/test/testcases/tests/level3/core/files/external_barfoo.xhtml new file mode 100644 index 0000000..e316dee --- /dev/null +++ b/test/testcases/tests/level3/core/files/external_barfoo.xhtml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html [
+<!ENTITY ent1 SYSTEM 'external_foo.ent'>
+<!ENTITY ent2 SYSTEM 'external_foobr.ent'>
+<!ENTITY ent3 SYSTEM 'external_widget.ent'>
+<!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>
+<!ELEMENT html (head, body)>
+<!ATTLIST html xmlns CDATA #IMPLIED>
+<!ELEMENT head (title,script*)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED>
+<!ELEMENT body (p*)>
+<!ATTLIST body onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|br)*>
+<!ATTLIST p xml:base CDATA #IMPLIED
+ xmlns CDATA #IMPLIED>
+<!ELEMENT br EMPTY>
+<!NOTATION notation1 PUBLIC "notation1File">
+]>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>external entity encoding sample</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>bar&ent2;&ent1;</p>
+<p xml:base="http://www.example.com/bogus_base">bar&ent2;&ent1;</p>
+&ent3;
+</body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/external_barfoo.xml b/test/testcases/tests/level3/core/files/external_barfoo.xml new file mode 100644 index 0000000..cc36fa4 --- /dev/null +++ b/test/testcases/tests/level3/core/files/external_barfoo.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html [ +<!ENTITY ent1 SYSTEM 'external_foo.ent'> +<!ENTITY ent2 SYSTEM 'external_foobr.ent'> +<!ENTITY ent3 SYSTEM 'external_widget.ent'> +<!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1> +<!ELEMENT html (head, body)> +<!ATTLIST html xmlns CDATA #IMPLIED> +<!ELEMENT head (title,script*)> +<!ELEMENT title (#PCDATA)> +<!ELEMENT script (#PCDATA)> +<!ATTLIST script + src CDATA #IMPLIED + type CDATA #IMPLIED + charset CDATA #IMPLIED> +<!ELEMENT body (p*)> +<!ATTLIST body onload CDATA #IMPLIED> +<!ELEMENT p (#PCDATA|br)*> +<!ATTLIST p xml:base CDATA #IMPLIED + xmlns CDATA #IMPLIED> +<!ELEMENT br EMPTY> +<!NOTATION notation1 PUBLIC "notation1File"> +]> +<html xmlns='http://www.w3.org/1999/xhtml'> +<head> +<title>external entity encoding sample</title> +</head> +<body onload="parent.loadComplete()"> +<p>bar&ent2;&ent1;</p> +<p xml:base="http://www.example.com/bogus_base">bar&ent2;&ent1;</p> +&ent3; +</body> +</html> diff --git a/test/testcases/tests/level3/core/files/external_foo.ent b/test/testcases/tests/level3/core/files/external_foo.ent Binary files differnew file mode 100644 index 0000000..fe8efcd --- /dev/null +++ b/test/testcases/tests/level3/core/files/external_foo.ent diff --git a/test/testcases/tests/level3/core/files/external_foobr.ent b/test/testcases/tests/level3/core/files/external_foobr.ent new file mode 100644 index 0000000..2cd59e8 --- /dev/null +++ b/test/testcases/tests/level3/core/files/external_foobr.ent @@ -0,0 +1 @@ +<br/>foo
\ No newline at end of file diff --git a/test/testcases/tests/level3/core/files/external_widget.ent b/test/testcases/tests/level3/core/files/external_widget.ent new file mode 100644 index 0000000..7c7d8a9 --- /dev/null +++ b/test/testcases/tests/level3/core/files/external_widget.ent @@ -0,0 +1 @@ +<p xmlns='http://www.w3.org/1999/xhtml'>widget</p>
diff --git a/test/testcases/tests/level3/core/files/hc_nodtdstaff.html b/test/testcases/tests/level3/core/files/hc_nodtdstaff.html new file mode 100644 index 0000000..0506a01 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_nodtdstaff.html @@ -0,0 +1,10 @@ +<html><head><title>hc_nodtdstaff</title></head><body onload="parent.loadComplete()"> + <p> + <em>EMP0001</em> + <strong>Margaret Martin</strong> + <code>Accountant</code> + <sup>56,000</sup> + <var>Female</var> + <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym> + </p> +</body></html> diff --git a/test/testcases/tests/level3/core/files/hc_nodtdstaff.svg b/test/testcases/tests/level3/core/files/hc_nodtdstaff.svg new file mode 100644 index 0000000..0ff4110 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_nodtdstaff.svg @@ -0,0 +1,10 @@ +<svg xmlns='http://www.w3.org/2000/svg'><rect x="0" y="0" width="100" height="100"/><head xmlns='http://www.w3.org/1999/xhtml'><title>hc_nodtdstaff</title></head><body xmlns='http://www.w3.org/1999/xhtml'>
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+</body></svg>
diff --git a/test/testcases/tests/level3/core/files/hc_nodtdstaff.xhtml b/test/testcases/tests/level3/core/files/hc_nodtdstaff.xhtml new file mode 100644 index 0000000..d183b02 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_nodtdstaff.xhtml @@ -0,0 +1,10 @@ +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>hc_nodtdstaff</title></head><body onload="parent.loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+</body></html>
diff --git a/test/testcases/tests/level3/core/files/hc_nodtdstaff.xml b/test/testcases/tests/level3/core/files/hc_nodtdstaff.xml new file mode 100644 index 0000000..7926374 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_nodtdstaff.xml @@ -0,0 +1,10 @@ +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>hc_nodtdstaff</title></head><body onload="parent.loadComplete()"> + <p> + <em>EMP0001</em> + <strong>Margaret Martin</strong> + <code>Accountant</code> + <sup>56,000</sup> + <var>Female</var> + <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym> + </p> +</body></html> diff --git a/test/testcases/tests/level3/core/files/hc_staff.svg b/test/testcases/tests/level3/core/files/hc_staff.svg new file mode 100644 index 0000000..e11e135 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_staff.svg @@ -0,0 +1,87 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE svg
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "α">
+ <!ENTITY beta "β">
+ <!ENTITY gamma "γ">
+ <!ENTITY delta "δ">
+ <!ENTITY epsilon "ε">
+ <!ENTITY alpha "ζ">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST p
+ dir CDATA 'rtl'
+ xmlns:dmstc CDATA #IMPLIED
+ xmlns:nm CDATA #IMPLIED
+ xmlns:emp2 CDATA #IMPLIED>
+ <!ATTLIST html
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED>
+ <!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>">
+ <!ATTLIST span xmlns CDATA #IMPLIED>
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+ <!ELEMENT svg (rect, script, body)>
+ <!ATTLIST svg
+ xmlns CDATA #IMPLIED
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ATTLIST body xmlns CDATA #IMPLIED>
+]>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2000/svg hc_staff.svg.xsd">
+<rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns="http://www.w3.org/1999/xhtml">
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0002</em>
+ <strong>Martha Raynolds
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">β Dallas, γ
+ 98554</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.netzero.com">
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&ent4;</var>
+ <acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p xmlns:nm="http://www.altavista.com">
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yα" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p xmlns:emp2="http://www.nist.gov">
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></svg>
diff --git a/test/testcases/tests/level3/core/files/hc_staff.svg.xsd b/test/testcases/tests/level3/core/files/hc_staff.svg.xsd new file mode 100644 index 0000000..52335a3 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_staff.svg.xsd @@ -0,0 +1,60 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for SVG
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+ <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="hc_staff.xsd"/>
+
+ <xsd:element name="svg">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="rect"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="xhtml:body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="rect">
+ <xsd:complexType>
+ <xsd:attribute name="x" type="xsd:double" use="required"/>
+ <xsd:attribute name="y" type="xsd:double" use="required"/>
+ <xsd:attribute name="height" type="xsd:double" use="required"/>
+ <xsd:attribute name="width" type="xsd:double" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/hc_staff.xhtml b/test/testcases/tests/level3/core/files/hc_staff.xhtml new file mode 100644 index 0000000..f2b6e71 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_staff.xhtml @@ -0,0 +1,73 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "α">
+ <!ENTITY beta "β">
+ <!ENTITY gamma "γ">
+ <!ENTITY delta "δ">
+ <!ENTITY epsilon "ε">
+ <!ENTITY alpha "ζ">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST p
+ dir CDATA 'rtl'
+ xmlns:dmstc CDATA #IMPLIED
+ xmlns:nm CDATA #IMPLIED
+ xmlns:emp2 CDATA #IMPLIED>
+ <!ATTLIST html
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED>
+ <!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>">
+ <!ATTLIST span xmlns CDATA #IMPLIED>
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/1999/xhtml hc_staff.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="svgunit.js"/><script charset="UTF-8" type="text/javascript" src="svgtest.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="parent.loadComplete()">
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0002</em>
+ <strong>Martha Raynolds
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">β Dallas, γ
+ 98554</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.netzero.com">
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&ent4;</var>
+ <acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p xmlns:nm="http://www.altavista.com">
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yα" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p xmlns:emp2="http://www.nist.gov">
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/test/testcases/tests/level3/core/files/hc_staff.xml b/test/testcases/tests/level3/core/files/hc_staff.xml new file mode 100644 index 0000000..0366a05 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_staff.xml @@ -0,0 +1,73 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "xhtml1-strict.dtd" [ + <!ENTITY alpha "α"> + <!ENTITY beta "β"> + <!ENTITY gamma "γ"> + <!ENTITY delta "δ"> + <!ENTITY epsilon "ε"> + <!ENTITY alpha "ζ"> + <!NOTATION notation1 PUBLIC "notation1File"> + <!NOTATION notation2 SYSTEM "notation2File"> + <!ATTLIST p + dir CDATA 'rtl' + xmlns:dmstc CDATA #IMPLIED + xmlns:nm CDATA #IMPLIED + xmlns:emp2 CDATA #IMPLIED> + <!ATTLIST html + xmlns:xsi CDATA #IMPLIED + xsi:schemaLocation CDATA #IMPLIED> + <!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED> + <!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>"> + <!ATTLIST span xmlns CDATA #IMPLIED> +]> +<!-- This is comment number 1.--> +<html xmlns='http://www.w3.org/1999/xhtml' + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.w3.org/1999/xhtml hc_staff.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="svgunit.js"/><script charset="UTF-8" type="text/javascript" src="svgtest.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="parent.loadComplete()"> + <p xmlns:dmstc="http://www.usa.com"> + <em>EMP0001</em> + <strong>Margaret Martin</strong> + <code>Accountant</code> + <sup>56,000</sup> + <var>Female</var> + <acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym> + </p> + <p xmlns:dmstc="http://www.usa.com"> + <em>EMP0002</em> + <strong>Martha Raynolds +<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]> +<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong> + <code>Secretary</code> + <sup>35,000</sup> + <var>Female</var> + <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">β Dallas, γ + 98554</acronym> + </p> + <p xmlns:dmstc="http://www.netzero.com"> + <em>EMP0003</em> + <strong>Roger + Jones</strong> + <code>Department Manager</code> + <sup>100,000</sup> + <var>&ent4;</var> + <acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym> + </p> + <p xmlns:nm="http://www.altavista.com"> + <em>EMP0004</em> + <strong>Jeny Oconnor</strong> + <code>Personnel Director</code> + <sup>95,000</sup> + <var>Female</var> + <acronym title="Yes" class="Yα" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym> + </p> + <p xmlns:emp2="http://www.nist.gov"> + <em>EMP0005</em> + <strong>Robert Myers</strong> + <code>Computer Specialist</code> + <sup>90,000</sup> + <var>male</var> + <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym> + </p> +</body></html> diff --git a/test/testcases/tests/level3/core/files/hc_staff.xsd b/test/testcases/tests/level3/core/files/hc_staff.xsd new file mode 100644 index 0000000..915cba0 --- /dev/null +++ b/test/testcases/tests/level3/core/files/hc_staff.xsd @@ -0,0 +1,250 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for XHTML
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsd:element name="html">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="head"/>
+ <xsd:element ref="body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="head">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="meta"/>
+ <xsd:element ref="title"/>
+ <xsd:element ref="script" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="meta">
+ <xsd:complexType>
+ <xsd:attribute name="http-equiv" type="xsd:string" use="required"/>
+ <xsd:attribute name="content" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="src" type="xsd:string" use="optional"/>
+ <xsd:attribute name="charset" type="xsd:string" use="optional"/>
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="title" type="xsd:string"/>
+
+ <xsd:element name="body">
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="p"/>
+ </xsd:sequence>
+ <xsd:attribute name="onload" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="classType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Yes"/>
+ <xsd:enumeration value="No"/>
+ <xsd:enumeration value="Yα"/>
+ <xsd:enumeration value="Y"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="part1">
+ <xsd:sequence>
+ <xsd:element ref="em"/>
+ <xsd:element ref="strong"/>
+ <xsd:element ref="code"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="pType">
+ <xsd:complexContent>
+ <xsd:extension base="part1">
+ <xsd:sequence>
+ <xsd:element ref="sup"/>
+ <xsd:element ref="var"/>
+ <xsd:element ref="acronym"/>
+ </xsd:sequence>
+ <xsd:attribute name="title" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="classType" use="optional"/>
+ <xsd:attribute name="dir" type="dirType" use="optional" default="rtl"/>
+ <xsd:attribute name="foo" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:element name="p">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:restriction base="pType">
+ <xsd:sequence>
+ <xsd:element ref="em"/>
+ <xsd:element ref="strong"/>
+ <xsd:element ref="code"/>
+ <xsd:element ref="sup"/>
+ <xsd:element ref="var"/>
+ <xsd:element ref="acronym"/>
+ </xsd:sequence>
+ <xsd:attribute name="title" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="classType" use="optional"/>
+ <xsd:attribute name="dir" type="dirType" use="optional" default="rtl"/>
+ <xsd:attribute name="foo" type="xsd:string" use="prohibited"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="emp0001_3Type">
+ <xsd:restriction base="xsd:ID">
+ <xsd:enumeration value="EMP0001"/>
+ <xsd:enumeration value="EMP0002"/>
+ <xsd:enumeration value="EMP0003"/>
+ <xsd:enumeration value="EMP0004"/>
+ <xsd:enumeration value="EMP0005"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="emp0004_5Type">
+ <xsd:restriction base="xsd:ID">
+ <xsd:enumeration value="EMP0006"/>
+ <xsd:enumeration value="EMP0007"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="unboundedEmType">
+ <xsd:union memberTypes="emp0001_3Type emp0004_5Type"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="emType">
+ <xsd:restriction base="unboundedEmType">
+ <xsd:pattern value="EMP[0-9]*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:element name="em" type="emType"/>
+
+ <xsd:simpleType name="unboundedStrongType">
+ <xsd:list itemType="xsd:string"/>
+ </xsd:simpleType>
+
+
+ <xsd:simpleType name="strongType">
+ <xsd:restriction base="unboundedStrongType">
+ <xsd:maxLength value="100"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="strong" type="strongType"/>
+
+ <!-- union of union and union of list -->
+ <xsd:simpleType name="integers">
+ <xsd:list itemType="xsd:integer"/>
+ </xsd:simpleType>
+
+
+ <xsd:simpleType name="sup">
+ <xsd:union memberTypes="emType integers xsd:string"/>
+ </xsd:simpleType>
+ <xsd:element name="sup" type="sup"/>
+
+ <!-- list of union of union -->
+ <xsd:simpleType name="supervisoryTitle">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Specialist"/>
+ <xsd:enumeration value="Director"/>
+ <xsd:enumeration value="Manager"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="nonSupervisoryTitle">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Accountant"/>
+ <xsd:enumeration value="Secretary"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="title">
+ <xsd:union memberTypes="supervisoryTitle nonSupervisoryTitle"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="field">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Department"/>
+ <xsd:enumeration value="Personnel"/>
+ <xsd:enumeration value="Computer"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="codeItem">
+ <xsd:union memberTypes="field title"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="code">
+ <xsd:list itemType="codeItem"/>
+ </xsd:simpleType>
+ <xsd:element name="code" type="code"/>
+
+ <xsd:element name="span" type="xsd:string"/>
+
+ <xsd:complexType name="var" mixed="true">
+ <xsd:sequence>
+ <xsd:element ref="span" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="var" type="var"/>
+
+ <xsd:simpleType name="dirType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="ltr"/>
+ <xsd:enumeration value="rtl"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="acronym">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="class" type="classType" use="optional"/>
+ <xsd:attribute name="title" type="xsd:string" use="optional"/>
+ <xsd:attribute name="id" type="xsd:ID" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/svgtest.js b/test/testcases/tests/level3/core/files/svgtest.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/core/files/svgtest.js diff --git a/test/testcases/tests/level3/core/files/svgunit.js b/test/testcases/tests/level3/core/files/svgunit.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/core/files/svgunit.js diff --git a/test/testcases/tests/level3/core/files/typeinfo.svg b/test/testcases/tests/level3/core/files/typeinfo.svg new file mode 100644 index 0000000..35c2d44 --- /dev/null +++ b/test/testcases/tests/level3/core/files/typeinfo.svg @@ -0,0 +1,29 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE svg
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+ <!ELEMENT svg (rect, script, body)>
+ <!ATTLIST svg
+ xmlns CDATA #IMPLIED
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ATTLIST body xmlns CDATA #IMPLIED>
+]>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2000/svg typeinfo.svg.xsd">
+<rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns="http://www.w3.org/1999/xhtml">
+ <p id="foo1"><strong>foo1 foo2</strong></p>
+ <p id="foo2"><code>1</code><code>unbounded</code></p>
+ <p><em>127</em><em>48</em></p>
+ <p><acronym>3.1415926 2.718</acronym></p>
+ </body>
+</svg>
diff --git a/test/testcases/tests/level3/core/files/typeinfo.svg.xsd b/test/testcases/tests/level3/core/files/typeinfo.svg.xsd new file mode 100644 index 0000000..51b4e7d --- /dev/null +++ b/test/testcases/tests/level3/core/files/typeinfo.svg.xsd @@ -0,0 +1,60 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for SVG
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+ <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="typeinfo.xsd"/>
+
+ <xsd:element name="svg">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="rect"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="xhtml:body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="rect">
+ <xsd:complexType>
+ <xsd:attribute name="x" type="xsd:double" use="required"/>
+ <xsd:attribute name="y" type="xsd:double" use="required"/>
+ <xsd:attribute name="height" type="xsd:double" use="required"/>
+ <xsd:attribute name="width" type="xsd:double" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/typeinfo.xhtml b/test/testcases/tests/level3/core/files/typeinfo.xhtml new file mode 100644 index 0000000..23eeacd --- /dev/null +++ b/test/testcases/tests/level3/core/files/typeinfo.xhtml @@ -0,0 +1,18 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd"[
+<!ATTLIST html
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+]>
+<html xmlns='http://www.w3.org/1999/xhtml'
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/1999/xhtml typeinfo.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title></head>
+ <body onload="parent.loadComplete()">
+ <p id="foo1"><strong>foo1 foo2</strong></p>
+ <p id="foo2"><code>1</code><code>unbounded</code></p>
+ <p><em>127</em><em>48</em></p>
+ <p><acronym>3.1415926 2.718</acronym></p>
+ </body>
+</html>
diff --git a/test/testcases/tests/level3/core/files/typeinfo.xml b/test/testcases/tests/level3/core/files/typeinfo.xml new file mode 100644 index 0000000..b94469b --- /dev/null +++ b/test/testcases/tests/level3/core/files/typeinfo.xml @@ -0,0 +1,18 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "xhtml1-strict.dtd"[ +<!ATTLIST html + xmlns:xsi CDATA #IMPLIED + xsi:schemaLocation CDATA #IMPLIED> +]> +<html xmlns='http://www.w3.org/1999/xhtml' + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.w3.org/1999/xhtml typeinfo.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title></head> + <body onload="parent.loadComplete()"> + <p id="foo1"><strong>foo1 foo2</strong></p> + <p id="foo2"><code>1</code><code>unbounded</code></p> + <p><em>127</em><em>48</em></p> + <p><acronym>3.1415926 2.718</acronym></p> + </body> +</html> diff --git a/test/testcases/tests/level3/core/files/typeinfo.xsd b/test/testcases/tests/level3/core/files/typeinfo.xsd new file mode 100644 index 0000000..ff72aef --- /dev/null +++ b/test/testcases/tests/level3/core/files/typeinfo.xsd @@ -0,0 +1,107 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema provides supports misc_typeinfo.xml
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsd:element name="html">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="head"/>
+ <xsd:element ref="body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="head">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="meta"/>
+ <xsd:element ref="title"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="title" type="xsd:string"/>
+ <xsd:element name="meta">
+ <xsd:complexType>
+ <xsd:attribute name="http-equiv" type="xsd:string" use="required"/>
+ <xsd:attribute name="content" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="body">
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="p"/>
+ </xsd:sequence>
+ <xsd:attribute name="onload" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="p">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="em"/>
+ <xsd:element ref="strong"/>
+ <xsd:element ref="code"/>
+ <xsd:element ref="acronym"/>
+ </xsd:choice>
+ <xsd:attribute name="id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="strong" type="xsd:IDREFS"/>
+ <xsd:element name="em" type="xsd:byte"/>
+ <xsd:simpleType name="unbounded">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="unbounded"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="unsignedIntOrUnbounded">
+ <xsd:union memberTypes="xsd:unsignedInt unbounded"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="doubleList">
+ <xsd:list itemType="xsd:double"/>
+ </xsd:simpleType>
+
+ <xsd:element name="acronym">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="doubleList">
+ <xsd:attribute name="id" use="optional" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="code">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="unsignedIntOrUnbounded">
+ <xsd:attribute name="id" type="xsd:ID" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/test/testcases/tests/level3/core/files/xhtml1-strict.dtd b/test/testcases/tests/level3/core/files/xhtml1-strict.dtd new file mode 100644 index 0000000..7ba5dd7 --- /dev/null +++ b/test/testcases/tests/level3/core/files/xhtml1-strict.dtd @@ -0,0 +1,65 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This is a radically simplified DTD for use in the DOM Test Suites
+due to a XML non-conformance of one implementation in processing
+parameter entities. When that non-conformance is resolved,
+this DTD can be replaced by the normal DTD for XHTML.
+
+-->
+
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html xmlns CDATA #IMPLIED>
+<!ELEMENT head (meta,title,script*)>
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ http-equiv CDATA #IMPLIED
+ content CDATA #IMPLIED>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT body (p*)>
+<!ATTLIST body onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|em|strong|code|sup|var|acronym|abbr)*>
+<!ATTLIST p
+ xmlns:dmstc CDATA #IMPLIED
+ xmlns:nm CDATA #IMPLIED
+ xmlns:emp2 CDATA #IMPLIED
+ id ID #IMPLIED
+>
+<!ELEMENT em (#PCDATA)>
+<!ELEMENT span (#PCDATA)>
+<!ELEMENT strong (#PCDATA)>
+<!ELEMENT code (#PCDATA)>
+<!ELEMENT sup (#PCDATA)>
+<!ELEMENT var (#PCDATA|span)*>
+<!ELEMENT acronym (#PCDATA)>
+<!ATTLIST acronym
+ title CDATA #IMPLIED
+ class CDATA #IMPLIED
+ id ID #IMPLIED
+>
+<!ELEMENT abbr (#PCDATA)>
+<!ATTLIST abbr
+ title CDATA #IMPLIED
+ class CDATA #IMPLIED
+ id ID #IMPLIED
+>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ type CDATA #IMPLIED
+ src CDATA #IMPLIED
+ charset CDATA #IMPLIED>
diff --git a/test/testcases/tests/level3/core/handleerror01.xml b/test/testcases/tests/level3/core/handleerror01.xml new file mode 100644 index 0000000..b0a2d16 --- /dev/null +++ b/test/testcases/tests/level3/core/handleerror01.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="handleerror01"> +<metadata> +<title>handleerror01</title> +<creator>Curt Arnold</creator> +<description> +Add two CDATASection containing "]]>" and call Node.normalize +with an error handler that stops processing. Only one of the +CDATASections should be split. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ERRORS-DOMErrorHandler-handleError"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="elemList" type="NodeList"/> +<var name="newChild" type="CDATASection"/> +<var name="oldChild" type="Node"/> +<var name="child" type="Node"/> +<var name="childValue" type="DOMString"/> +<var name="childType" type="int"/> +<var name="retval" type="Node"/> +<var name="errors" type="List"/> + +<var name="errorHandler" type="DOMErrorHandler"> + <handleError> + <!-- returning false should stop processing --> + <return value="false"/> + </handleError> +</var> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<!-- have two invalid CDATASections as the content for the p element --> +<firstChild var="oldChild" obj="elem" interface="Node"/> +<createCDATASection var="newChild" obj="doc" data='"this is not ]]> good"'/> +<replaceChild var="retval" obj="elem" newChild="newChild" oldChild="oldChild"/> +<createCDATASection var="newChild" obj="doc" data='"this is not ]]> bad"'/> +<appendChild var="retval" obj="elem" newChild="newChild"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"split-cdata-sections"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorHandler"/> +<!-- normalization should have been stopped after + so one of the cdata sections should be intact --> +<normalizeDocument obj="doc"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<lastChild var="child" obj="elem" interface="Node"/> +<nodeValue var="childValue" obj="child"/> +<if> + <!-- if last child matches original test --> + <equals actual="childValue" expected='"this is not ]]> bad"' ignoreCase="false"/> + <!-- check that it is a CDATASection --> + <nodeType var="childType" obj="child"/> + <assertEquals actual="childType" expected="4" ignoreCase="false" id="lastChildCDATA"/> + <!-- check that first child is not intact --> + <firstChild var="child" obj="elem" interface="Node"/> + <nodeValue var="childValue" obj="child"/> + <assertNotEquals actual="childValue" expected='"this is not ]]> good"' + ignoreCase="false" id="firstChildNotIntact"/> + <else> + <!-- last child was split, check that first child is intact --> + <firstChild var="child" obj="elem" interface="Node"/> + <nodeValue var="childValue" obj="child"/> + <assertEquals actual="childValue" expected='"this is not ]]> good"' + ignoreCase="false" id="firstChildIntact"/> + </else> +</if> +</test> + diff --git a/test/testcases/tests/level3/core/handleerror02.xml b/test/testcases/tests/level3/core/handleerror02.xml new file mode 100644 index 0000000..67accc8 --- /dev/null +++ b/test/testcases/tests/level3/core/handleerror02.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="handleerror02"> +<metadata> +<title>handleerror02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with two DOM L1 nodes. +Use an error handler to continue from errors and check that more than one +error was reported. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ERRORS-DOMErrorHandler-handleError"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="brElem" type="Element"/> +<var name="errors" type="List"/> +<var name="errorHandler" type="DOMErrorHandler"> + <!-- instance scope variables, + value attributes are passed via constructor --> + <var name="errors" type="List" value="errors"/> + <handleError> + <var name="severity" type="int"/> + <severity var="severity" obj="error"/> + <if><equals actual="severity" expected="2" ignoreCase="false"/> + <append collection="errors" item="error"/> + </if> + <return value="true"/> + </handleError> +</var> + +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorHandler"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<createElement var="brElem" obj="doc" tagName='"br"'/> +<appendChild var="retval" obj="pElem" newChild="brElem"/> +<createElement var="brElem" obj="doc" tagName='"br"'/> +<appendChild var="retval" obj="pElem" newChild="brElem"/> +<normalizeDocument obj="doc"/> +<assertSize id="twoErrors" size="2" collection="errors"/> +</test> + + diff --git a/test/testcases/tests/level3/core/hasFeature01.xml b/test/testcases/tests/level3/core/hasFeature01.xml new file mode 100644 index 0000000..ce25645 --- /dev/null +++ b/test/testcases/tests/level3/core/hasFeature01.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature01"> +<metadata> +<title>hasFeature01</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementation.hasFeature("XML", "3.0") should return true. +</description> +<date qualifier="created">2003-05-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> +</metadata> +<hasFeature feature='"XML"'/> +<var name="impl" type="DOMImplementation"/> +<var name="state" type="boolean"/> +<implementation var="impl"/> +<hasFeature var="state" obj="impl" feature='"xMl"' version='"3.0"'/> +<assertTrue id="hasXML30" actual="state"/> +</test> diff --git a/test/testcases/tests/level3/core/hasFeature02.xml b/test/testcases/tests/level3/core/hasFeature02.xml new file mode 100644 index 0000000..f5d6bea --- /dev/null +++ b/test/testcases/tests/level3/core/hasFeature02.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature02"> +<metadata> +<title>hasFeature02</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementation.hasFeature("XML", "3.0") should return true. +</description> +<date qualifier="created">2003-05-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> +</metadata> +<var name="impl" type="DOMImplementation"/> +<var name="state" type="boolean"/> +<implementation var="impl"/> +<hasFeature var="state" obj="impl" feature='"cOrE"' version='"3.0"'/> +<assertTrue id="hasCore30" actual="state"/> +</test> diff --git a/test/testcases/tests/level3/core/hasFeature03.xml b/test/testcases/tests/level3/core/hasFeature03.xml new file mode 100644 index 0000000..ce11584 --- /dev/null +++ b/test/testcases/tests/level3/core/hasFeature03.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature03"> +<metadata> +<title>hasFeature03</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementation.hasFeature("XML", "3.0") should return true. +</description> +<date qualifier="created">2003-05-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> +</metadata> +<var name="impl" type="DOMImplementation"/> +<var name="state" type="boolean"/> +<implementation var="impl"/> +<hasFeature var="state" obj="impl" feature='"+cOrE"' version='"3.0"'/> +<assertTrue id="hasPlusCore30" actual="state"/> +</test> diff --git a/test/testcases/tests/level3/core/hasFeature04.xml b/test/testcases/tests/level3/core/hasFeature04.xml new file mode 100644 index 0000000..5eac64d --- /dev/null +++ b/test/testcases/tests/level3/core/hasFeature04.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature04"> +<metadata> +<title>hasFeature04</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementation.hasFeature("XML", "3.0") should return true. +</description> +<date qualifier="created">2003-05-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> +</metadata> +<hasFeature feature='"XML"'/> +<var name="impl" type="DOMImplementation"/> +<var name="state" type="boolean"/> +<implementation var="impl"/> +<hasFeature var="state" obj="impl" feature='"+xMl"' version='"3.0"'/> +<assertTrue id="hasXML30" actual="state"/> +</test> diff --git a/test/testcases/tests/level3/core/infoset01.xml b/test/testcases/tests/level3/core/infoset01.xml new file mode 100644 index 0000000..b154037 --- /dev/null +++ b/test/testcases/tests/level3/core/infoset01.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset01"> +<metadata> +<title>infoset01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with infoset set to true, check that +entity references are expanded and unused entity declaration are maintained. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="childValue" type="DOMString"/> +<var name="entities" type="NamedNodeMap"/> +<var name="ent2" type="Entity"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- add an entity reference to the content of the p element --> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<createEntityReference var="entRef" obj="doc" name='"ent1"'/> +<appendChild var="child" obj="pElem" newChild="entRef"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<lastChild var="child" obj="pElem" interface="Node"/> +<assertNotNull actual="child" id="lastChildNotNull"/> +<!-- this should be a Text node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"#text"' ignoreCase="false" id="firstChildName"/> +<nodeValue var="childValue" obj="child"/> +<assertEquals actual="childValue" expected='"barfoo"' ignoreCase="false" id="firstChildValue"/> +<!-- early drafts would have removed unused entity declarations too --> +<doctype var="doctype" obj="doc"/> +<entities var="entities" obj="doctype"/> +<getNamedItem var="ent2" obj="entities" name='"ent2"'/> +<assertNotNull actual="ent2" id="ent2NotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/core/infoset02.xml b/test/testcases/tests/level3/core/infoset02.xml new file mode 100644 index 0000000..570d8ff --- /dev/null +++ b/test/testcases/tests/level3/core/infoset02.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset02"> +<metadata> +<title>infoset02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with infoset set to true, check that +unbound entity references are preserved. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="childType" type="int"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- add an entity reference to the content of the p element --> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<createEntityReference var="entRef" obj="doc" name='"ent3"'/> +<appendChild var="child" obj="pElem" newChild="entRef"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="pList" + obj="doc" + tagname='"p"' + interface="Document"/> +<item var="pElem" obj="pList" interface="NodeList" index="0"/> +<lastChild var="child" obj="pElem" interface="Node"/> +<assertNotNull actual="child" id="lastChildNotNull"/> +<!-- this should be a Entity Reference node --> +<nodeType var="childType" obj="child"/> +<assertEquals actual="childType" expected="5" ignoreCase="false" id="lastChildEntRef"/> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"ent3"' ignoreCase="false" id="lastChildName"/> +</test> + + diff --git a/test/testcases/tests/level3/core/infoset03.xml b/test/testcases/tests/level3/core/infoset03.xml new file mode 100644 index 0000000..21acd6a --- /dev/null +++ b/test/testcases/tests/level3/core/infoset03.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset03"> +<metadata> +<title>infoset03</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with infoset set to true, +check if string values were not normalized. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> +<var name="childLength" type="int"/> +<load var="doc" href="datatype_normalization2" willBeModified="true"/> + +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"infoset"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <normalizeDocument obj="doc"/> + <!-- fail test if normalize had any errors or fatal errors --> + <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"code"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <length var="childLength" obj="childValue" interface="DOMString"/> + <assertEquals actual="childLength" expected='18' ignoreCase="false" id="content1"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content3"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/infoset04.xml b/test/testcases/tests/level3/core/infoset04.xml new file mode 100644 index 0000000..6261d23 --- /dev/null +++ b/test/testcases/tests/level3/core/infoset04.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset04"> +<metadata> +<title>infoset04</title> +<creator>Curt Arnold</creator> +<description> +Normalize a document with a created CDATA section with the +'infoset' to true and check if +the CDATASection has been coalesced. +</description> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=416"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newCdata" type="CDATASection"/> +<var name="cdata" type="CDATASection"/> +<var name="text" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeValue" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createCDATASection var="newCdata" obj="doc" data='"CDATA"'/> +<appendChild obj="elem" var="appendedChild" newChild="newCdata"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalization2Error"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="text" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="text"/> +<assertEquals actual="nodeName" expected='"#text"' id="documentnormalizedocument03_false" ignoreCase="false"/> +<nodeValue var="nodeValue" obj="text"/> +<assertEquals actual="nodeValue" expected='"barCDATA"' id="normalizedValue" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/infoset05.xml b/test/testcases/tests/level3/core/infoset05.xml new file mode 100644 index 0000000..dfbfde5 --- /dev/null +++ b/test/testcases/tests/level3/core/infoset05.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset05"> +<metadata> +<title>infoset05</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with infoset set to true, check that +namespace declaration attributes are maintained. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="xmlnsAttr" type="Attr"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<documentElement var="docElem" obj="doc"/> +<getAttributeNode var="xmlnsAttr" obj="docElem" name='"xmlns"'/> +<assertNotNull actual="xmlnsAttr" id="xmlnsAttrNotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/core/infoset06.xml b/test/testcases/tests/level3/core/infoset06.xml new file mode 100644 index 0000000..596c8b3 --- /dev/null +++ b/test/testcases/tests/level3/core/infoset06.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset06"> +<metadata> +<title>infoset06</title> +<creator>Curt Arnold</creator> +<description> +Create a document with an XML 1.1 valid but XML 1.0 invalid element and +normalize document with infoset set to true. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullString" type="DOMString" isNull="true"/> +<var name="nullDoctype" type="DocumentType" isNull="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="retval" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="locator" type="DOMLocator"/> +<var name="relatedNode" type="Node"/> +<implementation var="domImpl"/> +<createDocument var="doc" obj="domImpl" + namespaceURI="nullString" + qualifiedName="nullString" + doctype="nullDoctype"/> +<assertDOMException id="xml10InvalidName"> + <INVALID_CHARACTER_ERR> + <createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed01"' + qualifiedName='"LegalNameࢎ"'/> + </INVALID_CHARACTER_ERR> +</assertDOMException> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed01"' + qualifiedName='"LegalNameࢎ"'/> +<appendChild var="retval" obj="doc" newChild="elem"/> +<xmlVersion obj="doc" value='"1.0"' interface="Document"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <assertEquals actual="severity" expected="2" ignoreCase="false" id="severity"/> + <type var="type" obj="error" interface="DOMError"/> + <assertEquals actual="type" expected='"wf-invalid-character-in-node-name"' + ignoreCase="false" id="type"/> + <location var="locator" obj="error" interface="DOMError"/> + <relatedNode var="relatedNode" obj="locator" interface="DOMLocator"/> + <assertSame actual="relatedNode" expected="elem" id="relatedNode"/> +</for-each> +<assertSize size="1" collection="errors" id="oneError"/> +</test> + + diff --git a/test/testcases/tests/level3/core/infoset07.xml b/test/testcases/tests/level3/core/infoset07.xml new file mode 100644 index 0000000..91dad6f --- /dev/null +++ b/test/testcases/tests/level3/core/infoset07.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset07"> +<metadata> +<title>infoset07</title> +<creator>Curt Arnold</creator> +<description> +Create a document with an XML 1.1 valid but XML 1.0 invalid attribute and +normalize document with infoset set to true. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDoctype" type="DocumentType" isNull="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="retval" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="locator" type="DOMLocator"/> +<var name="relatedNode" type="Node"/> +<implementation var="domImpl"/> +<createDocument var="doc" obj="domImpl" + namespaceURI='"http://www.w3.org/1999/xhtml"' + qualifiedName='"html"' + doctype="nullDoctype"/> +<documentElement var="docElem" obj="doc"/> +<assertDOMException id="xml10InvalidName"> + <INVALID_CHARACTER_ERR> + <createAttribute var="attr" obj="doc" + name='"LegalNameࢎ"'/> + </INVALID_CHARACTER_ERR> +</assertDOMException> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<setAttribute obj="docElem" name='"LegalNameࢎ"' value='"foo"'/> +<getAttributeNode var="attr" obj="docElem" name='"LegalNameࢎ"'/> +<xmlVersion obj="doc" value='"1.0"' interface="Document"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <assertEquals actual="severity" expected="2" ignoreCase="false" id="severity"/> + <type var="type" obj="error" interface="DOMError"/> + <assertEquals actual="type" expected='"wf-invalid-character-in-node-name"' + ignoreCase="false" id="type"/> + <location var="locator" obj="error" interface="DOMError"/> + <relatedNode var="relatedNode" obj="locator" interface="DOMLocator"/> + <assertSame actual="relatedNode" expected="attr" id="relatedNode"/> +</for-each> +<assertSize size="1" collection="errors" id="oneError"/> +</test> + + diff --git a/test/testcases/tests/level3/core/infoset08.xml b/test/testcases/tests/level3/core/infoset08.xml new file mode 100644 index 0000000..28d8b6c --- /dev/null +++ b/test/testcases/tests/level3/core/infoset08.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset08"> +<metadata> +<title>infoset08</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with infoset and validation set to true, check that +whitespace in element content is preserved. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="child" type="Node"/> +<var name="childName" type="DOMString"/> +<var name="text" type="Text"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<!-- if we discarded whitespace on parse, add some back --> +<if><implementationAttribute name="ignoringElementContentWhitespace" value="true"/> + <getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> + <item var="body" obj="bodyList" interface="NodeList" index="0"/> + <firstChild var="child" obj="body" interface="Node"/> + <createTextNode var="text" obj="doc" data='" "'/> + <insertBefore var="child" obj="body" newChild="text" refChild="child"/> +</if> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName + var="bodyList" + obj="doc" + tagname='"body"' + interface="Document"/> +<item var="body" obj="bodyList" interface="NodeList" index="0"/> +<firstChild var="child" obj="body" interface="Node"/> +<assertNotNull actual="child" id="firstChildNotNull"/> +<!-- this should be a Text node --> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"#text"' ignoreCase="false" id="firstChild"/> +<nextSibling var="child" obj="child" interface="Node"/> +<assertNotNull actual="child" id="secondChildNotNull"/> +<nodeName var="childName" obj="child"/> +<assertEquals actual="childName" expected='"p"' ignoreCase="false" id="secondChild"/> +</test> + + diff --git a/test/testcases/tests/level3/core/infoset09.xml b/test/testcases/tests/level3/core/infoset09.xml new file mode 100644 index 0000000..ab75a9f --- /dev/null +++ b/test/testcases/tests/level3/core/infoset09.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset09"> +<metadata> +<title>infoset09</title> +<creator>Curt Arnold</creator> +<description> + Append a Comment node and normalize with "infoset" set to true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newComment" type="Comment"/> +<var name="lastChild" type="Node"/> +<var name="text" type="Text"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<createComment var="newComment" obj="doc" data='"COMMENT_NODE"'/> +<appendChild obj="elem" var="appendedChild" newChild="newComment"/> +<domConfig interface="Document" obj="doc" var="domConfig" /> +<setParameter obj="domConfig" name='"comments"' value="false"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="normalizationError"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="lastChild" obj="elem" interface="Node"/> +<nodeName var="nodeName" obj="lastChild"/> +<assertEquals actual="nodeName" expected='"#comment"' id="commentPreserved" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/metadata.xml b/test/testcases/tests/level3/core/metadata.xml new file mode 100644 index 0000000..d9117c5 --- /dev/null +++ b/test/testcases/tests/level3/core/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. +See W3C License http://www.w3.org/Consortium/Legal/ for more details. +--> +<!DOCTYPE metadata SYSTEM "dom3.dtd"> + +<!-- This file contains additional metadata about DOM L3 Core tests. + Allowing additional documentation without modifying the tests themselves. --> +<metadata xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3"> +</metadata> diff --git a/test/testcases/tests/level3/core/namespacedeclarations01.xml b/test/testcases/tests/level3/core/namespacedeclarations01.xml new file mode 100644 index 0000000..7f1ad9b --- /dev/null +++ b/test/testcases/tests/level3/core/namespacedeclarations01.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="namespacedeclarations01"> +<metadata> +<title>namespacedeclarations01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with namespace-declarations set to true, check that +namespace declaration attributes are maintained. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="xmlnsAttr" type="Attr"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"namespace-declarations"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<documentElement var="docElem" obj="doc"/> +<getAttributeNode var="xmlnsAttr" obj="docElem" name='"xmlns"'/> +<assertNotNull actual="xmlnsAttr" id="xmlnsAttrNotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/core/namespacedeclarations02.xml b/test/testcases/tests/level3/core/namespacedeclarations02.xml new file mode 100644 index 0000000..fb0a911 --- /dev/null +++ b/test/testcases/tests/level3/core/namespacedeclarations02.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="namespacedeclarations02"> +<metadata> +<title>namespacedeclarations02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with namespace-declarations set to true, check that +namespace declaration attributes are maintained. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="xmlnsAttr" type="Attr"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"namespace-declarations"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<documentElement var="docElem" obj="doc"/> +<getAttributeNode var="xmlnsAttr" obj="docElem" name='"xmlns"'/> +<assertNull actual="xmlnsAttr" id="xmlnsAttrNull"/> +</test> + + diff --git a/test/testcases/tests/level3/core/nodeappendchild01.xml b/test/testcases/tests/level3/core/nodeappendchild01.xml new file mode 100644 index 0000000..cd151a1 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeappendchild01.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeappendchild01"> +<metadata> +<title>nodeappendchild01</title> +<creator>Curt Arnold</creator> +<description> +An attempt to add a second doctype node should result in a HIERARCHY_REQUEST_ERR +or a NOT_SUPPORTED_ERR. +</description> +<date qualifier="created">2004-01-22</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-184E7107"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="appendedChild" type="Node"/> +<var name="tagName" type="DOMString"/> +<var name="docElem" type="Element"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="tagName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="docType" obj="domImpl" qualifiedName='tagName' publicId="nullPubId" systemId="nullSysId"/> +<try> + <appendChild obj="doc" var="appendedChild" newChild="docType"/> + <fail id="throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED"/> + <catch> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodeappendchild02.xml b/test/testcases/tests/level3/core/nodeappendchild02.xml new file mode 100644 index 0000000..64cad80 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeappendchild02.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeappendchild02"> +<metadata> +<title>nodeappendchild02</title> +<creator>Curt Arnold</creator> +<description> +An attempt to add a second document element should result in a HIERARCHY_REQUEST_ERR +or a NOT_SUPPORTED_ERR. +</description> +<date qualifier="created">2004-01-22</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-184E7107"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newElem" type="Element"/> +<var name="appendedChild" type="Node"/> +<var name="tagName" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<var name="docElem" type="Element"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="tagName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<createElementNS var="newElem" obj="doc" qualifiedName='tagName' namespaceURI="rootNS"/> +<try> + <appendChild obj="doc" var="appendedChild" newChild="newElem"/> + <fail id="throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED"/> + <catch> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition01.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition01.xml new file mode 100644 index 0000000..eeb6a4b --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition01.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition01"> +<metadata> +<title>nodecomparedocumentposition01</title> +<creator>IBM</creator> +<description> + + + + Using compareDocumentPosition to check if a Document node contains and precedes its documentType and + node and if the DocumentTypeNode is contained and follows its Document node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-18</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="documentPositionDoc" type="int"/> +<var name="documentPositionDocType" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<compareDocumentPosition var="documentPositionDoc" obj="doc" other="docType"/> +<assertEquals actual="documentPositionDoc" expected="20" id="nodecomparedocumentpositionIsContainedFollowing01" ignoreCase="false"/> +<compareDocumentPosition var="documentPositionDocType" obj="docType" other="doc"/> +<assertEquals actual="documentPositionDocType" expected="10" id="nodecomparetreepositionContainsPRECEDING01" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition02.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition02.xml new file mode 100644 index 0000000..9f15c4f --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition02.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition02"> +<metadata> +<title>nodecomparedocumentposition02</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if a Document node contains and precedes its new DocumentType and + node and if the new DocumentType Node is contained and follows its Document node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDocType" type="DocumentType"/> +<var name="docType" type="DocumentType"/> +<var name="documentPositionDoc" type="int"/> +<var name="documentPositionDocType" type="int"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="replaced" type="Node"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<name var="rootName" obj="docType" interface="DocumentType"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="newDocType" obj="domImpl" qualifiedName="rootName" publicId="nullPubId" systemId="nullSysId"/> +<replaceChild obj="doc" var="replaced" newChild="newDocType" oldChild="docType"/> +<compareDocumentPosition var="documentPositionDoc" obj="doc" other="newDocType"/> +<assertEquals actual="documentPositionDoc" expected="20" id="nodecomparedocumentpositionIsContainedFollowing02" ignoreCase="false"/> +<compareDocumentPosition var="documentPositionDocType" obj="newDocType" other="doc"/> +<assertEquals actual="documentPositionDocType" expected="10" id="nodecomparedocumentpositionContainsPRECEDING02" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition03.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition03.xml new file mode 100644 index 0000000..5fbc2ed --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition03.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition03"> +<metadata> +<title>nodecomparedocumentposition03</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document position of two Document nodes obtained from the + same xml document is disconnected, implementation specific, and that the order of these two documents + is reserved. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docComp" type="Document"/> +<var name="documentPosition1" type="int"/> +<var name="documentPosition2" type="int"/> +<var name="documentPosition3" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<load var="docComp" href="hc_staff" willBeModified="false"/> +<compareDocumentPosition var="documentPosition1" obj="doc" other="docComp"/> +<!-- bitmask blocks out preceding and following bits --> +<assertEquals bitmask="57" actual="documentPosition1" expected="33" id="isImplSpecificDisconnected1" ignoreCase="false"/> +<compareDocumentPosition var="documentPosition2" obj="docComp" other="doc"/> +<assertNotEquals bitmask="2" actual="documentPosition2" expected="documentPosition1" id="notBothPreceding" ignoreCase="false"/> +<assertNotEquals bitmask="4" actual="documentPosition2" expected="documentPosition1" id="notBothFollowing" ignoreCase="false"/> +<assertEquals bitmask="57" actual="documentPosition2" expected="33" id="isImplSpecificDisconnected2" ignoreCase="false"/> +<!-- returned value should be consistent between invocations --> +<compareDocumentPosition var="documentPosition3" obj="doc" other="docComp"/> +<assertEquals actual="documentPosition3" expected="documentPosition1" id="isConsistent" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition04.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition04.xml new file mode 100644 index 0000000..754ab87 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition04.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition04"> +<metadata> +<title>nodecomparedocumentposition04</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check that no flags are set in return when the document position of a + Document node is compared with itself +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="documentPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<compareDocumentPosition var="documentPosition" obj="doc" other="doc"/> +<assertEquals actual="documentPosition" expected="0" id="nodecomparedocumentpositionNoFlags04" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition05.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition05.xml new file mode 100644 index 0000000..ed93ae3 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition05.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition05"> +<metadata> +<title>nodecomparedocumentposition05</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document position of a Document and a new Document node + are disconnected, implementation-specific and preceding/following. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="documentPosition1" type="int"/> +<var name="documentPosition2" type="int"/> +<var name="documentPosition3" type="int"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="rootName" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<var name="docElem" type="Element"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" qualifiedName='rootName' namespaceURI='rootNS' doctype="nullDocType"/> +<compareDocumentPosition var="documentPosition1" obj="doc" other="newDoc"/> +<assertEquals bitmask="57" actual="documentPosition1" expected="33" id="isImplSpecificDisconnected1" ignoreCase="false"/> +<compareDocumentPosition var="documentPosition2" obj="newDoc" other="doc"/> +<assertEquals bitmask="57" actual="documentPosition2" expected="33" id="isImplSpecificDisconnected2" ignoreCase="false"/> +<assertNotEquals bitmask="2" actual="documentPosition2" expected="documentPosition1" id="notBothPreceding" ignoreCase="false"/> +<assertNotEquals bitmask="4" actual="documentPosition2" expected="documentPosition1" id="notBothFollowing" ignoreCase="false"/> +<compareDocumentPosition var="documentPosition3" obj="doc" other="newDoc"/> +<assertEquals actual="documentPosition3" expected="documentPosition1" id="isConsistent" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition06.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition06.xml new file mode 100644 index 0000000..aaaa6d4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition06.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition06"> +<metadata> +<title>nodecomparedocumentposition06</title> +<creator>IBM</creator> +<description> + + + + Using compareDocumentPosition check if the document position of a Document node contains and precedes + its DocumentElement, and the DocumentElement is contained and follows the Document node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="documentPositionDoc" type="int"/> +<var name="documentPositionDocElem" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<compareDocumentPosition var="documentPositionDoc" obj="doc" other="docElem"/> +<assertEquals actual="documentPositionDoc" expected="20" id="nodecomparedocumentpositionIsContainedFollowing06" ignoreCase="false"/> +<compareDocumentPosition var="documentPositionDocElem" obj="docElem" other="doc"/> +<assertEquals actual="documentPositionDocElem" expected="10" id="nodecomparedocumentpotionContainsPRECEDING06" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition07.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition07.xml new file mode 100644 index 0000000..221d09a --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition07.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition07"> +<metadata> +<title>nodecomparedocumentposition07</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document compared contains and precedes the new + newElement, and the newElement is contained and follows the document. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newElem" type="Element"/> +<var name="documentPosition" type="int"/> +<var name="documentElementPosition" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createElementNS var="newElem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"br"'/> +<appendChild obj="docElem" var="appendedChild" newChild="newElem"/> +<compareDocumentPosition var="documentPosition" obj="doc" other="newElem"/> +<assertEquals actual="documentPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing07" ignoreCase="false"/> +<compareDocumentPosition var="documentElementPosition" obj="newElem" other="doc"/> +<assertEquals actual="documentElementPosition" expected="10" id="nodecomparedocumentpositionContainedPRECEDING07" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition08.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition08.xml new file mode 100644 index 0000000..27386be --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition08.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition08"> +<metadata> +<title>nodecomparedocumentposition08</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the Document node contains and precedes an Element, + and the Element is contained and follows the Document node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="documentPosition" type="int"/> +<var name="elementPosition" type = "int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<compareDocumentPosition var="documentPosition" obj="doc" other="elem"/> +<assertEquals actual="documentPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing08" ignoreCase="false"/> +<compareDocumentPosition var="elementPosition" obj="elem" other="doc"/> +<assertEquals actual="elementPosition" expected="10" id="nodecomparedocumentpositionContainsPRECEDING08" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition09.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition09.xml new file mode 100644 index 0000000..5d7ac69 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition09.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition09"> +<metadata> +<title>nodecomparedocumentposition09</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the Element node is contained and follows the appended Document node, and + if the Document node contains and precedes the Element node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="documentPosition" type="int"/> +<var name="documentElementPosition" type = "int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<createElementNS var="newElem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"br"'/> +<appendChild obj="elem" var="appendedChild" newChild="newElem"/> +<compareDocumentPosition var="documentPosition" obj="doc" other="newElem"/> +<assertEquals actual="documentPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing09" ignoreCase="false"/> +<compareDocumentPosition var="documentElementPosition" obj="newElem" other="doc"/> +<assertEquals actual="documentElementPosition" expected="10" id="nodecomparedocumentpositionContainsPRECEDING09" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition10.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition10.xml new file mode 100644 index 0000000..2d854d9 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition10.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition10"> +<metadata> +<title>nodecomparedocumentposition10</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document node precedes and contains its default Attr node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="dir" type="Attr"/> +<var name="elemList" type="NodeList"/> +<var name="attrPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="dir" obj="elem" name='"dir"'/> +<compareDocumentPosition var="attrPosition" obj="dir" other="doc"/> +<assertEquals actual="attrPosition" expected="10" id="nodecomparedocumentpositionPRECEDINGContains10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition11.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition11.xml new file mode 100644 index 0000000..e07f82c --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition11.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition11"> +<metadata> +<title>nodecomparedocumentposition11</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the Document node precedes and contains the Attr node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="newAttr" type="Attr"/> +<var name="elemList" type="NodeList"/> +<var name="documentPosition" type="int"/> +<var name="attrPosition" type ="int"/> +<var name="replacedAttr" type="Attr"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<createAttributeNS var="newAttr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<setAttributeNodeNS obj="elem" var="replacedAttr" newAttr="newAttr"/> +<compareDocumentPosition var="attrPosition" obj="newAttr" other="doc"/> +<assertEquals actual="attrPosition" expected="10" id="nodecomparedocumentpositionPRECEDINGContains11" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition12.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition12.xml new file mode 100644 index 0000000..d350306 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition12.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition12"> +<metadata> +<title>nodecomparedocumentposition12</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if a new ProcessingInstruction node is contained and follows the + Document node, and that the Document node contains and precedes the ProcessingInstruction node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="documentPosition" type="int"/> +<var name="piPosition" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createProcessingInstruction var="pi" obj="doc" data='"PIDATA"' target='"PITarget"'/> +<appendChild obj="doc" var="appendedChild" newChild="pi"/> +<compareDocumentPosition var="documentPosition" obj="doc" other="pi"/> +<assertEquals actual="documentPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing12" ignoreCase="false"/> +<compareDocumentPosition var="piPosition" obj="pi" other="doc"/> +<assertEquals actual="piPosition" expected="10" id="nodecomparedocumentpositionContainsPRECEDING12" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition13.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition13.xml new file mode 100644 index 0000000..f75a093 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition13.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition13"> +<metadata> +<title>nodecomparedocumentposition13</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the Document node contains and precedes the new Comment node, + and if the Comment node is contained and follows the Document node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="comment" type="Comment"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="documentPosition" type="int"/> +<var name="commentPosition" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createComment var="comment" obj="doc" data='"Another Comment"'/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<appendChild obj="elem" var="appendedChild" newChild="comment"/> +<compareDocumentPosition var="documentPosition" obj="doc" other="comment"/> +<assertEquals actual="documentPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing13" ignoreCase="false"/> +<compareDocumentPosition var="commentPosition" obj="comment" other="doc"/> +<assertEquals actual="commentPosition" expected="10" id="nodecomparedocumentpositionContainsPRECEDING13" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition14.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition14.xml new file mode 100644 index 0000000..499915f --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition14.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition14"> +<metadata> +<title>nodecomparedocumentposition14</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the DocumentFragment node contains and precedes an Element + node appended to it, and that the Element node is contained and follows the DocumentFragment node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="docElem" type="Element"/> +<var name="docFragChild" type="Node"/> +<var name="docFragPosition" type="int"/> +<var name="docFragChildPosition" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<appendChild obj="docFrag" var="appendedChild" newChild="docElem" /> +<firstChild var="docFragChild" obj="docFrag" interface="Node"/> +<compareDocumentPosition var="docFragPosition" obj="docFrag" other="docFragChild"/> +<assertEquals actual="docFragPosition" expected="20" id="nodecomparedocumentpositionContainsPRECEDING14" ignoreCase="false"/> +<compareDocumentPosition var="docFragChildPosition" obj="docFragChild" other="docFrag"/> +<assertEquals actual="docFragChildPosition" expected="10" id="nodecomparedocumentpositionIsContainedFollowing14" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition15.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition15.xml new file mode 100644 index 0000000..bcf1d5e --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition15.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition15"> +<metadata> +<title>nodecomparedocumentposition15</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the Element node precedes and contains its Attr child, and that the Attr child + is contained and follows the Element node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="docElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="docFragChild" type="Node"/> +<var name="attrPosition" type="int"/> +<var name="docFragChildPosition" type="int"/> +<var name="appendedChild" type="Node"/> +<var name="attrNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<setAttributeNodeNS obj="docElem" var="attrNode" newAttr="attr" /> +<appendChild obj="docFrag" var="appendedChild" newChild="docElem" /> +<firstChild var="docFragChild" obj="docFrag" interface="Node"/> +<compareDocumentPosition var="docFragChildPosition" obj="docFragChild" other="attr"/> +<assertEquals actual="docFragChildPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollows15" ignoreCase="false"/> +<compareDocumentPosition var="attrPosition" obj="attr" other="docFragChild"/> +<assertEquals actual="attrPosition" expected="10" id="nodecomparedocumentpositionPRECEEDINGContains15" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition16.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition16.xml new file mode 100644 index 0000000..083b654 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition16.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition16"> +<metadata> +<title>nodecomparedocumentposition16</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document position of a DocumentFragment node compared with + a cloned Attr node is disconnected and implementation specific, and that the order between these two + nodes is preserved. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="attr" type="Attr"/> +<var name="attrCloned" type="Attr"/> +<var name="docFragPosition" type="int"/> +<var name="position1" type="int"/> +<var name="position2" type="int"/> +<var name="position3" type="int"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<cloneNode var="attrCloned" obj="attr" deep="true"/> +<compareDocumentPosition var="position1" obj="docFrag" other="attrCloned"/> +<!-- bitmask blocks out preceding and following bits --> +<assertEquals bitmask="57" actual="position1" expected="33" id="isImplSpecificDisconnected1" ignoreCase="false"/> +<compareDocumentPosition var="position2" obj="attrCloned" other="docFrag"/> +<assertNotEquals bitmask="2" actual="position2" expected="position1" id="notBothPreceding" ignoreCase="false"/> +<assertNotEquals bitmask="4" actual="position2" expected="position1" id="notBothFollowing" ignoreCase="false"/> +<assertEquals bitmask="57" actual="position2" expected="33" id="isImplSpecificDisconnected2" ignoreCase="false"/> +<!-- returned value should be consistent between invocations --> +<compareDocumentPosition var="position3" obj="docFrag" other="attrCloned"/> +<assertEquals actual="position3" expected="position1" id="isConsistent" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition17.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition17.xml new file mode 100644 index 0000000..6c5335af --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition17.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition17"> +<metadata> +<title>nodecomparedocumentposition17</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document position of the first ProcessingInstruction node compared to + this second newly apended ProcessingInstruction node is PRECEDING, and FOLLOWING vice versa. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pi1" type="ProcessingInstruction"/> +<var name="pi2" type="ProcessingInstruction"/> +<var name="pi1Position" type="int"/> +<var name="pi2Position" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createProcessingInstruction var="pi1" obj="doc" target='"PI1"' data='""'/> +<createProcessingInstruction var="pi2" obj="doc" target='"PI2"' data='""'/> +<appendChild obj="doc" var="appendedChild" newChild="pi1"/> +<appendChild obj="doc" var="appendedChild" newChild="pi2"/> +<compareDocumentPosition var="pi1Position" obj="pi1" other="pi2"/> +<assertEquals actual="pi1Position" expected="4" id="nodecomparedocumentpositionFollowing17" ignoreCase="false"/> +<compareDocumentPosition var="pi2Position" obj="pi2" other="pi1"/> +<assertEquals actual="pi2Position" expected="2" id="nodecomparedocumentpositionPRECEDING17" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition18.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition18.xml new file mode 100644 index 0000000..0742885 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition18.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition18"> +<metadata> +<title>nodecomparedocumentposition18</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document position of the first new Text node compared to the + second text node is PRECEDING and is FOLLOWING vice versa. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-19</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="txt1" type="Text"/> +<var name="txt2" type="Text"/> +<var name="txt1Position" type="int"/> +<var name="txt2Position" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createTextNode var="txt1" obj="doc" data='"T1"'/> +<createTextNode var="txt2" obj="doc" data='"T2"'/> +<appendChild obj="docElem" var="appendedChild" newChild="txt1"/> +<appendChild obj="docElem" var="appendedChild" newChild="txt2"/> +<compareDocumentPosition var="txt1Position" obj="txt1" other="txt2"/> +<assertEquals actual="txt1Position" expected="4" id="nodecomparedocumentpositionFollowing18" ignoreCase="false"/> +<compareDocumentPosition var="txt2Position" obj="txt2" other="txt1"/> +<assertEquals actual="txt2Position" expected="2" id="nodecomparedocumentpositionPRECEDING18" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition19.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition19.xml new file mode 100644 index 0000000..25cf54a --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition19.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition19"> +<metadata> +<title>nodecomparedocumentposition19</title> +<creator>IBM</creator> +<description> + The method compareDocumentPosition compares a node with this node with regard to their position in the + document and according to the document order. + + Using compareDocumentPosition check if the document position of the first CDATASection node + of the second element whose localName is name compared with the second CDATASection node + is PRECEDING and is FOLLOWING vice versa. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<implementationAttribute name="coalescing" value="false"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elemStrong" type="Element"/> +<var name="cdata1" type="CDATASection"/> +<var name="cdata2" type="CDATASection"/> +<var name="aNode" type="Node"/> +<var name="cdata1Position" type="int"/> +<var name="cdata2Position" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagNameNS var="elemList" obj="doc" namespaceURI='"*"' localName='"strong"' interface="Document"/> +<item var="elemStrong" obj="elemList" index="1" interface="NodeList"/> +<lastChild var="cdata2" obj="elemStrong" interface="Node"/> +<previousSibling var="aNode" obj="cdata2" interface="Node"/> +<previousSibling var="cdata1" obj="aNode" interface="Node"/> +<compareDocumentPosition var="cdata1Position" obj="cdata1" other="cdata2"/> +<assertEquals actual="cdata1Position" expected="4" id="nodecomparedocumentposition19_cdata2Follows" ignoreCase="false"/> +<compareDocumentPosition var="cdata2Position" obj="cdata2" other="cdata1"/> +<assertEquals actual="cdata2Position" expected="2" id="nodecomparedocumentposition_cdata1Precedes" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition20.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition20.xml new file mode 100644 index 0000000..776c573 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition20.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition20"> +<metadata> +<title>nodecomparedocumentposition20</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document position of the first Text node + of the second element whose localName is name compared with the next CDATASection node + is PRECEDING and FOLLOWING vice versa. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<implementationAttribute name="coalescing" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elemName" type="Element"/> +<var name="cdata" type="CDATASection"/> +<var name="txt" type="Text"/> +<var name="txtPosition" type="int"/> +<var name="cdataPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemName" obj="elemList" index="1" interface="NodeList"/> +<firstChild var="txt" obj="elemName" interface="Node"/> +<lastChild var="cdata" obj="elemName" interface="Node"/> +<compareDocumentPosition var="txtPosition" obj="txt" other="cdata"/> +<assertEquals actual="txtPosition" expected="4" id="nodecomparedocumentpositionFollowingg20" ignoreCase="false"/> +<compareDocumentPosition var="cdataPosition" obj="cdata" other="txt"/> +<assertEquals actual="cdataPosition" expected="2" id="nodecomparedocumentpositionPRECEDING20" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition21.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition21.xml new file mode 100644 index 0000000..3e7525b --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition21.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition21"> +<metadata> +<title>nodecomparedocumentposition21</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check the document position of the text node of the fist and second elements + whose localName is name. The first text node should return FOLLOWING and the second text node should + return PRECEDING when compareDocumentPosition is invoked with the other node as a parameter. + +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<implementationAttribute name="coalescing" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elemName1" type="Element"/> +<var name="elemName2" type="Element"/> +<var name="txt1" type="Text"/> +<var name="txt2" type="Text"/> +<var name="txt1Position" type="int"/> +<var name="txt2Position" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemName1" obj="elemList" index="0" interface="NodeList"/> +<item var="elemName2" obj="elemList" index="1" interface="NodeList"/> +<firstChild var="txt1" obj="elemName1" interface="Node"/> +<firstChild var="txt2" obj="elemName2" interface="Node"/> +<compareDocumentPosition var="txt1Position" obj="txt1" other="txt2"/> +<assertEquals actual="txt1Position" expected="4" id="nodecomparedocumentpositionFollowing21" ignoreCase="false"/> +<compareDocumentPosition var="txt2Position" obj="txt2" other="txt1"/> +<assertEquals actual="txt2Position" expected="2" id="nodecomparedocumentpositionPRECEDING21" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition22.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition22.xml new file mode 100644 index 0000000..bbd3737 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition22.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition22"> +<metadata> +<title>nodecomparedocumentposition22</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the Entity node precedes the Notation node and the Notation + node follows the Entity node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<implementationAttribute name="coalescing" value="false"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="notation" type="Notation"/> +<var name="entityPosition" type="int"/> +<var name="notationPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<getNamedItem var="notation" obj="notationsMap" name='"notation1"'/> +<compareDocumentPosition var="entityPosition" obj="entity" other="notation"/> +<assertEquals actual="entityPosition" expected="4" id="nodecomparedocumentpositionFollowing22" ignoreCase="false"/> +<compareDocumentPosition var="notationPosition" obj="notation" other="entity"/> +<assertEquals actual="notationPosition" expected="2" id="nodecomparedocumentpositionPRECEDING22" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition23.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition23.xml new file mode 100644 index 0000000..8b3e32e --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition23.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition23"> +<metadata> +<title>nodecomparedocumentposition23</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the document position of an Entity node compared to another + Entity node following it in DocumentType is implementation specific. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="entity2" type="Entity"/> +<var name="position1" type="int"/> +<var name="position2" type="int"/> +<var name="position3" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<getNamedItem var="entity2" obj="entitiesMap" name='"delta"'/> +<compareDocumentPosition var="position1" obj="entity" other="entity2"/> +<!-- bitmask blocks out preceding and following bits --> +<assertEquals bitmask="57" actual="position1" expected="32" id="isImplSpecificDisconnected1" ignoreCase="false"/> +<compareDocumentPosition var="position2" obj="entity2" other="entity"/> +<assertNotEquals bitmask="2" actual="position2" expected="position1" id="notBothPreceding" ignoreCase="false"/> +<assertNotEquals bitmask="4" actual="position2" expected="position1" id="notBothFollowing" ignoreCase="false"/> +<assertEquals bitmask="57" actual="position2" expected="32" id="isImplSpecificDisconnected2" ignoreCase="false"/> +<!-- returned value should be consistent between invocations --> +<compareDocumentPosition var="position3" obj="entity" other="entity2"/> +<assertEquals actual="position3" expected="position1" id="isConsistent" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition24.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition24.xml new file mode 100644 index 0000000..ab4f111 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition24.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition24"> +<metadata> +<title>nodecomparedocumentposition24</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the return value of document position of a Notation node compared to another + that is the same is not flagged. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="notaionsMap" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="notation2" type="Notation"/> +<var name="notationPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<notations var="notaionsMap" obj="docType"/> +<getNamedItem var="notation" obj="notaionsMap" name='"notation1"'/> +<getNamedItem var="notation2" obj="notaionsMap" name='"notation1"'/> +<compareDocumentPosition var="notationPosition" obj="notation" other="notation2"/> +<assertEquals actual="notationPosition" expected="0" id="nodecomparedocumentposition24" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition25.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition25.xml new file mode 100644 index 0000000..1bfe1fa --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition25.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition25"> +<metadata> +<title>nodecomparedocumentposition25</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the EntityReference or Text node is contained and follows its + parent Element node, and that the Element node contains and precedes the + EntityReference or Text node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elemName" type="Element"/> +<var name="entRef" type="Node"/> +<var name="elementPosition" type="int"/> +<var name="entRefPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"var"' interface="Document"/> +<item var="elemName" obj="elemList" index="2" interface="NodeList"/> +<firstChild obj="elemName" var="entRef" interface="Node"/> +<compareDocumentPosition var="elementPosition" obj="elemName" other="entRef"/> +<assertEquals actual="elementPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing25" ignoreCase="false"/> +<compareDocumentPosition var="entRefPosition" obj="entRef" other="elemName"/> +<assertEquals actual="entRefPosition" expected="10" id="nodecomparedocumentpositionContainsPRECEDING25" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition26.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition26.xml new file mode 100644 index 0000000..b349fa3 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition26.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition26"> +<metadata> +<title>nodecomparedocumentposition26</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check if the EntityReference node contains and precedes it's first + childElement, and that the childElement is contained and follows the EntityReference node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="varList" type="NodeList"/> +<var name="varElem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="entRefChild1" type="Element"/> +<var name="entRefPosition" type="int"/> +<var name="entRefChild1Position" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<if> + <implementationAttribute name="expandEntityReferences" value="false"/> + <getElementsByTagName var="varList" obj="doc" tagname='"var"' interface="Document"/> + <item var="varElem" obj="varList" index="2" interface="NodeList"/> + <assertNotNull actual="varElem" id="varElemNotNull"/> + <firstChild var="entRef" obj="varElem" interface="Node"/> + <assertNotNull actual="entRef" id="entRefNotNull"/> + <else> + <createEntityReference name='"ent4"' obj="doc" var="entRef"/> + </else> +</if> +<firstChild var="entRefChild1" obj="entRef" interface="Node"/> +<assertNotNull actual="entRefChild1" id="entRefChild1NotNull"/> +<compareDocumentPosition var="entRefPosition" obj="entRef" other="entRefChild1"/> +<assertEquals actual="entRefPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing26" ignoreCase="false"/> +<compareDocumentPosition var="entRefChild1Position" obj="entRefChild1" other="entRef"/> +<assertEquals actual="entRefChild1Position" expected="10" id="nodecomparedocumentpositionContainsPRECEDING26" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition27.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition27.xml new file mode 100644 index 0000000..2da7475 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition27.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition27"> +<metadata> +<title>nodecomparedocumentposition27</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the EntityReference node contains and precedes it's last + childElement, and that this childElement is contained and follows the EntityReference node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="varList" type="NodeList"/> +<var name="varElem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="entRefChild1" type="ProcessingInstruction"/> +<var name="entRefPosition" type="int"/> +<var name="entRefChild1Position" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<if> + <implementationAttribute name="expandEntityReferences" value="false"/> + <getElementsByTagName var="varList" obj="doc" tagname='"var"' interface="Document"/> + <item var="varElem" obj="varList" index="2" interface="NodeList"/> + <assertNotNull actual="varElem" id="varElemNotNull"/> + <firstChild var="entRef" obj="varElem" interface="Node"/> + <assertNotNull actual="entRef" id="entRefNotNull"/> + <else> + <createEntityReference name='"ent4"' obj="doc" var="entRef"/> + </else> +</if> +<lastChild obj="entRef" var="entRefChild1" interface="Node"/> +<assertNotNull actual="entRefChild1" id="entRefChild1NotNull"/> +<compareDocumentPosition var="entRefPosition" obj="entRef" other="entRefChild1"/> +<assertEquals actual="entRefPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing27" ignoreCase="false"/> +<compareDocumentPosition var="entRefChild1Position" obj="entRefChild1" other="entRef"/> +<assertEquals actual="entRefChild1Position" expected="10" id="nodecomparedocumentpositionContainsPRECEDING" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition28.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition28.xml new file mode 100644 index 0000000..e596ed1 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition28.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition28"> +<metadata> +<title>nodecomparedocumentposition28</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition check the document position of the EntityReference node ent4's + first child and last child. Invoke compareDocumentPositon on first child with last child as a parameter + should return FOLLOWING, and should return PRECEDING vice versa. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="varList" type="NodeList"/> +<var name="varElem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="entRefChild1" type="Element"/> +<var name="entRefChild2" type="ProcessingInstruction"/> +<var name="entRefChild1Position" type="int"/> +<var name="entRefChild2Position" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<if> + <implementationAttribute name="expandEntityReferences" value="false"/> + <getElementsByTagName var="varList" obj="doc" tagname='"var"' interface="Document"/> + <item var="varElem" obj="varList" index="2" interface="NodeList"/> + <assertNotNull actual="varElem" id="varElemNotNull"/> + <firstChild var="entRef" obj="varElem" interface="Node"/> + <assertNotNull actual="entRef" id="entRefNotNull"/> + <else> + <createEntityReference name='"ent4"' obj="doc" var="entRef"/> + </else> +</if> +<firstChild obj="entRef" var="entRefChild1" interface="Node"/> +<assertNotNull actual="entRefChild1" id="entRefChild1NotNull"/> +<lastChild obj="entRef" var="entRefChild2" interface="Node"/> +<assertNotNull actual="entRefChild2" id="entRefChild2NotNull"/> +<compareDocumentPosition var="entRefChild1Position" obj="entRefChild1" other="entRefChild2"/> +<assertEquals actual="entRefChild1Position" expected="4" id="nodecomparedocumentpositionFollowing28" ignoreCase="false"/> +<compareDocumentPosition var="entRefChild2Position" obj="entRefChild2" other="entRefChild1"/> +<assertEquals actual="entRefChild2Position" expected="2" id="nodecomparedocumentpositionPRECEDING28" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition29.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition29.xml new file mode 100644 index 0000000..28ed0c1 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition29.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition29"> +<metadata> +<title>nodecomparedocumentposition29</title> +<creator>IBM</creator> +<description> + Create two entity reference nodes. Using compareDocumentPosition to check if the child of the first Entity + Ref node precedes the child of the second Entity Ref node, and that the child of the second Entity Ref node + follows the child of the first Entity Ref node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-20</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="entRef1" type="EntityReference"/> +<var name="entRef2" type="EntityReference"/> +<var name="entRefChild1" type="Element"/> +<var name="entRefChild2" type="ProcessingInstruction"/> +<var name="entRefChild1Position" type="int"/> +<var name="entRefChild2Position" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createEntityReference name='"ent4"' obj="doc" var="entRef1"/> +<createEntityReference name='"ent4"' obj="doc" var="entRef2"/> +<documentElement var="docElem" obj="doc"/> +<appendChild obj="docElem" var="appendedChild" newChild="entRef1"/> +<appendChild obj="docElem" var="appendedChild" newChild="entRef2"/> +<firstChild obj="entRef1" var="entRefChild1" interface="Node"/> +<assertNotNull actual="entRefChild1" id="entRefChild1NotNull"/> +<lastChild obj="entRef2" var="entRefChild2" interface="Node"/> +<assertNotNull actual="entRefChild2" id="entRefChild2NotNull"/> +<compareDocumentPosition var="entRefChild1Position" obj="entRefChild1" other="entRefChild2"/> +<assertEquals actual="entRefChild1Position" expected="4" id="nodecomparedocumentpositionFollowing29" ignoreCase="false"/> +<compareDocumentPosition var="entRefChild2Position" obj="entRefChild2" other="entRefChild1"/> +<assertEquals actual="entRefChild2Position" expected="2" id="nodecomparedocumentpositionPRECEDING29" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition30.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition30.xml new file mode 100644 index 0000000..205a035 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition30.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition30"> +<metadata> +<title>nodecomparedocumentposition30</title> +<creator>IBM</creator> +<description> + Using compareTreePosition check if comparedocumentposition invoked on the first name with + the first position node as a parameter returns FOLLOWING. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-03-03</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="nameList" type="NodeList"/> +<var name="positionList" type="NodeList"/> +<var name="strong" type="Element"/> +<var name="code" type="Element"/> +<var name="namePosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="nameList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="strong" obj="nameList" index="0" interface="NodeList"/> +<getElementsByTagName var="positionList" obj="doc" tagname='"code"' interface="Document"/> +<item var="code" obj="positionList" index="0" interface="NodeList"/> +<compareDocumentPosition var="namePosition" obj="code" other="strong"/> +<assertEquals actual="namePosition" expected="2" id="nodecomparedocumentpositionFollowing30" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition31.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition31.xml new file mode 100644 index 0000000..4df4149 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition31.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition31"> +<metadata> +<title>nodecomparedocumentposition31</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if invoking the method on the first name node with + a new node appended to the second position node as a parameter is FOLLOWING, and is PRECEDING vice versa +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="nameList" type="NodeList"/> +<var name="positionList" type="NodeList"/> +<var name="strong" type="Element"/> +<var name="code" type="Element"/> +<var name="newElem" type="Element"/> +<var name="namePosition" type="int"/> +<var name="elemPosition" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="nameList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="strong" obj="nameList" index="0" interface="NodeList"/> +<getElementsByTagName var="positionList" obj="doc" tagname='"code"' interface="Document"/> +<item var="code" obj="positionList" index="1" interface="NodeList"/> +<createElementNS var="newElem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"br"'/> +<appendChild obj="code" var="appendedChild" newChild="newElem"/> +<compareDocumentPosition var="namePosition" obj="strong" other="newElem"/> +<assertEquals actual="namePosition" expected="4" id="nodecomparedocumentpositionFollowing31" ignoreCase="false"/> +<compareDocumentPosition var="elemPosition" obj="newElem" other="strong"/> +<assertEquals actual="elemPosition" expected="2" id="nodecomparedocumentpositionPRECEDING31" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition32.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition32.xml new file mode 100644 index 0000000..bfa25db --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition32.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition32"> +<metadata> +<title>nodecomparedocumentposition32</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the document position returned by comparing the first name with + a first position node of another document reference and adopted by the first as a parameter is FOLLOWING. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="doc2" type="Document"/> +<var name="nameList" type="NodeList"/> +<var name="positionList" type="NodeList"/> +<var name="strong" type="Element"/> +<var name="code" type="Element"/> +<var name="documentPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<assign var="doc2" value="doc"/> +<getElementsByTagName var="nameList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="strong" obj="nameList" index="0" interface="NodeList"/> +<getElementsByTagName var="positionList" obj="doc2" tagname='"code"' interface="Document"/> +<item var="code" obj="positionList" index="0" interface="NodeList"/> +<compareDocumentPosition var="documentPosition" obj="strong" other="code"/> +<assertEquals actual="documentPosition" expected="4" id="nodecomparedocumentpositionFollowing32" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition33.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition33.xml new file mode 100644 index 0000000..77b4ab3 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition33.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition33"> +<metadata> +<title>nodecomparedocumentposition33</title> +<creator>IBM</creator> +<description> + Create a new Element node, add a new atttribute node to it. Compare the position + of the Element and the Document. This should return disconnected, implementation specific, and that + the order of these two nodes is preserved. + Also compare the position of the Element node with respect to the Attr node and this should + be PRECEDING and contains, and the Attr node follows and is contained by the Element node +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="position1" type="int"/> +<var name="position2" type="int"/> +<var name="position3" type="int"/> +<var name="position4" type="int"/> +<var name="position5" type="int"/> +<var name="replacedAttr" type="Attr"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"br"'/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<setAttributeNodeNS obj="elem" var="replacedAttr" newAttr="attr"/> + +<compareDocumentPosition var="position4" obj="elem" other="attr"/> +<assertEquals actual="position4" expected="20" id="nodecomparedocumentposition3FollowingisContained33" ignoreCase="false"/> +<compareDocumentPosition var="position5" obj="attr" other="elem"/> +<assertEquals actual="position5" expected="10" id="nodecomparedocumentposition4ContainsPRECEDING33" ignoreCase="false"/> + +<compareDocumentPosition var="position1" obj="doc" other="elem"/> +<!-- bitmask blocks out preceding and following bits --> +<assertEquals bitmask="57" actual="position1" expected="33" id="isImplSpecificDisconnected1" ignoreCase="false"/> +<compareDocumentPosition var="position2" obj="elem" other="doc"/> +<assertNotEquals bitmask="2" actual="position2" expected="position1" id="notBothPreceding" ignoreCase="false"/> +<assertNotEquals bitmask="4" actual="position2" expected="position1" id="notBothFollowing" ignoreCase="false"/> +<assertEquals bitmask="57" actual="position2" expected="33" id="isImplSpecificDisconnected2" ignoreCase="false"/> +<!-- returned value should be consistent between invocations --> +<compareDocumentPosition var="position3" obj="doc" other="elem"/> +<assertEquals actual="position3" expected="position1" id="isConsistent" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition34.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition34.xml new file mode 100644 index 0000000..39db666 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition34.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition34"> +<metadata> +<title>nodecomparedocumentposition34</title> +<creator>IBM</creator> +<description> + Create a new Element node, add new Text, Element and Processing Instruction nodes to it. + Using compareDocumentPosition, compare the position of the Element with respect to the Text + and the Text with respect to the Processing Instruction. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemMain" type="Element"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="elementToTxtPosition" type="int"/> +<var name="txtToPiPosition" type="int"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elemMain" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"br"'/> +<createTextNode var="txt" obj="doc" data='"TEXT"'/> +<createProcessingInstruction var="pi" obj="doc" data='"PID"' target='"PIT"'/> +<appendChild obj="elemMain" var="appendedChild" newChild="txt"/> +<appendChild obj="elemMain" var="appendedChild" newChild="elem"/> +<appendChild obj="elemMain" var="appendedChild" newChild="pi"/> +<compareDocumentPosition var="elementToTxtPosition" obj="txt" other="elem"/> +<assertEquals actual="elementToTxtPosition" expected="4" id="nodecomparedocumentpositionFollowing34" ignoreCase="false"/> +<compareDocumentPosition var="txtToPiPosition" obj="pi" other="txt"/> +<assertEquals actual="txtToPiPosition" expected="2" id="nodecomparedocumentpositionPRECEDING34" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition35.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition35.xml new file mode 100644 index 0000000..f9872ef --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition35.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition35"> +<metadata> +<title>nodecomparedocumentposition35</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the Element contains and precedes its default attribute + and that the attribute follows and iscontained by the Element +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elementPosition" type="int"/> +<var name="attrPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"dir"'/> +<compareDocumentPosition var="elementPosition" obj="elem" other="attr"/> +<assertEquals actual="elementPosition" expected="20" id="nodecomparedocumentpositionIsContainedFollowing35" ignoreCase="false"/> +<compareDocumentPosition var="attrPosition" obj="attr" other="elem"/> +<assertEquals actual="attrPosition" expected="10" id="nodecomparedocumentpositionPRECEDINGContains35" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition36.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition36.xml new file mode 100644 index 0000000..7a1b3f7 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition36.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition36"> +<metadata> +<title>nodecomparedocumentposition36</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the document position of an Attribute compared with + the element that follows its parent as a parameter is FOLLOWING, and is PRECEDING + vice versa. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="elemListFollows" type="NodeList"/> +<var name="elemFollows" type="Element"/> +<var name="attr" type="Attr"/> +<var name="attrPosition" type="int"/> +<var name="elemFollowsPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"dir"'/> +<getElementsByTagName var="elemListFollows" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elemFollows" obj="elemListFollows" index="3" interface="NodeList"/> +<compareDocumentPosition var="attrPosition" obj="attr" other="elemFollows"/> +<assertEquals actual="attrPosition" expected="4" id="nodecomparedocumentpositionFollowing36" ignoreCase="false"/> +<compareDocumentPosition var="elemFollowsPosition" obj="elemFollows" other="attr"/> +<assertEquals actual="elemFollowsPosition" expected="2" id="nodecomparedocumentpositionPRECEEDING36" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition37.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition37.xml new file mode 100644 index 0000000..9c0a33a --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition37.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition37"> +<metadata> +<title>nodecomparedocumentposition37</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the document position of the first class attribute + of the element acronym when compared with the elements text content as a parameter is + is FOLLOWING, and is PRECEDING vice versa. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="attr" type="Attr"/> +<var name="attrPosition" type="int"/> +<var name="txtPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"class"'/> +<firstChild var="txt" obj="elem" interface="Node"/> +<compareDocumentPosition var="attrPosition" obj="attr" other="txt"/> +<assertEquals actual="attrPosition" expected="4" id="nodecomparetreepositionFollowing37" ignoreCase="false"/> +<compareDocumentPosition var="txtPosition" obj="txt" other="attr"/> +<assertEquals actual="txtPosition" expected="2" id="nodecomparetreepositionPRECEDING37" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition38.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition38.xml new file mode 100644 index 0000000..84a9ee6 --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition38.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition38"> +<metadata> +<title>nodecomparedocumentposition38</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the class's attribute contains and precedes it's content, + and the content node is contained and follows the attribute node. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="attr" type="Attr"/> +<var name="attrPosition" type="int"/> +<var name="attrChildPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"class"'/> +<firstChild var="txt" obj="attr" interface="Node"/> +<compareDocumentPosition var="attrPosition" obj="attr" other="txt"/> +<assertEquals actual="attrPosition" expected="20" id="nodecomparedocumentpositionIsContainsFollowing38" ignoreCase="false"/> +<compareDocumentPosition var="attrChildPosition" obj="txt" other="attr"/> +<assertEquals actual="attrChildPosition" expected="10" id="nodecomparedocumentpositionContainsPRECEDING38" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition39.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition39.xml new file mode 100644 index 0000000..ea05c5a --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition39.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition39"> +<metadata> +<title>nodecomparedocumentposition39</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the document position of the class's attribute + when compared with the local1 attribute node is implementation_specific. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="attrPosition" type="int"/> +<var name="swappedPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr1" obj="elem" name='"class"'/> +<getAttributeNode var="attr2" obj="elem" name='"xsi:noNamespaceSchemaLocation"'/> +<compareDocumentPosition var="attrPosition" obj="attr1" other="attr2"/> +<assertEquals actual="attrPosition" expected="32" bitmask="32" id="isImplementationSpecific" ignoreCase="false"/> +<assertEquals actual="attrPosition" expected="0" bitmask="25" id="otherBitsZero" ignoreCase="false"/> +<assertNotEquals actual="attrPosition" expected="0" bitmask="6" id="eitherFollowingOrPreceding" ignoreCase="false"/> +<compareDocumentPosition var="swappedPosition" obj="attr2" other="attr1"/> +<assertNotEquals actual="attrPosition" expected="swappedPosition" bitmask="2" id="onlyOnePreceding" ignoreCase="false"/> +<assertNotEquals actual="attrPosition" expected="swappedPosition" bitmask="4" id="onlyOneFollowing" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodecomparedocumentposition40.xml b/test/testcases/tests/level3/core/nodecomparedocumentposition40.xml new file mode 100644 index 0000000..fcc48bb --- /dev/null +++ b/test/testcases/tests/level3/core/nodecomparedocumentposition40.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodecomparedocumentposition40"> +<metadata> +<title>nodecomparedocumentposition40</title> +<creator>IBM</creator> +<description> + Using compareDocumentPosition to check if the document position of the class's attribute + when compared with a new attribute node is implementation_specific +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-21</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="attrPosition" type="int"/> +<var name="swappedPosition" type="int"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr1" obj="elem" name='"class"'/> +<setAttributeNS obj="elem" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"' value='"FR-fr"'/> +<getAttributeNode var="attr2" obj="elem" name='"xml:lang"'/> +<compareDocumentPosition var="attrPosition" obj="attr1" other="attr2"/> +<assertEquals actual="attrPosition" expected="32" bitmask="32" id="isImplementationSpecific" ignoreCase="false"/> +<assertEquals actual="attrPosition" expected="0" bitmask="25" id="otherBitsZero" ignoreCase="false"/> +<assertNotEquals actual="attrPosition" expected="0" bitmask="6" id="eitherFollowingOrPreceding" ignoreCase="false"/> +<compareDocumentPosition var="swappedPosition" obj="attr2" other="attr1"/> +<assertNotEquals actual="attrPosition" expected="swappedPosition" bitmask="2" id="onlyOnePreceding" ignoreCase="false"/> +<assertNotEquals actual="attrPosition" expected="swappedPosition" bitmask="4" id="onlyOneFollowing" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri01.xml b/test/testcases/tests/level3/core/nodegetbaseuri01.xml new file mode 100644 index 0000000..18eba09 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri01.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri01"> +<metadata> +<title>nodegetbaseuri01</title> +<creator>IBM</creator> +<description> +Call Node.getBaseURI() on a test document. Should be not-null and same as Document.getDocumentURI(). +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Document"/> +</metadata> +<var name="doc" type="Document"/> +<var name="baseURI" type="DOMString"/> +<var name="documentURI" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<baseURI var="baseURI" obj="doc" interface="Node"/> +<assertURIEquals actual="baseURI" name='"barfoo"' isAbsolute="true" id="notNull"/> +<documentURI var="documentURI" obj="doc"/> +<assertEquals actual="baseURI" expected="documentURI" ignoreCase="false" id="sameAsDocumentURI"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetbaseuri02.xml b/test/testcases/tests/level3/core/nodegetbaseuri02.xml new file mode 100644 index 0000000..0131443 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri02.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri02"> +<metadata> +<title>nodegetbaseuri02</title> +<creator>IBM</creator> +<description> + Using getBaseURI check if the baseURI attribute of a new Document node is null + and if affected by changes in Document.documentURI. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Document"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="baseURI" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="docElem" type="Element"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootName' doctype="nullDocType"/> +<baseURI var="baseURI" obj="newDoc" interface="Node"/> +<assertNull actual="baseURI" id="baseURIIsNull"/> +<documentURI obj="newDoc" value='"http://www.example.com/sample.xml"'/> +<baseURI var="baseURI" obj="newDoc" interface="Node"/> +<assertEquals expected='"http://www.example.com/sample.xml"' actual="baseURI" ignoreCase="true" id="baseURISameAsDocURI"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetbaseuri03.xml b/test/testcases/tests/level3/core/nodegetbaseuri03.xml new file mode 100644 index 0000000..a102973 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri03.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri03"> +<metadata> +<title>nodegetbaseuri03</title> +<creator>IBM</creator> +<description> +Check that Node.baseURI is null for a DocumentType as defined in the Infoset Mapping (Appendix C). +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2DocumentType"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="baseURI" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<baseURI var="baseURI" obj="docType" interface="Node"/> +<assertNull actual="baseURI" id="nodegetbaseuri03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetbaseuri04.xml b/test/testcases/tests/level3/core/nodegetbaseuri04.xml new file mode 100644 index 0000000..b0dbbfc --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri04.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri04"> +<metadata> +<title>nodegetbaseuri04</title> +<creator>IBM</creator> +<description> +Node.baseURI for a document element without an xml:base attribute should be same as Document.documentURI. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Document"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="baseURI" type="DOMString"/> +<var name="documentURI" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<baseURI var="baseURI" obj="docElem" interface="Node"/> +<assertURIEquals actual="baseURI" isAbsolute="true" name='"barfoo"' id="baseURI"/> +<documentURI var="documentURI" obj="doc"/> +<assertEquals actual="baseURI" expected="documentURI" ignoreCase="false" id="baseURIEqualsDocURI"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetbaseuri05.xml b/test/testcases/tests/level3/core/nodegetbaseuri05.xml new file mode 100644 index 0000000..5941bdf --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri05.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri05"> +<metadata> +<title>nodegetbaseuri05</title> +<creator>IBM</creator> +<description> + Using getBaseURI check if the baseURI attribute of this DocumentElement is http://www.w3.org/DOM/L3Test. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="baseURI" type="DOMString"/> +<load var="doc" href="barfoo_base" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<baseURI var="baseURI" obj="docElem" interface="Node"/> +<assertEquals actual="baseURI" expected='"http://www.w3.org/DOM/L3Test"' id="nodegetbaseuri05" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetbaseuri06.xml b/test/testcases/tests/level3/core/nodegetbaseuri06.xml new file mode 100644 index 0000000..b3a8ce9 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri06.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri06"> +<metadata> +<title>nodegetbaseuri06</title> +<creator>IBM</creator> +<description> + TODO Clarification: Create a new Element in this document. Since its baseURI should be the baseURI of + the Document Entity which I assume is not null, using getBaseURI check if the baseURI + attribute of this Element node is not null.??? +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newElement" type="Element"/> +<var name="baseURI" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<createElementNS var="newElement" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"br"'/> +<baseURI var="baseURI" obj="doc" interface="Node"/> +<assertNotNull actual="baseURI" id="nodegetbaseuri06"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetbaseuri07.xml b/test/testcases/tests/level3/core/nodegetbaseuri07.xml new file mode 100644 index 0000000..c5814e4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri07.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri07"> +<metadata> +<title>nodegetbaseuri07</title> +<creator>IBM</creator> +<description> + Append a created element to a document and check that its baseURI + is inherited from its parent. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newElement" type="Element"/> +<var name="baseURI" type="DOMString"/> +<var name="appended" type="Node"/> +<var name="bodyList" type="NodeList"/> +<var name="bodyElem" type="Element"/> +<var name="htmlNS" type="DOMString" value='"http://www.w3.org/1999/xhtml"'/> +<load var="doc" href="barfoo_base" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" + tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<createElementNS var="newElement" obj="doc" namespaceURI='htmlNS' qualifiedName='"meta"'/> +<setAttribute obj="newElement" name='"content"' value='"text/xml"'/> +<appendChild obj="bodyElem" var="appended" newChild="newElement"/> +<baseURI var="baseURI" obj="newElement" interface="Node"/> +<assertEquals actual="baseURI" expected='"http://www.w3.org/DOM/EmployeeID"' id="nodegetbaseuri07" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri09.xml b/test/testcases/tests/level3/core/nodegetbaseuri09.xml new file mode 100644 index 0000000..4dc3d36 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri09.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri09"> +<metadata> +<title>nodegetbaseuri09</title> +<creator>IBM</creator> +<description> +Get the baseURI value on an element with an explicit xml:base attribute. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element"/> +</metadata> +<var name="doc" type="Document"/> +<var name="bodyElem" type="Element"/> +<var name="bodyList" type="NodeList"/> +<var name="baseURI" type="DOMString"/> +<load var="doc" href="barfoo_base" willBeModified="false"/> +<getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<baseURI var="baseURI" obj="bodyElem" interface="Node"/> +<assertEquals actual="baseURI" expected='"http://www.w3.org/DOM/EmployeeID"' id="nodegetbaseuri09" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetbaseuri10.xml b/test/testcases/tests/level3/core/nodegetbaseuri10.xml new file mode 100644 index 0000000..b4f0344 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri10.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri10"> +<metadata> +<title>nodegetbaseuri10</title> +<creator>IBM</creator> +<description> + Append as a child of this documentElement a new Processing Instruction. Using getBaseURI + check if the baseURI attribute of the new Processing Instruction node is "'http://www.w3.org/DOM/L3Test". +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2ProcessingInstruction"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newPI" type="ProcessingInstruction"/> +<var name="baseURI" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="barfoo_base" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createProcessingInstruction var="newPI" obj="doc" target='"TARGET"' data='"DATA"'/> +<appendChild obj="docElem" var="appendedChild" newChild="newPI"/> +<baseURI var="baseURI" obj="newPI" interface="Node"/> +<assertEquals actual="baseURI" expected='"http://www.w3.org/DOM/L3Test"' id="nodegetbaseuri10" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri11.xml b/test/testcases/tests/level3/core/nodegetbaseuri11.xml new file mode 100644 index 0000000..4845eb6 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri11.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri11"> +<metadata> +<title>nodegetbaseuri11</title> +<creator>IBM</creator> +<description> + Import a new Processing Instruction of a new Document after the document element. Using getBaseURI + check if the baseURI attribute of the new Processing Instruction node is the same as Document.documentURI. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2ProcessingInstruction"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newPI" type="ProcessingInstruction"/> +<var name="imported" type="ProcessingInstruction"/> +<var name="baseURI" type="DOMString"/> +<var name="docURI" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="barfoo_base" willBeModified="true"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> +<createProcessingInstruction var="newPI" obj="newDoc" target='"TARGET"' data='"DATA"'/> +<importNode var="imported" obj="doc" importedNode="newPI" deep="true"/> +<appendChild obj="doc" var="appendedChild" newChild="imported"/> +<baseURI var="baseURI" obj="imported" interface="Node"/> +<assertURIEquals actual="baseURI" isAbsolute="true" name='"barfoo_base"' id="equalsBarfooBase"/> +<documentURI var="docURI" obj="doc"/> +<assertEquals actual="baseURI" expected="docURI" ignoreCase="false" id="equalsDocURI"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri12.xml b/test/testcases/tests/level3/core/nodegetbaseuri12.xml new file mode 100644 index 0000000..fa5b2cb --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri12.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri12"> +<metadata> +<title>nodegetbaseuri12</title> +<creator>IBM</creator> +<description> + Using getBaseURI verify if the entity epsilon is absolute + and matches the URL of the document entity. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Entity"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="baseURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"epsilon"'/> +<baseURI var="baseURI" obj="entity" interface="Node"/> +<assertURIEquals actual="baseURI" id="entityBase" isAbsolute="true" name='"hc_staff"'/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri13.xml b/test/testcases/tests/level3/core/nodegetbaseuri13.xml new file mode 100644 index 0000000..029d6e5 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri13.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri13"> +<metadata> +<title>nodegetbaseuri13</title> +<creator>IBM</creator> +<description> + Using getBaseURI verify if the notation defined in an internal subset + is the base URI of the document. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Notation"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="baseURI" type="DOMString"/> +<var name="docURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="notation" obj="notationsMap" name='"notation1"'/> +<baseURI var="baseURI" obj="notation" interface="Node"/> +<documentURI var="docURI" obj="doc"/> +<assertEquals actual="baseURI" expected="docURI" ignoreCase="false" id="sameAsDocURI"/> +<assertURIEquals actual="baseURI" id="entityBase" isAbsolute="true" name='"hc_staff"'/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri14.xml b/test/testcases/tests/level3/core/nodegetbaseuri14.xml new file mode 100644 index 0000000..928f11e --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri14.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri14"> +<metadata> +<title>nodegetbaseuri14</title> +<creator>IBM</creator> +<description> + Using getBaseURI verify if the imported notation notation2 is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Notation"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="docElemNS" type="DOMString"/> +<var name="docElemName" type="DOMString"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="notationImported" type="Notation"/> +<var name="baseURI" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="docElemNS" obj="docElem" interface="Node"/> +<localName var="docElemName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='docElemNS' qualifiedName='docElemName' doctype="nullDocType"/> +<doctype var="docType" obj="doc"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="notation" obj="notationsMap" name='"notation2"'/> +<importNode var="notationImported" obj="newDoc" importedNode="notation" deep="true"/> +<baseURI var="baseURI" obj="notationImported" interface="Node"/> +<assertNull actual="baseURI" id="nodegetbaseuri14"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri15.xml b/test/testcases/tests/level3/core/nodegetbaseuri15.xml new file mode 100644 index 0000000..999ab50 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri15.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri15"> +<metadata> +<title>nodegetbaseuri15</title> +<creator>Curt Arnold</creator> +<description> +Node.getBaseURI for an Attr is null. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-07</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Attr"/> +</metadata> +<var name="doc" type="Document"/> +<var name="baseURI" type="DOMString"/> +<var name="attrNode" type="Attr"/> +<var name="bodyList" type="NodeList"/> +<var name="bodyElem" type="Element"/> +<load var="doc" href="barfoo_base" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" + tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<getAttributeNode var="attrNode" obj="bodyElem" name='"id"'/> +<baseURI var="baseURI" obj="attrNode" interface="Node"/> +<assertNull actual="baseURI" id="baseURI"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri16.xml b/test/testcases/tests/level3/core/nodegetbaseuri16.xml new file mode 100644 index 0000000..106fc6c --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri16.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri16"> +<metadata> +<title>nodegetbaseuri16</title> +<creator>Curt Arnold</creator> +<description> +Node.getBaseURI for an EntityReference to should be the baseURI where the entity declaration occurs. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-07</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2EntityReference"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="baseURI" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<load var="doc" href="external_barfoo" willBeModified="false"/> +<getElementsByTagName var="pList" obj="doc" + tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- the last child should be a entity reference to ent1 ref --> +<lastChild var="entRef" obj="pElem" interface="Node"/> +<baseURI var="baseURI" obj="entRef" interface="Node"/> +<assertURIEquals actual="baseURI" isAbsolute="true" name='"external_barfoo"' id="baseURI"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri17.xml b/test/testcases/tests/level3/core/nodegetbaseuri17.xml new file mode 100644 index 0000000..fff0b4e --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri17.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri17"> +<metadata> +<title>nodegetbaseuri17</title> +<creator>Curt Arnold</creator> +<description> +Node.getBaseURI for an text node is null. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-07</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Text"/> +</metadata> +<var name="doc" type="Document"/> +<var name="baseURI" type="DOMString"/> +<var name="textNode" type="Text"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<load var="doc" href="barfoo_base" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" + tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="textNode" obj="pElem" interface="Node"/> +<baseURI var="baseURI" obj="textNode" interface="Node"/> +<assertNull actual="baseURI" id="baseURI"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri18.xml b/test/testcases/tests/level3/core/nodegetbaseuri18.xml new file mode 100644 index 0000000..97b7e45 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri18.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri18"> +<metadata> +<title>nodegetbaseuri18</title> +<creator>Curt Arnold</creator> +<description> +Node.getBaseURI for an comment node is null. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-07</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Comment"/> +</metadata> +<var name="doc" type="Document"/> +<var name="baseURI" type="DOMString"/> +<var name="comment" type="Comment"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<load var="doc" href="barfoo_base" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" + tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<nextSibling var="comment" obj="pElem" interface="Node"/> +<baseURI var="baseURI" obj="comment" interface="Node"/> +<assertNull actual="baseURI" id="baseURI"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri19.xml b/test/testcases/tests/level3/core/nodegetbaseuri19.xml new file mode 100644 index 0000000..efb2dd9 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri19.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri19"> +<metadata> +<title>nodegetbaseuri19</title> +<creator>Curt Arnold</creator> +<description> +Checks baseURI for a text node is null. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-07</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2DocumentType"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2EntityReference"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="baseURI" type="DOMString"/> +<var name="entBaseURI" type="DOMString"/> +<var name="entRef" type="EntityReference"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="textNode" type="Text"/> +<load var="doc" href="external_barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" + tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<assertNotNull actual="pElem" id="pElemNotNull"/> +<if> + <implementationAttribute name="expandEntityReferences" value="true"/> + <firstChild var="textNode" obj="pElem" interface="Node"/> + <assertNotNull actual="textNode" id="expansionNotNull"/> + <else> + <lastChild var="entRef" obj="pElem" interface="Node"/> + <assertNotNull actual="entRef" id="entRefNotNull"/> + <firstChild var="textNode" obj="entRef" interface="Node"/> + <assertNotNull actual="textNode" id="entRefTextNotNull"/> + </else> +</if> +<baseURI var="baseURI" obj="textNode" interface="Node"/> +<assertNull actual="baseURI" id="baseURI"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetbaseuri20.xml b/test/testcases/tests/level3/core/nodegetbaseuri20.xml new file mode 100644 index 0000000..8f05a95 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetbaseuri20.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetbaseuri20"> +<metadata> +<title>nodegetbaseuri20</title> +<creator>Curt Arnold</creator> +<description> +baseURI for an element from an entity reference should be the URI of the +external entity if there is now xml:base attribute. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-07</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=419"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2EntityReference"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="baseURI" type="DOMString"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<load var="doc" href="external_barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" + tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="2" interface="NodeList"/> +<assertNotNull actual="pElem" id="pElemNotNull"/> +<baseURI var="baseURI" obj="pElem" interface="Node"/> +<assertURIEquals actual="baseURI" isAbsolute="true" name='"external_widget"' id="equalsExternalBarFoo"/> +</test> + diff --git a/test/testcases/tests/level3/core/nodegetfeature01.xml b/test/testcases/tests/level3/core/nodegetfeature01.xml new file mode 100644 index 0000000..8096b7c --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature01.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature01"> +<metadata> +<title>nodegetfeature01</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on Document. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<assign var="node" value="doc"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="doc" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature02.xml b/test/testcases/tests/level3/core/nodegetfeature02.xml new file mode 100644 index 0000000..1f1a0a4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature02.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature02"> +<metadata> +<title>nodegetfeature02</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on DocumentFragment. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentFragment var="node" obj="doc"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature03.xml b/test/testcases/tests/level3/core/nodegetfeature03.xml new file mode 100644 index 0000000..f5051bc --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature03.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature03"> +<metadata> +<title>nodegetfeature03</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on DocumentType. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<doctype var="node" obj="doc"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature04.xml b/test/testcases/tests/level3/core/nodegetfeature04.xml new file mode 100644 index 0000000..4a42cb2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature04.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature04"> +<metadata> +<title>nodegetfeature04</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on EntityReference. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createEntityReference var="node" obj="doc" name='"ent1"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature05.xml b/test/testcases/tests/level3/core/nodegetfeature05.xml new file mode 100644 index 0000000..98de868 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature05.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature05"> +<metadata> +<title>nodegetfeature05</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on Element. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<documentElement var="node" obj="doc"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature06.xml b/test/testcases/tests/level3/core/nodegetfeature06.xml new file mode 100644 index 0000000..77c7035 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature06.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature06"> +<metadata> +<title>nodegetfeature06</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on non-namespace attribute. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createAttribute var="node" obj="doc" name='"title"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature07.xml b/test/testcases/tests/level3/core/nodegetfeature07.xml new file mode 100644 index 0000000..93d4854 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature07.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature07"> +<metadata> +<title>nodegetfeature07</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on namespaced attribute. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createAttributeNS var="node" obj="doc" + namespaceURI='"http://www.w3.org/XML/1998/namespace"' + qualifiedName='"xml:lang"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature08.xml b/test/testcases/tests/level3/core/nodegetfeature08.xml new file mode 100644 index 0000000..bc3e77b --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature08.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature08"> +<metadata> +<title>nodegetfeature08</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on ProcessingInstruction. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<hasFeature feature='"XML"'/> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createProcessingInstruction var="node" obj="doc" target='"test-pi"' data='"foo"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature09.xml b/test/testcases/tests/level3/core/nodegetfeature09.xml new file mode 100644 index 0000000..8230ea7 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature09.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature09"> +<metadata> +<title>nodegetfeature09</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on Comment. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createComment var="node" obj="doc" data='"test comment"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature10.xml b/test/testcases/tests/level3/core/nodegetfeature10.xml new file mode 100644 index 0000000..68ddd41 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature10.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature10"> +<metadata> +<title>nodegetfeature10</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on Text. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nodeList" type="NodeList"/> +<var name="elem" type="Element"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<getElementsByTagName var="nodeList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="nodeList" index="0" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature11.xml b/test/testcases/tests/level3/core/nodegetfeature11.xml new file mode 100644 index 0000000..23e503a --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature11.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature11"> +<metadata> +<title>nodegetfeature11</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on CDATASection. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createCDATASection var="node" obj="doc" data='"some text"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature12.xml b/test/testcases/tests/level3/core/nodegetfeature12.xml new file mode 100644 index 0000000..4baafbd --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature12.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature12"> +<metadata> +<title>nodegetfeature12</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on Entity. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="entities" type="NamedNodeMap"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<doctype var="doctype" obj="doc"/> +<entities var="entities" obj="doctype"/> +<getNamedItem var="node" obj="entities" name='"ent1"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegetfeature13.xml b/test/testcases/tests/level3/core/nodegetfeature13.xml new file mode 100644 index 0000000..33a7537 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetfeature13.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature13"> +<metadata> +<title>nodegetfeature13</title> +<creator>Curt Arnold</creator> +<description> +Check implementation of Node.getFeature on Notation. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nullVersion" type="DOMString" isNull="true"/> +<var name="featureImpl" type="Node"/> +<var name="isSupported" type="boolean"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="notations" type="NamedNodeMap"/> +<var name="doctype" type="DocumentType"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<doctype var="doctype" obj="doc"/> +<notations var="notations" obj="doctype"/> +<getNamedItem var="node" obj="notations" name='"notation1"'/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/> +<assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/> +<assertNull actual="featureImpl" id="unrecognizedFeature"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core20"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/> +<assertSame actual="featureImpl" expected="node" id="Core30"/> +<!-- ask for some well-known feature, + can't say that they will be supported but they should not throw an exception --> +<isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if> +<isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/> +<getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/> +<if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent01.xml b/test/testcases/tests/level3/core/nodegettextcontent01.xml new file mode 100644 index 0000000..30d4fc7 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent01.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent01"> +<metadata> +<title>nodegettextcontent01</title> +<creator>IBM</creator> +<description> + + + Using getTextContent on this Document node check if the value returned is Null . +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<textContent var="textContent" obj="doc"/> +<assertNull actual="textContent" id="nodegettextcontent01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent02.xml b/test/testcases/tests/level3/core/nodegettextcontent02.xml new file mode 100644 index 0000000..e689fd5 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent02.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent02"> +<metadata> +<title>nodegettextcontent02</title> +<creator>IBM</creator> +<description> + + + Using getTextContent on a new Document node check if the value returned is Null . +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="textContent" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootName" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<textContent var="textContent" obj="newDoc"/> +<assertNull actual="textContent" id="nodegettextcontent02"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent03.xml b/test/testcases/tests/level3/core/nodegettextcontent03.xml new file mode 100644 index 0000000..43d87aa --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent03.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent03"> +<metadata> +<title>nodegettextcontent03</title> +<creator>IBM</creator> +<description> + + + Using getTextContent on this DocumentType node check if the value returned is Null . +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="newDoc" type="Document"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<textContent var="textContent" obj="docType"/> +<assertNull actual="textContent" id="nodegettextcontent03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent04.xml b/test/testcases/tests/level3/core/nodegettextcontent04.xml new file mode 100644 index 0000000..1ab67c2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent04.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent04"> +<metadata> +<title>nodegettextcontent04</title> +<creator>IBM</creator> +<description> + + + Using getTextContent on a new DocumentType node check if the value returned is Null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="textContent" type="DOMString"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="oldDocType" type="DocumentType"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="oldDocType" obj="doc"/> +<name var="rootName" obj="oldDocType" interface="DocumentType"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="docType" obj="domImpl" qualifiedName="rootName" publicId="nullPubId" systemId="nullSysId"/> +<textContent var="textContent" obj="docType"/> +<assertNull actual="textContent" id="nodegettextcontent04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent05.xml b/test/testcases/tests/level3/core/nodegettextcontent05.xml new file mode 100644 index 0000000..9034665 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent05.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent05"> +<metadata> +<title>nodegettextcontent05</title> +<creator>IBM</creator> +<description> + + + Using getTextContent on this DocumentType node check if the value returned is Null . +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="notation1" type="Notation"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="notation1" obj="notationsMap" name='"notation1"'/> +<textContent var="textContent" obj="docType"/> +<assertNull actual="textContent" id="nodegettextcontent05"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent06.xml b/test/testcases/tests/level3/core/nodegettextcontent06.xml new file mode 100644 index 0000000..44852bd --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent06.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent06"> +<metadata> +<title>nodegettextcontent06</title> +<creator>IBM</creator> +<description> + + + Invoke the method getTextContent on a default Attr node and check if the value returned + is the attributes Value. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"dir"'/> +<textContent var="textContent" obj="attr"/> +<assertEquals actual="textContent" expected='"rtl"' id="nodegettextcontent06" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent07.xml b/test/testcases/tests/level3/core/nodegettextcontent07.xml new file mode 100644 index 0000000..c70f5b5 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent07.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent07"> +<metadata> +<title>nodegettextcontent07</title> +<creator>IBM</creator> +<description> + Invoke the method getTextContent on a new Attr node and check if the value returned + is the attributes Value. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<setAttributeNS obj="elem" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"' value='"en-US"'/> +<getAttributeNodeNS var="attr" obj="elem" namespaceURI='"http://www.w3.org/XML/1998/namespace"' localName='"lang"'/> +<textContent var="textContent" obj="attr"/> +<assertEquals actual="textContent" expected='"en-US"' id="nodegettextcontent07" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent08.xml b/test/testcases/tests/level3/core/nodegettextcontent08.xml new file mode 100644 index 0000000..cf2fcd4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent08.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent08"> +<metadata> +<title>nodegettextcontent08</title> +<creator>IBM</creator> +<description> + Invoke the method getTextContent on a new Attr node and check if the value returned + is the attributes Value. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="att" type="Attr"/> +<var name="attr" type="Attr"/> +<var name="replacedAttr" type="Attr"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createAttributeNS var="att" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<setAttributeNodeNS obj="elem" var="replacedAttr" newAttr="att"/> +<getAttributeNodeNS var="attr" obj="elem" namespaceURI='"http://www.w3.org/XML/1998/namespace"' localName='"lang"'/> +<textContent var="textContent" obj="attr"/> +<assertEquals actual="textContent" expected='""' id="nodegettextcontent08" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent09.xml b/test/testcases/tests/level3/core/nodegettextcontent09.xml new file mode 100644 index 0000000..6eb9ca8 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent09.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent09"> +<metadata> +<title>nodegettextcontent09</title> +<creator>IBM</creator> +<description> + Invoke the method getTextContent on a new Text node and check if the value returned + is the text content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createTextNode var="txt" obj="doc" data='"Replacement Text"' /> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<textContent var="textContent" obj="txt"/> +<assertEquals actual="textContent" expected='"Replacement Text"' id="nodegettextcontent09" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent10.xml b/test/testcases/tests/level3/core/nodegettextcontent10.xml new file mode 100644 index 0000000..a789ed4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent10.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent10"> +<metadata> +<title>nodegettextcontent10</title> +<creator>IBM</creator> +<description> + + + Invoke the method getTextContent on an existing Text node and check if the value returned + is the elements Text content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="txt" obj="elem" interface="Node"/> +<textContent var="textContent" obj="txt"/> +<assertEquals actual="textContent" expected='"EMP0001"' id="nodegettextcontent10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent11.xml b/test/testcases/tests/level3/core/nodegettextcontent11.xml new file mode 100644 index 0000000..52b7265 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent11.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent11"> +<metadata> +<title>nodegettextcontent11</title> +<creator>IBM</creator> +<description> + + + Invoke the method getTextContent on an existing CDATASection node and check if the value returned + is the CDATASections content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="cdata" type="CDATASection"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="1" interface="NodeList"/> +<lastChild var="cdata" obj="elem" interface="Node"/> +<textContent var="textContent" obj="cdata"/> +<assertEquals actual="textContent" expected='"This is an adjacent CDATASection with a reference to a tab &tab;"' id="nodegettextcontent11" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent12.xml b/test/testcases/tests/level3/core/nodegettextcontent12.xml new file mode 100644 index 0000000..8a46f9a --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent12.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent12"> +<metadata> +<title>nodegettextcontent12</title> +<creator>IBM</creator> +<description> + Invoke the method getTextContent on a new Comment node and check if the value returned + is the Comments data. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="comment" type="Comment"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"body"'/> +<createComment var="comment" obj="doc" data='"Comment"' /> +<appendChild obj="elem" var="appendedChild" newChild="comment"/> +<textContent var="textContent" obj="comment"/> +<assertEquals actual="textContent" expected='"Comment"' id="nodegettextcontent12" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent13.xml b/test/testcases/tests/level3/core/nodegettextcontent13.xml new file mode 100644 index 0000000..a9d3f4e --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent13.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent13"> +<metadata> +<title>nodegettextcontent13</title> +<creator>IBM</creator> +<description> + + + Invoke the method getTextContent on an existing Element node with Text and CDATA + content and check if the value returned is a single concatenated String with its content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="1" interface="NodeList"/> +<textContent var="textContent" obj="elem"/> +<assertEquals actual="textContent" expected='"Martha Raynolds\nThis is a CDATASection with EntityReference number 2 &ent2;\nThis is an adjacent CDATASection with a reference to a tab &tab;"' id="nodegettextcontent13" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent14.xml b/test/testcases/tests/level3/core/nodegettextcontent14.xml new file mode 100644 index 0000000..e33e374 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent14.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent14"> +<metadata> +<title>nodegettextcontent14</title> +<creator>IBM</creator> +<description> + Invoke the method getTextContent on an existing Element node with Child Element, Text + EntityReferences and Attributes and check if the value returned is a single + concatenated String with its content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="2" interface="NodeList"/> +<textContent var="textContent" obj="elem"/> +<assertEquals actual="textContent" expected='"\n EMP0003\n Roger\n Jones\n Department Manager\n 100,000\n Element data\n PO Box 27 Irving, texas 98553\n "' id="nodegettextcontent13" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent15.xml b/test/testcases/tests/level3/core/nodegettextcontent15.xml new file mode 100644 index 0000000..cfe6d3f --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent15.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent15"> +<metadata> +<title>nodegettextcontent15</title> +<creator>IBM</creator> +<description> + The method getTextContent returns the text content of this node and its descendants. + + Invoke the method getTextContent on a new Element node with new Text, EntityReferences + CDATASection, PI and Comment nodes and check if the value returned is a single + concatenated String with its content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="comment" type="Comment"/> +<var name="entRef" type="EntityReference"/> +<var name="cdata" type="CDATASection"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom3:elem"'/> +<createTextNode var="txt" obj="doc" data='"Text "' /> +<createComment var="comment" obj="doc" data='"Comment "' /> +<createEntityReference var="entRef" obj="doc" name='"beta"' /> +<createProcessingInstruction var="pi" obj="doc" target='"PIT"' data='"PIData "'/> +<createCDATASection var="cdata" obj="doc" data='"CData"' /> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="elem" var="appendedChild" newChild="comment"/> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<appendChild obj="elem" var="appendedChild" newChild="pi"/> +<appendChild obj="elem" var="appendedChild" newChild="cdata"/> +<textContent var="textContent" obj="elem"/> +<normalizeDocument obj="doc" /> +<assertEquals actual="textContent" expected='"Text βCData"' id="nodegettextcontent15" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent16.xml b/test/testcases/tests/level3/core/nodegettextcontent16.xml new file mode 100644 index 0000000..5ce996e --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent16.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent16"> +<metadata> +<title>nodegettextcontent16</title> +<creator>IBM</creator> +<description> + The method getTextContent returns the text content of this node and its descendants. + + Invoke the method getTextContent on a new DocumentFragment node with new Text, EntityReferences + CDATASection, PI and Comment nodes and check if the value returned is a single + concatenated String with its content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="true"/> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="elem" type="Element"/> +<var name="elemChild" type="Element"/> +<var name="txt" type="Text"/> +<var name="comment" type="Comment"/> +<var name="entRef" type="EntityReference"/> +<var name="cdata" type="CDATASection"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom3:elem"'/> +<createTextNode var="txt" obj="doc" data='"Text "' /> +<createComment var="comment" obj="doc" data='"Comment "' /> +<createEntityReference var="entRef" obj="doc" name='"beta"' /> +<createProcessingInstruction var="pi" obj="doc" target='"PIT"' data='"PIData "'/> +<createCDATASection var="cdata" obj="doc" data='"CData"' /> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="elem" var="appendedChild" newChild="comment"/> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<appendChild obj="elem" var="appendedChild" newChild="pi"/> +<appendChild obj="elem" var="appendedChild" newChild="cdata"/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<normalizeDocument obj="doc" /> +<textContent var="textContent" obj="docFrag"/> +<assertEquals actual="textContent" expected='"Text βCData"' id="nodegettextcontent16" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent17.xml b/test/testcases/tests/level3/core/nodegettextcontent17.xml new file mode 100644 index 0000000..c3a15e5 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent17.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent17"> +<metadata> +<title>nodegettextcontent17</title> +<creator>IBM</creator> +<description> + Invoke the method getTextContent on a new EntityReference node and check if the + value returned is the EntityReference's content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="elem" obj="doc"/> +<createEntityReference var="entRef" obj="doc" name='"beta"' /> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<textContent var="textContent" obj="entRef"/> +<assertEquals actual="textContent" expected='"β"' id="nodegettextcontent17" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent18.xml b/test/testcases/tests/level3/core/nodegettextcontent18.xml new file mode 100644 index 0000000..d8bec3b --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent18.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent18"> +<metadata> +<title>nodegettextcontent18</title> +<creator>IBM</creator> +<description> + Invoke the method getTextContent on an Entity node and check if the value returned + is its replacement text. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entity" type="Entity"/> +<var name="entitymap" type="NamedNodeMap"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitymap" obj="docType"/> +<getNamedItem var="entity" obj="entitymap" name='"delta"'/> +<textContent var="textContent" obj="entity"/> +<assertEquals actual="textContent" expected='"δ"' id="nodegettextcontent18" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegettextcontent19.xml b/test/testcases/tests/level3/core/nodegettextcontent19.xml new file mode 100644 index 0000000..80a44be --- /dev/null +++ b/test/testcases/tests/level3/core/nodegettextcontent19.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegettextcontent19"> +<metadata> +<title>nodegettextcontent19</title> +<creator>Curt Arnold</creator> +<description> +Checks that element content whitespace is not added to textContent. Determination +of element content whitespace is only assured if validating. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=538"/> +</metadata> +<implementationAttribute name="ignoringElementContentWhitespace" value="false"/> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"body"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<textContent var="textContent" obj="elem"/> +<assertEquals actual="textContent" expected='"bar"' id="textContent" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetuserdata01.xml b/test/testcases/tests/level3/core/nodegetuserdata01.xml new file mode 100644 index 0000000..bb65a41 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetuserdata01.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetuserdata01"> +<metadata> +<title>nodegetuserdata01</title> +<creator>IBM</creator> +<description> + + + Using getUserData with a junk value for the key attempt to retreive the UserData object + of this Document node without setting it and verify if null is returned. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="userData" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getUserData var="userData" obj="doc" key='"key1"'/> +<assertNull actual="userData" id="nodegetuserdata01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetuserdata02.xml b/test/testcases/tests/level3/core/nodegetuserdata02.xml new file mode 100644 index 0000000..d497034 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetuserdata02.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetuserdata02"> +<metadata> +<title>nodegetuserdata02</title> +<creator>IBM</creator> +<description> + + + Using getUserData with a junk value for the key attempt to retreive the UserData object + of this Document node without setting it and verify if null is returned. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="userData" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getUserData var="userData" obj="doc" key='"key1"'/> +<assertNull actual="userData" id="nodegetuserdata02"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetuserdata03.xml b/test/testcases/tests/level3/core/nodegetuserdata03.xml new file mode 100644 index 0000000..25e600e --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetuserdata03.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetuserdata03"> +<metadata> +<title>nodegetuserdata03</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on this Document to set this Documents UserData to a new + Element node and using getUserData and isEqualNode check if the returned + UserData object is the same as the object that was set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="userData" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="elem" type="Element"/> +<var name="returnedUserData" type="DOMUserData"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"body"' /> +<setUserData obj="doc" var="returnedUserData" key='"something"' data="elem" handler="nullHandler"/> +<getUserData var="retUserData" obj="doc" key='"something"'/> +<isEqualNode var="success" obj="retUserData" arg="elem"/> +<assertTrue actual="success" id="nodegetuserdata03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetuserdata04.xml b/test/testcases/tests/level3/core/nodegetuserdata04.xml new file mode 100644 index 0000000..50f4c8f --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetuserdata04.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetuserdata04"> +<metadata> +<title>nodegetuserdata04</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on this DocumentType to set this its UserData to a this + Document node and using getUserData and isEqualNode check if the returned + UserData object is the same as the object that was set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="userData" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<var name="prevUserData" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<setUserData obj="docType" var="prevUserData" key='"KeyDoc"' data="doc" handler="nullHandler"/> +<getUserData var="retUserData" obj="docType" key='"KeyDoc"'/> +<isEqualNode var="success" obj="retUserData" arg="doc"/> +<assertTrue actual="success" id="nodegetuserdata04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetuserdata05.xml b/test/testcases/tests/level3/core/nodegetuserdata05.xml new file mode 100644 index 0000000..6230983 --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetuserdata05.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetuserdata05"> +<metadata> +<title>nodegetuserdata05</title> +<creator>IBM</creator> +<description> + Invoke setUserData on this Entity node to set this its UserData to a new + Attr node and using getUserData with an invalid Key check if the returned + UserData object is Null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entities" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="attr" type="Attr"/> +<var name="userData" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<var name="prevUserData" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entities" obj="docType"/> +<getNamedItem var="entity" obj="entities" name='"delta"'/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"lang"'/> +<setUserData obj="entity" var="prevUserData" key='"key"' data="attr" handler="nullHandler"/> +<getUserData var="retUserData" obj="entity" key='"Key"'/> +<assertNull actual="retUserData" id="nodegetuserdata05"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetuserdata06.xml b/test/testcases/tests/level3/core/nodegetuserdata06.xml new file mode 100644 index 0000000..46d7acd --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetuserdata06.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetuserdata06"> +<metadata> +<title>nodegetuserdata06</title> +<creator>IBM</creator> +<description> + + + Invoke getUserData on a new Text node with an ampty Key check if the returned + UserData object is Null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="txt" type="Text"/> +<var name="retUserData" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="txt" obj="doc" data='"TEXT"'/> +<getUserData var="retUserData" obj="txt" key='""'/> +<assertNull actual="retUserData" id="nodegetuserdata06"/> +</test> diff --git a/test/testcases/tests/level3/core/nodegetuserdata07.xml b/test/testcases/tests/level3/core/nodegetuserdata07.xml new file mode 100644 index 0000000..008631a --- /dev/null +++ b/test/testcases/tests/level3/core/nodegetuserdata07.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetuserdata07"> +<metadata> +<title>nodegetuserdata07</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on a new PI node to set this its UserData to itself + and using getUserData with an valid Key and isEqualsNode check if the + returned UserData object is the same as that was set. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="userData" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<var name="prevUserData" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createProcessingInstruction var="pi" obj="doc" data='"PIDATA"' target='"PITARGET"'/> +<setUserData obj="pi" var="prevUserData" key='"key"' data="pi" handler="nullHandler"/> +<getUserData var="retUserData" obj="pi" key='"key"'/> +<isEqualNode var="success" obj="retUserData" arg="pi"/> +<assertTrue actual="success" id="nodegetuserdata07"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore01.xml b/test/testcases/tests/level3/core/nodeinsertbefore01.xml new file mode 100644 index 0000000..1796609 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore01.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore01"> +<metadata> +<title>nodeinsertbefore01</title> +<creator>IBM</creator> +<description> + + + + Using insertBefore on this Document node attempt to insert a new Comment node before + this DocumentElement node and verify the name of the inserted Comment node. Now + attempt to insert a new Processing Instruction node before the new Comment and + verify the target of the inserted ProcessingInstruction. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newComment" type="Comment"/> +<var name="insertedComment" type="Comment"/> +<var name="data" type="DOMString"/> +<var name="newPI" type="ProcessingInstruction"/> +<var name="insertedPI" type="ProcessingInstruction"/> +<var name="target" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createComment var="newComment" obj="doc" data='"Comment"' /> +<createProcessingInstruction var="newPI" obj="doc" target='"PITarget"' data='"PIData"' /> +<insertBefore var="insertedComment" obj="doc" newChild="newComment" refChild="docElem"/> +<data var="data" obj="insertedComment" interface="CharacterData"/> +<assertEquals actual="data" expected='"Comment"' id="nodeinsertbefore01_1" ignoreCase="false"/> +<insertBefore var="insertedPI" obj="doc" newChild="newPI" refChild="newComment"/> +<target var="target" obj="insertedPI" interface="ProcessingInstruction"/> +<assertEquals actual="target" expected='"PITarget"' id="nodeinsertbefore01_2" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore02.xml b/test/testcases/tests/level3/core/nodeinsertbefore02.xml new file mode 100644 index 0000000..bfbefa7 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore02.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore02"> +<metadata> +<title>nodeinsertbefore02</title> +<creator>IBM</creator> +<description> + Using insertBefore on a new Document node attempt to insert a new Comment node before + this DocumentType node and verify the name of the inserted Comment node. Now + attempt to insert a new Processing Instruction node before the new Comment and + verify the target of the inserted ProcessingInstruction. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDocType" type="DocumentType"/> +<var name="newComment" type="Comment"/> +<var name="insertedComment" type="Comment"/> +<var name="data" type="DOMString"/> +<var name="newPI" type="ProcessingInstruction"/> +<var name="insertedPI" type="ProcessingInstruction"/> +<var name="target" type="DOMString"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="docElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="newDocType" obj="domImpl" qualifiedName="rootName" publicId="nullPubId" systemId="nullSysId"/> +<createDocument var="newDoc" obj="domImpl" qualifiedName="rootName" namespaceURI="rootNS" doctype="newDocType" /> +<createComment var="newComment" obj="newDoc" data='"Comment"' /> +<createProcessingInstruction var="newPI" obj="newDoc" target='"PITarget"' data='"PIData"' /> +<insertBefore var="insertedComment" obj="newDoc" newChild="newComment" refChild="newDocType"/> +<data var="data" obj="insertedComment" interface="CharacterData"/> +<assertEquals actual="data" expected='"Comment"' id="nodeinsertbefore02_1" ignoreCase="false"/> +<insertBefore var="insertedPI" obj="newDoc" newChild="newPI" refChild="newComment"/> +<target var="target" obj="insertedPI" interface="ProcessingInstruction"/> +<assertEquals actual="target" expected='"PITarget"' id="nodeinsertbefore02_2" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore03.xml b/test/testcases/tests/level3/core/nodeinsertbefore03.xml new file mode 100644 index 0000000..2c130a6 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore03.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore03"> +<metadata> +<title>nodeinsertbefore03</title> +<creator>IBM</creator> +<description> + Using insertBefore on this Document node attempt to insert a new Attr node before + this DocumentType node and verify if a HIERARCHY_REQUEST_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="newAttr" type="Attr"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<createAttributeNS var="newAttr" obj="doc" qualifiedName='"xml:lang"' namespaceURI='"http://www.w3.org/XML/1998/namespace"'/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<insertBefore obj="doc" var="inserted" newChild="newAttr" refChild="docType"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore04.xml b/test/testcases/tests/level3/core/nodeinsertbefore04.xml new file mode 100644 index 0000000..a69dc85 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore04.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore04"> +<metadata> +<title>nodeinsertbefore04</title> +<creator>IBM</creator> +<description> + Using insertBefore on this Document node attempt to insert this Document node before + this DocumentType node and verify if a HIERARCHY_REQUEST_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<insertBefore obj="doc" var="inserted" newChild="doc" refChild="docType"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore05.xml b/test/testcases/tests/level3/core/nodeinsertbefore05.xml new file mode 100644 index 0000000..479e533 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore05.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore05"> +<metadata> +<title>nodeinsertbefore05</title> +<creator>IBM</creator> +<description> + Attempt to insert a second DocumentType node in a document using Node.insertBefore, + should raise either DOMException with either a HIERARCHY_REQUEST_ERR + or NOT_SUPPORTED_ERR code. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDocType" type="DocumentType"/> +<var name="inserted" type="Node"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<name var="rootName" obj="docType" interface="DocumentType"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="newDocType" obj="domImpl" qualifiedName="rootName" publicId="nullPubId" systemId="nullSysId"/> +<try> + <insertBefore obj="doc" var="inserted" newChild="newDocType" refChild="docType"/> + <fail id="throw_DOMException"/> + <catch> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore06.xml b/test/testcases/tests/level3/core/nodeinsertbefore06.xml new file mode 100644 index 0000000..18158a2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore06.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore06"> +<metadata> +<title>nodeinsertbefore06</title> +<creator>IBM</creator> +<description> + Using insertBefore on this Document node attempt to insert an Element node before + the existing element node and verify if a HIERARCHY_REQUEST_ERR or NOT_SUPPORTED_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=415"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newElem" type="Element"/> +<var name="inserted" type="Node"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<createElementNS var="newElem" obj="doc" qualifiedName='rootTagname' namespaceURI='rootNS'/> +<try> + <insertBefore obj="doc" var="inserted" newChild="newElem" refChild="docElem"/> + <fail id="throw_DOMException"/> + <catch> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore07.xml b/test/testcases/tests/level3/core/nodeinsertbefore07.xml new file mode 100644 index 0000000..344ae25 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore07.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore07"> +<metadata> +<title>nodeinsertbefore07</title> +<creator>IBM</creator> +<description> + + + + Using insertBefore on this Document node attempt to insert a Comment node created by + another Document before this DocumentElement node and verify if a WRONG_DOCUMENT_ERR + is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docAlt" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newComment" type="Comment"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<load var="docAlt" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createComment var="newComment" obj="docAlt" data='"Comment"' /> +<assertDOMException id="WRONG_DOCUMENT_ERR_nodeinsertbefore07"> +<WRONG_DOCUMENT_ERR> +<insertBefore obj="doc" var="inserted" newChild="newComment" refChild="docElem"/> +</WRONG_DOCUMENT_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore08.xml b/test/testcases/tests/level3/core/nodeinsertbefore08.xml new file mode 100644 index 0000000..3d1c1e6 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore08.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore08"> +<metadata> +<title>nodeinsertbefore08</title> +<creator>IBM</creator> +<description> + + + + Using insertBefore on this Document node attempt to insert a Comment node created by + this Document before another Document's DocumentElement node and verify if a + NOT_FOUND_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docAlt" type="Document"/> +<var name="docElem" type="Element"/> +<var name="newComment" type="Comment"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<load var="docAlt" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="docAlt"/> +<createComment var="newComment" obj="doc" data='"Comment"' /> +<assertDOMException id="NOT_FOUND_ERR_nodeinsertbefore08"> +<NOT_FOUND_ERR> +<insertBefore obj="doc" var="inserted" newChild="newComment" refChild="docElem"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore09.xml b/test/testcases/tests/level3/core/nodeinsertbefore09.xml new file mode 100644 index 0000000..4be4e8e --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore09.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore09"> +<metadata> +<title>nodeinsertbefore09</title> +<creator>IBM</creator> +<description> + The method insertBefore inserts the node newChild before the existing child node refChild. + If refChild is null, insert newChild at the end of the list of children. + If newChild is a DocumentFragment object, all of its children are inserted, in the same + order, before refChild. + + Using insertBefore on this Document node attempt to insert a new DocumentFragment node + before a Comment node and verify the contents of the Comment node that is a child + of the DocumentFragment. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="newComment" type="Comment"/> +<var name="insertComment" type="Comment"/> +<var name="comment" type="Comment"/> +<var name="inserted" type="DocumentFragment"/> +<var name="data" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createComment var="newComment" obj="doc" data='"Comment"' /> +<appendChild obj="doc" var="appendedChild" newChild="newComment"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createComment var="insertComment" obj="doc" data='"insertComment"' /> +<appendChild obj="docFrag" var="appendedChild" newChild="insertComment"/> +<insertBefore var="inserted" obj="doc" newChild="docFrag" refChild="newComment"/> +<previousSibling var="comment" obj="newComment" interface="Node"/> +<data var="data" obj="comment" interface="CharacterData"/> +<assertEquals actual="data" expected='"insertComment"' id="nodeinsertbefore09" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore10.xml b/test/testcases/tests/level3/core/nodeinsertbefore10.xml new file mode 100644 index 0000000..d264cb2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore10.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore10"> +<metadata> +<title>nodeinsertbefore10</title> +<creator>IBM</creator> +<description> + Using insertBefore on this Document node attempt to insert a new Element node before + another Element node and verify a DOMException with a + HIERARCHY_REQUEST_ERR, NOT_FOUND_ERR or NOT_SUPPORTED_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=415"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="newElem" type="Element"/> +<var name="inserted" type="Node"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="1" interface="NodeList"/> +<createElementNS var="newElem" obj="doc" qualifiedName='rootTagname' namespaceURI='rootNS'/> +<try> + <insertBefore obj="doc" var="inserted" newChild="newElem" refChild="elem"/> + <fail id="throw_DOMException"/> + <catch> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore11.xml b/test/testcases/tests/level3/core/nodeinsertbefore11.xml new file mode 100644 index 0000000..1fc7c0a --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore11.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore11"> +<metadata> +<title>nodeinsertbefore11</title> +<creator>IBM</creator> +<description> + + + + Using insertBefore on a DocumentFragment node attempt to insert a child nodes before + other permissible nodes and verify the contents/name of each inserted node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="elem" type="Element"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="comment" type="Comment"/> +<var name="txt" type="Text"/> +<var name="cdata" type="CDATASection"/> +<var name="eRef" type="EntityReference"/> +<var name="inserted" type="Node"/> +<var name="insertedVal" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem" obj="doc" qualifiedName='"body"' namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<createProcessingInstruction var="pi" obj="doc" target='"PITarget"' data='"PIData"' /> +<createComment var="comment" obj="doc" data='"Comment"' /> +<createTextNode var="txt" obj="doc" data='"Text"' /> +<createCDATASection var="cdata" obj="doc" data='"CDATA"' /> +<createEntityReference var="eRef" obj="doc" name='"alpha"' /> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<appendChild obj="docFrag" var="appendedChild" newChild="pi"/> +<appendChild obj="docFrag" var="appendedChild" newChild="comment"/> +<appendChild obj="docFrag" var="appendedChild" newChild="txt"/> +<appendChild obj="docFrag" var="appendedChild" newChild="cdata"/> +<appendChild obj="docFrag" var="appendedChild" newChild="eRef"/> +<!-- +<insertBefore var="inserted" obj="docFrag" newChild="pi" refChild="elem" /> +<target var="insertedVal" obj="inserted" interface="ProcessingInstruction"/> +<assertEquals actual="insertedVal" expected='"PITarget"' id="nodeinsertbefore11"/> +--> +<insertBefore var="inserted" obj="docFrag" newChild="comment" refChild="pi"/> +<data var="insertedVal" obj="inserted" interface="CharacterData"/> +<assertEquals actual="insertedVal" expected='"Comment"' id="nodeinsertbefore11_Comment" ignoreCase="false"/> +<insertBefore var="inserted" obj="docFrag" newChild="txt" refChild="comment"/> +<data var="insertedVal" obj="inserted" interface="CharacterData"/> +<assertEquals actual="insertedVal" expected='"Text"' id="nodeinsertbefore11_Text" ignoreCase="false"/> +<insertBefore var="inserted" obj="docFrag" newChild="cdata" refChild="txt"/> +<data var="insertedVal" obj="inserted" interface="CharacterData"/> +<assertEquals actual="insertedVal" expected='"CDATA"' id="nodeinsertbefore11_CDATA" ignoreCase="false"/> +<insertBefore var="inserted" obj="docFrag" newChild="eRef" refChild="cdata"/> +<nodeName var="insertedVal" obj="inserted" /> +<assertEquals actual="insertedVal" expected='"alpha"' id="nodeinsertbefore11_Ent1" ignoreCase="false"/> + +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore12.xml b/test/testcases/tests/level3/core/nodeinsertbefore12.xml new file mode 100644 index 0000000..f63f945 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore12.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore12"> +<metadata> +<title>nodeinsertbefore12</title> +<creator>IBM</creator> +<description> + The method insertBefore inserts the node newChild before the existing child node refChild. + If refChild is null, insert newChild at the end of the list of children. + + Using insertBefore on a DocumentFragment node attempt to insert a new DocumentFragment node + before this DocumentFragment's Element node and verify the last child is still the only child + appended to docFrag. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="docFragNew" type="DocumentFragment"/> +<var name="elem" type="Element"/> +<var name="inserted" type="Node"/> +<var name="appendedChild" type="Node"/> +<var name="last" type="Node"/> +<var name="name" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createDocumentFragment var="docFragNew" obj="doc"/> +<createElementNS var="elem" obj="doc" qualifiedName='"dom3:elem"' namespaceURI='"http://www.w3.org/DOM/Test"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<insertBefore obj="docFrag" var="inserted" newChild="docFragNew" refChild="elem"/> +<lastChild obj="docFrag" var="last" interface="Node"/> +<nodeName obj="last" var="name" interface="Node"/> +<assertEquals actual="name" expected='"dom3:elem"' id="nodeinsertbefore12" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore13.xml b/test/testcases/tests/level3/core/nodeinsertbefore13.xml new file mode 100644 index 0000000..e40a138 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore13.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore13"> +<metadata> +<title>nodeinsertbefore13</title> +<creator>IBM</creator> +<description> + + + + Using insertBefore on a DocumentFragment node attempt to insert a new Element node + created by another Document, before this DocumentFragment's Element node and + verify if a WRONG_DOCUMENT_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docAlt" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="elemAlt" type="Element"/> +<var name="elem" type="Element"/> +<var name="appendedChild" type="Node"/> +<var name="inserted" type="Node"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootTagname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootTagname" obj="docElem"/> +<load var="docAlt" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem" obj="doc" qualifiedName='rootTagname' namespaceURI='rootNS'/> +<createElementNS var="elemAlt" obj="docAlt" qualifiedName='rootTagname' namespaceURI='rootNS'/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<assertDOMException id="throw_WRONG_DOCUMENT_ERR"> +<WRONG_DOCUMENT_ERR> +<insertBefore obj="docFrag" var="inserted" newChild="elemAlt" refChild="elem"/> +</WRONG_DOCUMENT_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore14.xml b/test/testcases/tests/level3/core/nodeinsertbefore14.xml new file mode 100644 index 0000000..a9b1c1e --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore14.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore14"> +<metadata> +<title>nodeinsertbefore14</title> +<creator>IBM</creator> +<description> + The method insertBefore inserts the node newChild before the existing child node refChild. + If refChild is null, insert newChild at the end of the list of children. + A NO_MODIFICATION_ALLOWED_ERR is raised if the node is read-only. + + Using insertBefore on this Document node attempt to insert a new Attr node before + this DocumentType node and verfiy if a NO_MODIFICATION_ALLOWED_ERR is raised. + (This can also raise a HIERARCHY_REQUEST_ERR and NOT_FOUND_ERR) +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="newAttr" type="Attr"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<createAttributeNS var="newAttr" obj="doc" qualifiedName='"dom3:attr"' namespaceURI='"http://www.w3.org/DOM/Test"'/> +<assertDOMException id="NO_MODIFICATION_ALLOWED_ERR_nodeinsertbefore14"> +<NO_MODIFICATION_ALLOWED_ERR> +<insertBefore obj="docType" var="inserted" newChild="newAttr" refChild="docType"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore15.xml b/test/testcases/tests/level3/core/nodeinsertbefore15.xml new file mode 100644 index 0000000..71aceb4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore15.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore15"> +<metadata> +<title>nodeinsertbefore15</title> +<creator>IBM</creator> +<description> + A NO_MODIFICATION_ALLOWED_ERR is raised if the node is read-only. + + Using insertBefore on a new EntityReference node attempt to insert Element, Text, + Comment, ProcessingInstruction and CDATASection nodes before an element child + and verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="entRef" type="EntityReference"/> +<var name="elemChild" type="Node"/> +<var name="txt" type="Text"/> +<var name="elem" type="Element"/> +<var name="comment" type="Comment"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="cdata" type="CDATASection"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createEntityReference var="entRef" obj="doc" name='"delta"'/> +<firstChild obj="entRef" var="elemChild" interface="Node"/> +<createCDATASection var="cdata" obj="doc" data='"CDATASection"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_1"> +<NO_MODIFICATION_ALLOWED_ERR> +<insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="cdata"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createProcessingInstruction var="pi" obj="doc" target='"target"' data='"data"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_2"> +<NO_MODIFICATION_ALLOWED_ERR> +<insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="pi"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createComment var="comment" obj="doc" data='"Comment"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_3"> +<NO_MODIFICATION_ALLOWED_ERR> +<insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="comment"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createTextNode var="txt" obj="doc" data='"Text"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_4"> +<NO_MODIFICATION_ALLOWED_ERR> +<insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="txt"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"body"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_5"> +<NO_MODIFICATION_ALLOWED_ERR> +<insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="elem"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore16.xml b/test/testcases/tests/level3/core/nodeinsertbefore16.xml new file mode 100644 index 0000000..f3876dd --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore16.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore16"> +<metadata> +<title>nodeinsertbefore16</title> +<creator>IBM</creator> +<description> + Using insertBefore on an Element node attempt to insert a new Element, node before its + first element child and verify the name of the new first child node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="newElem" type="Element"/> +<var name="refElem" type="Element"/> +<var name="firstChild" type="Node"/> +<var name="insertedElem" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="nodeName" type="DOMString"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="element" obj="childList" index="0" interface="NodeList"/> +<firstChild var="firstChild" obj="element" interface="Node"/> +<nextSibling var="refElem" obj="firstChild" interface="Node"/> +<createElementNS var="newElem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:br"'/> +<insertBefore obj="element" var="inserted" refChild="refElem" newChild="newElem"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="element" obj="childList" index="0" interface="NodeList"/> +<firstChild var="firstChild" obj="element" interface="Node"/> +<nextSibling var="insertedElem" obj="firstChild" interface="Node"/> +<nodeName var="nodeName" obj="insertedElem"/> +<assertEquals actual="nodeName" expected='"xhtml:br"' id="nodeinsertbefore16" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore17.xml b/test/testcases/tests/level3/core/nodeinsertbefore17.xml new file mode 100644 index 0000000..51fb499 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore17.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore17"> +<metadata> +<title>nodeinsertbefore17</title> +<creator>IBM</creator> +<description> + The method insertBefore inserts the node newChild before the existing child node refChild. + If refChild is null, insert newChild at the end of the list of children. + + Using insertBefore on an Element node attempt to insert a text node before its + first element child and verify the name of the new first child node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="false"/> +<implementationAttribute name="coalescing" value="true"/> +<implementationAttribute name="ignoringElementContentWhitespace" value="true"/> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="newText" type="Text"/> +<var name="refNode" type="Node"/> +<var name="firstChild" type="Node"/> +<var name="insertedText" type="Text"/> +<var name="childList" type="NodeList"/> +<var name="nodeName" type="DOMString"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagNameNS var="childList" obj="doc" namespaceURI='"*"' localName='"p"' interface="Document"/> +<item var="element" obj="childList" index="1" interface="NodeList"/> +<firstChild var="refNode" obj="element" interface="Node"/> +<createTextNode var="newText" obj="doc" data='"newText"' interface="Document"/> +<insertBefore obj="element" var="inserted" refChild="refNode" newChild="newText"/> +<firstChild var="insertedText" obj="element" interface="Node"/> +<nodeName var="nodeName" obj="insertedText"/> +<assertEquals actual="nodeName" expected='"#text"' id="nodeinsertbefore17" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore18.xml b/test/testcases/tests/level3/core/nodeinsertbefore18.xml new file mode 100644 index 0000000..a936b5d --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore18.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore18"> +<metadata> +<title>nodeinsertbefore18</title> +<creator>IBM</creator> +<description> + The method insertBefore inserts the node newChild before the existing child node refChild. + If refChild is null, insert newChild at the end of the list of children. + + Using insertBefore on an Element node attempt to insert new Comment/PI and CDATA nodes + before each other and verify the names of the newly inserted nodes. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="newElem" type="Element"/> +<var name="newComment" type="Comment"/> +<var name="newPI" type="ProcessingInstruction"/> +<var name="newCDATA" type="CDATASection"/> +<var name="insertedNode" type="Comment"/> +<var name="data" type="DOMString"/> +<var name="target" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElement var="element" obj="doc" tagName='"element"'/> +<createElementNS var="newElem" obj="doc" namespaceURI='"http://www.w3.org/DOM"' qualifiedName='"dom3:elem"'/> +<createComment var="newComment" obj="doc" data='"Comment"'/> +<createCDATASection var="newCDATA" obj="doc" data='"CDATASection"'/> +<createProcessingInstruction var="newPI" obj="doc" target='"target"' data='"data"'/> +<appendChild obj="element" var="appendedChild" newChild="newElem"/> +<appendChild obj="element" var="appendedChild" newChild="newComment"/> +<appendChild obj="element" var="appendedChild" newChild="newPI"/> +<appendChild obj="element" var="appendedChild" newChild="newCDATA"/> +<insertBefore obj="element" var="inserted" refChild="newElem" newChild="newComment"/> +<firstChild var="insertedNode" obj="element" interface="Node"/> +<data var="data" obj="insertedNode" interface="CharacterData"/> +<assertEquals actual="data" expected='"Comment"' id="nodeinsertbefore18" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore19.xml b/test/testcases/tests/level3/core/nodeinsertbefore19.xml new file mode 100644 index 0000000..d53717d --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore19.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore19"> +<metadata> +<title>nodeinsertbefore19</title> +<creator>IBM</creator> +<description> + Using insertBefore on an Element node attempt to insert an EntityReference node, before + another new EntityReference node and verify the name of the new first child node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="refNode" type="Node"/> +<var name="newNode" type="EntityReference"/> +<var name="inserted" type="EntityReference"/> +<var name="childList" type="NodeList"/> +<var name="nodeName" type="DOMString"/> +<var name="element" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"var"' interface="Document"/> +<item var="element" obj="childList" index="2" interface="NodeList"/> +<firstChild var="refNode" obj="element" interface="Node"/> +<createEntityReference var="newNode" obj="doc" name='"alpha"'/> +<insertBefore obj="element" var="inserted" refChild="refNode" newChild="newNode"/> +<nodeName var="nodeName" obj="inserted"/> +<assertEquals actual="nodeName" expected='"alpha"' id="nodeinsertbefore19" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore20.xml b/test/testcases/tests/level3/core/nodeinsertbefore20.xml new file mode 100644 index 0000000..1b541dc --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore20.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore20"> +<metadata> +<title>nodeinsertbefore20</title> +<creator>IBM</creator> +<description> + Using insertBefore on an Element node attempt to insert a new Attr node, before + an EntityReference child and verify if a HIERARCHY_REQUEST_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="refNode" type="Node"/> +<var name="newNode" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"var"' interface="Document"/> +<item var="element" obj="childList" index="2" interface="NodeList"/> +<firstChild var="refNode" obj="element" interface="Node"/> +<createAttributeNS var="newNode" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<insertBefore obj="element" var="inserted" refChild="refNode" newChild="newNode"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore21.xml b/test/testcases/tests/level3/core/nodeinsertbefore21.xml new file mode 100644 index 0000000..df9eec7 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore21.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore21"> +<metadata> +<title>nodeinsertbefore21</title> +<creator>IBM</creator> +<description> + Using insertBefore on an Element node attempt to insert the parent Element node, before + an EntityReference or Text child and verify if a HIERARCHY_REQUEST_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="refNode" type="Node"/> +<var name="newNode" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"var"' interface="Document"/> +<item var="element" obj="childList" index="2" interface="NodeList"/> +<firstChild var="refNode" obj="element" interface="Node"/> +<parentNode var="newNode" obj="element" interface="Node"/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<insertBefore obj="element" var="inserted" refChild="refNode" newChild="newNode"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore22.xml b/test/testcases/tests/level3/core/nodeinsertbefore22.xml new file mode 100644 index 0000000..5fc603b --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore22.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore22"> +<metadata> +<title>nodeinsertbefore22</title> +<creator>IBM</creator> +<description> + Using insertBefore on an Element node attempt to insert the ancestor of an Element node + before its child and verify if a HIERARCHY_REQUEST_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="refNode" type="Element"/> +<var name="ancestor" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="appendedChild" type="Node"/> +<var name="inserted" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<createElementNS var="element" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:body"'/> +<createElementNS var="refNode" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:a"'/> +<createElementNS var="ancestor" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<appendChild obj="element" var="appendedChild" newChild="refNode"/> +<appendChild obj="ancestor" var="appendedChild" newChild="element"/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<insertBefore obj="element" var="inserted" refChild="refNode" newChild="ancestor"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore23.xml b/test/testcases/tests/level3/core/nodeinsertbefore23.xml new file mode 100644 index 0000000..b99c4e4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore23.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore23"> +<metadata> +<title>nodeinsertbefore23</title> +<creator>IBM</creator> +<description> + Using insertBefore on an Element node attempt to insert a Text node created by a different + Document before an Element child and verify if a WRONG_DOCUMENT_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="doc2" type="Document"/> +<var name="element" type="Element"/> +<var name="refNode" type="Element"/> +<var name="newNode" type="Text"/> +<var name="childList" type="NodeList"/> +<var name="appendedChild" type="Node"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<load var="doc2" href="hc_staff" willBeModified="true"/> +<createElementNS var="element" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:body"'/> +<createElementNS var="refNode" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<createTextNode var="newNode" obj="doc2" data='"TextNode"' /> +<appendChild obj="element" var="appendedChild" newChild="refNode"/> +<assertDOMException id="throw_WRONG_DOCUMENT_ERR"> +<WRONG_DOCUMENT_ERR> +<insertBefore obj="element" var="inserted" refChild="refNode" newChild="newNode"/> +</WRONG_DOCUMENT_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore24.xml b/test/testcases/tests/level3/core/nodeinsertbefore24.xml new file mode 100644 index 0000000..1ea0b69 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore24.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore24"> +<metadata> +<title>nodeinsertbefore24</title> +<creator>IBM</creator> +<description> + Using insertBefore on an Element node attempt to insert a Comment node before + a CDATASection node that is not a child and verify if a NOT_FOUND_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="refNode" type="CDATASection"/> +<var name="newNode" type="Comment"/> +<var name="childList" type="NodeList"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="element" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<createCDATASection var="refNode" obj="doc" data='"CDATASection"' /> +<createComment var="newNode" obj="doc" data='"Comment"' /> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<insertBefore obj="element" var="inserted" refChild="refNode" newChild="newNode"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeinsertbefore25.xml b/test/testcases/tests/level3/core/nodeinsertbefore25.xml new file mode 100644 index 0000000..7d266c2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeinsertbefore25.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore25"> +<metadata> +<title>nodeinsertbefore25</title> +<creator>IBM</creator> +<description> + Using insertBefore on a child Element of an EntityReference node attempt to insert + a new Element node, before a Text node child of an Entity Node's replacement + text and verify if a NO_MODIFICATION_ALLOWED_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="eRef" type="EntityReference"/> +<var name="span" type="Element"/> +<var name="spanText" type="Text"/> +<var name="newNode" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="inserted" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"var"' interface="Document"/> +<item var="element" obj="childList" index="2" interface="NodeList"/> +<firstChild var="eRef" obj="element" interface="Node"/> +<firstChild var="span" obj="eRef" interface="Node"/> +<assertNotNull actual="span" id="spanNotNull"/> +<firstChild var="spanText" obj="span" interface="Node"/> +<assertNotNull actual="spanText" id="spanTextNotNull"/> +<createElementNS var="newNode" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"span"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<insertBefore obj="span" var="inserted" refChild="spanText" newChild="newNode"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace01.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace01.xml new file mode 100644 index 0000000..bdd125d --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace01.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace01"> +<metadata> +<title>nodeisdefaultnamespace01</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on this Document node with the + namespace of the document element check if the value returned is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="isDefault" type="boolean"/> +<var name="docElem" type="Element"/> +<var name="docElemNS" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="docElemNS" obj="docElem" interface="Node"/> +<isDefaultNamespace var="isDefault" obj="doc" namespaceURI="docElemNS"/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace02.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace02.xml new file mode 100644 index 0000000..87920de --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace02.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace02"> +<metadata> +<title>nodeisdefaultnamespace02</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on on a new Document node with the value of the namespaceURI + parameter equal to the namespaceURI of the newly created Document and check if the + value returned is false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="isDefault" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<localName var="rootName" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<isDefaultNamespace var="isDefault" obj="newDoc" namespaceURI="rootNS"/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace02_true"/> +<isDefaultNamespace var="isDefault" obj="newDoc" namespaceURI="nullNSURI"/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace02_false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace03.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace03.xml new file mode 100644 index 0000000..917e41c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace03.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace03"> +<metadata> +<title>nodeisdefaultnamespace03</title> +<creator>IBM</creator> +<description> + + + + Using isDefaultNamespace on this DocumentType node with the value of the namespaceURI parameter + as null check if the value returned is false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="isDefault" type="boolean"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<isDefaultNamespace var="isDefault" obj="docType" namespaceURI="nullNSURI"/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace04.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace04.xml new file mode 100644 index 0000000..ca6510c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace04.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace04"> +<metadata> +<title>nodeisdefaultnamespace04</title> +<creator>IBM</creator> +<description> + + + + Using isDefaultNamespace on a Notation and Entity node with the value of the namespaceURI parameter + as null check if the value returned is false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entity" type="Entity"/> +<var name="notation" type="Notation"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="isDefault" type="boolean"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<getNamedItem var="notation" obj="notationsMap" name='"notation1"'/> +<isDefaultNamespace var="isDefault" obj="entity" namespaceURI="nullNSURI"/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace04_1"/> +<isDefaultNamespace var="isDefault" obj="notation" namespaceURI="nullNSURI"/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace04_2"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace05.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace05.xml new file mode 100644 index 0000000..6de428f --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace05.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace05"> +<metadata> +<title>nodeisdefaultnamespace05</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on a DocumentElement of a new Document node with the value of the + namespaceURI parameter equal to the namespaceURI of the newly created Document and check if the + value returned is false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="isDefault" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<localName var="rootName" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<documentElement var="elem" obj="newDoc"/> +<isDefaultNamespace var="isDefault" obj="elem" namespaceURI="rootNS"/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace05_1"/> +<isDefaultNamespace var="isDefault" obj="elem" namespaceURI="nullNSURI"/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace05_2"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace06.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace06.xml new file mode 100644 index 0000000..6e7e07b --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace06.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace06"> +<metadata> +<title>nodeisdefaultnamespace06</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on an Element node with no prefix, which has a namespace + attribute declaration with and without a namespace prefix and check if isDefaultNamespace + returns true with the namespaceURI that does not have a prefix as its parameter. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="isDefault" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<isDefaultNamespace var="isDefault" obj="elem" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace06_1"/> +<isDefaultNamespace var="isDefault" obj="elem" namespaceURI='"http://www.usa.com"'/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace06_2"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace07.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace07.xml new file mode 100644 index 0000000..fcfe438 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace07.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace07"> +<metadata> +<title>nodeisdefaultnamespace07</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on the child of an Element node with no prefix, which has a + namespace attribute declaration with and without a namespace prefix and check if isDefaultNamespace + returns true with the namespaceURI that does not have a prefix as its parameter. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="isDefault" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<isDefaultNamespace var="isDefault" obj="elem" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace07_1"/> +<isDefaultNamespace var="isDefault" obj="elem" namespaceURI='"http://www.usa.com"'/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace07_2"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace08.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace08.xml new file mode 100644 index 0000000..8c7329c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace08.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace08"> +<metadata> +<title>nodeisdefaultnamespace08</title> +<creator>IBM</creator> +<description> + + + + Using isDefaultNamespace on an Element node with a prefix, which has a namespace + attribute declaration with a namespace prefix and check if isDefaultNamespace + returns false with this namespaceURI as its parameter. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="isDefault" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<isDefaultNamespace var="isDefault" obj="elem" namespaceURI='"http://www.altavista.com"'/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace08"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace09.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace09.xml new file mode 100644 index 0000000..d02444c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace09.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace09"> +<metadata> +<title>nodeisdefaultnamespace09</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on a new Child of a new Element node with a namespace URI + and prefix and using the parents namespace URI as an argument, verify if the + value returned is false. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="isDefault" type="boolean"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:body"'/> +<!-- shouldn't be mixing L1 and L2 calls --> +<createElement var="child" obj="doc" tagName='"xhtml:p"'/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<isDefaultNamespace var="isDefault" obj="parent" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace09_1"/> +<isDefaultNamespace var="isDefault" obj="child" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace09_2"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace10.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace10.xml new file mode 100644 index 0000000..a26790a --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace10.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace10"> +<metadata> +<title>nodeisdefaultnamespace10</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on a new Child of a new Element node with a namespace URI + and prefix and using the childs namespace URI as an argument, verify if the + value returned is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="isDefault" type="boolean"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:body"'/> +<createElementNS var="child" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<isDefaultNamespace var="isDefault" obj="child" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace10_1"/> +<isDefaultNamespace var="isDefault" obj="parent" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace10_2"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace11.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace11.xml new file mode 100644 index 0000000..36546b1 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace11.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace11"> +<metadata> +<title>nodeisdefaultnamespace11</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on an imported new Element node with a namespace URI and prefix + in a new Document and using the parent's namespace URI as an argument, verify if the + value returned is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="elem" type="Element"/> +<var name="importedNode" type="Element"/> +<var name="isDefault" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<importNode var="importedNode" obj="newDoc" importedNode="elem" deep="true"/> +<isDefaultNamespace var="isDefault" obj="importedNode" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace11"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace13.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace13.xml new file mode 100644 index 0000000..a7b16ee --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace13.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace13"> +<metadata> +<title>nodeisdefaultnamespace13</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on a Element's new Text node, which has a namespace attribute + declaration without a namespace prefix in its parent Element node and verify if the + value returned is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="isDefault" type="boolean"/> +<var name="appendedChild" type="Node"/> +<var name="bodyList" type="NodeList"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createTextNode var="txt" obj="doc" data='"Text"'/> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="bodyElem" var="appendedChild" newChild="elem"/> +<isDefaultNamespace var="isDefault" obj="txt" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace13"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace14.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace14.xml new file mode 100644 index 0000000..54c2a2e --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace14.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace14"> +<metadata> +<title>nodeisdefaultnamespace14</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on a Element's new CDATASection node, which has a namespace attribute + declaration without a namespace prefix in its parent Element node and verify if the + value returned is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="cdata" type="CDATASection"/> +<var name="isDefault" type="boolean"/> +<var name="appendedChild" type="Node"/> +<var name="bodyList" type="NodeList"/> +<var name="bodyElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createCDATASection var="cdata" obj="doc" data='"CDATASection"'/> +<appendChild obj="elem" var="appendedChild" newChild="cdata"/> +<appendChild obj="bodyElem" var="appendedChild" newChild="elem"/> +<isDefaultNamespace var="isDefault" obj="cdata" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace14"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace15.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace15.xml new file mode 100644 index 0000000..fe66287 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace15.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace15"> +<metadata> +<title>nodeisdefaultnamespace15</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on a Element's new cloned Comment node, which has a namespace attribute + declaration without a namespace prefix in its parent Element node and verify if the + value returned is true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="bodyElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="comment" type="Comment"/> +<var name="clonedComment" type="Comment"/> +<var name="isDefault" type="boolean"/> +<var name="appendedChild" type="Node"/> +<var name="bodyList" type="NodeList"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createComment var="comment" obj="doc" data='"Text"'/> +<cloneNode var="clonedComment" obj="comment" deep="true"/> +<appendChild obj="elem" var="appendedChild" newChild="clonedComment"/> +<appendChild obj="bodyElem" var="appendedChild" newChild="elem"/> +<isDefaultNamespace var="isDefault" obj="clonedComment" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertTrue actual="isDefault" id="nodeisdefaultnamespace15"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisdefaultnamespace16.xml b/test/testcases/tests/level3/core/nodeisdefaultnamespace16.xml new file mode 100644 index 0000000..572c98c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisdefaultnamespace16.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisdefaultnamespace16"> +<metadata> +<title>nodeisdefaultnamespace16</title> +<creator>IBM</creator> +<description> + Using isDefaultNamespace on a new Attribute node with with a namespace URI + and no prefix and verify if the value returned is false since default namespaces + do not apply directly to attributes. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr" type="Attr"/> +<var name="isDefault" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"lang"'/> +<isDefaultNamespace var="isDefault" obj="attr" namespaceURI='"http://www.w3.org/XML/1998/namespace"'/> +<assertFalse actual="isDefault" id="nodeisdefaultnamespace16"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode01.xml b/test/testcases/tests/level3/core/nodeisequalnode01.xml new file mode 100644 index 0000000..082c14a --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode01.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode01"> +<metadata> +<title>nodeisequalnode01</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 Document nodes created by parsing the same xml document + are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="isEqual" type="boolean"/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<load var="doc2" href="hc_staff" willBeModified="false"/> +<isEqualNode var="isEqual" obj="doc1" arg="doc2"/> +<assertTrue actual="isEqual" id="nodeisequalnode01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode02.xml b/test/testcases/tests/level3/core/nodeisequalnode02.xml new file mode 100644 index 0000000..8f82766 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode02.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode02"> +<metadata> +<title>nodeisequalnode02</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if 2 newly created Document nodes having the same namespaceURI + and qualifiedName are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="isEqual" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="doc1" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createDocument var="doc2" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<isEqualNode var="isEqual" obj="doc1" arg="doc2"/> +<assertTrue actual="isEqual" id="nodeisequalnode02"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode03.xml b/test/testcases/tests/level3/core/nodeisequalnode03.xml new file mode 100644 index 0000000..5d06566 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode03.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode03"> +<metadata> +<title>nodeisequalnode03</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if 2 Document nodes created by parsing + documents only differing in declared encoding return false for isEqualNode on + the document and true on the document element. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=528"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="docElem1" type="Element"/> +<var name="docElem2" type="Element"/> +<var name="isEqual" type="boolean"/> +<load var="doc1" href="barfoo_utf8" willBeModified="false"/> +<load var="doc2" href="barfoo_utf16" willBeModified="false"/> +<isEqualNode var="isEqual" obj="doc1" arg="doc2"/> +<!-- encoding is not significant in equality --> +<assertTrue actual="isEqual" id="docAreNotEquals"/> +<documentElement var="docElem1" obj="doc1"/> +<documentElement var="docElem2" obj="doc2"/> +<isEqualNode var="isEqual" obj="docElem1" arg="docElem2"/> +<assertTrue actual="isEqual" id="docElemsAreEquals"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode04.xml b/test/testcases/tests/level3/core/nodeisequalnode04.xml new file mode 100644 index 0000000..611bf3e --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode04.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode04"> +<metadata> +<title>nodeisequalnode04</title> +<creator>IBM</creator> +<description> + Create a new Element node in this Document. return its ownerDocument and check if the + the ownerDocument is equal to this Document using isEqualNode. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="ownerDoc" type="Document"/> +<var name="elem" type="Element"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<ownerDocument var="ownerDoc" obj="elem"/> +<isEqualNode var="isEqual" obj="doc" arg="ownerDoc"/> +<assertTrue actual="isEqual" id="nodeisequalnode04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode05.xml b/test/testcases/tests/level3/core/nodeisequalnode05.xml new file mode 100644 index 0000000..8771b30 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode05.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode05"> +<metadata> +<title>nodeisequalnode05</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if 2 Document nodes created by parsing different xml document + are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="isEqual" type="boolean"/> +<load var="doc1" href="barfoo_standalone_yes" willBeModified="false"/> +<load var="doc2" href="barfoo" willBeModified="false"/> +<isEqualNode var="isEqual" obj="doc1" arg="doc2"/> +<assertFalse actual="isEqual" id="nodeisequalnode05"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode06.xml b/test/testcases/tests/level3/core/nodeisequalnode06.xml new file mode 100644 index 0000000..b2ba637 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode06.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode06"> +<metadata> +<title>nodeisequalnode06</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 Element nodes having the same nodeName and namespaceURI attribute + are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem1" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:html"'/> +<createElementNS var="elem2" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:html"'/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertTrue actual="isEqual" id="nodeisequalnode06"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode07.xml b/test/testcases/tests/level3/core/nodeisequalnode07.xml new file mode 100644 index 0000000..3fca62e --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode07.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode07"> +<metadata> +<title>nodeisequalnode07</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if 2 Element nodes having the same nodeName and namespaceURI attribute + created by two different Document objects obtained by parsing the same xml document are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="isEqual" type="boolean"/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<load var="doc2" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem1" obj="doc1" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:html"'/> +<createElementNS var="elem2" obj="doc2" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:html"'/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertTrue actual="isEqual" id="nodeisequalnode07"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode08.xml b/test/testcases/tests/level3/core/nodeisequalnode08.xml new file mode 100644 index 0000000..005ab01 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode08.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode08"> +<metadata> +<title>nodeisequalnode08</title> +<creator>IBM</creator> +<description> + + + Retreive an element node of this Document having nodeName as employeeId and + namespaceURI as http://www.nist.gov. Create a new Element node having the same attributes + in this Document and using isEqualNode check if 2 Element nodes are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="ignoringElementContentWhitespace" value="true"/> +<var name="doc" type="Document"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="employeeList" type="NodeList"/> +<var name="text" type="Text"/> +<var name="isEqual" type="boolean"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="employeeList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem1" obj="employeeList" index="0" interface="NodeList"/> +<createElementNS var="elem2" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"em"'/> +<createTextNode var="text" obj="doc" data='"EMP0001"'/> +<appendChild obj="elem2" var="appendedChild" newChild="text"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertTrue actual="isEqual" id="nodeisequalnode08"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode09.xml b/test/testcases/tests/level3/core/nodeisequalnode09.xml new file mode 100644 index 0000000..3e23ca2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode09.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode09"> +<metadata> +<title>nodeisequalnode09</title> +<creator>IBM</creator> +<description> +Get the first "em" node, construct an equivalent in a new document and see if isEqualNode +returns true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="ignoringElementContentWhitespace" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="employeeList" type="NodeList"/> +<var name="text" type="Text"/> +<var name="isEqual" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="appendedChild" type="Node"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<localName var="rootName" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootName' doctype="nullDocType"/> +<getElementsByTagName var="employeeList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem1" obj="employeeList" index="0" interface="NodeList"/> +<createElementNS var="elem2" obj="newDoc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"em"'/> +<createTextNode var="text" obj="newDoc" data='"EMP0001"'/> +<appendChild obj="elem2" var="appendedChild" newChild="text"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertTrue actual="isEqual" id="nodesAreEqual"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode10.xml b/test/testcases/tests/level3/core/nodeisequalnode10.xml new file mode 100644 index 0000000..4c9200a --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode10.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode10"> +<metadata> +<title>nodeisequalnode10</title> +<creator>IBM</creator> +<description> + Retreive 2 different "em" nodes of this Document Use isEqualNode + check if nodes are not equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="employeeList" type="NodeList"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="employeeList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem1" obj="employeeList" index="0" interface="NodeList"/> +<item var="elem2" obj="employeeList" index="1" interface="NodeList"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertFalse actual="isEqual" id="nodeisequalnode10"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode11.xml b/test/testcases/tests/level3/core/nodeisequalnode11.xml new file mode 100644 index 0000000..d7bff0f --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode11.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode11"> +<metadata> +<title>nodeisequalnode11</title> +<creator>IBM</creator> +<description> + Retreive the first element node whose localName is "p". Import it into a new + Document with deep=false. Using isEqualNode check if the original and the imported + Element Node are not equal the child nodes are different. + Import with deep and the should still be unequal if + validating since the + new document does not provide the same default attributes. + Import it into another instance of the source document + and then the imported node and the source should be equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=529"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="employeeList" type="NodeList"/> +<var name="newDoc" type="Document"/> +<var name="dupDoc" type="Document"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="elem3" type="Element"/> +<var name="elem4" type="Element"/> +<var name="isEqual" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='rootNS' qualifiedName='rootName' doctype="nullDocType"/> +<getElementsByTagName var="employeeList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem1" obj="employeeList" index="0" interface="NodeList"/> +<importNode var="elem2" obj="newDoc" importedNode="elem1" deep="false"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertFalse actual="isEqual" id="nodeisequalnodeFalse11"/> +<importNode var="elem3" obj="newDoc" importedNode="elem1" deep="true"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem3"/> +<!-- if validating the nodes should be unequal + since the new node will not contain + default attributes. Unable to make a statement + when not validating --> +<if><implementationAttribute name="validating" value="true"/> +<assertFalse actual="isEqual" id="deepImportNoDTD"/> +</if> +<load var="dupDoc" href="hc_staff" willBeModified="true"/> +<importNode var="elem4" obj="dupDoc" importedNode="elem1" deep="true"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem4"/> +<assertTrue actual="isEqual" id="deepImportSameDTD"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode12.xml b/test/testcases/tests/level3/core/nodeisequalnode12.xml new file mode 100644 index 0000000..2f7a671 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode12.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode12"> +<metadata> +<title>nodeisequalnode12</title> +<creator>IBM</creator> +<description> + + + Using isEqual verify if the 2 documentElement nodes of different documents created + by parsing the same xml document are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="elem1" obj="doc"/> +<documentElement var="elem2" obj="doc"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertTrue actual="isEqual" id="nodeisequalnode12"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode13.xml b/test/testcases/tests/level3/core/nodeisequalnode13.xml new file mode 100644 index 0000000..f7dd2fe --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode13.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode13"> +<metadata> +<title>nodeisequalnode13</title> +<creator>IBM</creator> +<description> + Retreive the first element node whose localName is "p". Import it into a new + Document with deep=false. Using isEqualNode check if the original and the imported + Element Node are not equal. Now import it once more with deep=true and using isEqual + verify if they are now equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="employeeList" type="NodeList"/> +<var name="elem1" type="Element"/> +<var name="elem2" type="Element"/> +<var name="elem3" type="Element"/> +<var name="isEqual" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<getElementsByTagName var="employeeList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem1" obj="employeeList" index="0" interface="NodeList"/> +<cloneNode var="elem2" obj="elem1" deep="false"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem2"/> +<assertFalse actual="isEqual" id="nodeisequalnodeFalse13"/> +<cloneNode var="elem3" obj="elem1" deep="true"/> +<isEqualNode var="isEqual" obj="elem1" arg="elem3"/> +<assertTrue actual="isEqual" id="nodeisequalnodeTrue13"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode14.xml b/test/testcases/tests/level3/core/nodeisequalnode14.xml new file mode 100644 index 0000000..3e7615f --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode14.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode14"> +<metadata> +<title>nodeisequalnode14</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 Attr nodes having the same nodeName and a null namespaceURI + attribute, one created using createAttribute and the other createAttributeNS, are not equal. + Note the localName for an Attr created with DOM Level 1 methods is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="isEqual" type="boolean"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createAttribute var="attr1" obj="doc" name='"root"'/> +<createAttributeNS var="attr2" obj="doc" namespaceURI="nullNSURI" qualifiedName='"root"'/> +<isEqualNode var="isEqual" obj="attr1" arg="attr2"/> +<assertFalse actual="isEqual" id="nodeisequalnode14"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode15.xml b/test/testcases/tests/level3/core/nodeisequalnode15.xml new file mode 100644 index 0000000..3f6787c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode15.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode15"> +<metadata> +<title>nodeisequalnode15</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if 2 Attr nodes having the same nodeName and a null namespaceURI + attribute, one created using createAttributeNS and the other retreived from this document + are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="addrElement" type="Element"/> +<var name="elementList" type="NodeList"/> +<var name="isEqual" type="boolean"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"acronym"' var="elementList"/> +<item interface="NodeList" obj="elementList" var="addrElement" index="3" /> +<getAttributeNodeNS obj="addrElement" var="attr1" namespaceURI='nullNS' localName='"title"'/> +<if><implementationAttribute name="namespaceAware" value="true"/> + <createAttributeNS var="attr2" obj="doc" namespaceURI='nullNS' qualifiedName='"title"'/> + <else> + <createAttribute var="attr2" obj="doc" name='"title"'/> + </else> +</if> +<value obj="attr2" value='"Yes"'/> +<isEqualNode var="isEqual" obj="attr1" arg="attr2"/> +<assertTrue actual="isEqual" id="nodeisequalnode15"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode16.xml b/test/testcases/tests/level3/core/nodeisequalnode16.xml new file mode 100644 index 0000000..067195f --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode16.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode16"> +<metadata> +<title>nodeisequalnode16</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if a default attribute node and a cloned default attribute + node are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="addrElement" type="Element"/> +<var name="elementList" type="NodeList"/> +<var name="isEqual" type="boolean"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elementList" obj="doc" tagname='"p"' interface="Document"/> +<item var="addrElement" obj="elementList" index="3" interface="NodeList"/> +<getAttributeNodeNS obj="addrElement" var="attr1" namespaceURI="nullNSURI" localName='"dir"'/> +<cloneNode var="attr2" obj="attr1" deep="true"/> +<isEqualNode var="isEqual" obj="attr1" arg="attr2"/> +<assertTrue actual="isEqual" id="nodeisequalnode16"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode17.xml b/test/testcases/tests/level3/core/nodeisequalnode17.xml new file mode 100644 index 0000000..c4826cd --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode17.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode17"> +<metadata> +<title>nodeisequalnode17</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if a new Attr node created in this Document is equal to + the imported node returned when it is imported into a new Document. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="isEqual" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createAttributeNS var="attr1" obj="doc" namespaceURI="nullNSURI" qualifiedName='"root"'/> +<importNode var="attr2" obj="newDoc" importedNode="attr1" deep="true"/> +<isEqualNode var="isEqual" obj="attr1" arg="attr2"/> +<assertTrue actual="isEqual" id="nodeisequalnode17"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode18.xml b/test/testcases/tests/level3/core/nodeisequalnode18.xml new file mode 100644 index 0000000..aa1866f --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode18.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode18"> +<metadata> +<title>nodeisequalnode18</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if a new Attr node created in this Document is equal to + the attr node adopted by a new document. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="isEqual" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createAttributeNS var="attr1" obj="doc" namespaceURI="nullNSURI" qualifiedName='"title"'/> +<adoptNode var="attr2" obj="newDoc" source="attr1" /> +<if><notNull obj="attr2"/> +<isEqualNode var="isEqual" obj="attr1" arg="attr2"/> +<assertTrue actual="isEqual" id="nodeisequalnode18"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode19.xml b/test/testcases/tests/level3/core/nodeisequalnode19.xml new file mode 100644 index 0000000..77f714c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode19.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode19"> +<metadata> +<title>nodeisequalnode19</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 Attr nodes having the same nodeName but different namespaceURIs + are not equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="isEqual" type="boolean"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createAttributeNS var="attr1" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"lang"'/> +<createAttributeNS var="attr2" obj="doc" namespaceURI="nullNSURI" qualifiedName='"lang"'/> +<isEqualNode var="isEqual" obj="attr1" arg="attr2"/> +<assertFalse actual="isEqual" id="nodeisequalnode19"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode20.xml b/test/testcases/tests/level3/core/nodeisequalnode20.xml new file mode 100644 index 0000000..6ede462 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode20.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode20"> +<metadata> +<title>nodeisequalnode20</title> +<creator>IBM</creator> +<description> + Using isEqualNode check if an Element and an Attr nodes having the same nodeName + and namsepaceURI are not equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="attr1" type="Attr"/> +<var name="elem1" type="Element"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem1" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:html"'/> +<createAttributeNS var="attr1" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:html"'/> +<isEqualNode var="isEqual" obj="attr1" arg="elem1"/> +<assertFalse actual="isEqual" id="nodeisequalnode20"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode21.xml b/test/testcases/tests/level3/core/nodeisequalnode21.xml new file mode 100644 index 0000000..7c31e30 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode21.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode21"> +<metadata> +<title>nodeisequalnode21</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 DocumentType nodes returned by parsing the same xml document + are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="docType1" type="DocumentType"/> +<var name="docType2" type="DocumentType"/> +<var name="isEqual" type="boolean"/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<load var="doc2" href="hc_staff" willBeModified="false"/> +<doctype var="docType1" obj="doc1"/> +<doctype var="docType2" obj="doc2"/> +<isEqualNode var="isEqual" obj="docType1" arg="docType2"/> +<assertTrue actual="isEqual" id="nodeisequalnode21"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode22.xml b/test/testcases/tests/level3/core/nodeisequalnode22.xml new file mode 100644 index 0000000..96bfd99 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode22.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode22"> +<metadata> +<title>nodeisequalnode22</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 new DocumentType having null public and system ids + are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="domImpl1" type="DOMImplementation"/> +<var name="domImpl2" type="DOMImplementation"/> +<var name="docType1" type="DocumentType"/> +<var name="docType2" type="DocumentType"/> +<var name="isEqual" type="boolean"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="oldDocType" type="DocumentType"/> +<var name="rootName" type="DOMString"/> +<load var="doc1" href="barfoo" willBeModified="false"/> +<doctype var="oldDocType" obj="doc1"/> +<name var="rootName" obj="oldDocType" interface="DocumentType"/> +<load var="doc2" href="barfoo" willBeModified="false"/> +<implementation var="domImpl1" obj="doc1"/> +<implementation var="domImpl2" obj="doc2"/> +<createDocumentType var="docType1" obj="domImpl1" qualifiedName="rootName" publicId="nullPubId" systemId="nullSysId"/> +<createDocumentType var="docType2" obj="domImpl2" qualifiedName="rootName" publicId="nullPubId" systemId="nullSysId"/> +<isEqualNode var="isEqual" obj="docType1" arg="docType2"/> +<assertTrue actual="isEqual" id="nodeisequalnode22"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode25.xml b/test/testcases/tests/level3/core/nodeisequalnode25.xml new file mode 100644 index 0000000..a9fab69 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode25.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode25"> +<metadata> +<title>nodeisequalnode25</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 EntityNode having the same name of two DocumentType nodes + returned by parsing the same xml document are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="docType1" type="DocumentType"/> +<var name="docType2" type="DocumentType"/> +<var name="entitiesMap1" type="NamedNodeMap"/> +<var name="entitiesMap2" type="NamedNodeMap"/> +<var name="alpha" type="Entity"/> +<var name="beta" type="Entity"/> +<var name="isEqual" type="boolean"/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<load var="doc2" href="hc_staff" willBeModified="false"/> +<doctype var="docType1" obj="doc1"/> +<doctype var="docType2" obj="doc2"/> +<entities var="entitiesMap1" obj="docType1"/> +<entities var="entitiesMap2" obj="docType2"/> +<getNamedItem var="alpha" obj="entitiesMap1" name='"delta"'/> +<getNamedItem var="beta" obj="entitiesMap2" name='"delta"'/> +<isEqualNode var="isEqual" obj="alpha" arg="beta"/> +<assertTrue actual="isEqual" id="nodeisequalnode25"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode26.xml b/test/testcases/tests/level3/core/nodeisequalnode26.xml new file mode 100644 index 0000000..5d8febf --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode26.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode26"> +<metadata> +<title>nodeisequalnode26</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 NotationNode having the same name of two DocumnotationType nodes + returned by parsing the same xml documnotation are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="docType1" type="DocumentType"/> +<var name="docType2" type="DocumentType"/> +<var name="notationsMap1" type="NamedNodeMap"/> +<var name="notationsMap2" type="NamedNodeMap"/> +<var name="notation1" type="Notation"/> +<var name="notation2" type="Notation"/> +<var name="isEqual" type="boolean"/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<load var="doc2" href="hc_staff" willBeModified="false"/> +<doctype var="docType1" obj="doc1"/> +<doctype var="docType2" obj="doc2"/> +<notations var="notationsMap1" obj="docType1"/> +<notations var="notationsMap2" obj="docType2"/> +<getNamedItem var="notation1" obj="notationsMap1" name='"notation1"'/> +<getNamedItem var="notation2" obj="notationsMap2" name='"notation1"'/> +<isEqualNode var="isEqual" obj="notation1" arg="notation2"/> +<assertTrue actual="isEqual" id="nodeisequalnode26"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode27.xml b/test/testcases/tests/level3/core/nodeisequalnode27.xml new file mode 100644 index 0000000..1844ad8 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode27.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode27"> +<metadata> +<title>nodeisequalnode27</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 EntityNode having the same name of two DocumentType nodes + returned by parsing the same xml document are equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="alpha" type="Entity"/> +<var name="notation1" type="Notation"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="alpha" obj="entitiesMap" name='"alpha"'/> +<getNamedItem var="notation1" obj="notationsMap" name='"notation1"'/> +<isEqualNode var="isEqual" obj="notation1" arg="alpha"/> +<assertFalse actual="isEqual" id="nodeisequalnode27"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode28.xml b/test/testcases/tests/level3/core/nodeisequalnode28.xml new file mode 100644 index 0000000..886395c --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode28.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode28"> +<metadata> +<title>nodeisequalnode28</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 new Text nodes having null text are equal and two others + having different data are not equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="text1" type="Text"/> +<var name="text2" type="Text"/> +<var name="text3" type="Text"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="text1" obj="doc" data='""'/> +<createTextNode var="text2" obj="doc" data='""'/> +<createTextNode var="text3" obj="doc" data='"#Text"'/> +<isEqualNode var="isEqual" obj="text1" arg="text2"/> +<assertTrue actual="isEqual" id="nodeisequalnodeTrue28"/> +<isEqualNode var="isEqual" obj="text1" arg="text3"/> +<assertFalse actual="isEqual" id="nodeisequalnodeFalse28"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode29.xml b/test/testcases/tests/level3/core/nodeisequalnode29.xml new file mode 100644 index 0000000..57056cc --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode29.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="comment/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode29"> +<metadata> +<title>nodeisequalnode29</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 new Comment nodes having the same data are equal and two others + having different data are not equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="comment1" type="Comment"/> +<var name="comment2" type="Comment"/> +<var name="comment3" type="Comment"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createComment var="comment1" obj="doc" data='"comment"'/> +<createComment var="comment2" obj="doc" data='"comment"'/> +<createComment var="comment3" obj="doc" data='"#Comment"'/> +<isEqualNode var="isEqual" obj="comment1" arg="comment2"/> +<assertTrue actual="isEqual" id="nodeisequalnodeTrue29"/> +<isEqualNode var="isEqual" obj="comment1" arg="comment3"/> +<assertFalse actual="isEqual" id="nodeisequalnodeFalse29"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode31.xml b/test/testcases/tests/level3/core/nodeisequalnode31.xml new file mode 100644 index 0000000..fc77ce5 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode31.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="cdata/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode31"> +<metadata> +<title>nodeisequalnode31</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 new CDATASection nodes having the same data are equal and two others + having different data are not equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="cdata1" type="CDATASection"/> +<var name="cdata2" type="CDATASection"/> +<var name="cdata3" type="CDATASection"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createCDATASection var="cdata1" obj="doc" data='"cdata"'/> +<createCDATASection var="cdata2" obj="doc" data='"cdata"'/> +<createCDATASection var="cdata3" obj="doc" data='"#CDATASection"'/> +<isEqualNode var="isEqual" obj="cdata1" arg="cdata2"/> +<assertTrue actual="isEqual" id="nodeisequalnodeTrue29"/> +<isEqualNode var="isEqual" obj="cdata1" arg="cdata3"/> +<assertFalse actual="isEqual" id="nodeisequalnodeFalse29"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeisequalnode32.xml b/test/testcases/tests/level3/core/nodeisequalnode32.xml new file mode 100644 index 0000000..31f9d22 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeisequalnode32.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="pi/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeisequalnode32"> +<metadata> +<title>nodeisequalnode32</title> +<creator>IBM</creator> +<description> + + + Using isEqualNode check if 2 new ProcessingInstruction nodes having the same data are equal and two others + having different data are not equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pi1" type="ProcessingInstruction"/> +<var name="pi2" type="ProcessingInstruction"/> +<var name="pi3" type="ProcessingInstruction"/> +<var name="isEqual" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createProcessingInstruction var="pi1" obj="doc" data='"pi"' target='"Target1"'/> +<createProcessingInstruction var="pi2" obj="doc" data='"pi"' target='"Target1"'/> +<createProcessingInstruction var="pi3" obj="doc" data='"#ProcessingInstruction"' target='"Target1"'/> +<isEqualNode var="isEqual" obj="pi1" arg="pi2"/> +<assertTrue actual="isEqual" id="nodeisequalnodeTrue29"/> +<isEqualNode var="isEqual" obj="pi1" arg="pi3"/> +<assertFalse actual="isEqual" id="nodeisequalnodeFalse29"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode01.xml b/test/testcases/tests/level3/core/nodeissamenode01.xml new file mode 100644 index 0000000..2dcd51f --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode01.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode01"> +<metadata> +<title>nodeissamenode01</title> +<creator>IBM</creator> +<description> + + + Using isSameNode to check if 2 Document nodes that are equal but do not reference the + same object are not the same +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc1" type="Document"/> +<var name="doc2" type="Document"/> +<var name="isSame" type="boolean"/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<load var="doc2" href="hc_staff" willBeModified="false"/> +<isSameNode var="isSame" obj="doc1" other="doc2"/> +<assertFalse actual="isSame" id="nodeissamenode01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode02.xml b/test/testcases/tests/level3/core/nodeissamenode02.xml new file mode 100644 index 0000000..87b4cfe --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode02"> +<metadata> +<title>nodeissamenode02</title> +<creator>IBM</creator> +<description> + + + Using isSameNode check if 2 DocumentType nodes that reference the same object are + the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType1" type="DocumentType"/> +<var name="docType2" type="DocumentType"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType1" obj="doc"/> +<doctype var="docType2" obj="doc"/> +<isSameNode var="isSame" obj="docType1" other="docType2"/> +<assertTrue actual="isSame" id="nodeissamenode02"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode03.xml b/test/testcases/tests/level3/core/nodeissamenode03.xml new file mode 100644 index 0000000..fc8e9e7 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode03.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode03"> +<metadata> +<title>nodeissamenode03</title> +<creator>IBM</creator> +<description> + Using isSameNode check if 2 Element nodes that reference the same object are + the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element1" type="Element"/> +<var name="element2" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="element1" obj="childList" index="0" interface="NodeList"/> +<item var="element2" obj="childList" index="0" interface="NodeList"/> +<isSameNode var="isSame" obj="element2" other="element1"/> +<assertTrue actual="isSame" id="nodeissamenode03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode04.xml b/test/testcases/tests/level3/core/nodeissamenode04.xml new file mode 100644 index 0000000..a9f3814 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode04.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode04"> +<metadata> +<title>nodeissamenode04</title> +<creator>IBM</creator> +<description> + Using isSameNode check if 2 Element nodes that are equal but do not reference the + same object are not the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element1" type="Element"/> +<var name="element2" type="Element"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="element1" obj="doc" qualifiedName='"xhtml:br"' namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<createElementNS var="element2" obj="doc" qualifiedName='"xhtml:br"' namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<isSameNode var="isSame" obj="element2" other="element1"/> +<assertFalse actual="isSame" id="nodeissamenode04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode05.xml b/test/testcases/tests/level3/core/nodeissamenode05.xml new file mode 100644 index 0000000..b017c36 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode05.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode05"> +<metadata> +<title>nodeissamenode05</title> +<creator>IBM</creator> +<description> + + + Using isSameNode check if 2 Document Element nodes that reference the same object are + the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element1" type="Element"/> +<var name="element2" type="Element"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="element1" obj="doc"/> +<documentElement var="element2" obj="doc"/> +<isSameNode var="isSame" obj="element2" other="element1"/> +<assertTrue actual="isSame" id="nodeissamenode05"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode06.xml b/test/testcases/tests/level3/core/nodeissamenode06.xml new file mode 100644 index 0000000..75eca7f --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode06.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode06"> +<metadata> +<title>nodeissamenode06</title> +<creator>IBM</creator> +<description> + Using isSameNode check if 2 Document Element nodes that reference the same object are + the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="element" type="Element"/> +<var name="element1" type="Element"/> +<var name="attr1" type="Attr"/> +<var name="attr2" type="Attr"/> +<var name="childList" type="NodeList"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="element" obj="childList" index="2" interface="NodeList"/> +<item var="element1" obj="childList" index="2" interface="NodeList"/> +<getAttributeNode var="attr1" obj="element" name='"class"'/> +<getAttributeNode var="attr2" obj="element1" name='"class"'/> +<isSameNode var="isSame" obj="attr1" other="attr2"/> +<assertTrue actual="isSame" id="nodeissamenode06"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode07.xml b/test/testcases/tests/level3/core/nodeissamenode07.xml new file mode 100644 index 0000000..5182ef8 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode07.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode07"> +<metadata> +<title>nodeissamenode07</title> +<creator>IBM</creator> +<description> + + + Using isSameNode check if 2 Entity nodes that reference the same object are + the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity1" type="Entity"/> +<var name="entity2" type="Entity"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity1" obj="entitiesMap" name='"delta"'/> +<getNamedItem var="entity2" obj="entitiesMap" name='"delta"'/> +<isSameNode var="isSame" obj="entity1" other="entity2"/> +<assertTrue actual="isSame" id="nodeissamenode07"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode08.xml b/test/testcases/tests/level3/core/nodeissamenode08.xml new file mode 100644 index 0000000..3beb40a --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode08.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode08"> +<metadata> +<title>nodeissamenode08</title> +<creator>IBM</creator> +<description> + + + Using isSameNode check if 2 Notation nodes that reference the same object are + the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="notation1" type="Notation"/> +<var name="notation2" type="Notation"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<notations var="entitiesMap" obj="docType"/> +<getNamedItem var="notation1" obj="entitiesMap" name='"notation1"'/> +<getNamedItem var="notation2" obj="entitiesMap" name='"notation1"'/> +<isSameNode var="isSame" obj="notation1" other="notation2"/> +<assertTrue actual="isSame" id="nodeissamenode08"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode09.xml b/test/testcases/tests/level3/core/nodeissamenode09.xml new file mode 100644 index 0000000..93747c5 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode09.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode09"> +<metadata> +<title>nodeissamenode09</title> +<creator>IBM</creator> +<description> + + + Using isSameNode check if an Entity and its docType nodes are not the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="isSame" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<isSameNode var="isSame" obj="docType" other="entity"/> +<assertFalse actual="isSame" id="nodeissamenode09"/> +</test> diff --git a/test/testcases/tests/level3/core/nodeissamenode10.xml b/test/testcases/tests/level3/core/nodeissamenode10.xml new file mode 100644 index 0000000..bf01101 --- /dev/null +++ b/test/testcases/tests/level3/core/nodeissamenode10.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeissamenode10"> +<metadata> +<title>nodeissamenode10</title> +<creator>IBM</creator> +<description> + Using isSameNode check if an new Document and a new Element node are not the same. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="element" type="Element"/> +<var name="isSame" type="boolean"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createElementNS var="element" obj="newDoc" namespaceURI="rootNS" qualifiedName="rootName"/> +<isSameNode var="isSame" obj="newDoc" other="element"/> +<assertFalse actual="isSame" id="nodeissamenode10"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri01.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri01.xml new file mode 100644 index 0000000..cf79ae2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri01.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri01"> +<metadata> +<title>nodelookupnamespaceuri01</title> +<creator>IBM</creator> +<description> +Return value from lookupNamespaceURI(null) on a Document node with no default namespace should be null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullPrefix" type="DOMString" isNull="true"/> +<load var="doc" href="barfoo_nodefaultns" willBeModified="false"/> +<lookupNamespaceURI var="namespaceURI" obj="doc" prefix="nullPrefix" interface="Node"/> +<assertNull actual="namespaceURI" id="nodelookupnamespaceuri01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri02.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri02.xml new file mode 100644 index 0000000..572ab5b --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri02.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri02"> +<metadata> +<title>nodelookupnamespaceuri02</title> +<creator>IBM</creator> +<description> + Using lookupNamespaceURI on a new Document node with a namespaceURI and prefix + and check if the value returned is the same namespaceURI. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="qname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<plus var="qname" op1='"dom3:"' op2="rootName"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="qname" doctype="nullDocType"/> +<lookupNamespaceURI var="namespaceURI" obj="newDoc" prefix='"dom3"' interface="Node"/> +<assertEquals actual="namespaceURI" expected="rootNS" id="nodelookupnamespaceuri02" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri03.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri03.xml new file mode 100644 index 0000000..e2a99ca --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri03.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri03"> +<metadata> +<title>nodelookupnamespaceuri03</title> +<creator>IBM</creator> +<description> + + + + Using lookupNamespaceURI on this DocumentType node check if the value returned is Null . +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullPrefix" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<lookupNamespaceURI var="namespaceURI" obj="docType" prefix="nullPrefix" interface="Node"/> +<assertNull actual="namespaceURI" id="nodelookupnamespaceuri03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri04.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri04.xml new file mode 100644 index 0000000..c7e20e7 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri04.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri04"> +<metadata> +<title>nodelookupnamespaceuri04</title> +<creator>IBM</creator> +<description> + + + + Using lookupNamespaceURI on an Entity and Notation node and check if the value returned is Null . +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entity" type="Entity"/> +<var name="notation" type="Notation"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<getNamedItem var="notation" obj="notationsMap" name='"notation1"'/> +<lookupNamespaceURI var="namespaceURI" obj="entity" prefix='""' interface="Node"/> +<assertNull actual="namespaceURI" id="nodelookupnamespaceuri04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri05.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri05.xml new file mode 100644 index 0000000..cd4eaac --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri05.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri05"> +<metadata> +<title>nodelookupnamespaceuri05</title> +<creator>IBM</creator> +<description> + Using lookupNamespaceURI on the DocumentElement node of a new document with a + namespaceURI and prefix and check if the namespaceURI value returned is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="qname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<plus var="qname" op1='"dom3:"' op2="rootName"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="qname" doctype="nullDocType"/> +<documentElement var="elem" obj="newDoc"/> +<lookupNamespaceURI var="namespaceURI" obj="elem" prefix='"dom3"' interface="Node"/> +<assertEquals actual="namespaceURI" expected="rootNS" id="nodelookupnamespaceuri05" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri06.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri06.xml new file mode 100644 index 0000000..65c4d28 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri06.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri06"> +<metadata> +<title>nodelookupnamespaceuri06</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on an Element node with no prefix, which has a namespace + attribute declaration with a namespace prefix and check if the value of the namespaceURI + returned by using its prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="2" interface="NodeList"/> +<lookupNamespaceURI var="namespaceURI" obj="elem" prefix='"dmstc"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.netzero.com"' id="nodelookupnamespaceuri06" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri07.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri07.xml new file mode 100644 index 0000000..1032782 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri07.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri07"> +<metadata> +<title>nodelookupnamespaceuri07</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on an Element node with no prefix, which has a namespace + attribute declaration with a namespace prefix in its parent Element node and check if + the value of the namespaceURI returned by using its prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="2" interface="NodeList"/> +<lookupNamespaceURI var="namespaceURI" obj="elem" prefix='"dmstc"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.netzero.com"' id="nodelookupnamespaceuri07" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri08.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri08.xml new file mode 100644 index 0000000..2d04786 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri08.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri08"> +<metadata> +<title>nodelookupnamespaceuri08</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on an Element node with no prefix, which has 2 namespace + attribute declarations with and without namespace prefixes and check if the value of the prefix + returned by using a valid prefix and an empty prefix as a parameter is a valid + namespaceURI or null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="namespaceURI" type="DOMString"/> +<var name="namespaceURIEmpty" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<lookupNamespaceURI var="namespaceURI" obj="elem" prefix='"dmstc"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.usa.com"' id="nodelookupnamespaceuri08" ignoreCase="false"/> +<lookupNamespaceURI var="namespaceURIEmpty" obj="elem" prefix='""' interface="Node"/> +<assertNull actual="namespaceURIEmpty" id="nodelookupnamespaceprefixEmpty08"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri09.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri09.xml new file mode 100644 index 0000000..04d8670 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri09.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri09"> +<metadata> +<title>nodelookupnamespaceuri09</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on an Element node with no prefix, whose parent has no prefix and + 2 namespace attribute declarations with and without namespace prefixes and check if the value of + the namespaceURI returned by using each prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="namespaceURI" type="DOMString"/> +<var name="namespaceURIEmpty" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<lookupNamespaceURI var="namespaceURI" obj="elem" prefix='"dmstc"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.usa.com"' id="nodelookupnamespaceuri09" ignoreCase="false"/> +<lookupNamespaceURI var="namespaceURIEmpty" obj="elem" prefix='""' interface="Node"/> +<assertNull actual="namespaceURIEmpty" id="nodelookupnamespaceprefixEmpty09"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri10.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri10.xml new file mode 100644 index 0000000..263aa7d --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri10.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri10"> +<metadata> +<title>nodelookupnamespaceuri10</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on a new Child of a new Element node with a namespace URI + and prefix and using the parents prefix as an argument, verify if the namespaceURI + returned is a valid namespaceURI for the parent. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="namespaceURI" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:body"'/> +<createElement var="child" obj="doc" tagName='"p"'/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<lookupNamespaceURI var="namespaceURI" obj="child" prefix='"xhtml"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.w3.org/1999/xhtml"' id="nodelookupnamespaceuri10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri11.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri11.xml new file mode 100644 index 0000000..0b7721c --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri11.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri11"> +<metadata> +<title>nodelookupnamespaceuri11</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on an imported new Element node with a namespace URI and prefix + in a new Document and using the parents prefix as an argument, verify if the namespaceURI + returned is a valid namespaceURI of the parent. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="elem" type="Element"/> +<var name="importedNode" type="Element"/> +<var name="namespaceURI" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<importNode var="importedNode" obj="newDoc" importedNode="elem" deep="true"/> +<lookupNamespaceURI var="namespaceURI" obj="importedNode" prefix='"dom3"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.w3.org/1999/xhtml"' id="nodelookupnamespaceuri11" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri13.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri13.xml new file mode 100644 index 0000000..1ecd2bf --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri13.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri13"> +<metadata> +<title>nodelookupnamespaceuri13</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on a Element's new Text node, which has a namespace attribute declaration + with a namespace prefix in its parent Element node and check if the value of the namespaceURI + returned by using its prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="namespaceURI" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createTextNode var="txt" obj="doc" data='"Text"'/> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="docElem" var="appendedChild" newChild="elem"/> +<lookupNamespaceURI var="namespaceURI" obj="txt" prefix='"dom3"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.w3.org/1999/xhtml"' id="nodelookupnamespaceuri13" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri14.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri14.xml new file mode 100644 index 0000000..0deed71 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri14.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri14"> +<metadata> +<title>nodelookupnamespaceuri14</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on a Element's new Text node, which has a namespace attribute declaration + with a namespace prefix in its parent Element node and check if the value of the namespaceURI + returned by using its prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="cdata" type="CDATASection"/> +<var name="lookupNamespaceURI" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createCDATASection var="cdata" obj="doc" data='"Text"'/> +<appendChild var="appendedChild" obj="elem" newChild="cdata"/> +<appendChild var="appendedChild" obj="docElem" newChild="elem"/> +<lookupNamespaceURI var="lookupNamespaceURI" obj="cdata" prefix='"dom3"' interface="Node"/> +<assertEquals actual="lookupNamespaceURI" expected='"http://www.w3.org/1999/xhtml"' id="nodelookupnamespaceuri14" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri15.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri15.xml new file mode 100644 index 0000000..f969382 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri15.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri15"> +<metadata> +<title>nodelookupnamespaceuri15</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on a Element's new Comment node, which has a namespace attribute declaration + with a namespace prefix in its parent Element node and check if the value of the namespaceURI + returned by using its prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="comment" type="Comment"/> +<var name="clonedComment" type="Comment"/> +<var name="namespaceURI" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createComment var="comment" obj="doc" data='"Text"'/> +<cloneNode var="clonedComment" obj="comment" deep="true"/> +<appendChild obj="elem" var="appendedChild" newChild="clonedComment"/> +<appendChild obj="docElem" var="appendedChild" newChild="elem"/> +<lookupNamespaceURI var="namespaceURI" obj="clonedComment" prefix='"dom3"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.w3.org/1999/xhtml"' id="nodelookupnamespaceuri15" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri16.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri16.xml new file mode 100644 index 0000000..4ed8075 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri16.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri16"> +<metadata> +<title>nodelookupnamespaceuri16</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on a new Attribute node with with a namespace URI + and prefix and verify if the namespaceURI returned is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="attNode" type="Attr"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<setAttributeNodeNS obj="elem" var="attNode" newAttr="attr"/> +<lookupNamespaceURI var="namespaceURI" obj="attr" prefix='"xml"' interface="Node"/> +<assertNull actual="namespaceURI" id="nodelookupnamespaceuri16"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri17.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri17.xml new file mode 100644 index 0000000..20620f1 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri17.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri17"> +<metadata> +<title>nodelookupnamespaceuri17</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on the title attribute node of the acronym node with + a namespaceURI and a node prefix and check if the value of the namespaceURI returned by + using its prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="2" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> +<lookupNamespaceURI var="namespaceURI" obj="attr" prefix='"dmstc"' interface="Node" /> +<assertEquals actual="namespaceURI" expected='"http://www.netzero.com"' id="nodelookupnamespaceuri17" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri18.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri18.xml new file mode 100644 index 0000000..9bb3dff --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri18.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri18"> +<metadata> +<title>nodelookupnamespaceuri18</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on the default attribute node of the p node with + a namespaceURI and a node prefix and check if the value of the namespaceURI returned by + using its prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"dir"'/> +<lookupNamespaceURI var="namespaceURI" obj="attr" prefix='"nm"' interface="Node" /> +<assertEquals actual="namespaceURI" expected='"http://www.altavista.com"' id="nodelookupnamespaceuri18" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri19.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri19.xml new file mode 100644 index 0000000..2af768e --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri19.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri19"> +<metadata> +<title>nodelookupnamespaceuri19</title> +<creator>IBM</creator> +<description> + Invoke lookupNamespaceURI on the an attribute node without a namespace prefix of + an Element node that has a namespaceURI and prefix, and check if the value of the namespaceURI + returned by using the Elements prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<lookupNamespaceURI var="namespaceURI" obj="attr" prefix='"xsi"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.w3.org/2001/XMLSchema-instance"' id="nodelookupnamespaceuri19" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupnamespaceuri20.xml b/test/testcases/tests/level3/core/nodelookupnamespaceuri20.xml new file mode 100644 index 0000000..8b2ac81 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupnamespaceuri20.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupnamespaceuri20"> +<metadata> +<title>nodelookupnamespaceuri20</title> +<creator>IBM</creator> +<description> + + + + Invoke lookupNamespaceURI on the an attribute node without a namespace prefix of + an Element node that has a namespaceURI and prefix, and check if the value of the namespaceURI + returned by using the Elements prefix as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="namespaceURI" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"xmlns:nm"'/> +<lookupNamespaceURI var="namespaceURI" obj="attr" prefix='"nm"' interface="Node"/> +<assertEquals actual="namespaceURI" expected='"http://www.altavista.com"' id="nodelookupnamespaceuri20" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix01.xml b/test/testcases/tests/level3/core/nodelookupprefix01.xml new file mode 100644 index 0000000..8310163 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix01.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix01"> +<metadata> +<title>nodelookupprefix01</title> +<creator>IBM</creator> +<description> + + + + Using lookupPrefix on this Document node check if the value returned is Null . +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="prefix" type="DOMString"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<lookupPrefix var="prefix" obj="doc" namespaceURI="nullNSURI"/> +<assertNull actual="prefix" id="nodelookupprefix01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix02.xml b/test/testcases/tests/level3/core/nodelookupprefix02.xml new file mode 100644 index 0000000..47d695f --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix02.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix02"> +<metadata> +<title>nodelookupprefix02</title> +<creator>IBM</creator> +<description> + Using lookupPrefix on a new Document node with a namespaceURI and prefix + and check if the value returned is the same prefix. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="prefix" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="qname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<plus var="qname" op1='"dom3:"' op2="rootName"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="qname" doctype="nullDocType"/> +<lookupPrefix var="prefix" obj="newDoc" namespaceURI="rootNS"/> +<assertEquals actual="prefix" expected='"dom3"' id="nodelookupprefix02" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix03.xml b/test/testcases/tests/level3/core/nodelookupprefix03.xml new file mode 100644 index 0000000..610485f --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix03.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix03"> +<metadata> +<title>nodelookupprefix03</title> +<creator>IBM</creator> +<description> + + + + Using lookupPrefix on this DocumentType node check if the value returned is Null . +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="prefix" type="DOMString"/> +<var name="nullNSURI" type="DOMString" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<lookupPrefix var="prefix" obj="docType" namespaceURI="nullNSURI"/> +<assertNull actual="prefix" id="nodelookupprefix03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix04.xml b/test/testcases/tests/level3/core/nodelookupprefix04.xml new file mode 100644 index 0000000..c5a5c89 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix04.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix04"> +<metadata> +<title>nodelookupprefix04</title> +<creator>IBM</creator> +<description> + + + + Using lookupPrefix on an Entity and Notation node and check if the value returned is Null . +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entity" type="Entity"/> +<var name="notation" type="Notation"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="entity" obj="entitiesMap" name='"alpha"'/> +<getNamedItem var="notation" obj="notationsMap" name='"notation1"'/> +<lookupPrefix var="prefix" obj="entity" namespaceURI='""' interface="Node"/> +<assertNull actual="prefix" id="nodelookupprefixEntity04"/> +<lookupPrefix var="prefix" obj="notation" namespaceURI='""' interface="Node"/> +<assertNull actual="prefix" id="nodelookupprefixNotation04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix05.xml b/test/testcases/tests/level3/core/nodelookupprefix05.xml new file mode 100644 index 0000000..3de6966 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix05.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix05"> +<metadata> +<title>nodelookupprefix05</title> +<creator>IBM</creator> +<description> + Using lookupPrefix on the DocumentElement node of a new document with a + namespaceURI and prefix and check if the prefix value returned is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="prefix" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="qname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<plus var="qname" op1='"dom3:"' op2="rootName"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="qname" doctype="nullDocType"/> +<documentElement var="elem" obj="newDoc"/> +<lookupPrefix var="prefix" obj="elem" namespaceURI="rootNS"/> +<assertEquals actual="prefix" expected='"dom3"' id="nodelookupprefix05" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix06.xml b/test/testcases/tests/level3/core/nodelookupprefix06.xml new file mode 100644 index 0000000..e03cef8 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix06.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix06"> +<metadata> +<title>nodelookupprefix06</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on an Element node with no prefix, which has a namespace + attribute declaration with a namespace prefix and check if the value of the prefix + returned by using its namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="2" interface="NodeList"/> +<lookupPrefix var="prefix" obj="elem" namespaceURI='"http://www.netzero.com"'/> +<assertEquals actual="prefix" expected='"dmstc"' id="nodelookupprefix06" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix07.xml b/test/testcases/tests/level3/core/nodelookupprefix07.xml new file mode 100644 index 0000000..1e56803 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix07.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix07"> +<metadata> +<title>nodelookupprefix07</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on an Element node with no prefix, which has a namespace + attribute declaration with a namespace prefix in its parent Element node and check if the value of the prefix + returned by using its namespaceURI as a parameter is valid. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="2" interface="NodeList"/> +<lookupPrefix var="prefix" obj="elem" namespaceURI='"http://www.netzero.com"'/> +<assertEquals actual="prefix" expected='"dmstc"' id="nodelookupprefix07" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix08.xml b/test/testcases/tests/level3/core/nodelookupprefix08.xml new file mode 100644 index 0000000..cabca28 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix08.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix08"> +<metadata> +<title>nodelookupprefix08</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on an Element node with no prefix, which has 2 namespace + attribute declarations with and without namespace prefixes and check if the value of the prefix + returned by using each namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="prefix" type="DOMString"/> +<var name="prefixEmpty" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<lookupPrefix var="prefix" obj="elem" namespaceURI='"http://www.usa.com"'/> +<assertEquals actual="prefix" expected='"dmstc"' id="nodelookupprefix08" ignoreCase="false"/> +<lookupPrefix var="prefixEmpty" obj="elem" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertNull actual="prefixEmpty" id="nodelookupnamespaceprefixEmpty08"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix09.xml b/test/testcases/tests/level3/core/nodelookupprefix09.xml new file mode 100644 index 0000000..50bc6af --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix09.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix09"> +<metadata> +<title>nodelookupprefix09</title> +<creator>IBM</creator> +<description> + + + + Invoke lookupPrefix on an Element node with no prefix, whose parent has no prefix and + 2 namespace attribute declarations with and without namespace prefixes and check if the value of + the prefix returned by using each namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="prefix" type="DOMString"/> +<var name="prefixEmpty" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<lookupPrefix var="prefix" obj="elem" namespaceURI='"http://www.usa.com"'/> +<assertEquals actual="prefix" expected='"dmstc"' id="nodelookupprefix09" ignoreCase="false"/> +<lookupPrefix var="prefixEmpty" obj="elem" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertNull actual="prefixEmpty" id="nodelookupprefixEmpty09"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix10.xml b/test/testcases/tests/level3/core/nodelookupprefix10.xml new file mode 100644 index 0000000..72c7381 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix10.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix10"> +<metadata> +<title>nodelookupprefix10</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on a new Child of a new Element node with a namespace URI + and prefix and using the parents namespace URI as an argument, verify if the prefix + returned is a valid prefix of the parent. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="prefix" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createElement var="child" obj="doc" tagName='"br"'/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<lookupPrefix var="prefix" obj="child" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertEquals actual="prefix" expected='"dom3"' id="nodelookupprefix10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix11.xml b/test/testcases/tests/level3/core/nodelookupprefix11.xml new file mode 100644 index 0000000..4a228ce --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix11.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix11"> +<metadata> +<title>nodelookupprefix11</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on an imported new Element node with a namespace URI + and prefix in a new Document and using the parents namespace URI as an argument, verify if the prefix + returned is a valid prefix of the parent. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="elem" type="Element"/> +<var name="importedNode" type="Element"/> +<var name="prefix" type="DOMString"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="qname" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<plus var="qname" op1='"dom3doc:"' op2="rootName"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="qname" doctype="nullDocType"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:br"'/> +<importNode var="importedNode" obj="newDoc" importedNode="elem" deep="true"/> +<lookupPrefix var="prefix" obj="importedNode" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertEquals actual="prefix" expected='"dom3"' id="nodelookupprefix11" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix12.xml b/test/testcases/tests/level3/core/nodelookupprefix12.xml new file mode 100644 index 0000000..edc9e99 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix12.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix12"> +<metadata> +<title>nodelookupprefix12</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on an renamed new Element node with a namespace URI + and prefix in a new Document and using the parents namespace URI as an argument, verify if the prefix + returned is a valid prefix of the parent. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="elem" type="Element"/> +<var name="renamedNode" type="Element"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<renameNode var="renamedNode" obj="doc" n="elem" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"ren:br"'/> +<lookupPrefix var="prefix" obj="renamedNode" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertEquals actual="prefix" expected='"ren"' id="nodelookupprefix12" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix13.xml b/test/testcases/tests/level3/core/nodelookupprefix13.xml new file mode 100644 index 0000000..f3ded0c --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix13.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix13"> +<metadata> +<title>nodelookupprefix13</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on a Element's new Text node, which has a namespace attribute declaration + with a namespace prefix in its parent Element node and check if the value of the prefix + returned by using its namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="prefix" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="bodyList" type="NodeList"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createTextNode var="txt" obj="doc" data='"Text"'/> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="bodyElem" var="appendedChild" newChild="elem"/> +<lookupPrefix var="prefix" obj="txt" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertEquals actual="prefix" expected='"dom3"' id="nodelookupprefix13" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix14.xml b/test/testcases/tests/level3/core/nodelookupprefix14.xml new file mode 100644 index 0000000..12fd72b --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix14.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix14"> +<metadata> +<title>nodelookupprefix14</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on a Element's new CDATA node, which has a namespace attribute declaration + with a namespace prefix in its parent Element node and check if the value of the prefix + returned by using its namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="cdata" type="CDATASection"/> +<var name="prefix" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="bodyList" type="NodeList"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createCDATASection var="cdata" obj="doc" data='"Text"'/> +<appendChild obj="elem" var="appendedChild" newChild="cdata"/> +<appendChild obj="bodyElem" var="appendedChild" newChild="elem"/> +<lookupPrefix var="prefix" obj="cdata" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertEquals actual="prefix" expected='"dom3"' id="nodelookupprefix14" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix15.xml b/test/testcases/tests/level3/core/nodelookupprefix15.xml new file mode 100644 index 0000000..d2bfe1c --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix15.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix15"> +<metadata> +<title>nodelookupprefix15</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on a Element's new Comment node, which has a namespace attribute declaration + with a namespace prefix in its parent Element node and check if the value of the prefix + returned by using its namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="comment" type="Comment"/> +<var name="clonedComment" type="Comment"/> +<var name="prefix" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="bodyList" type="NodeList"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> +<item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createComment var="comment" obj="doc" data='"Text"'/> +<cloneNode var="clonedComment" obj="comment" deep="true"/> +<appendChild obj="elem" var="appendedChild" newChild="clonedComment"/> +<appendChild obj="bodyElem" var="appendedChild" newChild="elem"/> +<lookupPrefix var="prefix" obj="clonedComment" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertEquals actual="prefix" expected='"dom3"' id="nodelookupprefix15" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix16.xml b/test/testcases/tests/level3/core/nodelookupprefix16.xml new file mode 100644 index 0000000..7dbae02 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix16.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix16"> +<metadata> +<title>nodelookupprefix16</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on a new Attribute node with with a namespace URI + and prefix and verify if the prefix returned is null. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="prefix" type="DOMString"/> +<var name="attNode" type="Attr"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<setAttributeNodeNS obj="elem" var="attNode" newAttr="attr"/> +<lookupPrefix var="prefix" obj="attr" namespaceURI='"http://www.w3.org/XML/1998/namespace"'/> +<assertNull actual="prefix" id="nodelookupprefix16"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix17.xml b/test/testcases/tests/level3/core/nodelookupprefix17.xml new file mode 100644 index 0000000..a8b7847 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix17.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix17"> +<metadata> +<title>nodelookupprefix17</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on the title attribute node of the acronym node with + a namespaceURI and a node prefix and check if the value of the prefix returned by + using its namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="2" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"xsi:noNamespaceSchemaLocation"'/> +<lookupPrefix var="prefix" obj="attr" namespaceURI='"http://www.netzero.com"'/> +<assertEquals actual="prefix" expected='"dmstc"' id="nodelookupprefix17" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix18.xml b/test/testcases/tests/level3/core/nodelookupprefix18.xml new file mode 100644 index 0000000..b0a99e8 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix18.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix18"> +<metadata> +<title>nodelookupprefix18</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on the default attribute node of the p node with + a namespaceURI and a node prefix and check if the value of the prefix returned by + using its namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"dir"'/> +<lookupPrefix var="prefix" obj="attr" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertNull actual="prefix" id="xhtmlPrefixIsNull"/> +<lookupPrefix var="prefix" obj="attr" namespaceURI='"http://www.altavista.com"'/> +<assertEquals actual="prefix" expected='"nm"' id="nodelookupprefixB18" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix19.xml b/test/testcases/tests/level3/core/nodelookupprefix19.xml new file mode 100644 index 0000000..4ebec7d --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix19.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix19"> +<metadata> +<title>nodelookupprefix19</title> +<creator>IBM</creator> +<description> + Invoke lookupPrefix on the an attribute node without a namespace prefix of + an Element node that has a namespaceURI and prefix, and check if the value of the prefix + returned by using the Elements namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="barfoo_nodefaultns" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"html:p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"class"'/> +<lookupPrefix var="prefix" obj="attr" namespaceURI='"http://www.w3.org/1999/xhtml"'/> +<assertEquals actual="prefix" expected='"html"' id="nodelookupprefix19" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodelookupprefix20.xml b/test/testcases/tests/level3/core/nodelookupprefix20.xml new file mode 100644 index 0000000..28bec79 --- /dev/null +++ b/test/testcases/tests/level3/core/nodelookupprefix20.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodelookupprefix20"> +<metadata> +<title>nodelookupprefix20</title> +<creator>IBM</creator> +<description> + + + + Invoke lookupPrefix on the an attribute node without a namespace prefix of + an Element node that has a namespaceURI and prefix, and check if the value of the prefix + returned by using the Elements namespaceURI as a parameter is valid. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="attributesMap" type="NamedNodeMap"/> +<var name="attr" type="Attr"/> +<var name="prefix" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<attributes var="attributesMap" obj="elem"/> +<getNamedItem var="attr" obj="attributesMap" name='"xmlns:nm"'/> +<lookupPrefix var="prefix" obj="attr" namespaceURI='"http://www.altavista.com"'/> +<assertEquals actual="prefix" expected='"nm"' id="nodelookupprefix20" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild01.xml b/test/testcases/tests/level3/core/noderemovechild01.xml new file mode 100644 index 0000000..1f6c1ef --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild01"> +<metadata> +<title>noderemovechild01</title> +<creator>IBM</creator> +<description> + + + + Using removeChild on this Document node attempt to remove this Document node and + verify if a NOT_FOUND_ERR error is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<assertDOMException id="NOT_FOUND_ERR_noderemovechild01"> +<NOT_FOUND_ERR> +<removeChild obj="doc" var="removed" oldChild="doc" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild02.xml b/test/testcases/tests/level3/core/noderemovechild02.xml new file mode 100644 index 0000000..3043b08 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild02.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild02"> +<metadata> +<title>noderemovechild02</title> +<creator>IBM</creator> +<description> + Using removeChild on this Document node attempt to remove a new Document node and + vice versa and verify if a NOT_FOUND_ERR error is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="removed" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<assertDOMException id="throw_NOT_FOUND_ERR_1"> +<NOT_FOUND_ERR> +<removeChild obj="doc" var="removed" oldChild="newDoc" /> +</NOT_FOUND_ERR> +</assertDOMException> +<assertDOMException id="throw_NOT_FOUND_ERR_2"> +<NOT_FOUND_ERR> +<removeChild obj="newDoc" var="removed" oldChild="doc" /> +</NOT_FOUND_ERR> +</assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild03.xml b/test/testcases/tests/level3/core/noderemovechild03.xml new file mode 100644 index 0000000..a146720 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild03.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild03"> +<metadata> +<title>noderemovechild03</title> +<creator>IBM</creator> +<description> + Using removeChild on this DocumentElement node attempt to remove this Document node and + verify if the DocumentElement is null. Now try the reverse and a NOT_FOUND_ERR should be + thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="removedChild" type="Element"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<removeChild obj="doc" var="removed" oldChild="docElem" /> +<documentElement var="removedChild" obj="doc"/> +<assertNull actual="removedChild" id="noderemovechild03"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<removeChild obj="docElem" var="removed" oldChild="doc" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild04.xml b/test/testcases/tests/level3/core/noderemovechild04.xml new file mode 100644 index 0000000..95ad267 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild04.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild04"> +<metadata> +<title>noderemovechild04</title> +<creator>IBM</creator> +<description> + + + + Using removeChild on this Document node attempt to remove DocumentType node and + verify if the DocumentType node is null. Now try the reverse and a NOT_FOUND_ERR should be + thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="removedDocType" type="DocumentType"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<removeChild obj="doc" var="removed" oldChild="docType" /> +<doctype var="removedDocType" obj="doc"/> +<assertNull actual="removedDocType" id="noderemovechild04"/> +<assertDOMException id="NOT_FOUND_ERR_noderemovechild04"> +<NOT_FOUND_ERR> +<removeChild obj="docType" var="removed" oldChild="doc" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild05.xml b/test/testcases/tests/level3/core/noderemovechild05.xml new file mode 100644 index 0000000..46fe651 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild05.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild05"> +<metadata> +<title>noderemovechild05</title> +<creator>IBM</creator> +<description> + Using removeChild on this Document node attempt to remove a new DocumentType node and + verify if the DocumentType node is null. Attempting to remove the DocumentType + a second type should result in a NOT_FOUND_ERR. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=417"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType"/> +<var name="removedDocType" type="DocumentType"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="appendedChild" type="Node"/> +<var name="removedChild" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<!-- An implemention may not support removing doctype --> +<try> + <removeChild obj="doc" var="removedChild" oldChild="docType" /> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<assertNotNull actual="removedChild" id="removedChildNotNull"/> + +<doctype var="removedDocType" obj="doc"/> +<assertNull actual="removedDocType" id="noderemovechild05"/> + +<assertDOMException id="NOT_FOUND_ERR_noderemovechild05"> +<NOT_FOUND_ERR> +<removeChild obj="docType" var="removedChild" oldChild="doc" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild07.xml b/test/testcases/tests/level3/core/noderemovechild07.xml new file mode 100644 index 0000000..a9dfec5 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild07.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild07"> +<metadata> +<title>noderemovechild07</title> +<creator>IBM</creator> +<description> +Attempts to remove a notation from a Document node. Since notations are children of +DocumentType, not Document the operation should fail with a NOT_FOUND_ERR. Attempting +to remove Document from a Notation should also fail either with a NOT_FOUND_ERR +or a NO_MODIFICATION_ALLOWED_ERR. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=418"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="notations" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="removedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<notations var="notations" obj="docType"/> +<getNamedItem var="notation" obj="notations" name='"notation1"'/> +<assertDOMException id="NOT_FOUND_ERR_noderemovechild07_1"> +<NOT_FOUND_ERR> +<removeChild obj="doc" var="removedChild" oldChild="notation" /> +</NOT_FOUND_ERR> +</assertDOMException> +<try> + <removeChild obj="notation" var="removedChild" oldChild="doc" /> + <catch> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="NO_MODIFICATION_ALLOWED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild08.xml b/test/testcases/tests/level3/core/noderemovechild08.xml new file mode 100644 index 0000000..132b2ea --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild08.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild08"> +<metadata> +<title>noderemovechild08</title> +<creator>IBM</creator> +<description> + + + + Using removeChild on this Document node attempt to remove a new Comment node and + verify the data of the removed comment node.. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="comment" type="Comment"/> +<var name="removedCmt" type="Comment"/> +<var name="data" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createComment var="comment" obj="doc" data='"Comment"'/> +<appendChild obj="doc" var="appendedChild" newChild="comment"/> +<removeChild var="removedCmt" obj="doc" oldChild="comment" /> +<data var="data" obj="removedCmt" interface="CharacterData"/> +<assertEquals actual="data" expected='"Comment"' id="noderemovechild08" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild09.xml b/test/testcases/tests/level3/core/noderemovechild09.xml new file mode 100644 index 0000000..c7f5cfa --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild09.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild09"> +<metadata> +<title>noderemovechild09</title> +<creator>IBM</creator> +<description> + + + + Using removeChild on this Document node attempt to remove a new ProcessingInstruction node and + verify the target of the removed ProcessingInstruction node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="removedPi" type="ProcessingInstruction"/> +<var name="target" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createProcessingInstruction var="pi" obj="doc" data='"PID"' target='"PIT"'/> +<appendChild obj="doc" var="appendedChild" newChild="pi"/> +<removeChild var="removedPi" obj="doc" oldChild="pi" /> +<target var="target" obj="removedPi" interface="ProcessingInstruction"/> +<assertEquals actual="target" expected='"PIT"' id="noderemovechild09" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild10.xml b/test/testcases/tests/level3/core/noderemovechild10.xml new file mode 100644 index 0000000..c4d420f --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild10.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild10"> +<metadata> +<title>noderemovechild10</title> +<creator>IBM</creator> +<description> + Using removeChild on a new DocumentFragment node attempt to remove a new Element node and + verify the name of the removed Element node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="elem" type="Element"/> +<var name="removedElem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="removedChild" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:br"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<removeChild var="removedElem" obj="docFrag" oldChild="elem" /> +<nodeName var="elemName" obj="removedElem"/> +<assertEquals actual="elemName" expected='"dom3:br"' id="noderemovechild10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild11.xml b/test/testcases/tests/level3/core/noderemovechild11.xml new file mode 100644 index 0000000..e96a75d --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild11.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild11"> +<metadata> +<title>noderemovechild11</title> +<creator>IBM</creator> +<description> + + + + Using removeChild on a new DocumentFragment node attempt to remove a new Text node and + verify the name of the removed Element node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="txt" type="Text"/> +<var name="removedTxt" type="Text"/> +<var name="appendedChild" type="Node"/> +<var name="removedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createTextNode var="txt" obj="doc" data='"TEXT"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="txt"/> +<removeChild obj="docFrag" var="removedChild" oldChild="txt" /> +<firstChild var="removedTxt" obj="docFrag" interface="Node"/> +<assertNull actual="removedTxt" id="noderemovechild11"/> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild12.xml b/test/testcases/tests/level3/core/noderemovechild12.xml new file mode 100644 index 0000000..ccdf06f --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild12.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild12"> +<metadata> +<title>noderemovechild12</title> +<creator>IBM</creator> +<description> + The method removeChild removes the child node indicated by oldChild from the list + of children, and returns it. + + Using removeChild on a new DocumentFragment node attempt to remove a new EntityReference node. + Also attempt to remove the document fragment node from the EntityReference. Verify that a + NO_MODIFICATION_ALLOWED_ERR (EntityReference node is read-only) or a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="eRef" type="EntityReference"/> +<var name="removedERef" type="EntityReference"/> +<var name="appendedChild" type="Node"/> +<var name="removedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createEntityReference var="eRef" obj="doc" name='"ent1"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="eRef"/> +<removeChild obj="docFrag" var="removedChild" oldChild="eRef" /> +<firstChild var="removedERef" obj="docFrag" interface="Node"/> +<assertNull actual="removedERef" id="noderemovechild12"/> +<try> + <removeChild obj="eRef" var="removedChild" oldChild="docFrag" /> + <catch> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="NO_MODIFICATION_ALLOWED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild13.xml b/test/testcases/tests/level3/core/noderemovechild13.xml new file mode 100644 index 0000000..d21c737 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild13.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild13"> +<metadata> +<title>noderemovechild13</title> +<creator>IBM</creator> +<description> + Using removeChild on a new EntityReference node attempt to remove the first child + of this node and verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="txt" type="Text"/> +<var name="eRef" type="EntityReference"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createEntityReference var="eRef" obj="doc" name='"alpha"'/> +<firstChild obj="eRef" var="txt" interface="Node"/> +<assertNotNull actual="txt" id="txtNotNull"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild obj="eRef" var="removed" oldChild="txt" /> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild14.xml b/test/testcases/tests/level3/core/noderemovechild14.xml new file mode 100644 index 0000000..131aadb --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild14.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild14"> +<metadata> +<title>noderemovechild14</title> +<creator>IBM</creator> +<description> + Using removeChild on a new EntityReference node attempt to remove its last ProcessingInstruction + child node and verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="removed" type="Node"/> +<var name="eRef" type="EntityReference"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="entName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createEntityReference var="eRef" obj="doc" name='"ent4"'/> +<lastChild obj="eRef" var="pi" interface="Node"/> +<assertNotNull actual="pi" id="piNotNull"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild obj="eRef" var="removed" oldChild="pi" /> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild15.xml b/test/testcases/tests/level3/core/noderemovechild15.xml new file mode 100644 index 0000000..2e2f941 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild15.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild15"> +<metadata> +<title>noderemovechild15</title> +<creator>IBM</creator> +<description> + Using removeChild on a new EntityReference node attempt to remove an Element child + and verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="eRef" type="EntityReference"/> +<var name="elem" type="Element"/> +<var name="entName" type="DOMString"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createEntityReference var="eRef" obj="doc" name='"ent4"'/> +<firstChild obj="eRef" var="elem" interface="Node"/> +<assertNotNull actual="elem" id="elemNotNull"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild obj="eRef" var="removed" oldChild="elem" /> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild16.xml b/test/testcases/tests/level3/core/noderemovechild16.xml new file mode 100644 index 0000000..aec060a --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild16.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild16"> +<metadata> +<title>noderemovechild16</title> +<creator>IBM</creator> +<description> + Using removeChild on the first 'p' Element node attempt to remove its 'em' + Element child and verify the name of the returned node that was removed. Now attempt + the reverse and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<implementationAttribute name="ignoringElementContentWhitespace" value="true"/> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="childList" type="NodeList"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="removed" type="Element"/> +<var name="removedName" type="DOMString"/> +<var name="removedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"em"' interface="Document"/> +<item var="child" obj="parentList" index="0" interface="NodeList"/> +<parentNode var="parent" obj="child" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeName obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"em"' id="noderemovechild16" ignoreCase="false"/> +<assertDOMException id="NOT_FOUND_ERR_noderemovechild16"> +<NOT_FOUND_ERR> +<removeChild obj="child" var="removedNode" oldChild="parent" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild17.xml b/test/testcases/tests/level3/core/noderemovechild17.xml new file mode 100644 index 0000000..3e7a719 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild17.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild17"> +<metadata> +<title>noderemovechild17</title> +<creator>IBM</creator> +<description> + Using removeChild on the first 'p' Element node attempt to remove a Text + node child and verify the contents of the returned node that was removed. Now attempt + the reverse and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="parent" type="Element"/> +<var name="child" type="Text"/> +<var name="removed" type="Text"/> +<var name="removedValue" type="DOMString"/> +<var name="removedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"em"' interface="Document"/> +<item var="parent" obj="parentList" index="0" interface="NodeList"/> +<firstChild var="child" obj="parent" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeValue obj="removed" var="removedValue"/> +<assertEquals actual="removedValue" expected='"EMP0001"' id="noderemovechild17" ignoreCase="false"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<removeChild obj="child" var="removedNode" oldChild="parent" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild18.xml b/test/testcases/tests/level3/core/noderemovechild18.xml new file mode 100644 index 0000000..f3a03e5 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild18.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild18"> +<metadata> +<title>noderemovechild18</title> +<creator>IBM</creator> +<description> + + + + Using removeChild on the first 'p' Element node attempt to remove a CDATASection + node child and verify the contents of the returned node that was removed. Now attempt + the reverse and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="parent" type="Element"/> +<var name="child" type="CDATASection"/> +<var name="removed" type="CDATASection"/> +<var name="removedValue" type="DOMString"/> +<var name="removedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"strong"' interface="Document" /> +<item var="parent" obj="parentList" index="1" interface="NodeList"/> +<lastChild var="child" obj="parent" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeValue obj="removed" var="removedValue"/> +<assertEquals actual="removedValue" expected='"This is an adjacent CDATASection with a reference to a tab &tab;"' id="noderemovechild18" ignoreCase="false"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<removeChild obj="child" var="removedNode" oldChild="parent" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild19.xml b/test/testcases/tests/level3/core/noderemovechild19.xml new file mode 100644 index 0000000..46e6d6a --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild19.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild19"> +<metadata> +<title>noderemovechild19</title> +<creator>IBM</creator> +<description> + Using removeChild on the first 'p' Element node attempt to remove a EntityReference + node child and verify the nodeName of the returned node that was removed. Attempt + to remove a non-child from an entity reference and expect either a NOT_FOUND_ERR or + a NO_MODIFICATION_ALLOWED_ERR. Renove a child from an entity reference and expect + a NO_MODIFICATION_ALLOWED_ERR. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="parent" type="Element"/> +<var name="child" type="EntityReference"/> +<var name="removed" type="EntityReference"/> +<var name="removedName" type="DOMString"/> +<var name="removedNode" type="Node"/> +<var name="entRefChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="parent" obj="parentList" index="1" interface="NodeList"/> +<firstChild var="child" obj="parent" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeName obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"beta"' id="noderemovechild19" ignoreCase="false"/> +<!-- + Remove a non-member of the entity reference, + expect either a NO_MODIFICATION_ALLOWED_ERR or a NOT_FOUND_ERR +--> +<try> + <removeChild obj="child" var="removedNode" oldChild="parent" /> + <fail id="throw_DOMException"/> + <catch> + <DOMException code="NO_MODIFICATION_ALLOWED_ERR"/> + <DOMException code="NOT_FOUND_ERR"/> + </catch> +</try> +<!-- +Remove a child of the entity reference + Expect a NO_MODIFICATION_ALLOWED_ERR exception +--> +<firstChild var="entRefChild" obj="child" interface="Node"/> +<if> + <!-- entity may not be resolved if validating is false --> + <notNull obj="entRefChild"/> + <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild obj="child" var="removedNode" oldChild="entRefChild"/> + </NO_MODIFICATION_ALLOWED_ERR> + </assertDOMException> +</if> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild20.xml b/test/testcases/tests/level3/core/noderemovechild20.xml new file mode 100644 index 0000000..14bcc8e --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild20.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild20"> +<metadata> +<title>noderemovechild20</title> +<creator>IBM</creator> +<description> + Using removeChild on the first 'p' Element node attempt to remove a new + Element child and verify the name of the returned node that was removed. Now attempt + to do the same on a cloned child and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="childList" type="NodeList"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="clonedChild" type="Element"/> +<var name="removed" type="Element"/> +<var name="removedName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="removedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"p"' interface="Document"/> +<item var="parent" obj="parentList" index="0" interface="NodeList"/> +<createElementNS var="child" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:br"'/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeName obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"dom3:br"' id="noderemovechild20" ignoreCase="false"/> +<cloneNode var="clonedChild" obj="child" deep="true"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> + <NOT_FOUND_ERR> + <removeChild obj="parent" var="removedNode" oldChild="clonedChild" /> + </NOT_FOUND_ERR> + </assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild21.xml b/test/testcases/tests/level3/core/noderemovechild21.xml new file mode 100644 index 0000000..0d08e14 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild21.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild21"> +<metadata> +<title>noderemovechild21</title> +<creator>IBM</creator> +<description> + Using removeChild on a new Element node attempt to remove a new Element child + and verify the name of the returned node that was removed. Now append the parent + to the documentElement and attempt to remove the child using removeChild on the + documentElement and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="parent" type="Element"/> +<var name="child" type="Element"/> +<var name="removed" type="Element"/> +<var name="removedName" type="DOMString"/> +<var name="removedNode" type="Node"/> +<var name="appendedChild" type="Node"/> + +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createElementNS var="child" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:br"'/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<appendChild obj="docElem" var="appendedChild" newChild="parent"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeName obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"dom3:br"' id="noderemovechild21" ignoreCase="false"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> + <NOT_FOUND_ERR> + <removeChild obj="docElem" var="removedNode" oldChild="child" /> + </NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild22.xml b/test/testcases/tests/level3/core/noderemovechild22.xml new file mode 100644 index 0000000..e856a0e --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild22.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild22"> +<metadata> +<title>noderemovechild22</title> +<creator>IBM</creator> +<description> + Using removeChild on a new Element node attempt to remove a new Comment child + and verify the name of the rturned node that was removed. Now to remove the child + using removeChild on the parent and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parent" type="Element"/> +<var name="child" type="Comment"/> +<var name="removed" type="Comment"/> +<var name="removedName" type="DOMString"/> +<var name="removedNode" type="Node"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createComment var="child" obj="doc" data='"DATA"' /> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeValue obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"DATA"' id="noderemovechild22" ignoreCase="false"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> + <NOT_FOUND_ERR> + <removeChild obj="parent" var="removedNode" oldChild="child" /> + </NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild23.xml b/test/testcases/tests/level3/core/noderemovechild23.xml new file mode 100644 index 0000000..35291b6 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild23.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild23"> +<metadata> +<title>noderemovechild23</title> +<creator>IBM</creator> +<description> + Using removeChild on a new Element node attempt to remove a new ProcessingInstruction child + and verify the name of the returned node that was removed. Now to remove the child + using removeChild on the parent and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parent" type="Element"/> +<var name="child" type="ProcessingInstruction"/> +<var name="removed" type="ProcessingInstruction"/> +<var name="removedName" type="DOMString"/> +<var name="removedNode" type="Node"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createProcessingInstruction var="child" obj="doc" data='"DATA"' target='"TARGET"'/> +<appendChild obj="parent" var="appendedChild" newChild="child"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<target obj="removed" var="removedName" interface="ProcessingInstruction"/> +<assertEquals actual="removedName" expected='"TARGET"' id="noderemovechild23" ignoreCase="false"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> + <NOT_FOUND_ERR> + <removeChild obj="parent" var="removedNode" oldChild="child" /> + </NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild24.xml b/test/testcases/tests/level3/core/noderemovechild24.xml new file mode 100644 index 0000000..5ca9395 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild24.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild24"> +<metadata> +<title>noderemovechild24</title> +<creator>IBM</creator> +<description> + Using removeChild on an Entity node attempt to remove a Text child + and verify if a NO_MODIFICATION_ALLOWED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="alphaEntity" type="Entity"/> +<var name="alphaText" type="Text"/> +<var name="removed" type="Text"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="alphaEntity" obj="entitiesMap" name='"alpha"' interface="NamedNodeMap"/> +<assertNotNull actual="alphaEntity" id="alphaEntityNotNull"/> +<firstChild var="alphaText" obj="alphaEntity" interface="Node"/> +<assertNotNull actual="alphaText" id="alphaTextNotNull"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild var="removed" obj="alphaEntity" oldChild="alphaText" /> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild25.xml b/test/testcases/tests/level3/core/noderemovechild25.xml new file mode 100644 index 0000000..00e9eab --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild25.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild25"> +<metadata> +<title>noderemovechild25</title> +<creator>IBM</creator> +<description> + Using removeChild on an Entity node attempt to remove an Element child + and verify if a NO_MODIFICATION_ALLOWED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="ent4" type="Entity"/> +<var name="span" type="Element"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="ent4" interface="NamedNodeMap" obj="entitiesMap" name='"ent4"'/> +<assertNotNull actual="ent4" id="ent4NotNull"/> +<firstChild var="span" obj="ent4" interface="Node"/> +<assertNotNull actual="span" id="spanNotNull"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild obj="ent4" var="removed" oldChild="span" /> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild26.xml b/test/testcases/tests/level3/core/noderemovechild26.xml new file mode 100644 index 0000000..ba03eb5 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild26.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild26"> +<metadata> +<title>noderemovechild26</title> +<creator>IBM</creator> +<description> + Using removeChild on an Entity node attempt to remove a ProcessingInstruction child + and verify if a NO_MODIFICATION_ALLOWED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="ent4" type="Entity"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<getNamedItem var="ent4" interface="NamedNodeMap" obj="entitiesMap" name='"ent4"'/> +<assertNotNull actual="ent4" id="ent4NotNull"/> +<lastChild var="pi" obj="ent4" interface="Node"/> +<assertNotNull actual="pi" id="piNotNull"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild obj="ent4" var="removed" oldChild="pi" /> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild27.xml b/test/testcases/tests/level3/core/noderemovechild27.xml new file mode 100644 index 0000000..180e03d --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild27.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild27"> +<metadata> +<title>noderemovechild27</title> +<creator>IBM</creator> +<description> + The method removeChild removes the child node indicated by oldChild from the list + of children, and returns it. + + Using removeChild on a Notation node attempt to remove an Entity node + and verify if a NO_MODIFICATION_ALLOWED_ERR or a NOT_FOUND_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="child" type="Entity"/> +<var name="parent" type="Notation"/> +<var name="removed" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<entities var="entitiesMap" obj="docType"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="child" interface="NamedNodeMap" obj="entitiesMap" name='"ent1"'/> +<getNamedItem var="parent" interface="NamedNodeMap" obj="notationsMap" name='"notation1"'/> +<try> + <removeChild obj="parent" var="removed" oldChild="child" /> + <catch> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="NO_MODIFICATION_ALLOWED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild28.xml b/test/testcases/tests/level3/core/noderemovechild28.xml new file mode 100644 index 0000000..bada2b1 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild28.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild28"> +<metadata> +<title>noderemovechild28</title> +<creator>IBM</creator> +<description> + Using removeChild on an Attribute node attempt to remove its Text child node and + and verify the name of the returned node that was removed. Now attempt the reverse + and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="attrsMap" type="NamedNodeMap"/> +<var name="parent" type="Attr"/> +<var name="child" type="Text"/> +<var name="elem" type="Element"/> +<var name="removed" type="Text"/> +<var name="removedName" type="DOMString"/> +<var name="removedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="parentList" index="0" interface="NodeList"/> +<attributes var="attrsMap" obj="elem"/> +<getNamedItem var="parent" obj="attrsMap" name='"xsi:noNamespaceSchemaLocation"'/> +<firstChild var="child" obj="parent" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeValue obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"Yes"' id="noderemovechild28" ignoreCase="false"/> +<assertDOMException id="NOT_FOUND_ERR_noderemovechild28"> +<NOT_FOUND_ERR> +<removeChild obj="child" var="removedNode" oldChild="parent" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild29.xml b/test/testcases/tests/level3/core/noderemovechild29.xml new file mode 100644 index 0000000..a0a30ed --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild29.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild29"> +<metadata> +<title>noderemovechild29</title> +<creator>IBM</creator> +<description> + Using removeChild on a namespace Attribute node attempt to remove its Text child node and + and verify the name of the returned node that was removed. Now attempt the reverse + and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="attrsMap" type="NamedNodeMap"/> +<var name="parent" type="Attr"/> +<var name="child" type="Text"/> +<var name="elem" type="Element"/> +<var name="removed" type="Text"/> +<var name="removedName" type="DOMString"/> +<var name="removedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="parentList" index="0" interface="NodeList"/> +<attributes var="attrsMap" obj="elem"/> +<getNamedItem var="parent" obj="attrsMap" name='"xmlns:dmstc"'/> +<firstChild var="child" obj="parent" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeValue obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"http://www.usa.com"' id="noderemovechild29" ignoreCase="false"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<removeChild obj="child" var="removedNode" oldChild="parent" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild30.xml b/test/testcases/tests/level3/core/noderemovechild30.xml new file mode 100644 index 0000000..dbd8064 --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild30.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild30"> +<metadata> +<title>noderemovechild30</title> +<creator>IBM</creator> +<description> + + + + Using removeChild on a default Attribute node attempt to remove its Text child node and + and verify the name of the returned node that was removed. Now attempt the reverse + and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="attrsMap" type="NamedNodeMap"/> +<var name="parent" type="Attr"/> +<var name="child" type="Text"/> +<var name="elem" type="Element"/> +<var name="removed" type="Text"/> +<var name="removedNode" type="Node"/> +<var name="removedName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="parentList" index="3" interface="NodeList"/> +<attributes var="attrsMap" obj="elem"/> +<getNamedItem var="parent" obj="attrsMap" name='"dir"'/> +<firstChild var="child" obj="parent" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeValue obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"rtl"' id="noderemovechild30" ignoreCase="false"/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<removeChild obj="child" var="removedNode" oldChild="parent" /> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/noderemovechild31.xml b/test/testcases/tests/level3/core/noderemovechild31.xml new file mode 100644 index 0000000..99e533d --- /dev/null +++ b/test/testcases/tests/level3/core/noderemovechild31.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild31"> +<metadata> +<title>noderemovechild31</title> +<creator>IBM</creator> +<description> + Using removeChild on a default Attribute node attempt to remove its EntityReference child node and + and verify the name of the returned node that was removed. Now attempt the reverse + and verify if a NO_MODIFICATION_ALLOWED_ERR or NOT_FOUND_ERR is thrown. + Then remove an child of the entity reference and expect a NO_MODIFICATION_ALLOWED_ERR. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="parentList" type="NodeList"/> +<var name="attrsMap" type="NamedNodeMap"/> +<var name="parent" type="Attr"/> +<var name="child" type="EntityReference"/> +<var name="entRef" type="EntityReference"/> +<var name="elem" type="Element"/> +<var name="removed" type="EntityReference"/> +<var name="removedNode" type="Node"/> +<var name="removedName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="entRefChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="parentList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="parentList" index="3" interface="NodeList"/> +<attributes var="attrsMap" obj="elem"/> +<getNamedItem var="parent" obj="attrsMap" name='"class"'/> +<createEntityReference var="entRef" obj="doc" name='"delta"'/> +<appendChild obj="parent" var="appendedChild" newChild="entRef"/> +<lastChild var="child" obj="parent" interface="Node"/> +<removeChild var="removed" obj="parent" oldChild="child" /> +<nodeName obj="removed" var="removedName"/> +<assertEquals actual="removedName" expected='"delta"' id="noderemovechild31" ignoreCase="false"/> +<!-- +Remove a non-child from an entity reference +Should throw either a NO_MODIFICATION_ALLOWED_ERR or a NOT_FOUND_ERR +--> +<try> + <removeChild obj="child" var="removedNode" oldChild="parent" /> + <fail id="throw_DOMException"/> + <catch> + <DOMException code="NO_MODIFICATION_ALLOWED_ERR"/> + <DOMException code="NOT_FOUND_ERR"/> + </catch> +</try> +<!-- +Remove a child of the entity reference + Expect a NO_MODIFICATION_ALLOWED_ERR exception +--> +<firstChild var="entRefChild" obj="child" interface="Node"/> +<if> + <!-- entity may not be resolved if validating is false --> + <notNull obj="entRefChild"/> + <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <removeChild obj="child" var="removedNode" oldChild="entRefChild"/> + </NO_MODIFICATION_ALLOWED_ERR> + </assertDOMException> +</if> + +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild01.xml b/test/testcases/tests/level3/core/nodereplacechild01.xml new file mode 100644 index 0000000..5232835 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild01.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild01"> +<metadata> +<title>nodereplacechild01</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + + Using replaceChild on this Document node attempt to replace this Document node with itself + and verify if a HIERARCHY_REQUEST_ERR error or a NOT_FOUND_ERR (since oldChild + is not a child of this node) is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<try> + <replaceChild obj="doc" var="replaced" oldChild="doc" newChild="doc"/> + <catch> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild02.xml b/test/testcases/tests/level3/core/nodereplacechild02.xml new file mode 100644 index 0000000..60d506b --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild02.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild02"> +<metadata> +<title>nodereplacechild02</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on this Document node attempt to replace this DocumentType node with + its DocumentType (replacing node with itself -- implementation dependent) + </description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc"/> +<replaceChild obj="doc" var="replaced" oldChild="docType" newChild="docType"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild03.xml b/test/testcases/tests/level3/core/nodereplacechild03.xml new file mode 100644 index 0000000..c77b190 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild03.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild03"> +<metadata> +<title>nodereplacechild03</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on this Document node attempt to replace this Document node with + a new DocumentNode and verify if a HIERARCHY_REQUEST_ERR, WRONG_DOCUMENT_ERR + or NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='"http://www.w3.org/DOM"' qualifiedName='"dom3:doc"' doctype="nullDocType"/> +<try> + <replaceChild obj="doc" var="replaced" oldChild="doc" newChild="newDoc"/> + <catch> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="WRONG_DOCUMENT_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild04.xml b/test/testcases/tests/level3/core/nodereplacechild04.xml new file mode 100644 index 0000000..908d6a3 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild04.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild04"> +<metadata> +<title>nodereplacechild04</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on this Document node attempt to replace this DocumentElement node with + this Document Node and verify if a HIERARCHY_REQUEST_ERR or a NOT_FOUND_ERR error is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<documentElement var="docElem" obj="doc"/> +<try> + <replaceChild obj="doc" var="replaced" oldChild="docElem" newChild="doc"/> + <catch> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild06.xml b/test/testcases/tests/level3/core/nodereplacechild06.xml new file mode 100644 index 0000000..8bda09a --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild06.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild06"> +<metadata> +<title>nodereplacechild06</title> +<creator>IBM</creator> +<description> + Using replaceChild on this Document node attempt to replace this DocumentElement node + with one of its child elements and verify if the name of the replaced documentElement Node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="replaced" type="Element"/> +<var name="elem" type="Element"/> +<var name="childList" type="NodeList"/> +<var name="nodeName" type="DOMString"/> +<var name="replacedNode" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="childList" index="0" interface="NodeList"/> +<try> + <replaceChild obj="doc" var="replacedNode" oldChild="docElem" newChild="elem"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<documentElement var="replaced" obj="doc"/> +<nodeName obj="replaced" var="nodeName"/> +<assertEquals actual="nodeName" expected='"p"' id="nodereplacechild06" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild07.xml b/test/testcases/tests/level3/core/nodereplacechild07.xml new file mode 100644 index 0000000..8f74c07 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild07.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild07"> +<metadata> +<title>nodereplacechild07</title> +<creator>IBM</creator> +<description> + Using replaceChild on this Document node attempt to replace this DocumentElement node + with a new element and verify if the name of the replaced documentElement Node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="replaced" type="Element"/> +<var name="elem" type="Element"/> +<var name="nodeName" type="DOMString"/> +<var name="replacedNode" type="Node"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<createElementNS var="elem" obj="doc" namespaceURI='rootNS' qualifiedName='rootName'/> +<try> + <replaceChild obj="doc" var="replacedNode" oldChild="docElem" newChild="elem"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<documentElement var="replaced" obj="doc"/> +<nodeName obj="replaced" var="nodeName"/> +<assertEquals actual="nodeName" expected='rootName' id="nodereplacechild07" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild08.xml b/test/testcases/tests/level3/core/nodereplacechild08.xml new file mode 100644 index 0000000..51a0550 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild08.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild08"> +<metadata> +<title>nodereplacechild08</title> +<creator>IBM</creator> +<description> + Using replaceChild on this Document node attempt to replace this DocumentElement node + with a new element that was created in another document and verify if a + WRONG_DOCUMENT_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="doc2" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="nodeName" type="DOMString"/> +<var name="replaced" type="Node"/> +<var name="rootNS" type="DOMString"/> +<var name="rootName" type="DOMString"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<implementation var="domImpl"/> +<createDocument var="doc2" obj="domImpl" namespaceURI="rootNS" qualifiedName="rootName" doctype="nullDocType"/> +<createElementNS var="elem" obj="doc2" namespaceURI='rootNS' qualifiedName='rootName'/> +<try> + <replaceChild obj="doc" var="replaced" oldChild="docElem" newChild="elem"/> + <fail id="throw_WRONG_DOCUMENT_OR_NOT_SUPPORTED"/> + <catch> + <DOMException code="WRONG_DOCUMENT_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild10.xml b/test/testcases/tests/level3/core/nodereplacechild10.xml new file mode 100644 index 0000000..818e226 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild10.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild10"> +<metadata> +<title>nodereplacechild10</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on this Document node attempt to replace an Entity node with + a notation node of retieved from the DTD of another document and verify if a + NOT_FOUND_ERR or WRONG_DOCUMENT_ERR or HIERARCHY_REQUEST err is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="ent" type="Entity"/> +<var name="doc1" type="Document"/> +<var name="docType1" type="DocumentType"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc" /> +<entities var="entitiesMap" obj="docType" /> +<getNamedItem var="ent" obj="entitiesMap" name='"alpha"'/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<doctype var="docType1" obj="doc1" /> +<notations var="notationsMap" obj="docType1" /> +<getNamedItem var="notation" obj="notationsMap" name='"notation1"'/> +<try> + <replaceChild obj="doc" var="replaced" oldChild="ent" newChild="notation"/> + <catch> + <DOMException code="NOT_FOUND_ERR"/> + <DOMException code="WRONG_DOCUMENT_ERR"/> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild12.xml b/test/testcases/tests/level3/core/nodereplacechild12.xml new file mode 100644 index 0000000..db65ea1 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild12.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild12"> +<metadata> +<title>nodereplacechild12</title> +<creator>IBM</creator> +<description> + Using replaceChild on this Document node, attempt to replace a new ProcessingInstruction + node with new Comment node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=416"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="replaced" type="Node"/> +<var name="comment" type="Comment"/> +<var name="lastChild" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="replacedNode" type="Node"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<createComment var="comment" obj="doc" data='"dom3:doc"'/> +<createProcessingInstruction var="pi" obj="doc" target='"PITarget"' data='"PIData"'/> +<appendChild obj="doc" var="appendedChild" newChild="comment"/> +<appendChild obj="doc" var="appendedChild" newChild="pi"/> +<replaceChild obj="doc" var="replacedNode" oldChild="pi" newChild="comment"/> +<assertNotNull actual="replacedNode" id="returnValueNotNull"/> +<nodeName var="nodeName" obj="replacedNode"/> +<assertEquals actual="nodeName" expected='"PITarget"' id="returnValueIsPI" ignoreCase="false"/> +<lastChild var="lastChild" obj="doc" interface="Node"/> +<assertNotNull actual="lastChild" id="lastChildNotNull"/> +<nodeName var="nodeName" obj="lastChild"/> +<assertEquals actual="nodeName" expected='"#comment"' id="lastChildIsComment" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild13.xml b/test/testcases/tests/level3/core/nodereplacechild13.xml new file mode 100644 index 0000000..ee42adb --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild13.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild13"> +<metadata> +<title>nodereplacechild13</title> +<creator>IBM</creator> +<description> + Using replaceChild on this Document node attempt to replace this DocumentType node with + a new DocumentType and verify the name of the replaced DocumentType node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="newDocType" type="DocumentType"/> +<var name="replaced" type="DocumentType"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nodeName" type="DOMString"/> +<var name="nullPubId" type="DOMString" isNull="true"/> +<var name="nullSysId" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="docElemName" type="DOMString"/> +<var name="docElemNS" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="docElemName" obj="docElem"/> +<namespaceURI var="docElemNS" obj="docElem" interface="Node"/> +<doctype var="docType" obj="doc"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="newDocType" obj="domImpl" qualifiedName='docElemName' publicId="nullPubId" systemId="nullSysId"/> +<try> + <replaceChild var="replaced" obj="doc" oldChild="docType" newChild="newDocType"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<nodeName var="nodeName" obj="replaced"/> +<assertEquals actual="nodeName" expected='docElemName' id="nodereplacechild13" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild14.xml b/test/testcases/tests/level3/core/nodereplacechild14.xml new file mode 100644 index 0000000..cc12abc --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild14.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild14"> +<metadata> +<title>nodereplacechild14</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on the documentElement of a newly created Document node, attempt to replace an + element child of this documentElement node with a child that was imported from another document. + Verify the nodeName of the replaced element node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="newDoc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="elem2" type="Element"/> +<var name="imported" type="Node"/> +<var name="replaced" type="Element"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom3:doc1elem"'/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" qualifiedName='"dom3:doc"' namespaceURI='"http://www.w3.org/DOM/test"' doctype="nullDocType"/> +<createElementNS var="elem2" obj="newDoc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom3:doc2elem"'/> +<importNode var="imported" obj="newDoc" importedNode="elem" deep="true"/> +<documentElement var="docElem" obj="newDoc" interface="Document"/> +<appendChild obj="docElem" var="appendedChild" newChild="imported"/> +<appendChild obj="docElem" var="appendedChild" newChild="elem2"/> +<replaceChild var="replaced" obj="docElem" oldChild="elem2" newChild="imported"/> +<nodeName var="nodeName" obj="replaced"/> +<assertEquals actual="nodeName" expected='"dom3:doc2elem"' id="nodereplacechild14" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild15.xml b/test/testcases/tests/level3/core/nodereplacechild15.xml new file mode 100644 index 0000000..16b670e --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild15.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild15"> +<metadata> +<title>nodereplacechild15</title> +<creator>IBM</creator> +<description> + Using replaceChild on a DocumentFragment node attempt to replace an Element node with + another Element and the replaced element. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="elem" type="Element"/> +<var name="elem2" type="Element"/> +<var name="replaced" type="Element"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="title" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="docElem" type="Element"/> +<var name="rootName" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<createElementNS var="elem" obj="doc" namespaceURI="rootNS" qualifiedName="rootName"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem2" obj="doc" namespaceURI="rootNS" qualifiedName="rootName"/> +<setAttribute obj="elem2" name='"title"' value='"new element"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem2"/> +<replaceChild var="replaced" obj="docFrag" oldChild="elem2" newChild="elem"/> +<getAttribute var="title" obj="replaced" name='"title"'/> +<assertEquals actual="title" expected='"new element"' id="nodereplacechild15" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild16.xml b/test/testcases/tests/level3/core/nodereplacechild16.xml new file mode 100644 index 0000000..178b248 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild16.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild16"> +<metadata> +<title>nodereplacechild16</title> +<creator>IBM</creator> +<description> + Using replaceChild on a DocumentFragment node attempt to replace an Element node with + another Element and verify the name of the replaced Element node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="replaced" type="Element"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createTextNode var="txt" obj="doc" data='"Comment"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="txt"/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<replaceChild var="replaced" obj="docFrag" oldChild="elem" newChild="txt"/> +<nodeName var="nodeName" obj="replaced"/> +<assertEquals actual="nodeName" expected='"dom3:p"' id="nodereplacechild16" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild17.xml b/test/testcases/tests/level3/core/nodereplacechild17.xml new file mode 100644 index 0000000..1fd9bbf --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild17.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild17"> +<metadata> +<title>nodereplacechild17</title> +<creator>IBM</creator> +<description> + + + + Using replaceChild on a DocumentFragment node attempt to replace a Comment node with + a ProcessingInstruction and vice versa verify the data of the replaced nodes. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="cmt" type="Comment"/> +<var name="replacedCmt" type="Comment"/> +<var name="replacedPi" type="ProcessingInstruction"/> +<var name="data" type="DOMString"/> +<var name="target" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createComment var="cmt" obj="doc" data='"Comment"'/> +<createProcessingInstruction var="pi" obj="doc" target='"target"' data='"Comment"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="pi"/> +<appendChild obj="docFrag" var="appendedChild" newChild="cmt"/> +<replaceChild var="replacedCmt" obj="docFrag" oldChild="cmt" newChild="pi"/> +<data var="data" obj="replacedCmt" interface="CharacterData"/> +<assertEquals actual="data" expected='"Comment"' id="nodereplacechild17_1" ignoreCase="false"/> +<replaceChild var="replacedPi" obj="docFrag" oldChild="pi" newChild="cmt"/> +<target var="target" obj="replacedPi" interface="ProcessingInstruction"/> +<assertEquals actual="target" expected='"target"' id="nodereplacechild17_2" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild18.xml b/test/testcases/tests/level3/core/nodereplacechild18.xml new file mode 100644 index 0000000..e6d8707 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild18.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild18"> +<metadata> +<title>nodereplacechild18</title> +<creator>IBM</creator> +<description> + Using replaceChild on a DocumentFragment node attempt to replace a CDATASection node with + a EntityReference and vice versa verify the data of the replaced nodes. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="entRef" type="EntityReference"/> +<var name="cdata" type="CDATASection"/> +<var name="replacedCData" type="CDATASection"/> +<var name="replacedEref" type="EntityReference"/> +<var name="cdataName" type="DOMString"/> +<var name="erefName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createCDATASection var="cdata" obj="doc" data='"CDATASection"'/> +<createEntityReference var="entRef" obj="doc" name='"alpha"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="entRef"/> +<appendChild obj="docFrag" var="appendedChild" newChild="cdata"/> +<replaceChild var="replacedCData" obj="docFrag" oldChild="cdata" newChild="entRef"/> +<nodeValue var="cdataName" obj="replacedCData"/> +<assertEquals actual="cdataName" expected='"CDATASection"' id="nodereplacechild18_1" ignoreCase="false"/> +<replaceChild var="replacedEref" obj="docFrag" oldChild="entRef" newChild="cdata"/> +<nodeName var="erefName" obj="replacedEref"/> +<assertEquals actual="erefName" expected='"alpha"' id="nodereplacechild18_2" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild19.xml b/test/testcases/tests/level3/core/nodereplacechild19.xml new file mode 100644 index 0000000..0c70e38 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild19.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild19"> +<metadata> +<title>nodereplacechild19</title> +<creator>IBM</creator> +<description> + Using replaceChild on a DocumentFragment node attempt to replace an Element node with + its EntityReference child verify the nodeName of the replaced node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="entRef" type="EntityReference"/> +<var name="elem" type="Element"/> +<var name="replaced" type="Element"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createEntityReference var="entRef" obj="doc" name='"alpha"'/> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<replaceChild var="replaced" obj="docFrag" oldChild="elem" newChild="entRef"/> +<nodeName var="nodeName" obj="replaced"/> +<assertEquals actual="nodeName" expected='"dom3:p"' id="nodereplacechild19" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild20.xml b/test/testcases/tests/level3/core/nodereplacechild20.xml new file mode 100644 index 0000000..b12a47c --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild20.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild20"> +<metadata> +<title>nodereplacechild20</title> +<creator>IBM</creator> +<description> + Using replaceChild on a DocumentFragment node attempt to replace an Element node with + an Attr Node and verify if a HIERARCHY_REQUEST_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="replaced" type="Element"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<replaceChild var="replaced" obj="docFrag" oldChild="elem" newChild="attr"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild21.xml b/test/testcases/tests/level3/core/nodereplacechild21.xml new file mode 100644 index 0000000..eee19e3 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild21.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild21"> +<metadata> +<title>nodereplacechild21</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on this DocumentType node attempt to replace an Entity node with + a notation node of retieved from the DTD of another document and verify if a + NO_MODIFICATION_ALLOWED_ERR is thrown since DocumentType node is read-only. + Also try replacing the docType with an entity node and see if the same exception gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="ent" type="Entity"/> +<var name="doc1" type="Document"/> +<var name="docType1" type="DocumentType"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="replacedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<doctype var="docType" obj="doc" /> +<entities var="entitiesMap" obj="docType" /> +<getNamedItem var="ent" obj="entitiesMap" name='"alpha"'/> +<load var="doc1" href="hc_staff" willBeModified="false"/> +<doctype var="docType1" obj="doc1" /> +<notations var="notationsMap" obj="docType1" /> +<getNamedItem var="notation" obj="notationsMap" name='"notation1"'/> +<assertDOMException id="NO_MODIFICATION_ALLOWED_ERR1_nodereplacechild21"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="docType" var="replacedChild" oldChild="ent" newChild="notation"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<assertDOMException id="NO_MODIFICATION_ALLOWED_ERR2_nodereplacechild21"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="docType" var="replacedChild" oldChild="docType" newChild="ent"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild22.xml b/test/testcases/tests/level3/core/nodereplacechild22.xml new file mode 100644 index 0000000..30d8186 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild22.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild22"> +<metadata> +<title>nodereplacechild22</title> +<creator>IBM</creator> +<description> + Using replaceChild on a new EntityReference node attempt to replace an EntityReference node with + its Element parent, with itself and vice versa verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="entRefMain" type="EntityReference"/> +<var name="entRef" type="EntityReference"/> +<var name="elem" type="Element"/> +<var name="appendedChild" type="Node"/> +<var name="replacedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createEntityReference var="entRefMain" obj="doc" name='"delta"'/> +<createEntityReference var="entRef" obj="doc" name='"beta"'/> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_1"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRefMain" var="replacedChild" oldChild="entRef" newChild="elem"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_2"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRefMain" var="replacedChild" oldChild="elem" newChild="entRef"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_3"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRefMain" var="replacedChild" oldChild="entRef" newChild="entRefMain"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild23.xml b/test/testcases/tests/level3/core/nodereplacechild23.xml new file mode 100644 index 0000000..f8a54b0 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild23.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild23"> +<metadata> +<title>nodereplacechild23</title> +<creator>IBM</creator> +<description> + Using replaceChild on a new EntityReference node attempt to replace an Element, Text, + Comment, ProcessingInstruction and CDATASection nodes with each other and in each case + verify if a NO_MODIFICATION_ALLOWED_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="entRef" type="EntityReference"/> +<var name="txt" type="Text"/> +<var name="elem" type="Element"/> +<var name="comment" type="Comment"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="cdata" type="CDATASection"/> +<var name="replaced" type="Node"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:p"'/> +<createEntityReference var="entRef" obj="doc" name='"delta"'/> +<createTextNode var="txt" obj="doc" data='"Text"'/> +<createComment var="comment" obj="doc" data='"Comment"'/> +<createCDATASection var="cdata" obj="doc" data='"CDATASection"'/> +<createProcessingInstruction var="pi" obj="doc" target='"target"' data='"data"'/> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="elem" var="appendedChild" newChild="comment"/> +<appendChild obj="elem" var="appendedChild" newChild="pi"/> +<appendChild obj="elem" var="appendedChild" newChild="cdata"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_1"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRef" var="replaced" oldChild="elem" newChild="cdata"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_2"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRef" var="replaced" oldChild="cdata" newChild="pi"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_3"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRef" var="replaced" oldChild="pi" newChild="comment"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_4"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRef" var="replaced" oldChild="comment" newChild="txt"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_5"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="entRef" var="replaced" oldChild="txt" newChild="elem"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild24.xml b/test/testcases/tests/level3/core/nodereplacechild24.xml new file mode 100644 index 0000000..f91a67b --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild24.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild24"> +<metadata> +<title>nodereplacechild24</title> +<creator>IBM</creator> +<description> + Using replaceChild on an EntityReference node attempt to replace an Element node with + an EntityReference node verify if a NO_MODIFICATION_ALLOWED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="entRef" type="EntityReference"/> +<var name="elem" type="Element"/> +<var name="replaced" type="Element"/> +<var name="nodeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="childList" index="1" interface="NodeList"/> +<firstChild var="entRef" obj="elem" interface="Node"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild var="replaced" obj="entRef" oldChild="elem" newChild="entRef"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild25.xml b/test/testcases/tests/level3/core/nodereplacechild25.xml new file mode 100644 index 0000000..dd0d64c --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild25.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild25"> +<metadata> +<title>nodereplacechild25</title> +<creator>IBM</creator> +<description> + Using replaceChild on an Element node attempt to replace an + EntityReference or Text child node + with an Entity node and with itself and verify if a HIERARCHY_REQUEST_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entities" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="childList" type="NodeList"/> +<var name="entRef" type="Node"/> +<var name="elem" type="Element"/> +<var name="replaced" type="Element"/> +<var name="nodeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entities" obj="docType"/> +<getNamedItem var="entity" obj="entities" name='"alpha"'/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="childList" index="1" interface="NodeList"/> +<firstChild var="entRef" obj="elem" interface="Node"/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR_1"> +<HIERARCHY_REQUEST_ERR> +<replaceChild var="replaced" obj="elem" oldChild="entRef" newChild="entity"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR_2"> +<HIERARCHY_REQUEST_ERR> +<replaceChild var="replaced" obj="elem" oldChild="entRef" newChild="elem"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild26.xml b/test/testcases/tests/level3/core/nodereplacechild26.xml new file mode 100644 index 0000000..61ee622 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild26.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild26"> +<metadata> +<title>nodereplacechild26</title> +<creator>IBM</creator> +<description> + Using replaceChild on an Element node attempt to replace a Text child node with an Element + node that is an ancestor of this Element node and verify if a HIERARCHY_REQUEST_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="docElem" type="Element"/> +<var name="elem" type="Element"/> +<var name="firstChild" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="childList" index="0" interface="NodeList"/> +<firstChild var="firstChild" obj="elem" interface="Node"/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<replaceChild obj="elem" var="replaced" oldChild="firstChild" newChild="docElem"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild27.xml b/test/testcases/tests/level3/core/nodereplacechild27.xml new file mode 100644 index 0000000..df26995 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild27.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild27"> +<metadata> +<title>nodereplacechild27</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on an Element node attempt to replace an Element node with another + Element from another document and verify if a WRONG_DOCUMENT_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="doc2" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="childList2" type="NodeList"/> +<var name="elem2" type="Element"/> +<var name="elem" type="Element"/> +<var name="firstChild" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagNameNS var="childList" obj="doc" namespaceURI='"*"' localName='"p"' interface="Document"/> +<item var="elem" obj="childList" index="0" interface="NodeList"/> +<firstChild var="firstChild" obj="elem" interface="Node"/> +<load var="doc2" href="hc_staff" willBeModified="false"/> +<getElementsByTagNameNS var="childList2" obj="doc2" namespaceURI='"*"' localName='"p"' interface="Document"/> +<item var="elem2" obj="childList2" index="0" interface="NodeList"/> +<assertDOMException id="WRONG_DOCUMENT_ERR_nodereplacechild27"> +<WRONG_DOCUMENT_ERR> +<replaceChild obj="elem" var="replaced" oldChild="firstChild" newChild="elem2"/> +</WRONG_DOCUMENT_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild28.xml b/test/testcases/tests/level3/core/nodereplacechild28.xml new file mode 100644 index 0000000..2dc6239 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild28.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild28"> +<metadata> +<title>nodereplacechild28</title> +<creator>IBM</creator> +<description> +Attempt to replace a text node with a text node from an +entity reference. Since the replacing text node should be removed +from its current location first, a NO_MODIFICATION_ALLOWED_ERR should +be thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="acronym" type="Element"/> +<var name="betaRef" type="EntityReference"/> +<var name="dallas" type="Text"/> +<var name="betaText" type="Node"/> +<var name="appendedChild" type="Node"/> +<var name="replacedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronym" obj="childList" index="1" interface="NodeList"/> +<firstChild var="betaRef" obj="acronym" interface="Node"/> +<assertNotNull actual="betaRef" id="betaRefNotNull"/> +<firstChild var="betaText" obj="betaRef" interface="Node"/> +<assertNotNull actual="betaText" id="betaTextNotNull"/> +<nextSibling var="dallas" obj="betaRef" interface="Node"/> +<assertNotNull actual="dallas" id="dallasNotNull"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceChild obj="acronym" var="replacedChild" oldChild="dallas" newChild="betaText"/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild29.xml b/test/testcases/tests/level3/core/nodereplacechild29.xml new file mode 100644 index 0000000..0a88073 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild29.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild29"> +<metadata> +<title>nodereplacechild29</title> +<creator>IBM</creator> +<description> + Using replaceChild on an Element node attempt to replace a new Element node with + another new Element node and verify if a NOT_FOUND_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="oldChild" type="Element"/> +<var name="newChild" type="Element"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="childList" index="0" interface="NodeList"/> +<createElementNS var="oldChild" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:br"'/> +<createElementNS var="newChild" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"dom3:span"'/> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<replaceChild obj="elem" var="replaced" oldChild="oldChild" newChild="newChild"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild30.xml b/test/testcases/tests/level3/core/nodereplacechild30.xml new file mode 100644 index 0000000..c7c161a --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild30.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild30"> +<metadata> +<title>nodereplacechild30</title> +<creator>IBM</creator> +<description> + + + + Using replaceChild on an Element node attempt to replace a new Element child node with + new child nodes and vice versa and in each case verify the name of the replaced node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parent" type="Element"/> +<var name="oldChild" type="Element"/> +<var name="newElement" type="Element"/> +<var name="newText" type="Text"/> +<var name="newComment" type="Comment"/> +<var name="newPI" type="ProcessingInstruction"/> +<var name="newCdata" type="CDATASection"/> +<var name="newERef" type="EntityReference"/> +<var name="replaced" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:html"'/> +<createElementNS var="oldChild" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:head"'/> +<createElementNS var="newElement" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:body"'/> +<appendChild obj="parent" var="appendedChild" newChild="oldChild"/> +<appendChild obj="parent" var="appendedChild" newChild="newElement"/> +<createTextNode var="newText" obj="doc" data='"Text"' /> +<appendChild obj="parent" var="appendedChild" newChild="newText"/> +<createComment var="newComment" obj="doc" data='"Comment"' /> +<appendChild obj="parent" var="appendedChild" newChild="newComment"/> +<createProcessingInstruction var="newPI" obj="doc" target='"target"' data='"data"' /> +<appendChild obj="parent" var="appendedChild" newChild="newPI"/> +<createCDATASection var="newCdata" obj="doc" data='"Cdata"' /> +<appendChild obj="parent" var="appendedChild" newChild="newCdata"/> +<createEntityReference var="newERef" obj="doc" name='"delta"' /> +<appendChild obj="parent" var="appendedChild" newChild="newERef"/> +<replaceChild var="replaced" obj="parent" oldChild="oldChild" newChild="newElement"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"xhtml:head"' id="nodereplacechild30_1" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="newElement" newChild="oldChild"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"xhtml:body"' id="nodereplacechild30_2" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="oldChild" newChild="newText"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"xhtml:head"' id="nodereplacechild30_3" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="newText" newChild="oldChild"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"#text"' id="nodereplacechild30_4" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="oldChild" newChild="newComment"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"xhtml:head"' id="nodereplacechild30_5" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="newComment" newChild="oldChild"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"#comment"' id="nodereplacechild30_6" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="newPI" newChild="oldChild"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"target"' id="nodereplacechild30_7" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="newCdata" newChild="oldChild"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"#cdata-section"' id="nodereplacechild30_8" ignoreCase="false"/> +<replaceChild var="replaced" obj="parent" oldChild="newERef" newChild="oldChild"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"delta"' id="nodereplacechild30_9" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild31.xml b/test/testcases/tests/level3/core/nodereplacechild31.xml new file mode 100644 index 0000000..16a9b43 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild31.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild31"> +<metadata> +<title>nodereplacechild31</title> +<creator>IBM</creator> +<description> + Using replaceChild on an Element node that is the replacement Text of an EntityReference + node, attempt to replace its Text child node with a new Element node and verify if + a NO_MODIFICATION_ALLOWED_ERR gets thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="span" type="Element"/> +<var name="ent4Ref" type="EntityReference"/> +<var name="spanText" type="Text"/> +<var name="newChild" type="Element"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="childList" obj="doc" tagname='"var"' interface="Document"/> +<item var="elem" obj="childList" index="2" interface="NodeList"/> +<firstChild var="ent4Ref" obj="elem" interface="Node"/> +<firstChild var="span" obj="ent4Ref" interface="Node"/> +<assertNotNull actual="span" id="spanNotNull"/> +<firstChild var="spanText" obj="span" interface="Node"/> +<assertNotNull actual="spanText" id="spanTextNotNull"/> +<createElementNS var="newChild" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> +<NO_MODIFICATION_ALLOWED_ERR> +<replaceChild obj="span" var="replaced" oldChild="spanText" newChild="newChild"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild32.xml b/test/testcases/tests/level3/core/nodereplacechild32.xml new file mode 100644 index 0000000..62dbdb3 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild32.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild32"> +<metadata> +<title>nodereplacechild32</title> +<creator>IBM</creator> +<description> + The method replaceChild replaces the child node oldChild with newChild in the list of + children, and returns the oldChild node. + + Using replaceChild on an Attr node to replace its EntityReference Child with a + new Text Node and verify the name of the replaced child. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="false"/> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="parent" type="Attr"/> +<var name="oldChild" type="Node"/> +<var name="newChild" type="Text"/> +<var name="replaced" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="enRef" type="EntityReference"/> +<var name="enRefChild" type="EntityReference"/> +<var name="reference" type="DOMString" value='"entity1"'/> + +<load var="doc" href="hc_staff" willBeModified="false"/> +<createTextNode var="newChild" obj="doc" data='"Text"' /> +<getElementsByTagNameNS var="childList" obj="doc" namespaceURI='"*"' localName='"acronym"' interface="Document"/> +<item var="elem" obj="childList" index="3" interface="NodeList"/> +<getAttributeNode var="parent" obj="elem" name='"class"'/> +<createEntityReference var="enRef" obj="doc" name="reference"/> +<appendChild var="enRefChild" obj="parent" newChild="enRef"/> +<replaceChild var="replaced" obj="parent" oldChild="enRefChild" newChild="newChild"/> +<nodeName var="nodeName" obj="replaced" /> +<assertEquals actual="nodeName" expected='"entity1"' id="nodereplacechild32" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild33.xml b/test/testcases/tests/level3/core/nodereplacechild33.xml new file mode 100644 index 0000000..ad04a3a --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild33.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild33"> +<metadata> +<title>nodereplacechild33</title> +<creator>IBM</creator> +<description> + Using replaceChild on a default Attr node to replace its Text Child with a + new EntityReference Node and verify the value of the replaced child. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="childList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="parent" type="Attr"/> +<var name="oldChild" type="Node"/> +<var name="newChild" type="EntityReference"/> +<var name="replaced" type="Node"/> +<var name="nodeValue" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createEntityReference var="newChild" obj="doc" name='"delta"' /> +<getElementsByTagName var="childList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="childList" index="3" interface="NodeList"/> +<getAttributeNode var="parent" obj="elem" name='"dir"'/> +<lastChild var="oldChild" obj="parent" interface="Node"/> +<replaceChild var="replaced" obj="parent" oldChild="oldChild" newChild="newChild"/> +<nodeValue var="nodeValue" obj="replaced" /> +<assertEquals actual="nodeValue" expected='"rtl"' id="nodereplacechild33" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild34.xml b/test/testcases/tests/level3/core/nodereplacechild34.xml new file mode 100644 index 0000000..6fea992 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild34.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild34"> +<metadata> +<title>nodereplacechild34</title> +<creator>IBM</creator> +<description> + Using replaceChild on a new Attr node, replace its new EntityReference Child with a + new Text Node and verify the value of the new child. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parent" type="Attr"/> +<var name="oldChild" type="EntityReference"/> +<var name="newChild" type="Text"/> +<var name="nodeValue" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<createEntityReference var="oldChild" obj="doc" name='"delta"' /> +<appendChild obj="parent" var="appendedChild" newChild="oldChild"/> +<createTextNode var="newChild" obj="doc" data='"Text"' /> +<replaceChild obj="parent" var="replaced" oldChild="oldChild" newChild="newChild"/> +<value var="nodeValue" obj="parent" /> +<assertEquals actual="nodeValue" expected='"Text"' id="nodereplacechild34" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild35.xml b/test/testcases/tests/level3/core/nodereplacechild35.xml new file mode 100644 index 0000000..dfb3379 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild35.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild35"> +<metadata> +<title>nodereplacechild35</title> +<creator>IBM</creator> +<description> + Using replaceChild on a new Attr node, replace its new EntityRefernece Child with a + new Attr Node and verify if a HIERARCHY_REQUEST_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parent" type="Attr"/> +<var name="oldChild" type="EntityReference"/> +<var name="newChild" type="Attr"/> +<var name="nodeValue" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<createEntityReference var="oldChild" obj="doc" name='"delta"' /> +<appendChild obj="parent" var="appendedChild" newChild="oldChild"/> +<createAttributeNS var="newChild" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> +<HIERARCHY_REQUEST_ERR> +<replaceChild obj="parent" var="replaced" oldChild="oldChild" newChild="newChild"/> +</HIERARCHY_REQUEST_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild36.xml b/test/testcases/tests/level3/core/nodereplacechild36.xml new file mode 100644 index 0000000..1f13b3a --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild36.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild36"> +<metadata> +<title>nodereplacechild36</title> +<creator>IBM</creator> +<description> + Using replaceChild on a new Attr node, replace its new EntityRefernece node with a + new Text Node and verify if a NOT_FOUND_ERR is thrown. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="parent" type="Attr"/> +<var name="oldChild" type="EntityReference"/> +<var name="newChild" type="Text"/> +<var name="nodeValue" type="DOMString"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<createEntityReference var="oldChild" obj="doc" name='"delta"' /> +<createTextNode var="newChild" obj="doc" data='"Text"' /> +<assertDOMException id="throw_NOT_FOUND_ERR"> +<NOT_FOUND_ERR> +<replaceChild obj="parent" var="replaced" oldChild="oldChild" newChild="newChild"/> +</NOT_FOUND_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild37.xml b/test/testcases/tests/level3/core/nodereplacechild37.xml new file mode 100644 index 0000000..c7ab0c0 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild37.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild37"> +<metadata> +<title>nodereplacechild37</title> +<creator>IBM</creator> +<description> + Using replaceChild on a new Attr node, replace its new Text node with a + new EntityReference Node created by another document and verify if a + WRONG_DOCUMENT_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="doc2" type="Document"/> +<var name="parent" type="Attr"/> +<var name="oldChild" type="Text"/> +<var name="newChild" type="EntityReference"/> +<var name="nodeValue" type="DOMString"/> +<var name="replaced" type="Node"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<load var="doc2" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="parent" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<createTextNode var="oldChild" obj="doc" data='"Text"' /> +<createEntityReference var="newChild" obj="doc2" name='"delta"' /> +<appendChild obj="parent" var="appendedChild" newChild="oldChild"/> +<assertDOMException id="throw_WRONG_DOCUMENT_ERR"> +<WRONG_DOCUMENT_ERR> +<replaceChild obj="parent" var="replaced" oldChild="oldChild" newChild="newChild"/> +</WRONG_DOCUMENT_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild38.xml b/test/testcases/tests/level3/core/nodereplacechild38.xml new file mode 100644 index 0000000..230baec --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild38.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild38"> +<metadata> +<title>nodereplacechild38</title> +<creator>IBM</creator> +<description> + Using replaceChild on an Entity node attempt to replace its Text child with new Text, + Comment, ProcessingInstruction and CDATASection nodes and in each case verify if + a NO_MODIFICATION_ALLOWED_ERR is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entitiesMap" type="NamedNodeMap"/> +<var name="ent" type="Entity"/> +<var name="oldChild" type="Text"/> +<var name="entRef" type="EntityReference"/> +<var name="txt" type="Text"/> +<var name="elem" type="Element"/> +<var name="comment" type="Comment"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="cdata" type="CDATASection"/> +<var name="replaced" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc" /> +<entities var="entitiesMap" obj="docType" /> +<getNamedItem var="ent" obj="entitiesMap" name='"alpha"'/> +<assertNotNull actual="ent" id="alphaEntity"/> +<firstChild var="oldChild" obj="ent" interface="Node"/> +<assertNotNull actual="oldChild" id="alphaText"/> +<createCDATASection var="cdata" obj="doc" data='"CDATASection"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR1"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceChild obj="ent" var="replaced" oldChild="oldChild" newChild="cdata"/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createProcessingInstruction var="pi" obj="doc" target='"target"' data='"data"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR2"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceChild obj="ent" var="replaced" oldChild="oldChild" newChild="pi"/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createComment var="comment" obj="doc" data='"Comment"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR3"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceChild obj="ent" var="replaced" oldChild="oldChild" newChild="comment"/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createTextNode var="txt" obj="doc" data='"Text"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR4"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceChild obj="ent" var="replaced" oldChild="oldChild" newChild="txt"/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR5"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceChild obj="ent" var="replaced" oldChild="oldChild" newChild="elem"/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +<createEntityReference var="entRef" obj="doc" name='"delta"'/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR6"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceChild obj="ent" var="replaced" oldChild="oldChild" newChild="entRef"/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild39.xml b/test/testcases/tests/level3/core/nodereplacechild39.xml new file mode 100644 index 0000000..2c4a17e --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild39.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild39"> +<metadata> +<title>nodereplacechild39</title> +<creator>Curt Arnold</creator> +<description> +Attempt to add a second document element by a replacing a trailing comment. The attempt should result +in a HIERARCHY_REQUEST_ERR or NOT_SUPPORTED_ERR. +</description> +<date qualifier="created">2004-01-22</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="rootName" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<var name="newComment" type="Comment"/> +<var name="newElement" type="Element"/> +<var name="retNode" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<createElementNS var="newElement" obj="doc" namespaceURI="rootNS" qualifiedName="rootName"/> +<createComment var="newComment" obj="doc" data='"second element goes here"'/> +<appendChild var="retNode" obj="doc" newChild="newComment"/> +<try> + <replaceChild var="retNode" obj="doc" newChild="newElement" oldChild="newComment"/> + <fail id="throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED"/> + <catch> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodereplacechild40.xml b/test/testcases/tests/level3/core/nodereplacechild40.xml new file mode 100644 index 0000000..2e9aa30 --- /dev/null +++ b/test/testcases/tests/level3/core/nodereplacechild40.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodereplacechild40"> +<metadata> +<title>nodereplacechild40</title> +<creator>Curt Arnold</creator> +<description> +Attempt to add a second document element by a comment. The attempt should result +in a HIERARCHY_REQUEST_ERR or NOT_SUPPORTED_ERR. +</description> +<date qualifier="created">2004-01-22</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="rootName" type="DOMString"/> +<var name="publicId" type="DOMString" isNull="true"/> +<var name="systemId" type="DOMString" isNull="true"/> +<var name="newComment" type="Comment"/> +<var name="newDocType" type="DocumentType"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="retNode" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="rootName" obj="docElem"/> +<implementation var="domImpl" obj="doc"/> +<createDocumentType var="newDocType" obj="domImpl" qualifiedName="rootName" + publicId="publicId" systemId="systemId"/> +<createComment var="newComment" obj="doc" data='"second element goes here"'/> +<insertBefore var="retNode" obj="doc" newChild="newComment" refChild="docElem"/> +<try> + <replaceChild var="retNode" obj="doc" newChild="newDocType" oldChild="newComment"/> + <fail id="throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED"/> + <catch> + <DOMException code="HIERARCHY_REQUEST_ERR"/> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> +</try> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent01.xml b/test/testcases/tests/level3/core/nodesettextcontent01.xml new file mode 100644 index 0000000..45c5fa1 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent01"> +<metadata> +<title>nodesettextcontent01</title> +<creator>IBM</creator> +<description> +Attempt to set textContent for a Document node and check that the document appears +to be unaffected. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="nodeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<textContent value='"textContent"' obj="doc"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<assertNotNull actual="elem" id="stillHasAcronyms"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"acronym"' id="nodesettextcontent01" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent02.xml b/test/testcases/tests/level3/core/nodesettextcontent02.xml new file mode 100644 index 0000000..5f95eba --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent02.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent02"> +<metadata> +<title>nodesettextcontent02</title> +<creator>IBM</creator> +<description> + The method setTextContent has no effect when the node is defined to be null. + + Using setTextContent on a new Document node, attempt to set the textContent of this + new Document node to textContent. Check if it was not set by checking the nodeName + attribute of a new Element of this Document node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="newDoc" type="Document"/> +<var name="nodeName" type="DOMString"/> +<var name="elemChild" type="Element"/> +<var name="newElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="nullDocType" type="DocumentType" isNull="true"/> +<var name="appendedChild" type="Node"/> +<var name="documentElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<implementation var="domImpl" obj="doc"/> +<createDocument var="newDoc" obj="domImpl" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom3:elem"' doctype="nullDocType"/> +<createElementNS var="newElem" obj="newDoc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom3:childElem"'/> +<documentElement var="documentElem" obj="newDoc" interface="Document"/> +<appendChild obj="documentElem" var="appendedChild" newChild="newElem"/> +<textContent value='"textContent"' obj="newDoc"/> +<getElementsByTagNameNS var="elemList" obj="newDoc" localName='"childElem"' namespaceURI='"*"' interface="Document"/> +<item var="elemChild" obj="elemList" index="0" interface="NodeList"/> +<nodeName var="nodeName" obj="elemChild"/> +<assertEquals actual="nodeName" expected='"dom3:childElem"' id="nodesettextcontent02" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent03.xml b/test/testcases/tests/level3/core/nodesettextcontent03.xml new file mode 100644 index 0000000..cba7367 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent03.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent03"> +<metadata> +<title>nodesettextcontent03</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on this DocumentType node, attempt to set the textContent of this + DocumentType node to textContent. Retreive the textContent and verify if it is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<textContent value='"textContent"' obj="docType"/> +<textContent var="textContent" obj="docType"/> +<assertNull actual="textContent" id="nodesettextcontent03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent04.xml b/test/testcases/tests/level3/core/nodesettextcontent04.xml new file mode 100644 index 0000000..99e244f --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent04.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent04"> +<metadata> +<title>nodesettextcontent04</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on this DocumentType node, attempt to set the textContent of a + Notation node to textContent. Retreive the textContent and verify if it is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="notationsMap" type="NamedNodeMap"/> +<var name="notation1" type="Notation"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<notations var="notationsMap" obj="docType"/> +<getNamedItem var="notation1" obj="notationsMap" name='"notation1"'/> +<textContent value='"textContent"' obj="notation1"/> +<textContent var="textContent" obj="notation1"/> +<assertNull actual="textContent" id="nodesettextcontent04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent05.xml b/test/testcases/tests/level3/core/nodesettextcontent05.xml new file mode 100644 index 0000000..a98523f --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent05.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent05"> +<metadata> +<title>nodesettextcontent05</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on a default Attr node, attempt to set its value to NA. Retreive + the textContent and verify if it is was set to NA. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"dir"'/> +<textContent obj="attr" value='"NA"'/> +<textContent var="textContent" obj="attr"/> +<assertEquals actual="textContent" expected='"NA"' id="nodesettextcontent05" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent06.xml b/test/testcases/tests/level3/core/nodesettextcontent06.xml new file mode 100644 index 0000000..8f29418 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent06.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent06"> +<metadata> +<title>nodesettextcontent06</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on a new Attr node with a null value, attempt to set its value to NA. Retreive + the textContent and verify if it is was set to NA. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="attrNode" type="Attr"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"xml:lang"'/> +<setAttributeNodeNS obj="elem" var="attrNode" newAttr="attr"/> +<textContent obj="attr" value='"NA"'/> +<textContent var="textContent" obj="attr"/> +<assertEquals actual="textContent" expected='"NA"' id="nodesettextcontent06" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent07.xml b/test/testcases/tests/level3/core/nodesettextcontent07.xml new file mode 100644 index 0000000..193a335 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent07.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent07"> +<metadata> +<title>nodesettextcontent07</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on an existing Text node, attempt to set its value to Text. + Retreive the textContent and verify if it is was set to Text. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="txt" obj="elem" interface="Node"/> +<textContent obj="txt" value='"Text"'/> +<textContent var="textContent" obj="txt"/> +<assertEquals actual="textContent" expected='"Text"' id="nodegettextcontent10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent08.xml b/test/testcases/tests/level3/core/nodesettextcontent08.xml new file mode 100644 index 0000000..a443edc --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent08.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent08"> +<metadata> +<title>nodesettextcontent08</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on a new Processing Instruction node, attempt to set its data to PID. + Retreive the textContent and verify if it is was set to PID. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<createProcessingInstruction var="pi" obj="doc" target='"PIT"' data='"PID"'/> +<appendChild obj="elem" var="appendedChild" newChild="pi"/> +<textContent obj="pi" value='"PID"'/> +<textContent var="textContent" obj="pi"/> +<assertEquals actual="textContent" expected='"PID"' id="nodesettextcontent08" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent10.xml b/test/testcases/tests/level3/core/nodesettextcontent10.xml new file mode 100644 index 0000000..a3d5cec --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent10.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent10"> +<metadata> +<title>nodesettextcontent10</title> +<creator>IBM</creator> +<description> + The method setTextContent has no effect when the node is defined to be null. + + Using setTextContent on a new Element node, attempt to set its content to ELEMENT. + Retreive the textContent and verify if it is was set to ELEMENT. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="comment" type="Comment"/> +<var name="entRef" type="EntityReference"/> +<var name="cdata" type="CDATASection"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/DOM/Test"' qualifiedName='"dom3:elem"'/> +<createTextNode var="txt" obj="doc" data='"Text "' /> +<createComment var="comment" obj="doc" data='"Comment "' /> +<createEntityReference var="entRef" obj="doc" name='"ent1"' /> +<createProcessingInstruction var="pi" obj="doc" target='"PIT"' data='"PIData "'/> +<createCDATASection var="cdata" obj="doc" data='"CData"' /> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="elem" var="appendedChild" newChild="comment"/> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<appendChild obj="elem" var="appendedChild" newChild="pi"/> +<appendChild obj="elem" var="appendedChild" newChild="cdata"/> +<textContent obj="elem" value='"ELEMENT"'/> +<textContent var="textContent" obj="elem"/> +<assertEquals actual="textContent" expected='"ELEMENT"' id="nodesettextcontent10" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent11.xml b/test/testcases/tests/level3/core/nodesettextcontent11.xml new file mode 100644 index 0000000..63211f4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent11.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent11"> +<metadata> +<title>nodesettextcontent11</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on a new DocumentFragment node Element child, attempt to set its content to + DOCUMENTFRAGMENT. Retreive the textContent and verify if it is was set to DOCUMENTFRAGMENT +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docFrag" type="DocumentFragment"/> +<var name="elem" type="Element"/> +<var name="elemChild" type="Element"/> +<var name="txt" type="Text"/> +<var name="comment" type="Comment"/> +<var name="entRef" type="EntityReference"/> +<var name="cdata" type="CDATASection"/> +<var name="pi" type="ProcessingInstruction"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createDocumentFragment var="docFrag" obj="doc"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"'/> +<createTextNode var="txt" obj="doc" data='"Text "' /> +<createComment var="comment" obj="doc" data='"Comment "' /> +<createEntityReference var="entRef" obj="doc" name='"alpha"' /> +<createProcessingInstruction var="pi" obj="doc" target='"PIT"' data='"PIData "'/> +<createCDATASection var="cdata" obj="doc" data='"CData"' /> +<appendChild obj="elem" var="appendedChild" newChild="txt"/> +<appendChild obj="elem" var="appendedChild" newChild="comment"/> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<appendChild obj="elem" var="appendedChild" newChild="pi"/> +<appendChild obj="elem" var="appendedChild" newChild="cdata"/> +<appendChild obj="docFrag" var="appendedChild" newChild="elem"/> +<textContent obj="elem" value='"DOCUMENTFRAGMENT"'/> +<lastChild var="elemChild" obj="docFrag" interface="Node"/> +<textContent var="textContent" obj="elemChild"/> +<assertEquals actual="textContent" expected='"DOCUMENTFRAGMENT"' id="nodegettextcontent11" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent12.xml b/test/testcases/tests/level3/core/nodesettextcontent12.xml new file mode 100644 index 0000000..b489d0b --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent12.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent12"> +<metadata> +<title>nodesettextcontent12</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on a new EntityReference node, attempt to set its value. + Since EntityReference nodes are ReadOnly, check if a NO_MODIFICATION_ALLOWED_ERR + is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="textContent" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="elem" obj="doc"/> +<createEntityReference var="entRef" obj="doc" name='"beta"' /> +<appendChild obj="elem" var="appendedChild" newChild="entRef"/> +<assertDOMException id="nodesettextcontent12"> +<NO_MODIFICATION_ALLOWED_ERR> +<textContent obj="entRef" value='"NA"'/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodesettextcontent13.xml b/test/testcases/tests/level3/core/nodesettextcontent13.xml new file mode 100644 index 0000000..372d757 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesettextcontent13.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesettextcontent13"> +<metadata> +<title>nodesettextcontent13</title> +<creator>IBM</creator> +<description> + + + Using setTextContent on an Entity node, attempt to set its replacement text. + Since Entity nodes are ReadOnly, check if a NO_MODIFICATION_ALLOWED_ERR + is raised. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entity" type="Entity"/> +<var name="entitymap" type="NamedNodeMap"/> +<var name="textContent" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entitymap" obj="docType"/> +<getNamedItem var="entity" obj="entitymap" name='"delta"'/> +<assertDOMException id="nodesettextcontent13"> +<NO_MODIFICATION_ALLOWED_ERR> +<textContent value='"NA"' obj="entity"/> +</NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata01.xml b/test/testcases/tests/level3/core/nodesetuserdata01.xml new file mode 100644 index 0000000..006a2f4 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata01.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata01"> +<metadata> +<title>nodesetuserdata01</title> +<creator>IBM</creator> +<description> + + + Using setUserData with null values for the UserData and the handler parameters, check + if returned the current userData object of this Document node is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="userData" type="DOMUserData"/> +<var name="prevUserData" type="DOMUserData"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<var name="nullData" type="DOMUserData" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<setUserData var="prevUserData" obj="doc" key='"something"' data="nullData" handler="nullHandler"/> +<assertNull actual="prevUserData" id="nodesetuserdata01"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata02.xml b/test/testcases/tests/level3/core/nodesetuserdata02.xml new file mode 100644 index 0000000..ba2efcf --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata02"> +<metadata> +<title>nodesetuserdata02</title> +<creator>IBM</creator> +<description> + + + Using setUserData with values for the UserData as this Document and the handler as null + parameters, check if returned the current userData object of this Document node is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="userData" type="DOMUserData"/> +<var name="prevUserData" type="DOMUserData"/> +<var name="test" type="DOMUserData" isNull="true"/> +<var name="str" type="DOMString" value='"Junk"'/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<setUserData var="prevUserData" obj="doc" key='"something"' data="test" handler="nullHandler"/> +<assertNull actual="prevUserData" id="nodesetuserdata02"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata03.xml b/test/testcases/tests/level3/core/nodesetuserdata03.xml new file mode 100644 index 0000000..7ca41f2 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata03.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata03"> +<metadata> +<title>nodesetuserdata03</title> +<creator>IBM</creator> +<description> + Invoke setUserData on this Document to set this Documents UserData to a new + Element node. Do the same with a new Text node and using isNodeEqual verify + the returned Element UserData object. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="userData" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="returnedUserData" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"xhtml:p"' /> +<createTextNode var="txt" obj="doc" data='"TEXT"' /> +<setUserData obj="doc" var="returnedUserData" key='"Key1"' data="elem" handler="nullHandler"/> +<setUserData var="retUserData" obj="doc" key='"Key1"' data="txt" handler="nullHandler"/> +<isEqualNode var="success" obj="retUserData" arg="elem"/> +<assertTrue actual="success" id="nodesetuserdata03"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata04.xml b/test/testcases/tests/level3/core/nodesetuserdata04.xml new file mode 100644 index 0000000..3fc0aff --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata04.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata04"> +<metadata> +<title>nodesetuserdata04</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on a new Element to set its UserData to a new Text node + twice using different Keys. Using getUserData with each Key and isNodeEqual + verify if the returned nodes are Equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="userData" type="DOMUserData"/> +<var name="returned1" type="DOMUserData"/> +<var name="returned2" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="elem" type="Element"/> +<var name="txt" type="Text"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"' /> +<createTextNode var="txt" obj="doc" data='"TEXT"' /> +<setUserData obj="elem" var="retUserData" key='"Key1"' data="txt" handler="nullHandler"/> +<setUserData obj="elem" var="retUserData" key='"Key2"' data="txt" handler="nullHandler"/> +<getUserData var="returned1" obj="elem" key='"Key1"'/> +<getUserData var="returned2" obj="elem" key='"Key2"'/> +<isEqualNode var="success" obj="returned1" arg="returned2"/> +<assertTrue actual="success" id="nodesetuserdata04"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata05.xml b/test/testcases/tests/level3/core/nodesetuserdata05.xml new file mode 100644 index 0000000..f75c861 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata05.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata05"> +<metadata> +<title>nodesetuserdata05</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on a new Attr to set its UserData to two Document nodes + obtained by parsing the same xml document. Using getUserData and isNodeEqual + verify if the returned nodes are Equal. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="doc2" type="Document"/> +<var name="userData" type="DOMUserData"/> +<var name="returned1" type="DOMUserData"/> +<var name="returned2" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="attr" type="Attr"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<load var="doc2" href="hc_staff" willBeModified="true"/> +<createAttributeNS var="attr" obj="doc" namespaceURI='"http://www.w3.org/XML/1998/namespace"' qualifiedName='"lang"' /> +<setUserData obj="attr" var="retUserData" key='"Key1"' data="doc" handler="nullHandler"/> +<setUserData obj="attr" var="retUserData" key='"Key2"' data="doc2" handler="nullHandler"/> +<getUserData var="returned1" obj="attr" key='"Key1"'/> +<getUserData var="returned2" obj="attr" key='"Key2"'/> +<isEqualNode var="success" obj="returned1" arg="returned2"/> +<assertTrue actual="success" id="nodesetuserdata05"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata06.xml b/test/testcases/tests/level3/core/nodesetuserdata06.xml new file mode 100644 index 0000000..09f82e6 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata06.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata06"> +<metadata> +<title>nodesetuserdata06</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on a new Comment to set its UserData to an Entity node + twice using the same key. Verify if the UserData object that was by the + second setUserData is the same as original Entity. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="entities" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="comment" type="Comment"/> +<var name="userData" type="DOMUserData"/> +<var name="returned" type="DOMUserData"/> +<var name="retUserData" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<entities var="entities" obj="docType"/> +<getNamedItem var="entity" obj="entities" name='"delta"'/> +<createComment var="comment" obj="doc" data='"COMMENT_NODE"' /> +<setUserData obj="comment" var="retUserData" key='"Key1"' data="entity" handler="nullHandler"/> +<setUserData var="returned" obj="comment" key='"Key1"' data="entity" handler="nullHandler"/> +<isEqualNode var="success" obj="returned" arg="entity"/> +<assertTrue actual="success" id="nodesetuserdata06"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata07.xml b/test/testcases/tests/level3/core/nodesetuserdata07.xml new file mode 100644 index 0000000..21a1d50 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata07.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata07"> +<metadata> +<title>nodesetuserdata07</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on a Notation to set its UserData to a Comment node + twice using the same key. Verify if the UserData object that was returned + by second setUserData is the Comment node set in the first setUserData call. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docType" type="DocumentType"/> +<var name="notations" type="NamedNodeMap"/> +<var name="notation" type="Notation"/> +<var name="comment" type="Comment"/> +<var name="userData" type="DOMUserData"/> +<var name="returned" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="retUserData" type="DOMUserData"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<doctype var="docType" obj="doc"/> +<notations var="notations" obj="docType"/> +<getNamedItem var="notation" obj="notations" name='"notation1"'/> +<createComment var="comment" obj="doc" data='"COMMENT_NODE"' /> +<setUserData obj="notation" var="retUserData" key='"Key1"' data="comment" handler="nullHandler"/> +<setUserData var="returned" obj="notation" key='"Key1"' data="comment" handler="nullHandler"/> +<isEqualNode var="success" obj="returned" arg="comment"/> +<assertTrue actual="success" id="nodesetuserdata07"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata08.xml b/test/testcases/tests/level3/core/nodesetuserdata08.xml new file mode 100644 index 0000000..f96ba9f --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata08.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata08"> +<metadata> +<title>nodesetuserdata08</title> +<creator>IBM</creator> +<description> + Invoke setUserData on a CDATASection and EntityReference node to set their + UserData to this Document and DocumentElement node. Verify if the UserData + object that was set for both nodes is different. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="cData" type="CDATASection"/> +<var name="elemList" type="NodeList"/> +<var name="elemName" type="Element"/> +<var name="userData" type="DOMUserData"/> +<var name="returned1" type="DOMUserData"/> +<var name="returned2" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="retUserData" type="DOMUserData"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<createEntityReference name='"delta"' obj="doc" var="entRef"/> +<createCDATASection var="cData" obj="doc" data='"CDATASection"' /> +<setUserData obj="entRef" var="retUserData" key='"Key1"' data="doc" handler="nullHandler"/> +<setUserData obj="cData" var="retUserData" key='"Key2"' data="docElem" handler="nullHandler"/> +<getUserData var="returned1" obj="entRef" key='"Key1"'/> +<getUserData var="returned2" obj="cData" key='"Key2"'/> +<isEqualNode var="success" obj="returned1" arg="returned2"/> +<assertFalse actual="success" id="nodesetuserdata08"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata09.xml b/test/testcases/tests/level3/core/nodesetuserdata09.xml new file mode 100644 index 0000000..f603752 --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata09.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata09"> +<metadata> +<title>nodesetuserdata09</title> +<creator>IBM</creator> +<description> + + + Invoke setUserData on this documentElement node to set its UserData to + this Document node. Invoke getUserData on this Document node with the same + key of the UserData that was just set on the documentElement node and verify + if the returned node is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="returned" type="DOMUserData"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<var name="retUserData" type="DOMUserData"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<setUserData obj="docElem" var="retUserData" key='"Key1"' data="doc" handler="nullHandler"/> +<getUserData var="returned" obj="doc" key='"Key1"'/> +<assertNull actual="returned" id="nodesetuserdata09"/> +</test> diff --git a/test/testcases/tests/level3/core/nodesetuserdata10.xml b/test/testcases/tests/level3/core/nodesetuserdata10.xml new file mode 100644 index 0000000..129b1ee --- /dev/null +++ b/test/testcases/tests/level3/core/nodesetuserdata10.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodesetuserdata10"> +<metadata> +<title>nodesetuserdata10</title> +<creator>IBM</creator> +<description> + Invoke setUserData on a CDATASection and EntityReference node to set their + UserData to this Document and DocumentElement node. Verify if the UserData + object that was set for both nodes is different. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-06-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<!-- could also be Text --> +<var name="entRef" type="Node"/> +<var name="cData" type="CDATASection"/> +<var name="varList" type="NodeList"/> +<var name="varElem" type="Element"/> +<var name="userData" type="DOMUserData"/> +<var name="returned1" type="DOMUserData"/> +<var name="returned2" type="DOMUserData"/> +<var name="success" type="boolean"/> +<var name="retUserData" type="DOMUserData"/> +<var name="nullHandler" type="UserDataHandler" isNull="true"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<documentElement var="docElem" obj="doc"/> +<getElementsByTagName var="varList" obj="doc" tagname='"var"' interface="Document"/> +<item var="varElem" obj="varList" index="2" interface="NodeList"/> +<firstChild var="entRef" obj="varElem" interface="Node"/> +<createCDATASection var="cData" obj="doc" data='"CDATASection"' /> +<setUserData obj="entRef" var="retUserData" key='"Key1"' data="doc" handler="nullHandler"/> +<setUserData obj="cData" var="retUserData" key='"Key2"' data="docElem" handler="nullHandler"/> +<getUserData var="returned1" obj="entRef" key='"Key1"'/> +<getUserData var="returned2" obj="cData" key='"Key2"'/> +<isEqualNode var="success" obj="returned1" arg="returned2"/> +<assertFalse actual="success" id="nodesetuserdata08"/> +</test> diff --git a/test/testcases/tests/level3/core/normalizecharacters01.xml b/test/testcases/tests/level3/core/normalizecharacters01.xml new file mode 100644 index 0000000..e8dc28a --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters01.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters01"> +<metadata> +<title>normalizecharacters01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with normalize-characters set to false, check that +characters are not normalized. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</test> + + diff --git a/test/testcases/tests/level3/core/normalizecharacters02.xml b/test/testcases/tests/level3/core/normalizecharacters02.xml new file mode 100644 index 0000000..4d5a80b --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters02.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters02"> +<metadata> +<title>normalizecharacters02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with normalize-characters set to true, check that +characters are normalized. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"normalize-characters"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalizeDocument obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="charNormalized"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/normalizecharacters03.xml b/test/testcases/tests/level3/core/normalizecharacters03.xml new file mode 100644 index 0000000..67c9ce4 --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters03.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters03"> +<metadata> +<title>normalizecharacters03</title> +<creator>Curt Arnold</creator> +<description> +Normalize an element with normalize-characters set to false, check that +characters are not normalized. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalize obj="pElem"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</test> + + diff --git a/test/testcases/tests/level3/core/normalizecharacters04.xml b/test/testcases/tests/level3/core/normalizecharacters04.xml new file mode 100644 index 0000000..12ff2dc --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters04.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters04"> +<metadata> +<title>normalizecharacters04</title> +<creator>Curt Arnold</creator> +<description> +Normalize an element with normalize-characters set to true, check that +characters are normalized. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"normalize-characters"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalize obj="pElem"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/normalizecharacters05.xml b/test/testcases/tests/level3/core/normalizecharacters05.xml new file mode 100644 index 0000000..efd5703 --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters05.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters05"> +<metadata> +<title>normalizecharacters05</title> +<creator>Curt Arnold</creator> +<description> +Normalize an document (using Node.normalize) with normalize-characters set to false, check that +characters are not normalized. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalize obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</test> + + diff --git a/test/testcases/tests/level3/core/normalizecharacters06.xml b/test/testcases/tests/level3/core/normalizecharacters06.xml new file mode 100644 index 0000000..db349a5 --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters06.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters06"> +<metadata> +<title>normalizecharacters06</title> +<creator>Curt Arnold</creator> +<description> +Normalize a document (using Node.normalize) with normalize-characters set to true, check that +characters are normalized. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"normalize-characters"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalize obj="doc"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"barsuçon"' + ignoreCase="false" id="noCharNormalization"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/normalizecharacters07.xml b/test/testcases/tests/level3/core/normalizecharacters07.xml new file mode 100644 index 0000000..d395b30 --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters07.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters07"> +<metadata> +<title>normalizecharacters07</title> +<creator>Curt Arnold</creator> +<description> +Normalize a text node with normalize-characters set to false, check that +characters are not normalized. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalize obj="retval"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"suçon"' + ignoreCase="false" id="noCharNormalization"/> +</test> + + diff --git a/test/testcases/tests/level3/core/normalizecharacters08.xml b/test/testcases/tests/level3/core/normalizecharacters08.xml new file mode 100644 index 0000000..d70f90a --- /dev/null +++ b/test/testcases/tests/level3/core/normalizecharacters08.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters08"> +<metadata> +<title>normalizecharacters08</title> +<creator>Curt Arnold</creator> +<description> +Normalize a text node with normalize-characters set to true, check that +characters are normalized. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters"/> +<subject resource="http://www.w3.org/TR/2003/WD-charmod-20030822/"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="text" type="Text"/> +<var name="textValue" type="DOMString"/> +<var name="retval" type="Node"/> +<var name="canSet" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"normalize-characters"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- character entity is expanded during code generation + code equivalent to "suc\u0327on" --> +<createTextNode var="text" obj="doc" data='"suçon"'/> +<appendChild var="retval" obj="pElem" newChild="text"/> +<normalize obj="retval"/> +<!-- fail test if normalize had any errors or fatal errors --> +<assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<lastChild var="text" obj="pElem" interface="Node"/> +<nodeValue var="textValue" obj="text"/> +<assertEquals actual="textValue" expected='"suçon"' + ignoreCase="false" id="noCharNormalization"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/splitcdatasections01.xml b/test/testcases/tests/level3/core/splitcdatasections01.xml new file mode 100644 index 0000000..445836d --- /dev/null +++ b/test/testcases/tests/level3/core/splitcdatasections01.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="splitcdatasections01"> +<metadata> +<title>splitcdatasections</title> +<creator>Curt Arnold</creator> +<description> +Add a CDATASection containing "]]>" and call Node.normalize which should not +split or raise warning. +</description> +<date qualifier="created">2004-02-25</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="elemList" type="NodeList"/> +<var name="newChild" type="CDATASection"/> +<var name="oldChild" type="Node"/> +<var name="retval" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="oldChild" obj="elem" interface="Node"/> +<createCDATASection var="newChild" obj="doc" data='"this is not ]]> good"'/> +<replaceChild var="retval" obj="elem" newChild="newChild" oldChild="oldChild"/> +<domConfig obj="doc" var="domConfig" interface="Document"/> +<setParameter obj="domConfig" name='"split-cdata-sections"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalize obj="doc"/> +<assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="noErrors"/> +</test> + diff --git a/test/testcases/tests/level3/core/textiselementcontentwhitespace01.xml b/test/testcases/tests/level3/core/textiselementcontentwhitespace01.xml new file mode 100644 index 0000000..0ff1f3d --- /dev/null +++ b/test/testcases/tests/level3/core/textiselementcontentwhitespace01.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textiselementcontentwhitespace01"> +<metadata> +<title>textiselementcontentwhitespace01</title> +<creator>IBM</creator> +<description> + Invoke isElementContentWhitespace on a newly created Text Node that contains only whitespace. +Should be false since there is no content model to determine if the node appears within element content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="newText" type="Text"/> +<var name="hasWhitespace" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<createTextNode var="newText" obj="doc" data='" "'/> +<isElementContentWhitespace obj="newText" var="hasWhitespace"/> +<assertFalse actual="hasWhitespace" id="isWhitespace"/> +</test> diff --git a/test/testcases/tests/level3/core/textiselementcontentwhitespace02.xml b/test/testcases/tests/level3/core/textiselementcontentwhitespace02.xml new file mode 100644 index 0000000..7d510be --- /dev/null +++ b/test/testcases/tests/level3/core/textiselementcontentwhitespace02.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textiselementcontentwhitespace02"> +<metadata> +<title>textiselementcontentwhitespace02</title> +<creator>IBM</creator> +<description> +Get the text node child of the "p" element in barfoo. isElementContentWhitespace should +be false since the node is neither whitespace or in element content. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="textNode" type="Text"/> +<var name="isElemContentWhitespace" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<firstChild var="textNode" obj="pElem" interface="Node"/> +<isElementContentWhitespace obj="textNode" var="isElemContentWhitespace"/> +<assertFalse actual="isElemContentWhitespace" id="notElemContentOrWhitespace"/> +</test> diff --git a/test/testcases/tests/level3/core/textiselementcontentwhitespace03.xml b/test/testcases/tests/level3/core/textiselementcontentwhitespace03.xml new file mode 100644 index 0000000..e4374f7 --- /dev/null +++ b/test/testcases/tests/level3/core/textiselementcontentwhitespace03.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textiselementcontentwhitespace03"> +<metadata> +<title>textiselementcontentwhitespace03</title> +<creator>IBM</creator> +<description> +Get the newline between the "body" and "p" element. Since node is both in element content +and whitespace, isElementContentWhitespace should return true. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="ignoringElementContentWhitespace" value="false"/> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="textNode" type="Text"/> +<var name="isElemContentWhitespace" type="boolean"/> +<load var="doc" href="barfoo" willBeModified="false"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="pElem" obj="pList" index="0" interface="NodeList"/> +<!-- should be text node containing new line between "body" and "p" element --> +<previousSibling var="textNode" obj="pElem" interface="Node"/> +<isElementContentWhitespace obj="textNode" var="isElemContentWhitespace"/> +<assertTrue actual="isElemContentWhitespace" id="isElementContentWhitespace"/> +</test> diff --git a/test/testcases/tests/level3/core/textiselementcontentwhitespace04.xml b/test/testcases/tests/level3/core/textiselementcontentwhitespace04.xml new file mode 100644 index 0000000..80cb724 --- /dev/null +++ b/test/testcases/tests/level3/core/textiselementcontentwhitespace04.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textiselementcontentwhitespace04"> +<metadata> +<title>textiselementcontentwhitespace04</title> +<creator>Curt Arnold</creator> +<description> +Replace the text node child of the "p" element in barfoo with whitespace and normalize with validation. +isElementContentWhitespace should be false since the node is not in element content. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-05</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="pList" type="NodeList"/> +<var name="pElem" type="Element"/> +<var name="textNode" type="Text"/> +<var name="blankNode" type="Text"/> +<var name="returnedNode" type="Node"/> +<var name="isElemContentWhitespace" type="boolean"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSetValidation" type="boolean"/> +<var name="replacedNode" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<canSetParameter var="canSetValidation" obj="domConfig" name='"validate"' value="true"/> +<if> + <isTrue value="canSetValidation"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> + <item var="pElem" obj="pList" index="0" interface="NodeList"/> + <firstChild var="textNode" obj="pElem" interface="Node"/> + <createTextNode var="blankNode" obj="doc" data='" "'/> + <replaceChild var="replacedNode" obj="pElem" newChild="blankNode" oldChild="textNode"/> + <normalizeDocument obj="doc"/> + <firstChild var="textNode" obj="pElem" interface="Node"/> + <isElementContentWhitespace obj="textNode" var="isElemContentWhitespace"/> + <assertFalse actual="isElemContentWhitespace" id="notElemContent"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/textiselementcontentwhitespace05.xml b/test/testcases/tests/level3/core/textiselementcontentwhitespace05.xml new file mode 100644 index 0000000..c2d7ec0 --- /dev/null +++ b/test/testcases/tests/level3/core/textiselementcontentwhitespace05.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textiselementcontentwhitespace05"> +<metadata> +<title>textiselementcontentwhitespace05</title> +<creator>Curt Arnold</creator> +<description> +Replace the whitespace before the "p" element in barfoo with non-whitespace and normalize with validation. +isElementContentWhitespace should be false since the node is not whitespace. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-05</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="bodyElem" type="Element"/> +<var name="textNode" type="Text"/> +<var name="nonBlankNode" type="Text"/> +<var name="returnedNode" type="Node"/> +<var name="isElemContentWhitespace" type="boolean"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSetValidation" type="boolean"/> +<var name="refChild" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<canSetParameter var="canSetValidation" obj="domConfig" name='"validate"' value="true"/> +<if> + <isTrue value="canSetValidation"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> + <item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> + <!-- newline between body and p or p --> + <firstChild var="refChild" obj="bodyElem" interface="Node"/> + <!-- replace with non-blank --> + <createTextNode var="nonBlankNode" obj="doc" data='"not blank"'/> + <insertBefore var="returnedNode" obj="bodyElem" newChild="nonBlankNode" refChild="refChild"/> + <normalizeDocument obj="doc"/> + <assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="noErrors"/> + <getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> + <item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> + <!-- non-blank between body and p --> + <firstChild var="textNode" obj="bodyElem" interface="Node"/> + <isElementContentWhitespace obj="textNode" var="isElemContentWhitespace"/> + <assertFalse actual="isElemContentWhitespace" id="notElemContent"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/textiselementcontentwhitespace06.xml b/test/testcases/tests/level3/core/textiselementcontentwhitespace06.xml new file mode 100644 index 0000000..d29a268 --- /dev/null +++ b/test/testcases/tests/level3/core/textiselementcontentwhitespace06.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textiselementcontentwhitespace06"> +<metadata> +<title>textiselementcontentwhitespace06</title> +<creator>Curt Arnold</creator> +<description> +Insert whitespace before the "p" element in barfoo and normalize with validation. +isElementContentWhitespace should be true since the node is whitespace and in element content. +</description> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2004-01-05</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="bodyElem" type="Element"/> +<var name="refChild" type="Node"/> +<var name="textNode" type="Text"/> +<var name="blankNode" type="Text"/> +<var name="returnedNode" type="Node"/> +<var name="isElemContentWhitespace" type="boolean"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSetValidation" type="boolean"/> +<var name="replacedNode" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> + +<load var="doc" href="barfoo" willBeModified="true"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<canSetParameter var="canSetValidation" obj="domConfig" name='"validate"' value="true"/> +<if> + <isTrue value="canSetValidation"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> + <item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> + <!-- newline between body and p or the p element --> + <firstChild var="refChild" obj="bodyElem" interface="Node"/> + <!-- replace with different whitespace --> + <createTextNode var="blankNode" obj="doc" data='" "'/> + <insertBefore var="replacedNode" obj="bodyElem" newChild="blankNode" refChild="refChild"/> + <normalizeDocument obj="doc"/> + <assertLowerSeverity obj="errorMonitor" severity="SEVERITY_ERROR" id="noErrors"/> + <getElementsByTagName var="bodyList" obj="doc" tagname='"body"' interface="Document"/> + <item var="bodyElem" obj="bodyList" index="0" interface="NodeList"/> + <!-- previously inserted whitespace between body and p --> + <firstChild var="textNode" obj="bodyElem" interface="Node"/> + <isElementContentWhitespace obj="textNode" var="isElemContentWhitespace"/> + <assertTrue actual="isElemContentWhitespace" id="isElemContentWhitespace"/> +</if> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext01.xml b/test/testcases/tests/level3/core/textreplacewholetext01.xml new file mode 100644 index 0000000..676b7d9 --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext01.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext01"> +<metadata> +<title>textreplacewholetext01</title> +<creator>IBM</creator> +<description> + Invoke replaceWholeText on an existing Text Node to replace its value with a + new value containing white space characters. Verify the replaceWholeText by + verifying the values returned by wholeText + of the returned Text node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="elementName" type="Element"/> +<var name="textNode" type="Text"/> +<var name="replacedText" type="Text"/> +<var name="wholeText" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="itemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elementName" obj="itemList" index="0" interface="NodeList"/> +<firstChild var="textNode" obj="elementName" interface="Node"/> +<replaceWholeText obj="textNode" var="replacedText" content='"New Content"'/> +<wholeText var="wholeText" obj="replacedText"/> +<assertEquals expected='"New Content"' actual="wholeText" id="textreplacewholetext01_1" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext02.xml b/test/testcases/tests/level3/core/textreplacewholetext02.xml new file mode 100644 index 0000000..975fbdd --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext02.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext02"> +<metadata> +<title>textreplacewholetext02</title> +<creator>IBM</creator> +<description> + Invoke replaceWholeText on an existing Text Node to replace its value with an + empty string value. Verify the repalceWholeText method by verifying if the value + returned is null. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="elementName" type="Element"/> +<var name="textNode" type="Text"/> +<var name="replacedText" type="Text"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="itemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elementName" obj="itemList" index="0" interface="NodeList"/> +<firstChild var="textNode" obj="elementName" interface="Node"/> +<replaceWholeText obj="textNode" var="replacedText" content='""'/> +<assertNull actual="replacedText" id="textreplacewholetext02"/> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext03.xml b/test/testcases/tests/level3/core/textreplacewholetext03.xml new file mode 100644 index 0000000..287c0d2 --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext03.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext03"> +<metadata> +<title>textreplacewholetext03</title> +<creator>IBM</creator> +<description> + Invoke replaceWholeText on an new Text Node to replace its value with a + new value. Verify the repalceWholeText by verifying the values returned by + wholeText of the returned Text node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="textNode" type="Text"/> +<var name="replacedText" type="Text"/> +<var name="wholeText" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createTextNode var="textNode" obj="doc" data='"New Text"'/> +<replaceWholeText obj="textNode" var="replacedText" content='" +a b c b "'/> +<wholeText var="wholeText" obj="replacedText"/> +<assertEquals expected='" +a b c b "' actual="wholeText" id="textreplacewholetext03" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext04.xml b/test/testcases/tests/level3/core/textreplacewholetext04.xml new file mode 100644 index 0000000..e5824d1 --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext04.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext04"> +<metadata> +<title>textreplacewholetext04</title> +<creator>IBM</creator> +<description> + Invoke replaceWholeText on an new Text Node to replace its value with an + empty value. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="textNode" type="Text"/> +<var name="replacedText" type="Text"/> +<var name="wholeText" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createTextNode var="textNode" obj="doc" data='"New Text"'/> +<replaceWholeText obj="textNode" var="replacedText" content='""'/> +<assertNull actual="replacedText" id="retvalIsNull"/> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext05.xml b/test/testcases/tests/level3/core/textreplacewholetext05.xml new file mode 100644 index 0000000..4bd56da --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext05.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext05"> +<metadata> +<title>textreplacewholetext05</title> +<creator>IBM</creator> +<description> + Invoke replaceWholeText on an existing text node with newly created text and CDATASection + nodes appended as children of its parent element node. Verify repalceWholeText by + verifying the values returned by wholeText. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="elementName" type="Element"/> +<var name="textNode" type="Text"/> +<var name="cdataNode" type="CDATASection"/> +<var name="replacedText" type="Text"/> +<var name="wholeText" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="itemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elementName" obj="itemList" index="0" interface="NodeList"/> +<createTextNode var="textNode" obj="doc" data='"New Text"'/> +<createCDATASection var="cdataNode" obj="doc" data='"New CDATA"'/> +<appendChild obj="elementName" var="appendedChild" newChild="textNode"/> +<appendChild obj="elementName" var="appendedChild" newChild="cdataNode"/> +<firstChild var="textNode" obj="elementName" interface="Node"/> +<replaceWholeText obj="textNode" var="replacedText" content='"New Text and Cdata"'/> +<wholeText var="wholeText" obj="replacedText"/> +<assertEquals expected='"New Text and Cdata"' actual="wholeText" id="textreplacewholetext05" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext06.xml b/test/testcases/tests/level3/core/textreplacewholetext06.xml new file mode 100644 index 0000000..ab50457 --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext06.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext06"> +<metadata> +<title>textreplacewholetext06</title> +<creator>IBM</creator> +<description> + The method replaceWholeText substitutes the a specified text for the text of + the current node and all logically-adjacent text nodes. This method raises + a NO_MODIFICATION_ALLOWED_ERR if one of the Text nodes being replaced is readonly. + + Invoke replaceWholeText on an existing text node with newly created text and Entityreference + nodes (whose replacement text is a character entity reference) appended as children of its parent element node. + Where the nodes to be removed are read-only descendants of an EntityReference, the EntityReference + must be removed instead of the read-only nodes. Only if any EntityReference to be removed has + descendants that are not EntityReference, Text, or CDATASection nodes, the replaceWholeText + method must fail, raising a NO_MODIFICATION_ALLOWED_ERR. Verify that the method does not raise + an exception and verify the content of the returned text node. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="expandEntityReferences" value="true"/> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="elementStrong" type="Element"/> +<var name="textNode" type="Text"/> +<var name="erefNode" type="EntityReference"/> +<var name="replacedText" type="Text"/> +<var name="appendedChild" type="Node"/> +<var name="nodeValue" type="DOMString"/> + + + +<load var="doc" href="hc_staff" willBeModified="false"/> + + + +<getElementsByTagName var="itemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elementStrong" obj="itemList" index="0" interface="NodeList"/> +<createTextNode var="textNode" obj="doc" data='"New Text"'/> +<createEntityReference var="erefNode" obj="doc" name='"beta"'/> +<appendChild obj="elementStrong" var="appendedChild" newChild="textNode"/> +<appendChild obj="elementStrong" var="appendedChild" newChild="erefNode"/> +<firstChild var="textNode" obj="elementStrong" interface="Node"/> +<replaceWholeText obj="textNode" var="replacedText" content='"New Text and Cdata"'/> +<nodeValue var="nodeValue" obj="textNode" /> +<assertEquals actual="nodeValue" expected='"New Text and Cdata"' id="textreplacewholetext06" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext07.xml b/test/testcases/tests/level3/core/textreplacewholetext07.xml new file mode 100644 index 0000000..496b22f --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext07.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext07"> +<metadata> +<title>textreplacewholetext07</title> +<creator>IBM</creator> +<description> +Append an entity reference and a text node after to the content of the +first strong element. Then call replaceWholeText on initial content +of that element. Since the entity reference does not contain any +logically-adjacent text content, only the initial text element should +be replaced. +</description> +<contributor>Neil Delima</contributor> +<contributor>Curt Arnold</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=425"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="elementName" type="Element"/> +<var name="textNode" type="Text"/> +<var name="erefNode" type="EntityReference"/> +<var name="replacedText" type="Text"/> +<var name="appendedChild" type="Node"/> +<var name="node" type="Node"/> +<var name="nodeValue" type="DOMString"/> +<var name="nodeType" type="int"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="itemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elementName" obj="itemList" index="0" interface="NodeList"/> +<createEntityReference var="erefNode" obj="doc" name='"ent4"'/> +<createTextNode var="textNode" obj="doc" data='"New Text"'/> +<appendChild obj="elementName" var="appendedChild" newChild="erefNode"/> +<appendChild obj="elementName" var="appendedChild" newChild="textNode"/> +<firstChild var="textNode" obj="elementName" interface="Node"/> +<replaceWholeText obj="textNode" var="replacedText" content='"New Text and Cdata"'/> +<firstChild var="textNode" obj="elementName" interface="Node"/> +<assertSame expected="textNode" actual="replacedText" id="retval_same"/> +<nodeValue var="nodeValue" obj="textNode"/> +<assertEquals actual="nodeValue" expected='"New Text and Cdata"' + id="nodeValueSame" ignoreCase="false"/> +<nextSibling var="node" obj="textNode" interface="Node"/> +<assertNotNull actual="node" id="secondChildNotNull"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="5" id="secondChildIsEntRef" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/textreplacewholetext08.xml b/test/testcases/tests/level3/core/textreplacewholetext08.xml new file mode 100644 index 0000000..ad89eaa --- /dev/null +++ b/test/testcases/tests/level3/core/textreplacewholetext08.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textreplacewholetext08"> +<metadata> +<title>textreplacewholetext08</title> +<creator>Curt Arnold</creator> +<description> +Appends an entity reference containing text and an element to an existing +text node, then calls Text.replaceWholeText on the existing text node. +A NO_MODIFICATION_ALLOWED_ERR should be thrown. +</description> +<date qualifier="created">2003-12-18</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=425"/> +<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=540"/> +</metadata> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="p" type="Element"/> +<var name="entRef" type="EntityReference"/> +<var name="node" type="Node"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="itemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="p" obj="itemList" index="0" interface="NodeList"/> +<createEntityReference var="entRef" obj="doc" name='"ent2"'/> +<appendChild obj="p" var="node" newChild="entRef"/> +<firstChild var="node" obj="p" interface="Node"/> +<assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR"> + <NO_MODIFICATION_ALLOWED_ERR> + <replaceWholeText obj="node" var="node" content='"yo"'/> + </NO_MODIFICATION_ALLOWED_ERR> +</assertDOMException> +</test> diff --git a/test/testcases/tests/level3/core/textwholetext01.xml b/test/testcases/tests/level3/core/textwholetext01.xml new file mode 100644 index 0000000..40eb961 --- /dev/null +++ b/test/testcases/tests/level3/core/textwholetext01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textwholetext01"> +<metadata> +<title>textwholetext01</title> +<creator>IBM</creator> +<description> + Invoke wholetext on an existing Text Node that contains whitespace and verify if + the value returned is correct. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-wholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="elementName" type="Element"/> +<var name="textNode" type="Text"/> +<var name="nameWholeText" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="itemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elementName" obj="itemList" index="0" interface="NodeList"/> +<firstChild var="textNode" obj="elementName" interface="Node"/> +<wholeText obj="textNode" var="nameWholeText"/> +<assertEquals expected='"Margaret Martin"' actual="nameWholeText" id="textwholetext01" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/textwholetext02.xml b/test/testcases/tests/level3/core/textwholetext02.xml new file mode 100644 index 0000000..bacb859 --- /dev/null +++ b/test/testcases/tests/level3/core/textwholetext02.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textwholetext02"> +<metadata> +<title>textwholetext02</title> +<creator>IBM</creator> +<description> + Invoke wholetext on an existing Text Node that contains whitespace and and verify if + the value returned is correct. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-wholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="itemList" type="NodeList"/> +<var name="elementName" type="Element"/> +<var name="textNode" type="Text"/> +<var name="newTextNode" type="Text"/> +<var name="wholeText" type="DOMString"/> +<var name="appendedChild" type="Node"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<getElementsByTagName var="itemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elementName" obj="itemList" index="0" interface="NodeList"/> +<createTextNode var="newTextNode" obj="doc" data='"New Text"'/> +<appendChild obj="elementName" var="appendedChild" newChild="newTextNode"/> +<firstChild var="textNode" obj="elementName" interface="Node"/> +<wholeText obj="textNode" var="wholeText"/> +<assertEquals expected='"Margaret MartinNew Text"' actual="wholeText" id="textwholetext02" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/textwholetext03.xml b/test/testcases/tests/level3/core/textwholetext03.xml new file mode 100644 index 0000000..26ef6b0 --- /dev/null +++ b/test/testcases/tests/level3/core/textwholetext03.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="textwholetext03"> +<metadata> +<title>textwholetext03</title> +<creator>IBM</creator> +<description> + Invoke wholetext on two newly created text nodes and verify if the value returned + is correct. +</description> +<contributor>Neil Delima</contributor> +<date qualifier="created">2002-05-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-wholeText"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="text1" type="Text"/> +<var name="text2" type="Text"/> +<var name="appendedChild" type="Node"/> +<var name="combinedText" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"p"'/> +<createTextNode var="text1" obj="doc" data='"Text I"'/> +<createTextNode var="text2" obj="doc" data='" Text II"'/> +<appendChild obj="elem" var="appendedChild" newChild="text1"/> +<appendChild obj="elem" var="appendedChild" newChild="text2"/> +<wholeText obj="text1" var="combinedText"/> +<assertEquals expected='"Text I Text II"' actual="combinedText" id="textwholetext03" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfogettypename03.xml b/test/testcases/tests/level3/core/typeinfogettypename03.xml new file mode 100644 index 0000000..16d0aa1 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfogettypename03.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfogettypename03"> +<metadata> +<title>typeinfogettypename03</title> +<creator>IBM</creator> +<description> + The typeName attribute states the name of a type declared for the associated element or + attribute, or null if unknown. + + Invoke getSchemaTypeInfo method on an attribute having [type definition] property. Expose + {name} and {target namespace} properties of the [type definition] property. + Verify that the typeName of id's schemaTypeInfo are correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="attrid" type="Attr"/> +<var name="acElem" type="Element"/> +<var name="attrTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attrid" obj="acElem" name='"id"'/> +<schemaTypeInfo var="attrTypeInfo" obj="attrid" interface="Attr"/> +<typeName var="typeName" obj="attrTypeInfo"/> +<assertEquals expected='"ID"' actual="typeName" id="typeinfogettypename03_1" ignoreCase="false"/> + +</test> diff --git a/test/testcases/tests/level3/core/typeinfogettypename04.xml b/test/testcases/tests/level3/core/typeinfogettypename04.xml new file mode 100644 index 0000000..73d8ff4 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfogettypename04.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfogettypename04"> +<metadata> +<title>typeinfogettypename04</title> +<creator>IBM</creator> +<description> + The typeName attribute states the name of a type declared for the associated element or + attribute, or null if unknown. + + Invoke getSchemaTypeInfo method on an attribute having [member type definition]property. Expose + {name} and {target namespace} properties of the [member type definition] property. + Verify that the typeName of an em element's schemaTypeInfo is correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="emElem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="emElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="emElem" interface="Element"/> +<typeName var="typeName" obj="elemTypeInfo"/> +<assertEquals expected='"emType"' actual="typeName" id="typeinfogettypename04_1" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfogettypenamespace01.xml b/test/testcases/tests/level3/core/typeinfogettypenamespace01.xml new file mode 100644 index 0000000..756e3d6 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfogettypenamespace01.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfogettypenamespace01"> +<metadata> +<title>typeinfogettypenamespace01</title> +<creator>IBM</creator> +<description> + The typeNamespace attribute states the namespace of a type declared for the associated element or + attribute, or null if unknown. + + Invoke getSchemaTypeInfo method on an attribute having [type definition] property. Expose + {name} and {target namespace} properties of the [type definition] property. + Verify that the typeNamespace of the attrib1 and attrib3's schemaTypeInfo are correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acElem" type="Element"/> +<var name="titleAttr" type="Attr"/> +<var name="attrTypeInfo" type="TypeInfo"/> +<var name="typeNamespace" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="titleAttr" obj="acElem" name='"title"'/> +<schemaTypeInfo var="attrTypeInfo" obj="titleAttr" interface="Attr"/> +<typeNamespace var="typeNamespace" obj="attrTypeInfo"/> +<assertEquals expected='"http://www.w3.org/2001/XMLSchema"' actual="typeNamespace" id="typeinfogettypename01_1" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfogettypenamespace03.xml b/test/testcases/tests/level3/core/typeinfogettypenamespace03.xml new file mode 100644 index 0000000..5ae21fb --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfogettypenamespace03.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfogettypenamespace03"> +<metadata> +<title>typeinfogettypenamespace03</title> +<creator>IBM</creator> +<description> + The typeNamespace attribute states the namespace of a type declared for the associated element or + attribute, or null if unknown. + + Invoke getSchemaTypeInfo method on an attribute having [type definition] property. Expose + {name} and {target namespace} properties of the [type definition] property. + Verify that the typeName of class's schemaTypeInfo is correct. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="classAttr" type="Attr"/> +<var name="attrTypeInfo" type="TypeInfo"/> +<var name="typeNamespace" type="DOMString"/> +<var name="acElem" type="Element"/> +<load var="doc" href="hc_staff" willBeModified="false"/> + +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acElem" obj="elemList" index="1" interface="NodeList"/> +<getAttributeNode var="classAttr" obj="acElem" name='"class"'/> +<schemaTypeInfo var="attrTypeInfo" obj="classAttr" interface="Attr"/> +<typeNamespace var="typeNamespace" obj="attrTypeInfo"/> +<assertEquals expected='"http://www.w3.org/1999/xhtml"' actual="typeNamespace" id="typeinfogettypename03_1" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfogettypenamespace04.xml b/test/testcases/tests/level3/core/typeinfogettypenamespace04.xml new file mode 100644 index 0000000..8ca3c02 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfogettypenamespace04.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfogettypenamespace04"> +<metadata> +<title>typeinfogettypenamespace04</title> +<creator>IBM</creator> +<description> + The typeName attribute states the name of a type declared for the associated element or + attribute, or null if unknown. + + Invoke getSchemaTypeInfo method on an attribute having [member type definition]property. Expose + {name} and {target namespace} properties of the [member type definition] property. + Verify that the typeNamespace of eldblUnionA's schemaTypeInfo is null??? (sv) +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="emElem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeNamespace" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="emElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="emElem" interface="Element"/> +<typeNamespace var="typeNamespace" obj="elemTypeInfo"/> +<assertEquals expected='"http://www.w3.org/1999/xhtml"' actual="typeNamespace" id="typeinfogettypenamespace04_1" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom01.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom01.xml new file mode 100644 index 0000000..346bb86 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom01.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom01"> +<metadata> +<title>typeinfoisderivedfrom01</title> +<creator>Curt Arnold</creator> +<description> +DTD types always return false for isDerivedFrom. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/TR/REC-xml"' + typeNameArg='"CDATA"' derivationMethod="0"/> +<assertFalse actual="isDerived" id="isDerived0"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/TR/REC-xml"' + typeNameArg='"CDATA"' derivationMethod="15"/> +<assertFalse actual="isDerived" id="isDerived15"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom02.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom02.xml new file mode 100644 index 0000000..a0ab434 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom02.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom02"> +<metadata> +<title>typeinfoisderivedfrom02</title> +<creator>Curt Arnold</creator> +<description> +Check how xsd:string is derived from itself. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xsd:string --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromSelfRestriction"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="14"/> +<assertFalse actual="isDerived" id="derivedFromSelfOther"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="0"/> +<assertTrue actual="isDerived" id="derivedFromSelfAny"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromSelfAll"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom03.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom03.xml new file mode 100644 index 0000000..cbfbf9e --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom03.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom03"> +<metadata> +<title>typeinfoisderivedfrom03</title> +<creator>Curt Arnold</creator> +<description> +Check that isDerivedFrom does considers xsd:string to be derived from anySimpleType. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xsd:string --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"string"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom04.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom04.xml new file mode 100644 index 0000000..fc61788 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom04.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom04"> +<metadata> +<title>typeinfoisderivedfrom04</title> +<creator>Curt Arnold</creator> +<description> +Check if xsd:string is derived from xsd:anyType by any method. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xsd:string --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"string"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromAnyType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom05.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom05.xml new file mode 100644 index 0000000..edb506d --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom05.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom05"> +<metadata> +<title>typeinfoisderivedfrom05</title> +<creator>Curt Arnold</creator> +<description> +Check if xsd:string is derived from xsd:anyType by restriction. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xsd:string --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"string"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromAnyTypeRestrictionOnly"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom06.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom06.xml new file mode 100644 index 0000000..5129665 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom06.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom06"> +<metadata> +<title>typeinfoisderivedfrom06</title> +<creator>Curt Arnold</creator> +<description> +Check if xsd:string is derived from xsd:anyType by any method except restriction. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xsd:string --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"string"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="14"/> +<assertFalse actual="isDerived" id="derivedFromAnyTypeExceptRestriction"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom07.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom07.xml new file mode 100644 index 0000000..d426aa3 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom07.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom07"> +<metadata> +<title>typeinfoisderivedfrom07</title> +<creator>Curt Arnold</creator> +<description> +Check if xsd:string is derived from xsd:anyType using 0 as derivation method. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"title"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xsd:string --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"string"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="0"/> +<assertTrue actual="isDerived" id="derivedFromAnyType0"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom08.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom08.xml new file mode 100644 index 0000000..5fd16a8 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom08.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom08"> +<metadata> +<title>typeinfoisderivedfrom08</title> +<creator>Curt Arnold</creator> +<description> +Check if classType is derived from xsd:string by any method. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xhtml:classType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromString"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom09.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom09.xml new file mode 100644 index 0000000..3927da4 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom09.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom09"> +<metadata> +<title>typeinfoisderivedfrom09</title> +<creator>Curt Arnold</creator> +<description> +Check if classType is derived from xsd:anySimpleType by any method. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xhtml:classType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom10.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom10.xml new file mode 100644 index 0000000..39ccec5 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom10.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom10"> +<metadata> +<title>typeinfoisderivedfrom10</title> +<creator>Curt Arnold</creator> +<description> +Check if classType is derived from anyType by any method. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xhtml:classType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromAnyType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom11.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom11.xml new file mode 100644 index 0000000..ba6a588 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom11.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom11"> +<metadata> +<title>typeinfoisderivedfrom11</title> +<creator>Curt Arnold</creator> +<description> +Check if classType is derived from xsd:anyType by restriction. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xhtml:classType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromAnyTypeRestrictionOnly"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom12.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom12.xml new file mode 100644 index 0000000..ee46e4a --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom12.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom12"> +<metadata> +<title>typeinfoisderivedfrom12</title> +<creator>Curt Arnold</creator> +<description> +Check classType is derived from anyType specifying derivationMethod as 0. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xhtml:classType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="nameIsString"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="0"/> +<assertTrue actual="isDerived" id="derivedFromAnyType0"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom13.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom13.xml new file mode 100644 index 0000000..7b1af06 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom13.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom13"> +<metadata> +<title>typeinfoisderivedfrom13</title> +<creator>Curt Arnold</creator> +<description> +Check if classType is derived from xsd:anyType by any method other than restriction. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xhtml:classType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="name"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="14"/> +<assertFalse actual="isDerived" id="derivedFromAnyTypeExceptRestriction"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom14.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom14.xml new file mode 100644 index 0000000..281d1c8 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom14.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom14"> +<metadata> +<title>typeinfoisderivedfrom14</title> +<creator>Curt Arnold</creator> +<description> +Check how classType is derived from itself. +</description> +<date qualifier="created">2004-01-11</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<getAttributeNode var="attr" obj="acronymElem" name='"class"'/> +<schemaTypeInfo var="typeInfo" obj="attr" interface="Attr"/> +<!-- type info should be xhtml:classType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"classType"' ignoreCase="false" id="name"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"classType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromSelfRestriction"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"classType"' derivationMethod="14"/> +<assertFalse actual="isDerived" id="notDerivedFromSelfOther"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"classType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromSelfAll"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"classType"' derivationMethod="0"/> +<assertTrue actual="isDerived" id="derivedFromSelfAny"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom15.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom15.xml new file mode 100644 index 0000000..1ced9c0 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom15.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom15"> +<metadata> +<title>typeinfoisderivedfrom15</title> +<creator>Curt Arnold</creator> +<description> +Check "emType" is derived from emp0001_3Type by any method. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="name"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"emp0001_3Type"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromEmp13AnyMethod"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom16.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom16.xml new file mode 100644 index 0000000..556285d --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom16.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom16"> +<metadata> +<title>typeinfoisderivedfrom16</title> +<creator>Curt Arnold</creator> +<description> +Check emType is derived from emp0001_3Type by union. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="name"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"emp0001_3Type"' derivationMethod="4"/> +<assertTrue actual="isDerived" id="derivedFromEmp13Union"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom17.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom17.xml new file mode 100644 index 0000000..a046bdc --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom17.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom17"> +<metadata> +<title>typeinfoisderivedfrom17</title> +<creator>Curt Arnold</creator> +<description> +Check if emType is derived from emp0001_3Type by any method other than union. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="name"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"emp0001_3Type"' derivationMethod="11"/> +<assertFalse actual="isDerived" id="derivedFromEmp13NotUnion"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom18.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom18.xml new file mode 100644 index 0000000..ca4f97b --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom18.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom18"> +<metadata> +<title>typeinfoisderivedfrom18</title> +<creator>Curt Arnold</creator> +<description> +Check if emType is derived from xsd:ID by restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="typeName"/> + +<!-- emType is not derived by restriction from xsd:ID even though + every memberType in the union is derived by restriction from xsd:ID --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"ID"' derivationMethod="1"/> +<assertFalse actual="isDerived" id="derivedFromID"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom19.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom19.xml new file mode 100644 index 0000000..44356ee --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom19.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom19"> +<metadata> +<title>typeinfoisderivedfrom19</title> +<creator>Curt Arnold</creator> +<description> +Check emType is derived from anySimpleType by restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom20.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom20.xml new file mode 100644 index 0000000..3a0e665 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom20.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom20"> +<metadata> +<title>typeinfoisderivedfrom20</title> +<creator>Curt Arnold</creator> +<description> +Check if emType is derived from anyType by restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromAnyType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom21.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom21.xml new file mode 100644 index 0000000..065af84 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom21.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom21"> +<metadata> +<title>typeinfoisderivedfrom21</title> +<creator>Curt Arnold</creator> +<description> +Check if emType is derived from itself. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"emType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromSelfByRestriction"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"emType"' derivationMethod="14"/> +<assertFalse actual="isDerived" id="notDerivedFromSelfOtherMethod"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"emType"' derivationMethod="0"/> +<assertTrue actual="isDerived" id="derivedFromSelfByAny"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"emType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromSelfByAll"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom22.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom22.xml new file mode 100644 index 0000000..ceec2ad --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom22.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom22"> +<metadata> +<title>typeinfoisderivedfrom22</title> +<creator>Curt Arnold</creator> +<description> +Check strongType is derived from xsd:string by any method. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromStringAnyMethod"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom23.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom23.xml new file mode 100644 index 0000000..447d14e --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom23.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom23"> +<metadata> +<title>typeinfoisderivedfrom23</title> +<creator>Curt Arnold</creator> +<description> +Check if strongType is derived from xsd:string by list. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="8"/> +<assertTrue actual="isDerived" id="derivedFromStringList"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom24.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom24.xml new file mode 100644 index 0000000..6fd8ec8 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom24.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom24"> +<metadata> +<title>typeinfoisderivedfrom24</title> +<creator>Curt Arnold</creator> +<description> +Check if strongType is derived from xsd:string by any method other than list. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="7"/> +<assertFalse actual="isDerived" id="derivedFromStringNotList"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom25.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom25.xml new file mode 100644 index 0000000..33e8500 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom25.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom25"> +<metadata> +<title>typeinfoisderivedfrom25</title> +<creator>Curt Arnold</creator> +<description> +Check if strongType is derived from anySimpleType by restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom26.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom26.xml new file mode 100644 index 0000000..3b6cc1d --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom26.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom26"> +<metadata> +<title>typeinfoisderivedfrom26</title> +<creator>Curt Arnold</creator> +<description> +Check if strongType is derived from anyType by restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromAnyType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom27.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom27.xml new file mode 100644 index 0000000..e6c6666 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom27.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom27"> +<metadata> +<title>typeinfoisderivedfrom27</title> +<creator>Curt Arnold</creator> +<description> +Check if strongType is derived from anyType by union or extension. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="6"/> +<assertFalse actual="isDerived" id="derivedFromAnyType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom28.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom28.xml new file mode 100644 index 0000000..c4f2fe3 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom28.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom28"> +<metadata> +<title>typeinfoisderivedfrom28</title> +<creator>Curt Arnold</creator> +<description> +Check how strongType is derived from itself. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"strongType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="notDerivedFromSelfRestriction"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"strongType"' derivationMethod="14"/> +<assertFalse actual="isDerived" id="notDerivedFromSelfOther"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"strongType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="notDerivedFromSelfAll"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"strongType"' derivationMethod="0"/> +<assertTrue actual="isDerived" id="notDerivedFromSelfAny"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom29.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom29.xml new file mode 100644 index 0000000..b8ae97e --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom29.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom29"> +<metadata> +<title>typeinfoisderivedfrom29</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type for p element is derived from pType. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<!-- check its relationship with pType --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"pType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromPTypeAnyMethod"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom30.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom30.xml new file mode 100644 index 0000000..8f95608 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom30.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom30"> +<metadata> +<title>typeinfoisderivedfrom30</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type for p element is derived from pType by restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"pType"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="derivedFromPTypeRestriction"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom31.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom31.xml new file mode 100644 index 0000000..2719324 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom31.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom31"> +<metadata> +<title>typeinfoisderivedfrom31</title> +<creator>Curt Arnold</creator> +<description> +Check anonymous type for p element is derived from pType by any method other than restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<!-- check its relationship with pType --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"pType"' derivationMethod="14"/> +<assertFalse actual="isDerived" id="derivedFromPTypeNotRestriction"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom32.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom32.xml new file mode 100644 index 0000000..26ece55 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom32.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom32"> +<metadata> +<title>typeinfoisderivedfrom32</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of p element is derived from part1. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<!-- check its relationship with part1 --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"part1"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromPart1AnyMethod"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom33.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom33.xml new file mode 100644 index 0000000..deaaef1 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom33.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom33"> +<metadata> +<title>typeinfoisderivedfrom33</title> +<creator>Curt Arnold</creator> +<description> +Check is anonymous type of p element is derived by extension from part1. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"part1"' derivationMethod="2"/> +<assertTrue actual="isDerived" id="derivedFromPart1Extension"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom34.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom34.xml new file mode 100644 index 0000000..921c7e5 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom34.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom34"> +<metadata> +<title>typeinfoisderivedfrom34</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of p element is derived from part1 by any method other than extension. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"part1"' derivationMethod="13"/> +<assertFalse actual="isDerived" id="derivedFromPart1NotExtension"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom35.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom35.xml new file mode 100644 index 0000000..102814b --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom35.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom35"> +<metadata> +<title>typeinfoisderivedfrom35</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of p element is derived from xsd:simpleType. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<!-- check relationship with anySimpleType --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="15"/> +<assertFalse actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom36.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom36.xml new file mode 100644 index 0000000..d8a5c59 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom36.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom36"> +<metadata> +<title>typeinfoisderivedfrom36</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of p element is derived from xsd:anyType. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<!-- check relationship with anyType --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="15"/> +<assertTrue actual="isDerived" id="derivedFromAnyTypeAnyMethod"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom37.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom37.xml new file mode 100644 index 0000000..c4966aa --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom37.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom37"> +<metadata> +<title>typeinfoisderivedfrom37</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of p element is derived from xsd:anyType by restriction. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="1"/> +<assertFalse actual="isDerived" id="derivedFromAnyTypeRestriction"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom38.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom38.xml new file mode 100644 index 0000000..314a8cc --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom38.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom38"> +<metadata> +<title>typeinfoisderivedfrom38</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of p element is derived from xsd:anyType by any method other +than extension. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="13"/> +<assertFalse actual="isDerived" id="derivedFromAnyTypeNotExtension"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom39.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom39.xml new file mode 100644 index 0000000..01f14ec --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom39.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom39"> +<metadata> +<title>typeinfoisderivedfrom39</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of p element derives from itself. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<var name="typeNS" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be anonymous type defined within p element --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<typeNamespace var="typeNS" obj="typeInfo"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='typeNS' + typeNameArg='typeName' derivationMethod="15"/> +<assertFalse actual="isDerived" id="notDerivedFromSelf"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom40.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom40.xml new file mode 100644 index 0000000..23dd8e6 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom40.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom40"> +<metadata> +<title>typeinfoisderivedfrom40</title> +<creator>Curt Arnold</creator> +<description> +Check if emType is derived from xsd:ID by union. +</description> +<date qualifier="created">2004-01-13</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="typeName"/> +<!-- emType is derived by union from xsd:ID since + at least one memberType in the union is derived by restriction from xsd:ID --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"ID"' derivationMethod="4"/> +<assertTrue actual="isDerived" id="derivedFromID"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom41.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom41.xml new file mode 100644 index 0000000..0acf008 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom41.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom41"> +<metadata> +<title>typeinfoisderivedfrom41</title> +<creator>Curt Arnold</creator> +<description> +Check if emType is derived from xsd:ID by any method other than union or restriction. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be emType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"emType"' ignoreCase="false" id="typeName"/> +<!-- emType is derived by union from xsd:ID since + at least one memberType in the union is derived by restriction from xsd:ID --> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"ID"' derivationMethod="10"/> +<assertFalse actual="isDerived" id="derivedFromID"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom42.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom42.xml new file mode 100644 index 0000000..f3a88d4 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom42.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom42"> +<metadata> +<title>typeinfoisderivedfrom42</title> +<creator>Curt Arnold</creator> +<description> +Check if strongType is derived from anySimpleType by list. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<var name="typeName" type="DOMString"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<!-- type should be strongType --> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<typeName var="typeName" obj="typeInfo"/> +<assertEquals actual="typeName" expected='"strongType"' ignoreCase="false" id="typeName"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="8"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom43.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom43.xml new file mode 100644 index 0000000..607cc93 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom43.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom43"> +<metadata> +<title>typeinfoisderivedfrom43</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of acronym element derived from anyType by restriction. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="acronymElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="1"/> +<assertFalse actual="isDerived" id="derivedFromAnyType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom44.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom44.xml new file mode 100644 index 0000000..f2d4410 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom44.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom44"> +<metadata> +<title>typeinfoisderivedfrom44</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of acronym element derived from anyType by any method other than extension. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="acronymElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="13"/> +<assertFalse actual="isDerived" id="derivedFromAnyType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom45.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom45.xml new file mode 100644 index 0000000..170b697 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom45.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom45"> +<metadata> +<title>typeinfoisderivedfrom45</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of acronym element derived from anySimpleType by extension. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="acronymElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="2"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom46.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom46.xml new file mode 100644 index 0000000..94d16be --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom46.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom46"> +<metadata> +<title>typeinfoisderivedfrom46</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of acronym element derived from anySimpleType by any method other than extension. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="acronymElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="13"/> +<assertFalse actual="isDerived" id="derivedFromAnySimpleType"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom47.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom47.xml new file mode 100644 index 0000000..2eb0c0a --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom47.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom47"> +<metadata> +<title>typeinfoisderivedfrom47</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of acronym element derived from xsd:string by extension. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="acronymElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="2"/> +<assertTrue actual="isDerived" id="derivedFromString"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom48.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom48.xml new file mode 100644 index 0000000..88b4c62 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom48.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom48"> +<metadata> +<title>typeinfoisderivedfrom48</title> +<creator>Curt Arnold</creator> +<description> +Check if anonymous type of acronym element derived from xsd:string by any method other than extension. +</description> +<date qualifier="created">2004-01-15</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="2" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="acronymElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"string"' derivationMethod="13"/> +<assertFalse actual="isDerived" id="derivedFromString"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom49.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom49.xml new file mode 100644 index 0000000..edd7097 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom49.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom49"> +<metadata> +<title>typeinfoisderivedfrom49</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns true +when asked if it derives by list from the item type. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"double"' derivationMethod="8"/> +<assertTrue actual="isDerived" id="derivedFromDoubleList"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom50.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom50.xml new file mode 100644 index 0000000..79835f9 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom50.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom50"> +<metadata> +<title>typeinfoisderivedfrom50</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns true +when asked if it derives by any method from the item type. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"double"' derivationMethod="0"/> +<assertTrue actual="isDerived" id="derivedFromDoubleAny"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom51.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom51.xml new file mode 100644 index 0000000..eeba513 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom51.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom51"> +<metadata> +<title>typeinfoisderivedfrom51</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns false +when asked if it derives by any method other than list from the item type. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"double"' derivationMethod="7"/> +<assertFalse actual="isDerived" id="derivedFromDoubleNonList"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom52.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom52.xml new file mode 100644 index 0000000..6faac43 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom52.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom52"> +<metadata> +<title>typeinfoisderivedfrom52</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns false +when asked if it derives by restriction from anySimpleType type. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="1"/> +<assertFalse actual="isDerived" id="derivedFromAnySimpleRestriction"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom53.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom53.xml new file mode 100644 index 0000000..1dd52ba --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom53.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom53"> +<metadata> +<title>typeinfoisderivedfrom53</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns true +when asked if it derives by extension from anySimpleType. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="2"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleExtension"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom54.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom54.xml new file mode 100644 index 0000000..e6cbaf7 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom54.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom54"> +<metadata> +<title>typeinfoisderivedfrom54</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns true +when asked if it derives by list from anySimpleType. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anySimpleType"' derivationMethod="8"/> +<assertTrue actual="isDerived" id="derivedFromAnySimpleList"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom55.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom55.xml new file mode 100644 index 0000000..2cff9c3 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom55.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom55"> +<metadata> +<title>typeinfoisderivedfrom55</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns true +when asked if it derives by extension from anyType type. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="2"/> +<assertTrue actual="isDerived" id="derivedFromAnyRestriction"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom56.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom56.xml new file mode 100644 index 0000000..0e5404a --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom56.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom56"> +<metadata> +<title>typeinfoisderivedfrom56</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns true +when asked if it derives by extension from anyType. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="2"/> +<assertTrue actual="isDerived" id="derivedFromAnyExtension"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom57.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom57.xml new file mode 100644 index 0000000..66e1a18 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom57.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom57"> +<metadata> +<title>typeinfoisderivedfrom57</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a list of a item type returns true +when asked if it derives by list from anyType. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"anyType"' derivationMethod="8"/> +<assertTrue actual="isDerived" id="derivedFromAnyList"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom58.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom58.xml new file mode 100644 index 0000000..6983000 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom58.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom58"> +<metadata> +<title>typeinfoisderivedfrom58</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a union returns true +when asked if it derives by union from a member type of the union. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="codeElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"code"' interface="Document"/> +<item var="codeElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="codeElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' + typeNameArg='"unbounded"' derivationMethod="4"/> +<assertTrue actual="isDerived" id="isDerived"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom59.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom59.xml new file mode 100644 index 0000000..2a24946 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom59.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom59"> +<metadata> +<title>typeinfoisderivedfrom59</title> +<creator>Curt Arnold</creator> +<description> +Check if a type derived by extension from a union returns true +when asked if it derives by union from a restricted base of +a member of type union. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="codeElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="elem" type="Element"/> +<var name="elemName" type="DOMString"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"code"' interface="Document"/> +<item var="codeElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="codeElem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"integer"' derivationMethod="4"/> +<assertTrue actual="isDerived" id="isDerived"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom60.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom60.xml new file mode 100644 index 0000000..41c06e7 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom60.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom60"> +<metadata> +<title>typeinfoisderivedfrom60</title> +<creator>Curt Arnold</creator> +<description> +Check if xs:IDREFS is derived by list from xs:IDREF. +</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"IDREF"' derivationMethod="8"/> +<assertTrue actual="isDerived" id="isDerived"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom61.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom61.xml new file mode 100644 index 0000000..580d204 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom61.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom61"> +<metadata> +<title>typeinfoisderivedfrom61</title> +<creator>Curt Arnold</creator> +<description> +Check if xs:byte is derived by restriction from xs:short</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"short"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="isDerived"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom62.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom62.xml new file mode 100644 index 0000000..04ef63d --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom62.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom62"> +<metadata> +<title>typeinfoisderivedfrom62</title> +<creator>Curt Arnold</creator> +<description> +Check if xs:byte is derived by restriction from xs:decimal</description> +<date qualifier="created">2004-02-14</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="typeInfo" type="TypeInfo"/> +<var name="isDerived" type="boolean"/> +<load var="doc" href="typeinfo" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="typeInfo" obj="elem" interface="Element"/> +<assertNotNull actual="typeInfo" id="typeInfoNotNull"/> +<isDerivedFrom var="isDerived" obj="typeInfo" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' + typeNameArg='"decimal"' derivationMethod="1"/> +<assertTrue actual="isDerived" id="isDerived"/> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom63.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom63.xml new file mode 100644 index 0000000..a605bd2 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom63.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom63"> +<metadata> +<title>typeinfoisderivedfrom63</title> +<creator>IBM</creator> +<description> + The isDerivedFrom method checks if this TypeInfo derives from the specified ancestor type. + If the document's schema is a DTD or no schema is associated with the document, this method + will always return false. + + Get schemaTypeInfo on an element that belongs to a document with an XML DTD. Invoke method + isDerivedFrom and verify that returned the typeNamespace is null. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-10</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> + +<implementationAttribute name="validating" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="acronymElem" type="Element"/> +<var name="retValue" type="boolean"/> +<var name="typeNamespace" type="DOMString"/> +<var name="nullName" type="DOMString" isNull="true"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acronymElem" obj="elemList" index="0" interface="NodeList"/> + +<schemaTypeInfo var="elemTypeInfo" obj="acronymElem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/TR/REC-xml"' typeNameArg="nullName" derivationMethod="0" /> +<assertFalse actual="retValue" id="typeinfoisderivedfrom63" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom64.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom64.xml new file mode 100644 index 0000000..f2e7c58 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom64.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom64"> +<metadata> +<title>typeinfoisderivedfrom64</title> +<creator>IBM</creator> +<description> +Check that the simpleType of an attributes derives by restriction from itself +and from its base type. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="acElem" type="Element"/> +<var name="classAttr" type="Attr"/> +<var name="attrTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="acElem" obj="elemList" index="1" interface="NodeList"/> +<getAttributeNode var="classAttr" obj="acElem" name='"class"'/> +<schemaTypeInfo var="attrTypeInfo" obj="classAttr" interface="Attr"/> +<isDerivedFrom obj="attrTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' typeNameArg='"classType"' derivationMethod="1"/> +<assertTrue actual="retValue" id="derivedFromClassType" /> +<isDerivedFrom obj="attrTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' typeNameArg='"string"' derivationMethod="1"/> +<assertTrue actual="retValue" id="derivedFromString" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom65.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom65.xml new file mode 100644 index 0000000..ea20157 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom65.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom65"> +<metadata> +<title>typeinfoisderivedfrom65</title> +<creator>IBM</creator> +<description> + The isDerivedFrom method checks if this TypeInfo derives from the specified ancestor type. + + Get schemaTypeInfo on a simple type attribute that belongs to a document with an XML schema. + Invoke method isDerivedFrom with derivation method list and verify that the value returned is true. +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> + +<implementationAttribute name="schemaValidating" value="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemTypeInfo" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="strongElem" type="Element"/> +<var name="attrTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="strongElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="strongElem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' typeNameArg='"string"' derivationMethod="8"/> +<assertTrue actual="retValue" id="lisrDerivedFromString" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom66.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom66.xml new file mode 100644 index 0000000..b1bcad0 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom66.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom66"> +<metadata> +<title>typeinfoisderivedfrom66</title> +<creator>IBM</creator> +<description> + The isDerivedFrom method checks if this TypeInfo derives from the specified ancestor type. + + Get schemaTypeInfo on an element of type Union that belongs to a document with an XML schema. + Invoke method isDerivedFrom with derivation method union and verify that the value returned is true. + Verify that emType is derived from emp0004_5Type by union. + +</description> +<contributor>Jenny Hsu</contributor> +<date qualifier="created">2003-10-28</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="unionElem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"em"' interface="Document"/> +<item var="unionElem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="unionElem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' typeNameArg='"emp0004_5Type"' derivationMethod="0"/> +<assertTrue actual="retValue" id="typeinfoisderivedfrom66" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom67.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom67.xml new file mode 100644 index 0000000..dcf52c5 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom67.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom67"> +<metadata> +<title>typeinfoisderivedfrom67</title> +<creator>Curt Arnold</creator> +<description> +Checks that isDerivedFrom(...,METHOD_UNION) returns true when there +are multiple union derivation steps between the target and +ancestor type. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"sup"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="elem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' typeNameArg='"emp0004_5Type"' derivationMethod="4"/> +<assertTrue actual="retValue" id="isDerived" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom68.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom68.xml new file mode 100644 index 0000000..ec18564 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom68.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom68"> +<metadata> +<title>typeinfoisderivedfrom68</title> +<creator>Curt Arnold</creator> +<description> +Checks that isDerivedFrom(...,0) returns true when there +is more than one union derivation steps between the target and +ancestor type. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"sup"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="elem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' typeNameArg='"emp0004_5Type"' derivationMethod="0"/> +<assertTrue actual="retValue" id="isDerived" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom69.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom69.xml new file mode 100644 index 0000000..d5cf376 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom69.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom69"> +<metadata> +<title>typeinfoisderivedfrom69</title> +<creator>Curt Arnold</creator> +<description> +Checks that isDerivedFrom(...,DERIVATION_UNION|DERIVATION_LIST) returns false when there +is both a union and list derivation steps between the target and +ancestor type. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"sup"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="elem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' typeNameArg='"integer"' derivationMethod="12"/> +<assertFalse actual="retValue" id="isDerived" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom70.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom70.xml new file mode 100644 index 0000000..859cab4 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom70.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom70"> +<metadata> +<title>typeinfoisderivedfrom70</title> +<creator>Curt Arnold</creator> +<description> +Checks that isDerivedFrom(...,0) returns true when there +is both a union and list derivation steps between the target and +ancestor type. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"sup"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="elem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/2001/XMLSchema"' typeNameArg='"string"' derivationMethod="0"/> +<assertTrue actual="retValue" id="isDerived" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom71.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom71.xml new file mode 100644 index 0000000..9a8fc88 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom71.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom71"> +<metadata> +<title>typeinfoisderivedfrom71</title> +<creator>Curt Arnold</creator> +<description> +Checks that isDerivedFrom(...,0) returns true when target type is a list +of an union of the ancestor type. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"code"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="elem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' typeNameArg='"field"' derivationMethod="0"/> +<assertTrue actual="retValue" id="isDerived" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom72.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom72.xml new file mode 100644 index 0000000..1c4af19 --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom72.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom72"> +<metadata> +<title>typeinfoisderivedfrom72</title> +<creator>Curt Arnold</creator> +<description> +Checks that isDerivedFrom(...,DERIVATION_LIST|DERIVATION_UNION) returns false when target type is a list +of an union. +ancestor type. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"code"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="elem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' typeNameArg='"field"' derivationMethod="12"/> +<assertFalse actual="retValue" id="isDerived" /> +</test> diff --git a/test/testcases/tests/level3/core/typeinfoisderivedfrom73.xml b/test/testcases/tests/level3/core/typeinfoisderivedfrom73.xml new file mode 100644 index 0000000..46dfe6b --- /dev/null +++ b/test/testcases/tests/level3/core/typeinfoisderivedfrom73.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="typeinfoisderivedfrom73"> +<metadata> +<title>typeinfoisderivedfrom73</title> +<creator>Curt Arnold</creator> +<description> +Checks that isDerivedFrom(...,0) returns true where the target type is a union +where the ancestor type is a member of the union and is a union itself. +</description> +<date qualifier="created">2004-03-04</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> +<implementationAttribute name="validating" value="true"/> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="elemTypeInfo" type="TypeInfo"/> +<var name="typeName" type="DOMString"/> +<var name="elemList" type="NodeList"/> +<var name="retValue" type="boolean"/> +<load var="doc" href="hc_staff" willBeModified="false"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"sup"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<schemaTypeInfo var="elemTypeInfo" obj="elem" interface="Element"/> +<isDerivedFrom obj="elemTypeInfo" var="retValue" typeNamespaceArg='"http://www.w3.org/1999/xhtml"' typeNameArg='"emType"' derivationMethod="0"/> +<assertTrue actual="retValue" id="isDerived" /> +</test> diff --git a/test/testcases/tests/level3/core/userdatahandler01.xml b/test/testcases/tests/level3/core/userdatahandler01.xml new file mode 100644 index 0000000..95fc311 --- /dev/null +++ b/test/testcases/tests/level3/core/userdatahandler01.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="userdatahandler01"> +<metadata> +<title>userdatahandler01</title> +<creator>Curt Arnold</creator> +<description> +Call setUserData on a node providing a UserDataHandler and rename the node. +</description> +<date qualifier="created">2004-01-16</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="pList" type="NodeList"/> +<var name="userDataMonitor" type="UserDataMonitor"/> +<var name="oldUserData" type="DOMUserData"/> +<var name="elementNS" type="DOMString"/> +<var name="newNode" type="Node"/> +<var name="notifications" type="List"/> +<var name="notification" type="UserDataNotification"/> +<var name="operation" type="short"/> +<var name="key" type="DOMString"/> +<var name="data" type="DOMString"/> +<var name="src" type="Node"/> +<var name="dst" type="Node"/> +<var name="greetingCount" type="int" value="0"/> +<var name="salutationCount" type="int" value="0"/> +<var name="hello" type="DOMString" value='"Hello"'/> +<var name="mister" type="DOMString" value='"Mr."'/> + +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="node" obj="pList" index="0" interface="NodeList"/> +<setUserData var="oldUserData" obj="node" key='"greeting"' data='hello' handler="userDataMonitor"/> +<setUserData var="oldUserData" obj="node" key='"salutation"' data='mister' handler="userDataMonitor"/> +<namespaceURI var="elementNS" obj="node" interface="Node"/> +<renameNode var="newNode" obj="doc" n="node" namespaceURI="elementNS" qualifiedName='"div"'/> +<allNotifications var="notifications" obj="userDataMonitor"/> +<assertSize size="2" collection="notifications" id="twoNotifications"/> +<for-each member="notification" collection="notifications"> + <operation var="operation" obj="notification"/> + <assertEquals actual="operation" expected="4" ignoreCase="false" id="operationIsRename"/> + <key var="key" obj="notification"/> + <data var="data" obj="notification" interface="UserDataNotification"/> + <if> + <equals actual="key" expected='"greeting"' ignoreCase="false"/> + <assertEquals actual="data" expected='hello' ignoreCase="false" id="greetingDataHello"/> + <increment var="greetingCount" value="1"/> + <else> + <assertEquals actual="key" expected='"salutation"' ignoreCase="false" id="saluationKey"/> + <assertEquals actual="data" expected='mister' ignoreCase="false" id="salutationDataMr"/> + <increment var="salutationCount" value="1"/> + </else> + </if> + <src interface="UserDataNotification" var="src" obj="notification"/> + <assertSame actual="src" expected="node" id="srcIsNode"/> + <dst var="dst" obj="notification"/> + <if> + <!-- will be null if no node needs to be newly created --> + <isNull obj="dst"/> + <assertSame actual="newNode" expected="node" id="ifDstNullRenameMustReuseNode"/> + <else> + <!-- otherwise will be same as newNode --> + <assertSame actual="dst" expected="newNode" id="dstIsNewNode"/> + </else> + </if> +</for-each> +<assertEquals actual="greetingCount" expected="1" ignoreCase="false" id="greetingCountIs1"/> +<assertEquals actual="salutationCount" expected="1" ignoreCase="false" id="salutationCountIs1"/> +</test> diff --git a/test/testcases/tests/level3/core/userdatahandler02.xml b/test/testcases/tests/level3/core/userdatahandler02.xml new file mode 100644 index 0000000..14da16a --- /dev/null +++ b/test/testcases/tests/level3/core/userdatahandler02.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="userdatahandler02"> +<metadata> +<title>userdatahandler02</title> +<creator>Curt Arnold</creator> +<description> +Call setUserData on a node providing a UserDataHandler and clone the node. +</description> +<date qualifier="created">2004-01-16</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="pList" type="NodeList"/> +<var name="userDataMonitor" type="UserDataMonitor"/> +<var name="oldUserData" type="DOMUserData"/> +<var name="elementNS" type="DOMString"/> +<var name="newNode" type="Node"/> +<var name="notifications" type="List"/> +<var name="notification" type="UserDataNotification"/> +<var name="operation" type="short"/> +<var name="key" type="DOMString"/> +<var name="data" type="DOMString"/> +<var name="src" type="Node"/> +<var name="dst" type="Node"/> +<var name="greetingCount" type="int" value="0"/> +<var name="salutationCount" type="int" value="0"/> +<var name="hello" type="DOMString" value='"Hello"'/> +<var name="mister" type="DOMString" value='"Mr."'/> + +<load var="doc" href="barfoo" willBeModified="true"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="node" obj="pList" index="0" interface="NodeList"/> +<setUserData var="oldUserData" obj="node" key='"greeting"' data='hello' handler="userDataMonitor"/> +<setUserData var="oldUserData" obj="node" key='"salutation"' data='mister' handler="userDataMonitor"/> +<namespaceURI var="elementNS" obj="node" interface="Node"/> +<cloneNode var="newNode" obj="node" deep="true"/> +<allNotifications var="notifications" obj="userDataMonitor"/> +<assertSize size="2" collection="notifications" id="twoNotifications"/> +<for-each member="notification" collection="notifications"> + <operation var="operation" obj="notification"/> + <assertEquals actual="operation" expected="1" ignoreCase="false" id="operationIsClone"/> + <key var="key" obj="notification"/> + <data var="data" obj="notification" interface="UserDataNotification"/> + <if> + <equals actual="key" expected='"greeting"' ignoreCase="false"/> + <assertEquals actual="data" expected='hello' ignoreCase="false" id="greetingDataHello"/> + <increment var="greetingCount" value="1"/> + <else> + <assertEquals actual="key" expected='"salutation"' ignoreCase="false" id="saluationKey"/> + <assertEquals actual="data" expected='mister' ignoreCase="false" id="salutationDataMr"/> + <increment var="salutationCount" value="1"/> + </else> + </if> + <src interface="UserDataNotification" var="src" obj="notification"/> + <assertSame actual="src" expected="node" id="srcIsNode"/> + <dst var="dst" obj="notification"/> + <assertSame actual="dst" expected="newNode" id="dstIsNewNode"/> +</for-each> +<assertEquals actual="greetingCount" expected="1" ignoreCase="false" id="greetingCountIs1"/> +<assertEquals actual="salutationCount" expected="1" ignoreCase="false" id="salutationCountIs1"/> +</test> diff --git a/test/testcases/tests/level3/core/userdatahandler03.xml b/test/testcases/tests/level3/core/userdatahandler03.xml new file mode 100644 index 0000000..865a856 --- /dev/null +++ b/test/testcases/tests/level3/core/userdatahandler03.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="userdatahandler03"> +<metadata> +<title>userdatahandler03</title> +<creator>Curt Arnold</creator> +<description> +Call setUserData on a node providing a UserDataHandler and import the node. +</description> +<date qualifier="created">2004-01-16</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="pList" type="NodeList"/> +<var name="userDataMonitor" type="UserDataMonitor"/> +<var name="oldUserData" type="DOMUserData"/> +<var name="elementNS" type="DOMString"/> +<var name="newNode" type="Node"/> +<var name="notifications" type="List"/> +<var name="notification" type="UserDataNotification"/> +<var name="operation" type="short"/> +<var name="key" type="DOMString"/> +<var name="data" type="DOMString"/> +<var name="src" type="Node"/> +<var name="dst" type="Node"/> +<var name="greetingCount" type="int" value="0"/> +<var name="salutationCount" type="int" value="0"/> +<var name="hello" type="DOMString" value='"Hello"'/> +<var name="mister" type="DOMString" value='"Mr."'/> +<var name="newDoc" type="Document"/> +<var name="rootName" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<implementation var="domImpl" obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<createDocument var="newDoc" obj="domImpl" qualifiedName="rootName" namespaceURI="rootNS" doctype="docType"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="node" obj="pList" index="0" interface="NodeList"/> +<setUserData var="oldUserData" obj="node" key='"greeting"' data='hello' handler="userDataMonitor"/> +<setUserData var="oldUserData" obj="node" key='"salutation"' data='mister' handler="userDataMonitor"/> +<namespaceURI var="elementNS" obj="node" interface="Node"/> +<importNode var="newNode" obj="doc" importedNode="node" deep="true"/> +<allNotifications var="notifications" obj="userDataMonitor"/> +<assertSize size="2" collection="notifications" id="twoNotifications"/> +<for-each member="notification" collection="notifications"> + <operation var="operation" obj="notification"/> + <assertEquals actual="operation" expected="2" ignoreCase="false" id="operationIsImport"/> + <key var="key" obj="notification"/> + <data var="data" obj="notification" interface="UserDataNotification"/> + <if> + <equals actual="key" expected='"greeting"' ignoreCase="false"/> + <assertEquals actual="data" expected='hello' ignoreCase="false" id="greetingDataHello"/> + <increment var="greetingCount" value="1"/> + <else> + <assertEquals actual="key" expected='"salutation"' ignoreCase="false" id="saluationKey"/> + <assertEquals actual="data" expected='mister' ignoreCase="false" id="salutationDataMr"/> + <increment var="salutationCount" value="1"/> + </else> + </if> + <src interface="UserDataNotification" var="src" obj="notification"/> + <assertSame actual="src" expected="node" id="srcIsNode"/> + <dst var="dst" obj="notification"/> + <assertSame actual="dst" expected="newNode" id="dstIsNewNode"/> +</for-each> +<assertEquals actual="greetingCount" expected="1" ignoreCase="false" id="greetingCountIs1"/> +<assertEquals actual="salutationCount" expected="1" ignoreCase="false" id="salutationCountIs1"/> +</test> diff --git a/test/testcases/tests/level3/core/userdatahandler04.xml b/test/testcases/tests/level3/core/userdatahandler04.xml new file mode 100644 index 0000000..9aaa424 --- /dev/null +++ b/test/testcases/tests/level3/core/userdatahandler04.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="userdatahandler04"> +<metadata> +<title>userdatahandler04</title> +<creator>Curt Arnold</creator> +<description> +Call setUserData on a node providing a UserDataHandler and adopt the node. +</description> +<date qualifier="created">2004-01-16</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="pList" type="NodeList"/> +<var name="userDataMonitor" type="UserDataMonitor"/> +<var name="oldUserData" type="DOMUserData"/> +<var name="elementNS" type="DOMString"/> +<var name="newNode" type="Node"/> +<var name="notifications" type="List"/> +<var name="notification" type="UserDataNotification"/> +<var name="operation" type="short"/> +<var name="key" type="DOMString"/> +<var name="data" type="DOMString"/> +<var name="src" type="Node"/> +<var name="dst" type="Node"/> +<var name="greetingCount" type="int" value="0"/> +<var name="salutationCount" type="int" value="0"/> +<var name="hello" type="DOMString" value='"Hello"'/> +<var name="mister" type="DOMString" value='"Mr."'/> +<var name="newDoc" type="Document"/> +<var name="rootName" type="DOMString"/> +<var name="rootNS" type="DOMString"/> +<var name="domImpl" type="DOMImplementation"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<load var="doc" href="barfoo" willBeModified="true"/> +<implementation var="domImpl" obj="doc"/> +<documentElement var="docElem" obj="doc"/> +<namespaceURI var="rootNS" obj="docElem" interface="Node"/> +<tagName var="rootName" obj="docElem"/> +<createDocument var="newDoc" obj="domImpl" qualifiedName="rootName" namespaceURI="rootNS" doctype="docType"/> +<getElementsByTagName var="pList" obj="doc" tagname='"p"' interface="Document"/> +<item var="node" obj="pList" index="0" interface="NodeList"/> +<setUserData var="oldUserData" obj="node" key='"greeting"' data='hello' handler="userDataMonitor"/> +<setUserData var="oldUserData" obj="node" key='"salutation"' data='mister' handler="userDataMonitor"/> +<namespaceURI var="elementNS" obj="node" interface="Node"/> +<adoptNode var="newNode" obj="doc" source="node"/> +<allNotifications var="notifications" obj="userDataMonitor"/> +<assertSize size="2" collection="notifications" id="twoNotifications"/> +<for-each member="notification" collection="notifications"> + <operation var="operation" obj="notification"/> + <assertEquals actual="operation" expected="5" ignoreCase="false" id="operationIsImport"/> + <key var="key" obj="notification"/> + <data var="data" obj="notification" interface="UserDataNotification"/> + <if> + <equals actual="key" expected='"greeting"' ignoreCase="false"/> + <assertEquals actual="data" expected='hello' ignoreCase="false" id="greetingDataHello"/> + <increment var="greetingCount" value="1"/> + <else> + <assertEquals actual="key" expected='"salutation"' ignoreCase="false" id="saluationKey"/> + <assertEquals actual="data" expected='mister' ignoreCase="false" id="salutationDataMr"/> + <increment var="salutationCount" value="1"/> + </else> + </if> + <src interface="UserDataNotification" var="src" obj="notification"/> + <assertSame actual="src" expected="node" id="srcIsNode"/> + <dst var="dst" obj="notification"/> + <!-- spec says dst must be newly created --> + <assertNull actual="dst" id="dstIsNull"/> +</for-each> +<assertEquals actual="greetingCount" expected="1" ignoreCase="false" id="greetingCountIs1"/> +<assertEquals actual="salutationCount" expected="1" ignoreCase="false" id="salutationCountIs1"/> +</test> diff --git a/test/testcases/tests/level3/core/wellformed01.xml b/test/testcases/tests/level3/core/wellformed01.xml new file mode 100644 index 0000000..3d0fea6 --- /dev/null +++ b/test/testcases/tests/level3/core/wellformed01.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="wellformed01"> +<metadata> +<title>wellformed01</title> +<creator>Curt Arnold</creator> +<description> +Create a document with an XML 1.1 valid but XML 1.0 invalid element and +normalize document with well-formed set to true. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullString" type="DOMString" isNull="true"/> +<var name="nullDoctype" type="DocumentType" isNull="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="retval" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="locator" type="DOMLocator"/> +<var name="relatedNode" type="Node"/> +<implementation var="domImpl"/> +<createDocument var="doc" obj="domImpl" + namespaceURI="nullString" + qualifiedName="nullString" + doctype="nullDoctype"/> +<assertDOMException id="xml10InvalidName"> + <INVALID_CHARACTER_ERR> + <createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed01"' + qualifiedName='"LegalNameࢎ"'/> + </INVALID_CHARACTER_ERR> +</assertDOMException> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed01"' + qualifiedName='"LegalNameࢎ"'/> +<appendChild var="retval" obj="doc" newChild="elem"/> +<xmlVersion obj="doc" value='"1.0"' interface="Document"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<setParameter obj="domConfig" name='"well-formed"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <assertEquals actual="severity" expected="2" ignoreCase="false" id="severity"/> + <type var="type" obj="error" interface="DOMError"/> + <assertEquals actual="type" expected='"wf-invalid-character-in-node-name"' + ignoreCase="false" id="type"/> + <location var="locator" obj="error" interface="DOMError"/> + <relatedNode var="relatedNode" obj="locator" interface="DOMLocator"/> + <assertSame actual="relatedNode" expected="elem" id="relatedNode"/> +</for-each> +<assertSize size="1" collection="errors" id="oneError"/> +</test> + + diff --git a/test/testcases/tests/level3/core/wellformed02.xml b/test/testcases/tests/level3/core/wellformed02.xml new file mode 100644 index 0000000..6ab3a44 --- /dev/null +++ b/test/testcases/tests/level3/core/wellformed02.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="wellformed02"> +<metadata> +<title>wellformed02</title> +<creator>Curt Arnold</creator> +<description> +Create a document with an XML 1.1 valid but XML 1.0 invalid element and +normalize document with well-formed set to false. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullString" type="DOMString" isNull="true"/> +<var name="nullDoctype" type="DocumentType" isNull="true"/> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="retval" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="canSet" type="boolean"/> +<implementation var="domImpl"/> +<createDocument var="doc" obj="domImpl" + namespaceURI="nullString" + qualifiedName="nullString" + doctype="nullDoctype"/> +<assertDOMException id="xml10InvalidName"> + <INVALID_CHARACTER_ERR> + <createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed02"' + qualifiedName='"LegalNameࢎ"'/> + </INVALID_CHARACTER_ERR> +</assertDOMException> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<createElementNS var="elem" obj="doc" + namespaceURI='"http://www.example.org/domts/wellformed02"' + qualifiedName='"LegalNameࢎ"'/> +<appendChild var="retval" obj="doc" newChild="elem"/> +<xmlVersion obj="doc" value='"1.0"' interface="Document"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"well-formed"' value="false"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"well-formed"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<assertSize size="0" collection="errors" id="noError"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/core/wellformed03.xml b/test/testcases/tests/level3/core/wellformed03.xml new file mode 100644 index 0000000..2c9f10d --- /dev/null +++ b/test/testcases/tests/level3/core/wellformed03.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="wellformed03"> +<metadata> +<title>wellformed03</title> +<creator>Curt Arnold</creator> +<description> +Create a document with an XML 1.1 valid but XML 1.0 invalid attribute and +normalize document with well-formed set to true. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDoctype" type="DocumentType" isNull="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="retval" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="locator" type="DOMLocator"/> +<var name="relatedNode" type="Node"/> +<implementation var="domImpl"/> +<createDocument var="doc" obj="domImpl" + namespaceURI='"http://www.w3.org/1999/xhtml"' + qualifiedName='"html"' + doctype="nullDoctype"/> +<documentElement var="docElem" obj="doc"/> +<assertDOMException id="xml10InvalidName"> + <INVALID_CHARACTER_ERR> + <createAttribute var="attr" obj="doc" + name='"LegalNameࢎ"'/> + </INVALID_CHARACTER_ERR> +</assertDOMException> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<setAttribute obj="docElem" name='"LegalNameࢎ"' value='"foo"'/> +<getAttributeNode var="attr" obj="docElem" name='"LegalNameࢎ"'/> +<xmlVersion obj="doc" value='"1.0"' interface="Document"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<setParameter obj="domConfig" name='"well-formed"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <assertEquals actual="severity" expected="2" ignoreCase="false" id="severity"/> + <type var="type" obj="error" interface="DOMError"/> + <assertEquals actual="type" expected='"wf-invalid-character-in-node-name"' + ignoreCase="false" id="type"/> + <location var="locator" obj="error" interface="DOMError"/> + <relatedNode var="relatedNode" obj="locator" interface="DOMLocator"/> + <assertSame actual="relatedNode" expected="attr" id="relatedNode"/> +</for-each> +<assertSize size="1" collection="errors" id="oneError"/> +</test> + + diff --git a/test/testcases/tests/level3/core/wellformed04.xml b/test/testcases/tests/level3/core/wellformed04.xml new file mode 100644 index 0000000..f39f53c --- /dev/null +++ b/test/testcases/tests/level3/core/wellformed04.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="wellformed04"> +<metadata> +<title>wellformed04</title> +<creator>Curt Arnold</creator> +<description> +Create a document with an XML 1.1 valid but XML 1.0 invalid attribute and +normalize document with well-formed set to false. +</description> +<date qualifier="created">2004-02-24</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="domImpl" type="DOMImplementation"/> +<var name="nullDoctype" type="DocumentType" isNull="true"/> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="attr" type="Attr"/> +<var name="retval" type="Node"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="canSet" type="boolean"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<implementation var="domImpl"/> +<createDocument var="doc" obj="domImpl" + namespaceURI='"http://www.w3.org/1999/xhtml"' + qualifiedName='"html"' + doctype="nullDoctype"/> +<documentElement var="docElem" obj="doc"/> +<assertDOMException id="xml10InvalidName"> + <INVALID_CHARACTER_ERR> + <createAttributeNS var="attr" obj="doc" + namespaceURI="nullNS" + qualifiedName='"LegalNameࢎ"'/> + </INVALID_CHARACTER_ERR> +</assertDOMException> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<setAttributeNS obj="docElem" namespaceURI="nullNS" qualifiedName='"LegalNameࢎ"' value='"foo"'/> +<xmlVersion obj="doc" value='"1.0"' interface="Document"/> +<domConfig var="domConfig" obj="doc" interface="Document"/> +<canSetParameter var="canSet" obj="domConfig" name='"well-formed"' value="false"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"well-formed"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<normalizeDocument obj="doc"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <assertNull actual="error" id="noErrorsExpected"/> +</for-each> +</if> +</test> + + diff --git a/test/testcases/tests/level3/events/.cvsignore b/test/testcases/tests/level3/events/.cvsignore new file mode 100644 index 0000000..65d27fe --- /dev/null +++ b/test/testcases/tests/level3/events/.cvsignore @@ -0,0 +1,3 @@ +dom3.dtd +test-to-html.xsl +dom3.xsd diff --git a/test/testcases/tests/level3/events/CVS/Entries b/test/testcases/tests/level3/events/CVS/Entries new file mode 100644 index 0000000..04b1f3f --- /dev/null +++ b/test/testcases/tests/level3/events/CVS/Entries @@ -0,0 +1,5 @@ +D/files//// +/.cvsignore/1.2/Fri Apr 3 02:47:57 2009// +/alltests.xml/1.3/Fri Apr 3 02:47:57 2009// +/hasFeature01.xml/1.1/Fri Apr 3 02:47:57 2009// +/metadata.xml/1.1/Fri Apr 3 02:47:56 2009// diff --git a/test/testcases/tests/level3/events/CVS/Repository b/test/testcases/tests/level3/events/CVS/Repository new file mode 100644 index 0000000..4fcba37 --- /dev/null +++ b/test/testcases/tests/level3/events/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/events diff --git a/test/testcases/tests/level3/events/CVS/Root b/test/testcases/tests/level3/events/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/events/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/events/CVS/Template b/test/testcases/tests/level3/events/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/events/CVS/Template diff --git a/test/testcases/tests/level3/events/alltests.xml b/test/testcases/tests/level3/events/alltests.xml new file mode 100644 index 0000000..f73157d --- /dev/null +++ b/test/testcases/tests/level3/events/alltests.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. +See W3C License http://www.w3.org/Consortium/Legal/ for more details. +--> +<!DOCTYPE suite SYSTEM "dom3.dtd"> +<suite xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="alltests"> +<metadata> +<title>DOM Level 3 Events Test Suite</title> +<creator>DOM Test Suite Project</creator> +</metadata> + <suite.member href="hasFeature01.xml"/> +</suite> diff --git a/test/testcases/tests/level3/events/files/CVS/Entries b/test/testcases/tests/level3/events/files/CVS/Entries new file mode 100644 index 0000000..d229dd6 --- /dev/null +++ b/test/testcases/tests/level3/events/files/CVS/Entries @@ -0,0 +1,3 @@ +/staff.dtd/1.1/Fri Apr 3 02:47:56 2009// +/staff.xml/1.1/Fri Apr 3 02:47:57 2009// +D diff --git a/test/testcases/tests/level3/events/files/CVS/Repository b/test/testcases/tests/level3/events/files/CVS/Repository new file mode 100644 index 0000000..c01a2e5 --- /dev/null +++ b/test/testcases/tests/level3/events/files/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/events/files diff --git a/test/testcases/tests/level3/events/files/CVS/Root b/test/testcases/tests/level3/events/files/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/events/files/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/events/files/CVS/Template b/test/testcases/tests/level3/events/files/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/events/files/CVS/Template diff --git a/test/testcases/tests/level3/events/files/staff.dtd b/test/testcases/tests/level3/events/files/staff.dtd new file mode 100644 index 0000000..3f7dc86 --- /dev/null +++ b/test/testcases/tests/level3/events/files/staff.dtd @@ -0,0 +1,17 @@ +<!ELEMENT employeeId (#PCDATA)>
+<!ELEMENT name (#PCDATA)>
+<!ELEMENT position (#PCDATA)>
+<!ELEMENT salary (#PCDATA)>
+<!ELEMENT address (#PCDATA)>
+<!ELEMENT entElement ( #PCDATA ) >
+<!ELEMENT gender ( #PCDATA | entElement )* >
+<!ELEMENT employee (employeeId, name, position, salary, gender, address) >
+<!ELEMENT staff (employee)+>
+<!ATTLIST entElement
+ attr1 CDATA "Attr">
+<!ATTLIST address
+ domestic CDATA #IMPLIED
+ street CDATA "Yes">
+<!ATTLIST entElement
+ domestic CDATA "MALE" >
+
diff --git a/test/testcases/tests/level3/events/files/staff.xml b/test/testcases/tests/level3/events/files/staff.xml new file mode 100644 index 0000000..f89c510 --- /dev/null +++ b/test/testcases/tests/level3/events/files/staff.xml @@ -0,0 +1,57 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?> +<!DOCTYPE staff SYSTEM "staff.dtd" [ + <!ENTITY ent1 "es"> + <!ENTITY ent2 "1900 Dallas Road"> + <!ENTITY ent3 "Texas"> + <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>"> + <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1> + <!ENTITY ent1 "This entity should be discarded"> + <!NOTATION notation1 PUBLIC "notation1File"> + <!NOTATION notation2 SYSTEM "notation2File"> +]> +<!-- This is comment number 1.--> +<staff> + <employee> + <employeeId>EMP0001</employeeId> + <name>Margaret Martin</name> + <position>Accountant</position> + <salary>56,000</salary> + <gender>Female</gender> + <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address> + </employee> + <employee> + <employeeId>EMP0002</employeeId> + <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]> +<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name> + <position>Secretary</position> + <salary>35,000</salary> + <gender>Female</gender> + <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3; + 98554</address> + </employee> + <employee> + <employeeId>EMP0003</employeeId> + <name>Roger + Jones</name> + <position>Department Manager</position> + <salary>100,000</salary> + <gender>&ent4;</gender> + <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address> + </employee> + <employee> + <employeeId>EMP0004</employeeId> + <name>Jeny Oconnor</name> + <position>Personnel Director</position> + <salary>95,000</salary> + <gender>Female</gender> + <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address> + </employee> + <employee> + <employeeId>EMP0005</employeeId> + <name>Robert Myers</name> + <position>Computer Specialist</position> + <salary>90,000</salary> + <gender>male</gender> + <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address> + </employee> + </staff> diff --git a/test/testcases/tests/level3/events/hasFeature01.xml b/test/testcases/tests/level3/events/hasFeature01.xml new file mode 100644 index 0000000..da92b42 --- /dev/null +++ b/test/testcases/tests/level3/events/hasFeature01.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2001-2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature01"> +<metadata> +<title>hasFeature01</title> +<creator>Curt Arnold</creator> +<description> +DOMImplementation.hasFeature("eVenTs", "3.0") should return true. +</description> +<date qualifier="created">2003-12-03</date> +</metadata> +<var name="impl" type="DOMImplementation"/> +<var name="state" type="boolean"/> +<implementation var="impl"/> +<hasFeature var="state" obj="impl" feature='"eVenTs"' version='"3.0"'/> +<assertTrue id="hasEvents30" actual="state"/> +</test> diff --git a/test/testcases/tests/level3/events/metadata.xml b/test/testcases/tests/level3/events/metadata.xml new file mode 100644 index 0000000..d3d2324 --- /dev/null +++ b/test/testcases/tests/level3/events/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. +See W3C License http://www.w3.org/Consortium/Legal/ for more details. +--> +<!DOCTYPE metadata SYSTEM "dom3.dtd"> + +<!-- This file contains additional metadata about DOM L3 Events tests. + Allowing additional documentation without modifying the tests themselves. --> +<metadata xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3"> +</metadata> diff --git a/test/testcases/tests/level3/ls/.cvsignore b/test/testcases/tests/level3/ls/.cvsignore new file mode 100644 index 0000000..65d27fe --- /dev/null +++ b/test/testcases/tests/level3/ls/.cvsignore @@ -0,0 +1,3 @@ +dom3.dtd +test-to-html.xsl +dom3.xsd diff --git a/test/testcases/tests/level3/ls/CVS/Entries b/test/testcases/tests/level3/ls/CVS/Entries new file mode 100644 index 0000000..514635b --- /dev/null +++ b/test/testcases/tests/level3/ls/CVS/Entries @@ -0,0 +1,180 @@ +D/files//// +/.cvsignore/1.1/Fri Apr 3 02:47:57 2009// +/CertifiedText1.xml/1.3/Fri Apr 3 02:47:58 2009// +/CharacterStream1.xml/1.4/Fri Apr 3 02:47:57 2009// +/DOMBuilderFilterTest0.xml/1.10/Fri Apr 3 02:47:58 2009// +/DOMBuilderFilterTest1.xml/1.9/Fri Apr 3 02:47:57 2009// +/DOMBuilderFilterTest2.xml/1.9/Fri Apr 3 02:47:57 2009// +/DOMBuilderTest0.xml/1.9/Fri Apr 3 02:47:58 2009// +/DOMBuilderTest1.xml/1.10/Fri Apr 3 02:47:57 2009// +/DOMBuilderTest2.xml/1.10/Fri Apr 3 02:47:58 2009// +/DOMBuilderTest3.xml/1.11/Fri Apr 3 02:47:58 2009// +/DOMBuilderTest4.xml/1.10/Fri Apr 3 02:47:57 2009// +/DOMBuilderTest5.xml/1.12/Fri Apr 3 02:47:57 2009// +/DOMBuilderTest6.xml/1.4/Fri Apr 3 02:47:57 2009// +/DOMBuilderTest8.xml/1.4/Fri Apr 3 02:47:58 2009// +/DOMEntityResolverTest0.xml/1.14/Fri Apr 3 02:47:57 2009// +/DOMEntityResolverTest1.xml/1.13/Fri Apr 3 02:47:57 2009// +/DOMEntityResolverTest2.xml/1.7/Fri Apr 3 02:47:58 2009// +/DOMImplementationLSTest0.xml/1.6/Fri Apr 3 02:47:57 2009// +/DOMImplementationLSTest1.xml/1.7/Fri Apr 3 02:47:57 2009// +/DOMImplementationLSTest2.xml/1.4/Fri Apr 3 02:47:58 2009// +/DOMImplementationLSTest3.xml/1.5/Fri Apr 3 02:47:57 2009// +/DOMImplementationLSTest4.xml/1.4/Fri Apr 3 02:47:58 2009// +/DOMImplementationLSTest5.xml/1.4/Fri Apr 3 02:47:57 2009// +/DOMInputSourceTest0.xml/1.8/Fri Apr 3 02:47:58 2009// +/DOMInputSourceTest1.xml/1.8/Fri Apr 3 02:47:58 2009// +/DOMInputSourceTest2.xml/1.7/Fri Apr 3 02:47:57 2009// +/DOMInputSourceTest3.xml/1.9/Fri Apr 3 02:47:57 2009// +/DOMInputSourceTest4.xml/1.7/Fri Apr 3 02:47:58 2009// +/DOMInputSourceTest5.xml/1.11/Fri Apr 3 02:47:57 2009// +/DOMInputSourceTest6.xml/1.4/Fri Apr 3 02:47:58 2009// +/DOMWriterFilterTest0.xml/1.9/Fri Apr 3 02:47:57 2009// +/DOMWriterFilterTest1.xml/1.10/Fri Apr 3 02:47:57 2009// +/DOMWriterFilterTest2.xml/1.12/Fri Apr 3 02:47:57 2009// +/DOMWriterFilterTest3.xml/1.9/Fri Apr 3 02:47:57 2009// +/DOMWriterTest0.xml/1.8/Fri Apr 3 02:47:57 2009// +/DOMWriterTest1.xml/1.8/Fri Apr 3 02:47:58 2009// +/DOMWriterTest2.xml/1.8/Fri Apr 3 02:47:58 2009// +/DOMWriterTest3.xml/1.4/Fri Apr 3 02:47:58 2009// +/DOMWriterTest4.xml/1.4/Fri Apr 3 02:47:57 2009// +/DOMWriterTest5.xml/1.3/Fri Apr 3 02:47:57 2009// +/DOMWriterTest6.xml/1.3/Fri Apr 3 02:47:58 2009// +/GetFeature1.xml/1.3/Fri Apr 3 02:47:58 2009// +/GetFeature2.xml/1.3/Fri Apr 3 02:47:57 2009// +/HasFeature01.xml/1.3/Fri Apr 3 02:47:57 2009// +/HasFeature02.xml/1.3/Fri Apr 3 02:47:57 2009// +/HasFeature03.xml/1.3/Fri Apr 3 02:47:57 2009// +/HasFeature04.xml/1.4/Fri Apr 3 02:47:57 2009// +/HasFeature05.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSParserConfig1.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSParserConfig2.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSParserConfig3.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSParserConfig4.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSParserConfig5.xml/1.5/Fri Apr 3 02:47:58 2009// +/LSParserConfig6.xml/1.6/Fri Apr 3 02:47:57 2009// +/LSParserConfig7.xml/1.6/Fri Apr 3 02:47:57 2009// +/LSParserConfig8.xml/1.7/Fri Apr 3 02:47:58 2009// +/LSParserConfig9.xml/1.5/Fri Apr 3 02:47:58 2009// +/LSSerializerConfig1.xml/1.6/Fri Apr 3 02:47:57 2009// +/LSSerializerConfig10.xml/1.6/Fri Apr 3 02:47:58 2009// +/LSSerializerConfig2.xml/1.7/Fri Apr 3 02:47:58 2009// +/LSSerializerConfig3.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSSerializerConfig4.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSSerializerConfig5.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSSerializerConfig6.xml/1.6/Fri Apr 3 02:47:57 2009// +/LSSerializerConfig7.xml/1.5/Fri Apr 3 02:47:57 2009// +/LSSerializerConfig8.xml/1.7/Fri Apr 3 02:47:58 2009// +/LSSerializerConfig9.xml/1.6/Fri Apr 3 02:47:58 2009// +/SystemId1.xml/1.3/Fri Apr 3 02:47:57 2009// +/SystemId2.xml/1.3/Fri Apr 3 02:47:57 2009// +/alltests.xml/1.22/Fri Apr 3 02:47:57 2009// +/canonicalform01.xml/1.4/Fri Apr 3 02:47:57 2009// +/canonicalform03.xml/1.4/Fri Apr 3 02:47:58 2009// +/canonicalform04.xml/1.4/Fri Apr 3 02:47:57 2009// +/canonicalform05.xml/1.4/Fri Apr 3 02:47:57 2009// +/canonicalform06.xml/1.4/Fri Apr 3 02:47:58 2009// +/canonicalform08.xml/1.4/Fri Apr 3 02:47:57 2009// +/canonicalform09.xml/1.4/Fri Apr 3 02:47:57 2009// +/canonicalform10.xml/1.4/Fri Apr 3 02:47:57 2009// +/canonicalform11.xml/1.4/Fri Apr 3 02:47:58 2009// +/canonicalform12.xml/1.4/Fri Apr 3 02:47:57 2009// +/canonicalform13.xml/1.4/Fri Apr 3 02:47:58 2009// +/cdatasections01.xml/1.4/Fri Apr 3 02:47:57 2009// +/cdatasections02.xml/1.4/Fri Apr 3 02:47:58 2009// +/cdatasections03.xml/1.4/Fri Apr 3 02:47:58 2009// +/cdatasections04.xml/1.5/Fri Apr 3 02:47:58 2009// +/checkcharacternormalization01.xml/1.4/Fri Apr 3 02:47:57 2009// +/checkcharacternormalization02.xml/1.5/Fri Apr 3 02:47:58 2009// +/checkcharacternormalization03.xml/1.4/Fri Apr 3 02:47:58 2009// +/checkcharacternormalization04.xml/1.4/Fri Apr 3 02:47:58 2009// +/comments01.xml/1.5/Fri Apr 3 02:47:57 2009// +/comments02.xml/1.5/Fri Apr 3 02:47:57 2009// +/comments03.xml/1.4/Fri Apr 3 02:47:57 2009// +/comments04.xml/1.4/Fri Apr 3 02:47:57 2009// +/datatypenormalization01.xml/1.4/Fri Apr 3 02:47:57 2009// +/datatypenormalization02.xml/1.4/Fri Apr 3 02:47:57 2009// +/datatypenormalization03.xml/1.4/Fri Apr 3 02:47:58 2009// +/datatypenormalization04.xml/1.4/Fri Apr 3 02:47:58 2009// +/datatypenormalization05.xml/1.4/Fri Apr 3 02:47:58 2009// +/datatypenormalization06.xml/1.4/Fri Apr 3 02:47:57 2009// +/datatypenormalization07.xml/1.4/Fri Apr 3 02:47:58 2009// +/datatypenormalization08.xml/1.4/Fri Apr 3 02:47:58 2009// +/datatypenormalization09.xml/1.4/Fri Apr 3 02:47:58 2009// +/datatypenormalization10.xml/1.4/Fri Apr 3 02:47:57 2009// +/datatypenormalization11.xml/1.4/Fri Apr 3 02:47:57 2009// +/datatypenormalization12.xml/1.4/Fri Apr 3 02:47:57 2009// +/datatypenormalization13.xml/1.5/Fri Apr 3 02:47:58 2009// +/datatypenormalization14.xml/1.5/Fri Apr 3 02:47:58 2009// +/datatypenormalization15.xml/1.5/Fri Apr 3 02:47:57 2009// +/datatypenormalization16.xml/1.5/Fri Apr 3 02:47:57 2009// +/datatypenormalization17.xml/1.4/Fri Apr 3 02:47:57 2009// +/disallowdoctype01.xml/1.5/Fri Apr 3 02:47:57 2009// +/discarddefaultcontent01.xml/1.3/Fri Apr 3 02:47:58 2009// +/discarddefaultcontent02.xml/1.3/Fri Apr 3 02:47:57 2009// +/dom3tests.ent/1.15/Fri Apr 3 02:47:57 2009// +/elementcontentwhitespace01.xml/1.4/Fri Apr 3 02:47:58 2009// +/elementcontentwhitespace02.xml/1.5/Fri Apr 3 02:47:58 2009// +/elementcontentwhitespace03.xml/1.3/Fri Apr 3 02:47:58 2009// +/encoding01.xml/1.2/Fri Apr 3 02:47:57 2009// +/entities01.xml/1.4/Fri Apr 3 02:47:57 2009// +/entities02.xml/1.4/Fri Apr 3 02:47:57 2009// +/entities03.xml/1.4/Fri Apr 3 02:47:57 2009// +/entities04.xml/1.4/Fri Apr 3 02:47:58 2009// +/entities05.xml/1.4/Fri Apr 3 02:47:57 2009// +/entities06.xml/1.4/Fri Apr 3 02:47:57 2009// +/entities07.xml/1.5/Fri Apr 3 02:47:57 2009// +/entities08.xml/1.5/Fri Apr 3 02:47:57 2009// +/entities09.xml/1.4/Fri Apr 3 02:47:57 2009// +/infoset01.xml/1.3/Fri Apr 3 02:47:57 2009// +/infoset02.xml/1.3/Fri Apr 3 02:47:58 2009// +/infoset03.xml/1.3/Fri Apr 3 02:47:57 2009// +/infoset04.xml/1.3/Fri Apr 3 02:47:58 2009// +/infoset05.xml/1.3/Fri Apr 3 02:47:57 2009// +/infoset06.xml/1.3/Fri Apr 3 02:47:57 2009// +/infoset07.xml/1.3/Fri Apr 3 02:47:57 2009// +/infoset08.xml/1.3/Fri Apr 3 02:47:58 2009// +/metadata.xml/1.1/Fri Apr 3 02:47:57 2009// +/namespacedeclarations01.xml/1.4/Fri Apr 3 02:47:58 2009// +/namespacedeclarations02.xml/1.4/Fri Apr 3 02:47:57 2009// +/namespaces01.xml/1.3/Fri Apr 3 02:47:57 2009// +/namespaces02.xml/1.3/Fri Apr 3 02:47:57 2009// +/newline01.xml/1.3/Fri Apr 3 02:47:57 2009// +/newline02.xml/1.3/Fri Apr 3 02:47:58 2009// +/newline03.xml/1.3/Fri Apr 3 02:47:58 2009// +/noinputspecified01.xml/1.4/Fri Apr 3 02:47:57 2009// +/nooutputspecified01.xml/1.4/Fri Apr 3 02:47:57 2009// +/normalizecharacters01.xml/1.3/Fri Apr 3 02:47:58 2009// +/normalizecharacters02.xml/1.3/Fri Apr 3 02:47:57 2009// +/normalizecharacters03.xml/1.3/Fri Apr 3 02:47:58 2009// +/normalizecharacters04.xml/1.4/Fri Apr 3 02:47:58 2009// +/schemalocation01.xml/1.6/Fri Apr 3 02:47:58 2009// +/schemalocation02.xml/1.5/Fri Apr 3 02:47:58 2009// +/schemalocation03.xml/1.4/Fri Apr 3 02:47:58 2009// +/schemalocation04.xml/1.4/Fri Apr 3 02:47:57 2009// +/schematype01.xml/1.5/Fri Apr 3 02:47:58 2009// +/schematype02.xml/1.5/Fri Apr 3 02:47:57 2009// +/schematype03.xml/1.5/Fri Apr 3 02:47:57 2009// +/schematype04.xml/1.4/Fri Apr 3 02:47:57 2009// +/splitcdatasections01.xml/1.4/Fri Apr 3 02:47:57 2009// +/splitcdatasections02.xml/1.4/Fri Apr 3 02:47:57 2009// +/unsupportedencoding01.xml/1.4/Fri Apr 3 02:47:58 2009// +/validate01.xml/1.4/Fri Apr 3 02:47:57 2009// +/validate02.xml/1.4/Fri Apr 3 02:47:57 2009// +/validate03.xml/1.5/Fri Apr 3 02:47:58 2009// +/validate04.xml/1.4/Fri Apr 3 02:47:57 2009// +/validate05.xml/1.4/Fri Apr 3 02:47:57 2009// +/validate06.xml/1.4/Fri Apr 3 02:47:57 2009// +/validate07.xml/1.4/Fri Apr 3 02:47:58 2009// +/validate08.xml/1.4/Fri Apr 3 02:47:58 2009// +/validateifschema01.xml/1.4/Fri Apr 3 02:47:58 2009// +/validateifschema02.xml/1.4/Fri Apr 3 02:47:57 2009// +/validateifschema03.xml/1.5/Fri Apr 3 02:47:57 2009// +/validateifschema04.xml/1.4/Fri Apr 3 02:47:58 2009// +/wellformed01.xml/1.4/Fri Apr 3 02:47:57 2009// +/wellformed02.xml/1.4/Fri Apr 3 02:47:57 2009// +/wellformed03.xml/1.5/Fri Apr 3 02:47:58 2009// +/writeToURI1.xml/1.2/Fri Apr 3 02:47:57 2009// +/writeToURI2.xml/1.2/Fri Apr 3 02:47:58 2009// +/xmldeclaration01.xml/1.3/Fri Apr 3 02:47:57 2009// +/xmldeclaration02.xml/1.3/Fri Apr 3 02:47:57 2009// diff --git a/test/testcases/tests/level3/ls/CVS/Repository b/test/testcases/tests/level3/ls/CVS/Repository new file mode 100644 index 0000000..59add56 --- /dev/null +++ b/test/testcases/tests/level3/ls/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/ls diff --git a/test/testcases/tests/level3/ls/CVS/Root b/test/testcases/tests/level3/ls/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/ls/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/ls/CVS/Template b/test/testcases/tests/level3/ls/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/ls/CVS/Template diff --git a/test/testcases/tests/level3/ls/CertifiedText1.xml b/test/testcases/tests/level3/ls/CertifiedText1.xml new file mode 100644 index 0000000..f1dd2a6 --- /dev/null +++ b/test/testcases/tests/level3/ls/CertifiedText1.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="CertifiedText1"> + <metadata> + <title>CertifiedText1</title> + <creator>Curt Arnold</creator> + <description>Changes certifiedText on LSInput.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSInput"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-certifiedText"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="input" type="LSInput"/> + <var name="certifiedText" type="boolean"/> + + <implementation var="domImpl"/> + <createLSInput var="input" obj="domImpl"/> + <certifiedText var="certifiedText" obj="input"/> + <assertFalse actual="certifiedText" id="initiallyFalse"/> + <certifiedText obj="input" value="true"/> + <certifiedText var="certifiedText" obj="input"/> + <assertTrue actual="certifiedText" id="setTrue"/> + + <certifiedText obj="input" value="false"/> + <certifiedText var="certifiedText" obj="input"/> + <assertFalse actual="certifiedText" id="setFalse"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/CharacterStream1.xml b/test/testcases/tests/level3/ls/CharacterStream1.xml new file mode 100644 index 0000000..f0c7043 --- /dev/null +++ b/test/testcases/tests/level3/ls/CharacterStream1.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="CharacterStream1"> + <metadata> + <title>CharacterStream1</title> + <creator>Curt Arnold</creator> + <description>Writes a document to a character stream and rereads the document.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSInput"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-characterStream"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSOutput-characterStream"/> + </metadata> + <implementationAttribute name="validating" value="false"/> + + <var name="testDoc" type="Document"/> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <var name="serializer" type="LSSerializer"/> + <var name="writer" type="LSWriter"/> + <var name="checkWriter" type="LSWriter"/> + <var name="reader" type="LSReader"/> + <var name="checkReader" type="LSReader"/> + <var name="status" type="boolean"/> + <var name="input" type="LSInput"/> + <var name="parser" type="LSParser"/> + <var name="checkDoc" type="Document"/> + <var name="docElem" type="Element"/> + <var name="docElemName" type="DOMString"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <load var="testDoc" href="test0" willBeModified="false"/> + <implementation var="domImpl"/> + + <!-- create an LSOutput and connect it to an stock LSWriter --> + <createLSOutput var="output" obj="domImpl"/> + <!-- check that it was initially null --> + <characterStream var="checkWriter" obj="output" interface="LSOutput"/> + <assertNull actual="checkWriter" id="writerInitiallyNull"/> + <characterStream obj="output" value="writer" interface="LSOutput"/> + <characterStream var="checkWriter" obj="output" interface="LSOutput"/> + <assertNotNull actual="checkWriter" id="writerNotNull"/> + + <!-- create a serializer and write a test document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <write var="status" obj="serializer" destination="output" nodeArg="testDoc"/> + <assertTrue actual="status" id="writeStatus"/> + + <!-- read the serialized document --> + <assign var="reader" value="writer"/> + <createLSInput var="input" obj="domImpl"/> + <characterStream var="checkReader" obj="input" interface="LSInput"/> + <assertNull actual="checkReader" id="readerInitiallyNull"/> + <characterStream obj="input" value="reader" interface="LSInput"/> + <characterStream var="checkReader" obj="input" interface="LSInput"/> + <assertNotNull actual="checkReader" id="readerNotNull"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <parse var="checkDoc" obj="parser" input="input"/> + <assertNotNull actual="checkDoc" id="checkNotNull"/> + <documentElement var="docElem" obj="checkDoc"/> + <nodeName var="docElemName" obj="docElem"/> + <assertEquals expected='"elt0"' actual="docElemName" id="checkDocElemName" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderFilterTest0.xml b/test/testcases/tests/level3/ls/DOMBuilderFilterTest0.xml new file mode 100644 index 0000000..37191ed --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderFilterTest0.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMBuilderFilterTest0"> + <metadata> + <title>DOMBuilderFilterTest0</title> + &creator; + <description>Parses a document twice, once using a filter to reject all elt1 elements.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-filter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParserFilter-startElement"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParserFilter-whatToShow"/> + </metadata> + + + <var name="myfilter" type="LSParserFilter"> + <var name="name" type="DOMString"/> + &filterVars; + + + <startElement> + <nodeName var="name" obj="elementArg"/> + <if> + <equals actual="name" expected='"elt1"' ignoreCase="false"/> + <return value="&FILTER_REJECT;"/> + <else> + <return value="&FILTER_ACCEPT;"/> + </else> + </if> + </startElement> + + <acceptNode> + <return value="&FILTER_ACCEPT;"/> + </acceptNode> + + <whatToShow> + <get> + <return value="&SHOW_ELEMENT;"/> + </get> + </whatToShow> + + </var> + + <var name="list" type="NodeList"/> + <var name="count" type="int"/> + <var name="resourceURI" type="DOMString"/> + &vars; + &init; + + <getResourceURI var="resourceURI" href="TEST1"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName var="list" obj="document" tagname=""elt1"" interface="Document"/> + <length var="count" obj="list" interface="NodeList"/> + <assertEquals actual="count" expected="1" ignoreCase="false" id="filter_count_1"/> + + &parser.setFilter_myfilter; + + <parseURI var="document" obj="parser" uri="resourceURI"/> + <assertNotNull actual="document" id="secondParseDocumentNotNull"/> + <getElementsByTagName var="list" obj="document" tagname=""elt1"" interface="Document"/> + <length var="count" obj="list" interface="NodeList"/> + <assertEquals actual="count" expected="0" ignoreCase="false" id="filter_count_2"/> + + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderFilterTest1.xml b/test/testcases/tests/level3/ls/DOMBuilderFilterTest1.xml new file mode 100644 index 0000000..226efc0 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderFilterTest1.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMBuilderFilterTest1"> + <metadata> + <title>DOMBuilderFilterTest1</title> + &creator; + <description>DOM Builder Filter test, test whether incorrect node types are never passed to the filter.</description> + &contributor; &date; + <subject resource="&spec;#LS-Interfaces-LSParserFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-filter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParserFilter-acceptNode"/> + </metadata> + + <var name="resourceURI" type="DOMString"/> + <var name="myfilter" type="LSParserFilter"> + &filterVars; + + <startElement> + <return value="&FILTER_ACCEPT;"/> + </startElement> + + <acceptNode> + <var name="type" type="int"/> + <nodeType obj="nodeArg" var="type"/> + + <assertNotEquals actual="type" expected="2" id="attribute_node_test" ignoreCase="false"/> + <assertNotEquals actual="type" expected="6" id="entity_node_test" ignoreCase="false"/> + <assertNotEquals actual="type" expected="9" id="document_node_test" ignoreCase="false"/> + <assertNotEquals actual="type" expected="10" id="document_type_node_test" ignoreCase="false"/> + <assertNotEquals actual="type" expected="12" id="notation_node_test" ignoreCase="false"/> + + <return value="&FILTER_ACCEPT;"/> + </acceptNode> + + <whatToShow> + <get> + <return value="&SHOW_ALL;"/> + </get> + </whatToShow> + + </var> + + &vars; + &init; + + &parser.setFilter_myfilter; + + <getResourceURI var="resourceURI" href="TEST7"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <assertNotNull actual="document" id="documentNotNull"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderFilterTest2.xml b/test/testcases/tests/level3/ls/DOMBuilderFilterTest2.xml new file mode 100644 index 0000000..1456009 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderFilterTest2.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMBuilderFilterTest2"> + <metadata> + <title>DOMBuilderFilterTest2</title> + &creator; + <description>Checks that attributes are visible when elements are passed to LSParserFilter.startElement.</description> + &contributor; &date; + <subject resource="&spec;#LS-Interfaces-LSParserFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParserFilter-startElement"/> + </metadata> + <var name="resourceURI" type="DOMString"/> + + <var name="myfilter" type="LSParserFilter"> + &filterVars; + <var name="name" type="DOMString"/> + <var name="hasattribute" type="boolean"/> + + <startElement> + + <nodeName var="name" obj="elementArg"/> + <if> + <equals actual="name" expected='"elt1"' ignoreCase="false"/> + <hasAttribute var="hasattribute" obj="elementArg" name='"attr1"'/> + <assertTrue actual="hasattribute" id="default_content_check"/> + </if> + + <return value="&FILTER_ACCEPT;"/> + </startElement> + + <acceptNode> + <return value="&FILTER_ACCEPT;"/> + </acceptNode> + + <whatToShow> + <get> + <return value="&SHOW_ALL;"/> + </get> + </whatToShow> + + </var> + + &vars; + &init; + + &parser.setFilter_myfilter; + + <getResourceURI var="resourceURI" href="TEST3"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest0.xml b/test/testcases/tests/level3/ls/DOMBuilderTest0.xml new file mode 100644 index 0000000..dd65d25 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest0.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + +<test xmlns="&level3;" name="DOMBuilderTest0"> + <metadata> + <title>DOMBuilderTest0</title> + &creator; + <description>Parses a document, writes it to string, parses the string and checks that the number of elt1 elements is as expected.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-stringData"/> + </metadata> + + <var name="elementList" type="NodeList"/> + <var name="stringDoc" type="DOMString"/> + <var name="resourceURI" type="DOMString"/> + + &vars; + + &init; + + <getResourceURI var="resourceURI" href="TEST0" contentType="text/xml"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="2" id="count_elt1_1"/> + + <writeToString var="stringDoc" obj="writer" nodeArg="document"/> + <stringData obj="inputSource" value="stringDoc"/> + <parse var="document" obj="parser" input="inputSource"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="2" id="count_elt1_2"/> + +</test> + + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest1.xml b/test/testcases/tests/level3/ls/DOMBuilderTest1.xml new file mode 100644 index 0000000..e0f54b1 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest1.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM 'dom3.dtd' [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="DOMBuilderTest1"> + <metadata> + <title>DOMBuilderTest1</title> + &creator; + <description>Uses LSParser.parseWithContext to replace a node in an existing document.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseWithContext"/> + </metadata> + <var name="elementList" type="NodeList"/> + <var name="stringDoc" type="DOMString"/> + <var name="firstElt2" type="Element"/> + <var name="returnNode" type="Node"/> + <var name="resourceURI" type="DOMString"/> + &vars; + + &init; + <getResourceURI var="resourceURI" href="TEST0" contentType="text/xml"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt2"" var="elementList"/> + <assertSize collection="elementList" size="1" id="elt2Count_1"/> + + <item interface="NodeList" obj="elementList" var="firstElt2" index="0"/> + + <getResourceURI var="resourceURI" href="TEST2" contentType="text/xml"/> + <systemId obj="inputSource" value="resourceURI" interface="LSInput"/> + <try> + <parseWithContext obj="parser" input="inputSource" + contextArg="firstElt2" action="ACTION_REPLACE" var="returnNode"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> + </try> + <getElementsByTagName interface="Document" obj="document" tagname=""elt2"" var="elementList"/> + <assertSize collection="elementList" size="1" id="elt2Count_2"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt3"" var="elementList"/> + <assertSize collection="elementList" size="1" id="elt3Count"/> + +</test> + + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest2.xml b/test/testcases/tests/level3/ls/DOMBuilderTest2.xml new file mode 100644 index 0000000..6de856a --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest2.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + +<test xmlns="&level3;" name="DOMBuilderTest2"> + <metadata> + <title>DOMBuilderTest2</title> + &creator; + <description>Uses LSParser.parseWithContext to append a document as a child of an existing node.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseWithContext"/> + </metadata> + + <var name="elementList" type="NodeList"/> + <var name="stringDoc" type="DOMString"/> + <var name="firstElt0" type="Element"/> + <var name="returnNode" type="Node"/> + <var name="resourceURI" type="DOMString"/> + + &vars; + &init; + + <getResourceURI var="resourceURI" href="TEST0" contentType="text/xml"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt0"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt0"/> + + <item interface="NodeList" obj="elementList" var="firstElt0" index="0"/> + + <getResourceURI var="resourceURI" href="TEST2" contentType="text/xml"/> + <systemId obj="inputSource" value="resourceURI" interface="LSInput"/> + <try> + <parseWithContext obj="parser" input="inputSource" contextArg="firstElt0" action="ACTION_APPEND_AS_CHILDREN" var="returnNode"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> + </try> + <getElementsByTagName interface="Document" obj="document" tagname=""elt2"" var="elementList"/> + <assertSize collection="elementList" size="2" id="count_elt2"/> + + <getElementsByTagName interface="Document" obj="document" tagname=""elt3"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt3"/> + +</test> + + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest3.xml b/test/testcases/tests/level3/ls/DOMBuilderTest3.xml new file mode 100644 index 0000000..c1a6e78 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest3.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + +<test xmlns="&level3;" name="DOMBuilderTest3"> + <metadata> + <title>DOMBuilderTest3</title> + &creator; + <description>Uses LSParser.parseWithContext to insert a document after a node.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseWithContext"/> + </metadata> + + <var name="elementList" type="NodeList"/> + <var name="stringDoc" type="DOMString"/> + + <var name="firstElt1" type="Element"/> + <var name="secondElt1" type="Element"/> + <var name="thirdElt" type="Element"/> + <var name="nodeName" type="DOMString"/> + <var name="returnNode" type="Node"/> + <var name="resourceURI" type="DOMString"/> + + &vars; + + &init; + + <getResourceURI var="resourceURI" href="TEST0" contentType="text/xml"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="2" id="count_elt1"/> + + + <item interface="NodeList" obj="elementList" var="firstElt1" index="0"/> + + <nextSibling interface="Node" obj="firstElt1" var="secondElt1"/> + <nodeName obj="secondElt1" var="nodeName"/> + <assertEquals actual="nodeName" expected=""elt1"" id="nextSibling_before_add" ignoreCase="false"/> + + <getResourceURI var="resourceURI" href="TEST2" contentType="text/xml"/> + <systemId obj="inputSource" value="resourceURI" interface="LSInput"/> + <try> + <parseWithContext obj="parser" input="inputSource" contextArg="firstElt1" action="ACTION_INSERT_AFTER" var="returnNode"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> + </try> + <nextSibling interface="Node" obj="firstElt1" var="secondElt1"/> + <nodeName obj="secondElt1" var="nodeName"/> + <assertEquals actual="nodeName" expected=""elt2"" id="nextSibling_after_add" ignoreCase="false"/> + + <nextSibling interface="Node" obj="secondElt1" var="thirdElt"/> + <nodeName obj="thirdElt" var="nodeName"/> + <assertEquals actual="nodeName" expected=""elt1"" id="nextSiblings_sibling_after_add" ignoreCase="false"/> + +</test> + + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest4.xml b/test/testcases/tests/level3/ls/DOMBuilderTest4.xml new file mode 100644 index 0000000..ee557d3 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest4.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + +<test xmlns="&level3;" name="DOMBuilderTest4"> + <metadata> + <title>DOMBuilderTest4</title> + &creator; + <description>Uses LSParser.parseWithContext to insert a document before a node.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseWithContext"/> + </metadata> + + <var name="elementList" type="NodeList"/> + <var name="stringDoc" type="DOMString"/> + + <var name="firstElt1" type="Element"/> + <var name="secondElt1" type="Element"/> + <var name="thirdElt" type="Element"/> + <var name="nodeName" type="DOMString"/> + <var name="returnNode" type="Node"/> + <var name="resourceURI" type="DOMString"/> + + &vars; + &init; + <getResourceURI var="resourceURI" href="TEST0" contentType="text/xml"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="2" id="count_elt1"/> + + + <item interface="NodeList" obj="elementList" var="secondElt1" index="1"/> + + <previousSibling interface="Node" obj="secondElt1" var="firstElt1"/> + <nodeName obj="firstElt1" var="nodeName"/> + <assertEquals actual="nodeName" expected=""elt1"" id="previousSibling_before_insert_before" ignoreCase="false"/> + + <getResourceURI var="resourceURI" href="TEST2" contentType="text/xml"/> + <systemId obj="inputSource" value="resourceURI" interface="LSInput"/> + <try> + <parseWithContext obj="parser" input="inputSource" contextArg="secondElt1" action="ACTION_INSERT_BEFORE" var="returnNode"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> + </try> + <previousSibling interface="Node" obj="secondElt1" var="firstElt1"/> + <nodeName obj="firstElt1" var="nodeName"/> + <assertEquals actual="nodeName" expected=""elt2"" id="previousSibling_after_insert_before" ignoreCase="false"/> + + +</test> + + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest5.xml b/test/testcases/tests/level3/ls/DOMBuilderTest5.xml new file mode 100644 index 0000000..fd212c9 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest5.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003-2004 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"[ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + +<test xmlns="&level3;" name="DOMBuilderTest5"> + <metadata> + <title>DOMBuilderTest5</title> + &creator; + <description>supported-media-types-only is set to true if supported and + an XML file with an unsupported media type from an HTTP server + on the local machine is retrieved.</description> + &contributor; &date; + <subject resource="&spec;#LS-LSParser-parseURI"/> + <subject resource="&spec;#parameter-supported-media-types-only"/> + </metadata> + + + <var name="elementList" type="NodeList"/> + <var name="stringDoc" type="DOMString"/> + <var name="configuration" type="DOMConfiguration"/> + + <var name="ERROR_HANDLER" type="DOMString" value='"error-handler"'/> + <var name="SUPPORTED_MEDIATYPES_ONLY" type="DOMString" value='"supported-media-types-only"'/> + <var name="mediaTypesSupported" type="boolean"/> + <var name="resourceURI" type="DOMString"/> + + <var name="errorHandler" type="DOMErrorHandler"> + <handleError> + <var name="type" type="DOMString"/> + <type var="type" obj="error" interface="DOMError"/> + <assertEquals id="handler_1" actual="type" expected='"unsupported-media-type"' ignoreCase="false"/> + <return value="false"/> + </handleError> + </var> + &vars; + + &init; + + <domConfig var="configuration" obj="parser" interface="LSParser"/> + + <getResourceURI var="resourceURI" href="TESTPDF" scheme="http" contentType="application/pdf"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <!-- + document should successfully parse since, properly configured, + testpdf.pdf is a valid XML file on the http server. + --> + <assertNotNull actual="document" id="testpdf_parsed"/> + + <canSetParameter var="mediaTypesSupported" obj="configuration" name="SUPPORTED_MEDIATYPES_ONLY" value="true"/> + <if> + <isTrue value="mediaTypesSupported"/> + <setParameter obj="configuration" name="SUPPORTED_MEDIATYPES_ONLY" value="true"/> + <setParameter obj="configuration" name="ERROR_HANDLER" value="errorHandler"/> + <assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="document" obj="parser" uri="resourceURI"/> + </PARSE_ERR> + </assertLSException> + </if> + +</test> + + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest6.xml b/test/testcases/tests/level3/ls/DOMBuilderTest6.xml new file mode 100644 index 0000000..7462529 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest6.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="DOMBuilderTest6"> + <metadata> + <title>DOMBuilderTest6</title> + <creator>Curt Arnold</creator> + <description>Parses from an uninitialized LSInput.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="input" type="LSInput"/> + <var name="document" type="Document"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <createLSInput var="input" obj="domImpl"/> + <assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parse var="document" obj="parser" input="input"/> + </PARSE_ERR> + </assertLSException> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMBuilderTest8.xml b/test/testcases/tests/level3/ls/DOMBuilderTest8.xml new file mode 100644 index 0000000..ec943b6 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMBuilderTest8.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="DOMBuilderTest8"> + <metadata> + <title>DOMBuilderTest8</title> + <creator>Curt Arnold</creator> + <description>Parses an unresolvable System ID.</description> + <date qualifier="created">2003-12-19</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="input" type="LSInput"/> + <var name="document" type="Document"/> + <var name="resourceURI" type="DOMString"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <createLSInput var="input" obj="domImpl"/> + <getResourceURI var="resourceURI" href='"test0"' contentType="text/xml"/> + <plus var="resourceURI" op1="resourceURI" op2='"_missing"'/> + <systemId obj="input" value="resourceURI" interface="LSInput"/> + <assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parse var="document" obj="parser" input="input"/> + </PARSE_ERR> + </assertLSException> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMEntityResolverTest0.xml b/test/testcases/tests/level3/ls/DOMEntityResolverTest0.xml new file mode 100644 index 0000000..33922c3 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMEntityResolverTest0.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMEntityResolverTest0"> + <metadata> + <title>DOMEntityResolverTest0</title> + &creator; + <description>Checks parameters on call to resolve resource are + as expected and redirects to parse a different resource.</description> + &contributor; &date; + <subject resource="&spec;#LS-LSResourceResolver-resolveResource"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-resource-resolver"/> + </metadata> + + <var name="resourceURI" type="DOMString"/> + <var name="elt2List" type="NodeList"/> + <var name="elt2Count" type="int"/> + <var name="myentityresolver" type="LSResourceResolver"> + <resolveResource> + <var name="domImplLS" type="DOMImplementationLS"/> + <var name="redirectedInput" type="LSInput"/> + <var name="resourceURI" type="DOMString"/> + <var name="source" type="DOMString" value='"<elt2/>"'/> + + <!-- check that parameters on call to resolveSource are correct --> + <assertNull actual="publicId" id="rr_publicId"/> + <assertEquals actual="systemId" expected='"test5.xml"' ignoreCase="false" id="rr_systemId"/> + <assertURIEquals actual="baseURI" isAbsolute='true' name='"test4"' id="rr_baseURI"/> + + <!-- redirect so that test5 is loaded --> + <implementation var="domImplLS"/> + <createLSInput var="redirectedInput" obj="domImplLS"/> + <stringData obj="redirectedInput" value="source" interface="LSInput"/> + <return value="redirectedInput"/> + </resolveResource> + + </var> + + <var name="configuration" type="DOMConfiguration"/> + + &vars; + &init; + + <domConfig var="configuration" obj="parser" interface="LSParser"/> + <setParameter obj="configuration" name='"resource-resolver"' value="myentityresolver"/> + + <getResourceURI var="resourceURI" href="TEST4" contentType="text/xml"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName var="elt2List" obj="document" + tagname='"elt2"' interface="Document"/> + <length var="elt2Count" obj="elt2List" interface="NodeList"/> + <assertEquals actual="elt2Count" expected="1" id="elt2Count" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMEntityResolverTest1.xml b/test/testcases/tests/level3/ls/DOMEntityResolverTest1.xml new file mode 100644 index 0000000..16851cc --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMEntityResolverTest1.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMEntityResolverTest1"> + <metadata> + <title>DOMEntityResolverTest1</title> + &creator; + <description>Tests a custom entity resolver. The entity resolver creates an input source that supplies 2 elt1 elements. The original entity reference referes to 1 elt1</description> + &contributor; &date; + <subject resource="&spec;#LS-LSResourceResolver-resolveResource"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-resource-resolver"/> + </metadata> + <implementationAttribute name="validating" value="true"/> + + + <var name="myentityresolver" type="LSResourceResolver"> + <resolveResource> + <var name="erInputSource" type="LSInput"/> + <var name='implementation' type='DOMImplementation'/> + <var name='lsImplementation' type='DOMImplementationLS'/> + <var name="substitute" type="DOMString" value='"<elt1>second elt1</elt1><elt1>third elt1</elt1>"'/> + + <implementation var='implementation'/> + <assign var='lsImplementation' value='implementation'/> + + <createLSInput var='erInputSource' obj='lsImplementation'/> + <stringData obj="erInputSource" value="substitute" interface="LSInput"/> + + <return value="erInputSource"/> + </resolveResource> + + </var> + + <var name="elementList" type="NodeList"/> + <var name="configuration" type="DOMConfiguration"/> + <var name="resourceURI" type="DOMString"/> + + &vars; + &init; + + <domConfig var="configuration" obj="parser" interface="LSParser"/> + + <getResourceURI var="resourceURI" href="TEST4" contentType="text/xml"/> + + <!-- before applying the entity resolver there should be 2 elt1 in this document --> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="2" id="count_elt1_before_applying_entity_resolver"/> + + <setParameter obj="configuration" name='"resource-resolver"' value="myentityresolver"/> + + <!-- after applying the entity resolver there should be 3 elt1 in this document --> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="3" id="count_elt1_after_applying_entity_resolver"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMEntityResolverTest2.xml b/test/testcases/tests/level3/ls/DOMEntityResolverTest2.xml new file mode 100644 index 0000000..ce72982 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMEntityResolverTest2.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMEntityResolverTest2"> + <metadata> + <title>DOMEntityResolverTest2</title> + &creator; + <description>Resource resolvers do not participate in resolving the top-level document entity. + This test attempts to redirect any resource and then checks that the + requested document was not affected.</description> + &contributor; &date; + <subject resource="&spec;#LS-LSResourceResolver-resolveResource"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-resource-resolver"/> + </metadata> + + <var name="resourceURI" type="DOMString"/> + <var name="docElem" type="Element"/> + <var name="docElemName" type="DOMString"/> + <var name="myentityresolver" type="LSResourceResolver"> + <resolveResource> + <var name="domImplLS" type="DOMImplementationLS"/> + <var name="redirectedInput" type="LSInput"/> + <var name="source" type="DOMString" value='"<!DOCTYPE failure [<!ELEMENT failure EMPTY>]><failure/>"'/> + + <!-- + The resolveResource should not be invoked, + but if it is substitute a failure document --> + <implementation var="domImplLS"/> + <createLSInput var="redirectedInput" obj="domImplLS"/> + <stringData obj="redirectedInput" value="source" interface="LSInput"/> + <return value="redirectedInput"/> + </resolveResource> + </var> + + <var name="configuration" type="DOMConfiguration"/> + + &vars; + &init; + + <domConfig var="configuration" obj="parser" interface="LSParser"/> + <setParameter obj="configuration" name='"resource-resolver"' value="myentityresolver"/> + + <getResourceURI var="resourceURI" href="TEST0" contentType="text/xml"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <assertNotNull actual="document" id="documentNotNull"/> + <documentElement var="docElem" obj="document"/> + <nodeName var="docElemName" obj="docElem"/> + <assertEquals actual="docElemName" expected='"elt0"' + id="docElemName" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMImplementationLSTest0.xml b/test/testcases/tests/level3/ls/DOMImplementationLSTest0.xml new file mode 100644 index 0000000..e008fcc --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMImplementationLSTest0.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMImplementationLSTest0"> + <metadata> + <title>DOMImplementationLSTest0</title> + &creator; + <description>Uses DOMImplementationLS.createLSParser to create a synchronous parser with an unspecified schema type.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSParser"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-async"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-busy"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-filter"/> + </metadata> + <var name="isAsync" type="boolean"/> + <var name="isBusy" type="boolean"/> + <var name="filter" type="LSParserFilter"/> + &vars; + + <createLSParser var='parser' obj='lsImplementation' mode='MODE_SYNCHRONOUS' schemaType='NULL_SCHEMATYPE'/> + <assertNotNull actual="parser" id="parserNotNull"/> + <async var="isAsync" obj="parser"/> + <assertFalse actual="isAsync" id="notAsync"/> + <busy var="isBusy" obj="parser"/> + <assertFalse actual="isBusy" id="notBusy"/> + <filter var="filter" obj="parser" interface="LSParser"/> + <assertNull actual="filter" id="nullFilter"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMImplementationLSTest1.xml b/test/testcases/tests/level3/ls/DOMImplementationLSTest1.xml new file mode 100644 index 0000000..3447a76 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMImplementationLSTest1.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMImplementationLSTest1"> + <metadata> + <title>DOMImplementationLSTest1</title> + &creator; + <description>Calls DOMImplementationLS.createLSParser(MODE_ASYNCHRONOUS, null) and + checks the return value is not null. Only applicable if DOMImplementation.hasFeature("LS-ASync", null) is true.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSParser"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-async"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-busy"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-filter"/> + </metadata> + <hasFeature feature='"LS-Async"'/> + <var name="isAsync" type="boolean"/> + <var name="isBusy" type="boolean"/> + <var name="filter" type="LSParserFilter"/> + &vars; + + <createLSParser var='parser' obj='lsImplementation' mode='MODE_ASYNCHRONOUS' schemaType='NULL_SCHEMATYPE'/> + <assertNotNull actual="parser" id="parserNotNull"/> + <async var="isAsync" obj="parser"/> + <assertTrue actual="isAsync" id="notAsync"/> + <busy var="isBusy" obj="parser"/> + <assertFalse actual="isBusy" id="notBusy"/> + <filter var="filter" obj="parser" interface="LSParser"/> + <assertNull actual="filter" id="nullFilter"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMImplementationLSTest2.xml b/test/testcases/tests/level3/ls/DOMImplementationLSTest2.xml new file mode 100644 index 0000000..5327a9c --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMImplementationLSTest2.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMImplementationLSTest2"> + <metadata> + <title>DOMImplementationLSTest2</title> + &creator; + <description>Calls DOMImplementationLS.createLSParser(MODE_SYNCHRONOUS, "http://www.w3.org/TR/REC-xml") and checks the return value is not null.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSParser"/> + </metadata> + &vars; + + <createLSParser var='parser' obj='lsImplementation' mode='MODE_SYNCHRONOUS' schemaType='DTD_SCHEMATYPE'/> + <assertNotNull actual="parser" id="parserNotNull"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMImplementationLSTest3.xml b/test/testcases/tests/level3/ls/DOMImplementationLSTest3.xml new file mode 100644 index 0000000..f2480b1 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMImplementationLSTest3.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMImplementationLSTest3"> + <metadata> + <title>DOMImplementationLSTest3</title> + &creator; + <description>Calls DOMImplementationLS.createLSParser(MODE_SYNCHRONOUS, "http://www.w3.org/2001/XMLSchema"). + Should either throw a NOT_SUPPORTED_ERR or return a non-null parser.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSParser"/> + </metadata> + &vars; + + <try> + <createLSParser var='parser' obj='lsImplementation' mode='MODE_SYNCHRONOUS' schemaType='SCHEMA_SCHEMATYPE'/> + <assertNotNull actual="parser" id="parserNotNull"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"/> + </catch> + </try> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMImplementationLSTest4.xml b/test/testcases/tests/level3/ls/DOMImplementationLSTest4.xml new file mode 100644 index 0000000..447e8a2 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMImplementationLSTest4.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMImplementationLSTest4"> + <metadata> + <title>DOMImplementationLSTest4</title> + &creator; + <description>Calls DOMImplementationLS.createLSParser(MODE_SYNCHRONOUS, "http://nobody...err") expecting that a + NOT_SUPPORTED_ERR would be raised.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSParser"/> + </metadata> + &vars; + + <assertDOMException id="NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <createLSParser var='parser' obj='lsImplementation' + mode='MODE_SYNCHRONOUS' + schemaType='"http://nobody_should_support_this_schematype_this_should_throw_a_not_supported_err"'/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMImplementationLSTest5.xml b/test/testcases/tests/level3/ls/DOMImplementationLSTest5.xml new file mode 100644 index 0000000..e9344fc --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMImplementationLSTest5.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMImplementationLSTest5"> + <metadata> + <title>DOMImplementationLSTest0</title> + &creator; + <description>Calls DOMImplementationLS.createLSParser(MODE_SYNCHRONOUS, "http://nobody...err") expecting that a + NOT_SUPPORTED_ERR would be raised.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSParser"/> + </metadata> + &vars; + <assertDOMException id="NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <createLSParser var='parser' obj='lsImplementation' + mode='17' + schemaType='NULL_SCHEMATYPE'/> + </NOT_SUPPORTED_ERR> + </assertDOMException> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMInputSourceTest0.xml b/test/testcases/tests/level3/ls/DOMInputSourceTest0.xml new file mode 100644 index 0000000..113e645 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMInputSourceTest0.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMInputSourceTest0"> + <metadata> + <title>DOMInputSourceTest0</title> + &creator; + <description>Parses a document from a byte stream.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-byteStream"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + </metadata> + + <!-- stream value is <elt0/> in UTF-8 --> + <var name="myByteStream" type="LSInputStream" value='"3C656C74302F3E"'/> + <var name="elementList" type="NodeList"/> + + &vars; + &init; + + + <byteStream obj="inputSource" value="myByteStream" interface="LSInput"/> + + <parse var="document" obj="parser" input="inputSource"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt0"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt0"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMInputSourceTest1.xml b/test/testcases/tests/level3/ls/DOMInputSourceTest1.xml new file mode 100644 index 0000000..6d490eb --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMInputSourceTest1.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMInputSourceTest1"> + <metadata> + <title>DOMInputSourceTest1</title> + &creator; + <description>Parses a document from a character stream.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-characterStream"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + </metadata> + <var name="myReader" type="LSReader" value='"<elt0/>"'/> + <var name="elementList" type="NodeList"/> + &vars; + + + &init; + + + <characterStream obj="inputSource" value="myReader" interface="LSInput"/> + + <parse var="document" obj="parser" input="inputSource"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt0"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt0"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMInputSourceTest2.xml b/test/testcases/tests/level3/ls/DOMInputSourceTest2.xml new file mode 100644 index 0000000..3a5cff0 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMInputSourceTest2.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMInputSourceTest2"> + <metadata> + <title>DOMInputSourceTest2</title> + &creator; + <description>test the parser by using a string inputsource</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-stringData"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + </metadata> + + <var name="elementList" type="NodeList"/> + <var name="myString" type="DOMString" value=""<elt0>elt0</elt0>""/> + &vars; + &init; + + <stringData obj="inputSource" value="myString" interface="LSInput"/> + + <parse var="document" obj="parser" input="inputSource"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt0"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt0"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMInputSourceTest3.xml b/test/testcases/tests/level3/ls/DOMInputSourceTest3.xml new file mode 100644 index 0000000..af25ac1 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMInputSourceTest3.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMInputSourceTest3"> + <metadata> + <title>DOMInputSourceTest3</title> + &creator; + <description>Specify encodings for LSInput with string data. The + setting should have no effect and the inputEncoding of the resulting document should be UTF-16.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-encoding"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + </metadata> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="myString" type="DOMString" value=""<?xml version='1.0' encoding='UTF-8'?><elt0>elt0</elt0>""/> + <var name="encodingString" type="DOMString"/> + &vars; + &init; + + <!-- initialize an input source with a string and a misleading encoding --> + <stringData obj="inputSource" value="myString" interface="LSInput"/> + <encoding obj="inputSource" value='"UTF-8"' interface="LSInput"/> + <!-- parse --> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- check inputEncoding, should be UTF-16 --> + <inputEncoding var="encodingString" obj="document" interface="Document"/> + <assertEquals actual="encodingString" expected='"UTF-16"' ignoreCase="true" id="encodingstringcheck0"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMInputSourceTest4.xml b/test/testcases/tests/level3/ls/DOMInputSourceTest4.xml new file mode 100644 index 0000000..945ed57 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMInputSourceTest4.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMInputSourceTest4"> + <metadata> + <title>DOMInputSourceTest4</title> + &creator; + <description>tests whether DOMInput whether abort can be called even if loading is finished already</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-abort"/> + </metadata> + + <var name="elementList" type="NodeList"/> + <var name="myString" type="DOMString" value=""<?xml version='1.0' encoding='UTF-8'?><elt0>elt0</elt0>""/> + + &vars; + &init; + + <stringData obj="inputSource" value="myString" interface="LSInput"/> + + <parse var="document" obj="parser" input="inputSource"/> + + <!-- abort should be possible even in synchronous load --> + <abort obj="parser" interface="LSParser"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMInputSourceTest5.xml b/test/testcases/tests/level3/ls/DOMInputSourceTest5.xml new file mode 100644 index 0000000..34bff24 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMInputSourceTest5.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMInputSourceTest5"> + <metadata> + <title>DOMInputSourceTest5</title> + &creator; + <description>Parses a document containing an external entity and checks + that resource resolver is passed the baseURI value specified on LSInput.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-systemId"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-publicId"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-baseURI"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSResourceResolver-resolveResource"/> + </metadata> + + + <var name="myentityresolver" type="LSResourceResolver"> + <resolveResource> + <var name="domImplLS" type="DOMImplementationLS"/> + <var name="input" type="LSInput"/> + <assertEquals actual="baseURI" expected='"http://www.example.com/new_base"' ignoreCase="false" id="er_base"/> + <assertEquals actual="publicId" expected='"-//X-Hive//native xml storage//EN"' ignoreCase="false" id="er_public"/> + <assertURIEquals actual="systemId" isAbsolute="true" name='"test5"' id="er_system"/> + + <!-- create an empty string input so we can detect + that resource resolver was used --> + <implementation var="domImplLS"/> + <createLSInput var="input" obj="domImplLS"/> + <stringData obj="input" value='""' interface="LSInput"/> + <return value="input"/> + </resolveResource> + + </var> + + <var name="configuration" type="DOMConfiguration"/> + <var name="resourceURI" type="DOMString"/> + <var name="nodeList" type="NodeList"/> + &vars; + &init; + + <domConfig var="configuration" obj="parser" interface="LSParser"/> + + <setParameter obj="configuration" name='"resource-resolver"' value="myentityresolver"/> + <setParameter obj="configuration" name='"entities"' value="false"/> + + <getResourceURI var="resourceURI" href="TEST4" contentType="text/xml"/> + <systemId obj="inputSource" value="resourceURI" interface="LSInput"/> + <publicId obj="inputSource" value='"-//X-Hive//native xml storage//DE"' interface="LSInput"/> + <baseURI obj="inputSource" value='"http://www.example.com/new_base"' interface="LSInput"/> + + + <parse var="document" obj="parser" input="inputSource"/> + <!-- should parse successfully --> + <assertNotNull actual="document" id="documentNotNull"/> + + <!-- resource resolver should have suppressed elt2 from the + external entity --> + <getElementsByTagName var="nodeList" obj="document" tagname='"elt2"' interface="Document"/> + <assertSize size="0" collection="nodeList" id="noElt2"/> + + <!-- check that there is an elt1 --> + <getElementsByTagName var="nodeList" obj="document" tagname='"elt1"' interface="Document"/> + <assertSize size="1" collection="nodeList" id="hasElt1"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMInputSourceTest6.xml b/test/testcases/tests/level3/ls/DOMInputSourceTest6.xml new file mode 100644 index 0000000..9c896a8 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMInputSourceTest6.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMInputSourceTest6"> + <metadata> + <title>DOMInputSourceTest6</title> + &creator; + <description>Specify encodings for LSInput with a character stream. The + setting should have no effect and the inputEncoding of the resulting document should be UTF-16.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-encoding"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> + </metadata> + <hasFeature feature='"Core"' version='"3.0"'/> + + <var name="encodingString" type="DOMString"/> + + <var name="myReader" type="LSReader" value=""<?xml version='1.0' encoding='UTF-8'?><elt0>elt0</elt0>""/> + + &vars; + &init; + + <!-- initialize an input source with a string and a misleading encoding --> + <encoding obj="inputSource" value='"UTF-8"' interface="LSInput"/> + <characterStream obj="inputSource" value="myReader" interface="LSInput"/> + <!-- parse --> + <parse var="document" obj="parser" input="inputSource"/> + <assertNotNull actual="document" id="documentNotNull"/> + + <!-- check inputEncoding, should be UTF-16 --> + <inputEncoding var="encodingString" obj="document" interface="Document"/> + <assertEquals actual="encodingString" expected='"UTF-16"' ignoreCase="true" id="encodingstringcheck0"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterFilterTest0.xml b/test/testcases/tests/level3/ls/DOMWriterFilterTest0.xml new file mode 100644 index 0000000..09030c6 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterFilterTest0.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterFilterTest0"> + <metadata> + <title>DOMWriterFilterTest0</title> + &creator; + <description>DOMSerializerFilter test, a simple test eliminating a subtree</description> + &contributor; &date; + <subject resource="&spec;#LS-Interfaces-LSSerializerFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-LSSerializerFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializerFilter-acceptNode"/> + </metadata> + + + <var name="myfilter" type="LSSerializerFilter"> + <var name="name" type="DOMString"/> + &filterVars; + + + <acceptNode> + + <nodeName obj="n" var="name"/> + <if> + <equals actual="name" expected='"elt1"' ignoreCase="false"/> + <return value="&FILTER_ACCEPT;"/> + </if> + + <return value="&FILTER_REJECT;"/> + </acceptNode> + + <whatToShow> + <get> + <return value="&SHOW_ALL;"/> + </get> + </whatToShow> + + </var> + + + + + <var name="configuration" type="DOMConfiguration"/> + <var name="stringDoc" type="DOMString" value='"<elt1>first elt1<elt2>elt2</elt2></elt1>"'/> + <var name="writeResult" type="DOMString"/> + <var name="length" type="int"/> + <var name="elementList" type="NodeList"/> + + &vars; + &init; + + <!-- parse the string --> + <stringData obj="inputSource" value="stringDoc"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- apply the filter --> + <filter obj="writer" value="myfilter" interface="LSSerializer"/> + + <!-- serialize result --> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + + <!-- parse result --> + <stringData obj="inputSource" value="writeResult" interface="LSInput"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- tests elt1 should be in the result, elt2 should be filtered out --> + <getElementsByTagName interface="Document" obj="document" tagname=""elt2"" var="elementList"/> + <assertSize collection="elementList" size="0" id="count_elt2"/> + + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt1"/> + + +</test> + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterFilterTest1.xml b/test/testcases/tests/level3/ls/DOMWriterFilterTest1.xml new file mode 100644 index 0000000..1dc0140 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterFilterTest1.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterFilterTest1"> + <metadata> + <title>DOMWriterFilterTest1</title> + &creator; + <description>Uses a serializer filter to eliminate attributes, parses the output and checks if the attribute is not there.</description> + &contributor; &date; + <subject resource="&spec;#LS-Interfaces-LSSerializerFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-LSSerializerFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializerFilter-acceptNode"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializerFilter-whatToShow"/> + </metadata> + + + <var name="myfilter" type="LSSerializerFilter"> + &filterVars; + <acceptNode> + <return value="&FILTER_REJECT;"/> + </acceptNode> + + <whatToShow> + <get> + <return value="&SHOW_ATTRIBUTE;"/> + </get> + </whatToShow> + + </var> + + + + + <var name="configuration" type="DOMConfiguration"/> + <var name="stringDoc" type="DOMString" value=""<elt1 attr1='attr1'>first elt1</elt1>""/> + <var name="writeResult" type="DOMString"/> + <var name="length" type="int"/> + <var name="elementList" type="NodeList"/> + <var name="elt1" type="Element"/> + <var name="attrNode" type="Attr"/> + + &vars; + &init; + + <!-- parse the string --> + <stringData obj="inputSource" value="stringDoc"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- apply the filter --> + <filter obj="writer" value="myfilter" interface="LSSerializer"/> + + <!-- serialize result --> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + + <!-- parse result --> + <stringData obj="inputSource" value="writeResult" interface="LSInput"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- tests elt1 should be in the result--> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt2"/> + + <!-- attr1 of elt1 should have been suppressed --> + <item interface="NodeList" obj="elementList" index="0" var="elt1"/> + <getAttributeNode obj="elt1" var="attrNode" name=""attr1""/> + <assertNull actual="attrNode" id="attrib1"/> + + +</test> + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterFilterTest2.xml b/test/testcases/tests/level3/ls/DOMWriterFilterTest2.xml new file mode 100644 index 0000000..6f2be15 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterFilterTest2.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterFilterTest2"> + <metadata> + <title>DOMWriterFilterTest2</title> + &creator; + <description>Uses a filter to strip text during serialization + parsers to check expections.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-LSSerializerFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializerFilter-acceptNode"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializerFilter-whatToShow"/> + <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=643"/> + </metadata> + + + <var name="myfilter" type="LSSerializerFilter"> + <var name="name" type="DOMString"/> + &filterVars; + + <acceptNode> + <return value="&FILTER_REJECT;"/> + </acceptNode> + + <whatToShow> + <get> + <return value="&SHOW_TEXT;"/> + </get> + </whatToShow> + + </var> + + + + + <var name="stringDoc" type="DOMString" value=""<elt1 attr1='attr1'>first elt1</elt1>""/> + <var name="writeResult" type="DOMString"/> + <var name="length" type="int"/> + <var name="elementList" type="NodeList"/> + <var name="elt1" type="Element"/> + <var name="childs" type="boolean"/> + <var name="attrNode" type="Attr"/> + <var name="attr1" type="DOMString"/> + + &vars; + &init; + + <!-- parse the string --> + <stringData obj="inputSource" value="stringDoc"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- apply the filter --> + <filter obj="writer" value="myfilter" interface="LSSerializer"/> + + <!-- serialize result --> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + + <!-- parse result --> + <stringData obj="inputSource" value="writeResult" interface="LSInput"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- tests no child of elt1--> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <item interface="NodeList" obj="elementList" index="0" var="elt1"/> + + <!-- attr not effected since children of attribute nodes not passed to filter --> + <getAttributeNode var="attrNode" obj="elt1" name='"attr1"'/> + <assertNotNull actual="attrNode" id="attrExists"/> + <nodeValue var="attr1" obj="attrNode"/> + <assertEquals actual="attr1" expected='"attr1"' ignoreCase="false" id="attrUnchanged"/> + + <!-- elt1 should be empty --> + <hasChildNodes obj="elt1" var="childs"/> + <assertFalse actual="childs" id="nodeHasChilds_elt1"/> + + +</test> + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterFilterTest3.xml b/test/testcases/tests/level3/ls/DOMWriterFilterTest3.xml new file mode 100644 index 0000000..0af3c38 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterFilterTest3.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterFilterTest3"> + <metadata> + <title>DOMWriterFilterTest3</title> + &creator; + <description>Eliminates comments on serialization, parses results and checks for comments.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-LSSerializerFilter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializerFilter-acceptNode"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializerFilter-whatToShow"/> + </metadata> + + + <var name="myfilter" type="LSSerializerFilter"> + &filterVars; + <acceptNode> + <return value="&FILTER_REJECT;"/> + </acceptNode> + + <whatToShow> + <get> + <return value="&SHOW_COMMENT;"/> + </get> + </whatToShow> + </var> + + + + + <var name="configuration" type="DOMConfiguration"/> + <var name="stringDoc" type="DOMString" value=""<elt1><elt2>elt2</elt2><!--comment1--></elt1>""/> + <var name="writeResult" type="DOMString"/> + <var name="length" type="int"/> + <var name="elementList" type="NodeList"/> + <var name="children" type="NodeList"/> + <var name="elt1" type="Element"/> + + &vars; + &init; + + <!-- parse the string --> + <stringData obj="inputSource" value="stringDoc"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- apply the filter --> + <filter obj="writer" value="myfilter" interface="LSSerializer"/> + + <!-- serialize result --> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + + <!-- parse result --> + <stringData obj="inputSource" value="writeResult" interface="LSInput"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- test comments should be deleted, one child left of elt1 --> + <getElementsByTagName interface="Document" obj="document" tagname=""elt1"" var="elementList"/> + <assertSize collection="elementList" size="1" id="count_elt1"/> + + <item interface="NodeList" obj="elementList" index="0" var="elt1"/> + <childNodes obj="elt1" var="children"/> + <assertSize collection="children" size="1" id="count_children"/> + + +</test> + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterTest0.xml b/test/testcases/tests/level3/ls/DOMWriterTest0.xml new file mode 100644 index 0000000..0832a4c --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterTest0.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterTest0"> + <metadata> + <title>DOMWriterTest0</title> + &creator; + <description>Calls LSSerializer.writeToString and checks result.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> + </metadata> + <var name="stringDoc" type="DOMString"/> + <var name="writeResult" type="DOMString"/> + <var name="elementList" type="NodeList"/> + <var name="resourceURI" type="DOMString"/> + + &vars; + &init; + <getResourceURI var="resourceURI" href="TEST0"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + + <stringData obj="inputSource" value="writeResult"/> + <parse var="document" obj="parser" input="inputSource"/> + + <getElementsByTagName interface="Document" obj="document" tagname=""elt2"" var="elementList"/> + <assertSize collection="elementList" size="1" id="elt2Count_1"/> + + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterTest1.xml b/test/testcases/tests/level3/ls/DOMWriterTest1.xml new file mode 100644 index 0000000..178fe88 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterTest1.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterTest1"> + <metadata> + <title>DOMWriterTest1</title> + &creator; + <description>Writes an element node to a byte stream.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSOutput-byteStream"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-write"/> + </metadata> + <var name="stringDoc" type="DOMString"/> + <var name="writeResult" type="boolean"/> + <var name="elementList" type="NodeList"/> + <var name="firstElt3" type="Node"/> + <var name="output" type="LSOutput"/> + <var name="outputStream" type="LSOutputStream"/> + <var name="inputStream" type="LSInputStream" isNull="true"/> + <var name="resourceURI" type="DOMString"/> + + &vars; + + &init; + <!-- write out only subtree with elt3--> + <getResourceURI var="resourceURI" href="TEST2"/> + <parseURI var="document" obj="parser" uri="resourceURI"/> + <getElementsByTagName interface="Document" obj="document" tagname=""elt3"" var="elementList"/> + <item interface="NodeList" obj="elementList" var="firstElt3" index="0"/> + <createLSOutput var="output" obj="lsImplementation"/> + <byteStream obj="output" value="outputStream" interface="LSOutput"/> + + <write var="writeResult" obj="writer" destination="output" nodeArg="firstElt3"/> + <assign var="inputStream" value="outputStream"/> + <byteStream obj="inputSource" value="inputStream" interface="LSInput"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- no elt2 may be found --> + <getElementsByTagName interface="Document" obj="document" tagname=""elt2"" var="elementList"/> + <assertSize collection="elementList" size="0" id="elt2Count_1"/> + + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterTest2.xml b/test/testcases/tests/level3/ls/DOMWriterTest2.xml new file mode 100644 index 0000000..1b1cb82 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterTest2.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterTest2"> + <metadata> + <title>DOMWriterTest2</title> + &creator; + <description>Serializes a document without a XML declaration for both for 'xml-declaration' configuration values.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + + <var name="configuration" type="DOMConfiguration"/> + <var name="XML_DECLARATION" type="DOMString" value='"xml-declaration"'/> + <var name="stringDoc" type="DOMString" value='"<hello>me again</hello>"'/> + <var name="writeResult" type="DOMString"/> + <var name="xmlDecl" type="DOMString"/> + + &vars; + &init; + + <!-- parse the string --> + <stringData obj="inputSource" value="stringDoc"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- include xml declaration on serialization --> + <domConfig var="configuration" obj="writer" interface="LSSerializer"/> + + <setParameter obj="configuration" name="XML_DECLARATION" value="false"/> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + <assertEquals actual="writeResult" expected="stringDoc" id="without_xml_declaration" ignoreCase="false"/> + + <setParameter obj="configuration" name="XML_DECLARATION" value="true"/> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + <substring var="xmlDecl" obj="writeResult" beginIndex="0" endIndex="6"/> + <assertEquals actual="xmlDecl" expected='"<?xml "' id="with_xml_declaration" ignoreCase="false"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterTest3.xml b/test/testcases/tests/level3/ls/DOMWriterTest3.xml new file mode 100644 index 0000000..720a64d --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterTest3.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3tests.ent"> + %entities; +]> + + +<test xmlns="&level3;" name="DOMWriterTest3"> + <metadata> + <title>DOMWriterTest3</title> + &creator; + <description>Serializes a document with a XML declaration for both for 'xml-declaration' configuration values.</description> + &contributor; &date; + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + + <var name="configuration" type="DOMConfiguration"/> + <var name="XML_DECLARATION" type="DOMString" value='"xml-declaration"'/> + <var name="stringDoc" type="DOMString" value='"<?xml version='1.0'?><hello>me again</hello>"'/> + <var name="writeResult" type="DOMString"/> + <var name="xmlDecl" type="DOMString"/> + + &vars; + &init; + + <!-- parse the string --> + <stringData obj="inputSource" value="stringDoc"/> + <parse var="document" obj="parser" input="inputSource"/> + + <!-- include xml declaration on serialization --> + <domConfig var="configuration" obj="writer" interface="LSSerializer"/> + + <setParameter obj="configuration" name="XML_DECLARATION" value="false"/> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + <assertEquals actual="writeResult" expected='"<hello>me again</hello>"' id="without_xml_declaration" ignoreCase="false"/> + + <setParameter obj="configuration" name="XML_DECLARATION" value="true"/> + <writeToString var="writeResult" obj="writer" nodeArg="document"/> + <substring var="xmlDecl" obj="writeResult" beginIndex="0" endIndex="6"/> + <assertEquals actual="xmlDecl" expected='"<?xml "' id="with_xml_declaration" ignoreCase="false"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterTest4.xml b/test/testcases/tests/level3/ls/DOMWriterTest4.xml new file mode 100644 index 0000000..3d45e5f --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterTest4.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="DOMWriterTest4"> + <metadata> + <title>DOMWriterTest4</title> + <creator>Curt Arnold</creator> + <description>Writes a document to an uninitialized LSOutput.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-write"/> + </metadata> + <implementationAttribute name="validating" value="false"/> + + <var name="testDoc" type="Document"/> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <var name="serializer" type="LSSerializer"/> + <var name="status" type="boolean"/> + + <load var="testDoc" href="test0" willBeModified="false"/> + <implementation var="domImpl"/> + + <!-- create an LSOutput --> + <createLSOutput var="output" obj="domImpl"/> + + <!-- create a serializer and write a test document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <write var="status" obj="serializer" destination="output" nodeArg="testDoc"/> + </SERIALIZE_ERR> + </assertLSException> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterTest5.xml b/test/testcases/tests/level3/ls/DOMWriterTest5.xml new file mode 100644 index 0000000..0fafb5d --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterTest5.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="DOMWriterTest5"> + <metadata> + <title>DOMWriterTest5</title> + <creator>Curt Arnold</creator> + <description>Creates an document containing a namespaced attribute node without + user-specified prefix and checks that it is serialized properly.</description> + <date qualifier="created">2003-12-22</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-write"/> + <subject resource="http://lists.w3.org/Archives/Public/www-dom/2003OctDec/0062.html"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + + <var name="domImpl" type="DOMImplementation"/> + <var name="origDoc" type="Document"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="namespaceURI" type="DOMString" value='"http://www.example.com/DOMWriterTest5"'/> + <var name="docElem" type="Element"/> + <var name="outputString" type="DOMString"/> + <var name="input" type="LSInput"/> + <var name="serializer" type="LSSerializer"/> + <var name="parser" type="LSParser"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="attrValue" type="DOMString"/> + <var name="parsedDoc" type="Document"/> + <var name="docElemLocalName" type="DOMString"/> + <var name="docElemNS" type="DOMString"/> + + <implementation var="domImpl"/> + <createDocument var="origDoc" obj="domImpl" + namespaceURI="namespaceURI" + qualifiedName='"test"' + doctype="nullDocType"/> + <documentElement var="docElem" obj="origDoc"/> + <setAttributeNS obj="docElem" namespaceURI="namespaceURI" qualifiedName='"attr"' value='"test value"'/> + + + <!-- create a serializer and write the document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <writeToString var="outputString" obj="serializer" nodeArg="origDoc"/> + + <!-- create an LSInput --> + <createLSInput var="input" obj="domImpl"/> + <stringData obj="input" value="outputString"/> + + <!-- create parser --> + <createLSParser var="parser" obj="domImpl" mode="1" schemaType="NULL_SCHEMA_TYPE"/> + <parse var="parsedDoc" obj="parser" input="input"/> + + <documentElement var="docElem" obj="parsedDoc"/> + + <!-- check local name of document element --> + <localName var="docElemLocalName" obj="docElem"/> + <assertEquals actual="docElemLocalName" expected='"test"' ignoreCase="false" id="docElemLocalName"/> + + <!-- namespace of document element --> + <namespaceURI var="docElemNS" obj="docElem" interface="Node"/> + <assertEquals actual="docElemNS" expected="namespaceURI" ignoreCase="false" id="docElemNS"/> + + <!-- attribute with namespaceURI namespace --> + <getAttributeNS var="attrValue" obj="docElem" namespaceURI="namespaceURI" localName='"attr"'/> + <assertEquals actual="attrValue" expected='"test value"' ignoreCase="false" id="properNSAttrValue"/> + + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/DOMWriterTest6.xml b/test/testcases/tests/level3/ls/DOMWriterTest6.xml new file mode 100644 index 0000000..e562b13 --- /dev/null +++ b/test/testcases/tests/level3/ls/DOMWriterTest6.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="DOMWriterTest6"> + <metadata> + <title>DOMWriterTest6</title> + <creator>Curt Arnold</creator> + <description>Creates an document containing a namespaced attribute node with + user-specified prefix and checks that it is serialized properly.</description> + <date qualifier="created">2003-12-22</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-write"/> + <subject resource="http://lists.w3.org/Archives/Public/www-dom/2003OctDec/0062.html"/> + </metadata> + <implementationAttribute name="namespaceAware" value="true"/> + + <var name="domImpl" type="DOMImplementation"/> + <var name="origDoc" type="Document"/> + <var name="nullDocType" type="DocumentType" isNull="true"/> + <var name="namespaceURI" type="DOMString" value='"http://www.example.com/DOMWriterTest5"'/> + <var name="docElem" type="Element"/> + <var name="outputString" type="DOMString"/> + <var name="input" type="LSInput"/> + <var name="serializer" type="LSSerializer"/> + <var name="parser" type="LSParser"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="attrValue" type="DOMString"/> + <var name="parsedDoc" type="Document"/> + <var name="docElemLocalName" type="DOMString"/> + <var name="docElemNS" type="DOMString"/> + + <implementation var="domImpl"/> + <createDocument var="origDoc" obj="domImpl" + namespaceURI="namespaceURI" + qualifiedName='"test"' + doctype="nullDocType"/> + <documentElement var="docElem" obj="origDoc"/> + <setAttributeNS obj="docElem" namespaceURI="namespaceURI" qualifiedName='"test:attr"' value='"test value"'/> + + + <!-- create a serializer and write the document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <writeToString var="outputString" obj="serializer" nodeArg="origDoc"/> + + <!-- create an LSInput --> + <createLSInput var="input" obj="domImpl"/> + <stringData obj="input" value="outputString"/> + + <!-- create parser --> + <createLSParser var="parser" obj="domImpl" mode="1" schemaType="NULL_SCHEMA_TYPE"/> + <parse var="parsedDoc" obj="parser" input="input"/> + + <documentElement var="docElem" obj="parsedDoc"/> + + <!-- check local name of document element --> + <localName var="docElemLocalName" obj="docElem"/> + <assertEquals actual="docElemLocalName" expected='"test"' ignoreCase="false" id="docElemLocalName"/> + + <!-- namespace of document element --> + <namespaceURI var="docElemNS" obj="docElem" interface="Node"/> + <assertEquals actual="docElemNS" expected="namespaceURI" ignoreCase="false" id="docElemNS"/> + + <!-- attribute with namespaceURI namespace --> + <getAttributeNS var="attrValue" obj="docElem" namespaceURI="namespaceURI" localName='"attr"'/> + <assertEquals actual="attrValue" expected='"test value"' ignoreCase="false" id="properNSAttrValue"/> + + + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/GetFeature1.xml b/test/testcases/tests/level3/ls/GetFeature1.xml new file mode 100644 index 0000000..04a6c12 --- /dev/null +++ b/test/testcases/tests/level3/ls/GetFeature1.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="GetFeature1"> + <metadata> + <title>GetFeature1</title> + <creator>Curt Arnold</creator> + <description>DOMImplementationLS can be obtained by DOMImplementation.getFeature("LS", "3.0").</description> + <date qualifier="created">2003-12-09</date> + <!-- DOMImplementation.getFeature --> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature"/> + </metadata> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="domImpl" type="DOMImplementation"/> + <var name="domImplLS" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <implementation var="domImpl"/> + <getFeature var="domImplLS" obj="domImpl" + feature='"LS"' version='"3.0"' interface="DOMImplementation"/> + <assertNotNull actual="domImplLS" id="domImplLSNotNull"/> + <createLSOutput var="output" obj="domImplLS"/> + <assertNotNull actual="output" id="outputNotNull"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/GetFeature2.xml b/test/testcases/tests/level3/ls/GetFeature2.xml new file mode 100644 index 0000000..bf2755f --- /dev/null +++ b/test/testcases/tests/level3/ls/GetFeature2.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="GetFeature2"> + <metadata> + <title>GetFeature2</title> + <creator>Curt Arnold</creator> + <description>DOMImplementationLS can be obtained by DOMImplementation.getFeature("+lS", "3.0").</description> + <date qualifier="created">2003-12-09</date> + <!-- DOMImplementation.getFeature --> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature"/> + </metadata> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="domImpl" type="DOMImplementation"/> + <var name="domImplLS" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <implementation var="domImpl"/> + <getFeature var="domImplLS" obj="domImpl" feature='"+lS"' + version='"3.0"' interface="DOMImplementation"/> + <assertNotNull actual="domImplLS" id="domImplLSNotNull"/> + <createLSOutput var="output" obj="domImplLS"/> + <assertNotNull actual="output" id="outputNotNull"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/HasFeature01.xml b/test/testcases/tests/level3/ls/HasFeature01.xml new file mode 100644 index 0000000..f98d962 --- /dev/null +++ b/test/testcases/tests/level3/ls/HasFeature01.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="HasFeature01"> + <metadata> + <title>HasFeature01</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("LS", "3.0").</description> + <date qualifier="created">2003-12-01</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasLS" type="boolean"/> + <implementation var="domImpl"/> + <hasFeature var="hasLS" obj="domImpl" feature='"LS"' version='"3.0"'/> + <assertTrue actual="hasLS" id="hasFeature_LS3"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/HasFeature02.xml b/test/testcases/tests/level3/ls/HasFeature02.xml new file mode 100644 index 0000000..7eac1f6 --- /dev/null +++ b/test/testcases/tests/level3/ls/HasFeature02.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="HasFeature02"> + <metadata> + <title>HasFeature02</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("LS", null).</description> + <date qualifier="created">2003-12-01</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasLS" type="boolean"/> + <var name="version" type="DOMString" isNull="true"/> + <implementation var="domImpl"/> + <hasFeature var="hasLS" obj="domImpl" feature='"LS"' version="version"/> + <assertTrue actual="hasLS" id="hasFeature_LS"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/HasFeature03.xml b/test/testcases/tests/level3/ls/HasFeature03.xml new file mode 100644 index 0000000..68cf44b --- /dev/null +++ b/test/testcases/tests/level3/ls/HasFeature03.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="HasFeature03"> + <metadata> + <title>HasFeature03</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("Core", "2.0") and hasFeature("Core", null).</description> + <date qualifier="created">2003-12-01</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasLS" type="boolean"/> + <var name="NULL_VERSION" type="DOMString" isNull="true"/> + <implementation var="domImpl"/> + <hasFeature var="hasLS" obj="domImpl" feature='"cOrE"' version='"2.0"'/> + <assertTrue actual="hasLS" id="hasFeature_Core2"/> + <hasFeature var="hasLS" obj="domImpl" feature='"cOrE"' version="NULL_VERSION"/> + <assertTrue actual="hasLS" id="hasFeature_Core"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/HasFeature04.xml b/test/testcases/tests/level3/ls/HasFeature04.xml new file mode 100644 index 0000000..a091cb4 --- /dev/null +++ b/test/testcases/tests/level3/ls/HasFeature04.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="HasFeature04"> + <metadata> + <title>HasFeature04</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("+lS", "3.0").</description> + <date qualifier="created">2003-12-09</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> + </metadata> + <!-- + on feature names requires L3 Core --> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasLS" type="boolean"/> + <implementation var="domImpl"/> + <hasFeature var="hasLS" obj="domImpl" feature='"+lS"' version='"3.0"'/> + <assertTrue actual="hasLS" id="hasFeature_LS3"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/HasFeature05.xml b/test/testcases/tests/level3/ls/HasFeature05.xml new file mode 100644 index 0000000..a3ba3af --- /dev/null +++ b/test/testcases/tests/level3/ls/HasFeature05.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="HasFeature05"> + <metadata> + <title>HasFeature05</title> + <creator>Curt Arnold</creator> + <description>The return values of hasFeature("lS-aSynC", "3.0") and hasFeature("+Ls-AsYNc", "3.0") should be equal.</description> + <date qualifier="created">2003-12-09</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7"/> + </metadata> + <!-- + on feature names requires L3 Core --> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasLS1" type="boolean"/> + <var name="hasLS2" type="boolean"/> + <implementation var="domImpl"/> + <hasFeature var="hasLS1" obj="domImpl" feature='"lS-aSynC"' version='"3.0"'/> + <hasFeature var="hasLS2" obj="domImpl" feature='"+Ls-AsYNc"' version='"3.0"'/> + <assertEquals actual="hasLS2" expected="hasLS1" id="featuresEqual" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig1.xml b/test/testcases/tests/level3/ls/LSParserConfig1.xml new file mode 100644 index 0000000..643faf8 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig1.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig1"> + <metadata> + <title>LSParserConfig1</title> + <creator>Curt Arnold</creator> + <description>Checks initial state of parser configuration.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="resolver" type="LSResourceResolver"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name='"cHarset-overrides-xml-encoding"'/> + <assertTrue actual="state" id="charset-overrides-xml-encoding-is-true"/> + <getParameter var="state" obj="config" name='"dIsallow-doctype"'/> + <assertFalse actual="state" id="disallow-doctype-is-false"/> + <getParameter var="state" obj="config" name='"iGnore-unknown-character-denormalizations"'/> + <assertTrue actual="state" id="ignore-unknown-character-denormalizations-is-true"/> + <getParameter var="state" obj="config" name='"iNfoset"'/> + <assertTrue actual="state" id="infoset-is-true"/> + <getParameter var="state" obj="config" name='"nAmespaces"'/> + <assertTrue actual="state" id="namespaces-is-true"/> + <getParameter var="resolver" obj="config" name='"rEsource-resolver"'/> + <assertNull actual="resolver" id="resource-resolver-is-null"/> + <getParameter var="state" obj="config" name='"sUpported-media-types-only"'/> + <assertFalse actual="state" id="supported-media-types-only-is-false"/> + <getParameter var="state" obj="config" name='"wEll-formed"'/> + <assertTrue actual="state" id="well-formed-is-true"/> + +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig2.xml b/test/testcases/tests/level3/ls/LSParserConfig2.xml new file mode 100644 index 0000000..88a87a9 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig2.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig2"> + <metadata> + <title>LSParserConfig2</title> + <creator>Curt Arnold</creator> + <description>Checks getParameterNames and canSetParameter.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="resolver" type="LSResourceResolver"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="parameterNames" type="DOMStringList"/> + <var name="parameterName" type="DOMString"/> + <var name="matchCount" type="int" value="0"/> + <var name="paramValue" type="DOMUserData"/> + <var name="canSet" type="boolean"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <parameterNames var="parameterNames" obj="config"/> + <assertNotNull actual="parameterNames" id="parameterNamesNotNull"/> + <for-each collection="parameterNames" member="parameterName"> + <!-- get the default value of this parameter --> + <getParameter var="paramValue" obj="config" name="parameterName"/> + <!-- should be able to set to default value --> + <canSetParameter var="canSet" obj="config" name="parameterName" value="paramValue"/> + <assertTrue actual="canSet" id="canSetToDefaultValue"/> + <setParameter obj="config" name="parameterName" value="paramValue"/> + <if> + <or> + <equals actual="parameterName" expected='"canonical-form"' ignoreCase="true"/> + <equals actual="parameterName" expected='"cdata-sections"' ignoreCase="true"/> + <equals actual="parameterName" expected='"check-character-normalization"' ignoreCase="true"/> + <equals actual="parameterName" expected='"comments"' ignoreCase="true"/> + <equals actual="parameterName" expected='"datatype-normalization"' ignoreCase="true"/> + <equals actual="parameterName" expected='"entities"' ignoreCase="true"/> + <equals actual="parameterName" expected='"error-handler"' ignoreCase="true"/> + <equals actual="parameterName" expected='"infoset"' ignoreCase="true"/> + <equals actual="parameterName" expected='"namespaces"' ignoreCase="true"/> + <equals actual="parameterName" expected='"namespace-declarations"' ignoreCase="true"/> + <equals actual="parameterName" expected='"normalize-characters"' ignoreCase="true"/> + <equals actual="parameterName" expected='"schema-location"' ignoreCase="true"/> + <equals actual="parameterName" expected='"schema-type"' ignoreCase="true"/> + <equals actual="parameterName" expected='"split-cdata-sections"' ignoreCase="true"/> + <equals actual="parameterName" expected='"validate"' ignoreCase="true"/> + <equals actual="parameterName" expected='"validate-if-schema"' ignoreCase="true"/> + <equals actual="parameterName" expected='"well-formed"' ignoreCase="true"/> + <equals actual="parameterName" expected='"element-content-whitespace"' ignoreCase="true"/> + <equals actual="parameterName" expected='"charset-overrides-xml-encoding"' ignoreCase="true"/> + <equals actual="parameterName" expected='"disallow-doctype"' ignoreCase="true"/> + <equals actual="parameterName" expected='"ignore-unknown-character-denormalizations"' ignoreCase="true"/> + <equals actual="parameterName" expected='"resource-resolver"' ignoreCase="true"/> + <equals actual="parameterName" expected='"supported-media-types-only"' ignoreCase="true"/> + </or> + <increment var="matchCount" value="1"/> + </if> + </for-each> + <assertEquals actual="matchCount" expected="23" id="definedParameterCount" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig3.xml b/test/testcases/tests/level3/ls/LSParserConfig3.xml new file mode 100644 index 0000000..9c5df82 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig3.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig3"> + <metadata> + <title>LSParserConfig3</title> + <creator>Curt Arnold</creator> + <description>Checks support of charset-overrides-xml-encoding.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="propertyName" type="DOMString" value='"cHarset-overrides-xml-encoding"'/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalse"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrue"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig4.xml b/test/testcases/tests/level3/ls/LSParserConfig4.xml new file mode 100644 index 0000000..9c4efc8 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig4.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig4"> + <metadata> + <title>LSParserConfig4</title> + <creator>Curt Arnold</creator> + <description>Checks support of disallow-doctype.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"dIsAllow-doctype"'/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" mode="1" schemaType="NULL_SCHEMA_TYPE"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <else> + <setParameter obj="config" name="propertyName" value="false"/> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_if_canSetParameter_false"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig5.xml b/test/testcases/tests/level3/ls/LSParserConfig5.xml new file mode 100644 index 0000000..633b908 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig5.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig5"> + <metadata> + <title>LSParserConfig5</title> + <creator>Curt Arnold</creator> + <description>Checks support of ignore-unknown-character-denormalizations.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"iGnOre-unknown-character-denormalizations"'/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" mode="1" schemaType="NULL_SCHEMA_TYPE"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setTrueIsEffective"/> + <else> + <setParameter obj="config" name="propertyName" value="true"/> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_if_not_canSetParameter"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig6.xml b/test/testcases/tests/level3/ls/LSParserConfig6.xml new file mode 100644 index 0000000..5ef31ce --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig6.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig6"> + <metadata> + <title>LSParserConfig6</title> + <creator>Curt Arnold</creator> + <description>Checks support of infoset.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="propertyName" type="DOMString" value='"iNfoset"'/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <!-- setting infoset to false should have no effect + that is infoset will still be true --> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setFalse"/> + + <!-- setting comments to false should change value of + infoset to false --> + <setParameter obj="config" name='"comments"' value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="falseWhenCommentsFalse"/> + + <!-- setting infoset to true should cause infoset to be true + and comments to be true --> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="resetTrue"/> + + <getParameter var="state" obj="config" name='"comments"'/> + <assertTrue actual="state" id="resetTrueComments"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig7.xml b/test/testcases/tests/level3/ls/LSParserConfig7.xml new file mode 100644 index 0000000..fbac979 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig7.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig7"> + <metadata> + <title>LSParserConfig7</title> + <creator>Curt Arnold</creator> + <description>Checks support of namespaces.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"nAmespaces"'/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" mode="1" schemaType="NULL_SCHEMA_TYPE"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <else> + <setParameter obj="config" name="propertyName" value="true"/> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_if_not_canSetParameter"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig8.xml b/test/testcases/tests/level3/ls/LSParserConfig8.xml new file mode 100644 index 0000000..2c33caa --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig8.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig8"> + <metadata> + <title>LSParserConfig8</title> + <creator>Curt Arnold</creator> + <description>Checks support of well-formed.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + <var name="propertyName" type="DOMString" value='"wEll-formed"'/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" mode="1" schemaType="NULL_SCHEMA_TYPE"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <assertFalse actual="canSet" id="canSetFalse"/> + <assertDOMException id="throw_NOT_SUPPORTED_EXCEPTION"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSParserConfig9.xml b/test/testcases/tests/level3/ls/LSParserConfig9.xml new file mode 100644 index 0000000..146c84e --- /dev/null +++ b/test/testcases/tests/level3/ls/LSParserConfig9.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSParserConfig9"> + <metadata> + <title>LSParserConfig9</title> + <creator>Curt Arnold</creator> + <description>Checks support of supported-media-types-only.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="parser" type="LSParser"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"sUpported-media-types-only"'/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <implementation var="domImpl"/> + <createLSParser var="parser" obj="domImpl" mode="1" schemaType="NULL_SCHEMA_TYPE"/> + <domConfig var="config" obj="parser" interface="LSParser"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <else> + <setParameter obj="config" name="propertyName" value="false"/> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_if_canSetParameter_false"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig1.xml b/test/testcases/tests/level3/ls/LSSerializerConfig1.xml new file mode 100644 index 0000000..5681b30 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig1.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig1"> + <metadata> + <title>LSSerializerConfig1</title> + <creator>Curt Arnold</creator> + <description>Checks initial state of serializer configuration.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name='"cAnonical-form"'/> + <assertFalse actual="state" id="canonical-form-is-false"/> + <getParameter var="state" obj="config" name='"dIscard-default-content"'/> + <assertTrue actual="state" id="discard-default-content-is-true"/> + <getParameter var="state" obj="config" name='"fOrmat-pretty-print"'/> + <assertFalse actual="state" id="format-pretty-print-is-false"/> + <getParameter var="state" obj="config" name='"iGnore-unknown-character-denormalizations"'/> + <assertTrue actual="state" id="ignore-unknown-character-denormalizations-is-true"/> + + <!-- normalize characters is supposed to be true if + the implementation supports true --> + <getParameter var="state" obj="config" name='"nOrmalize-characters"'/> + <canSetParameter var="canSet" obj="config" name='"normalize-characters"' value="true"/> + <assertTrue id="normalize-characters-default"> + <or> + <isTrue value="state"/> + <isFalse value="canSet"/> + </or> + </assertTrue> + + <getParameter var="state" obj="config" name='"xMl-declaration"'/> + <assertTrue actual="state" id="xml-declaration-is-true"/> + <getParameter var="state" obj="config" name='"wEll-formed"'/> + <assertTrue actual="state" id="well-formed-is-true"/> + <getParameter var="state" obj="config" name='"nAmespaces"'/> + <assertTrue actual="state" id="namespaces-is-true"/> + <getParameter var="state" obj="config" name='"nAmespace-declarations"'/> + <assertTrue actual="state" id="namespace-declarations-is-true"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig10.xml b/test/testcases/tests/level3/ls/LSSerializerConfig10.xml new file mode 100644 index 0000000..29b8145 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig10.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig10"> + <metadata> + <title>LSSerializerConfig10</title> + <creator>Curt Arnold</creator> + <description>Checks support of namespace-declarations.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"nAmespace-declarations"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig2.xml b/test/testcases/tests/level3/ls/LSSerializerConfig2.xml new file mode 100644 index 0000000..8ed0a3c --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig2.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig2"> + <metadata> + <title>LSSerializerConfig2</title> + <creator>Curt Arnold</creator> + <description>Checks getParameterNames and canSetParameter.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="parameterNames" type="DOMStringList"/> + <var name="parameterName" type="DOMString"/> + <var name="matchCount" type="int" value="0"/> + <var name="paramValue" type="DOMUserData"/> + <var name="canSet" type="boolean"/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <parameterNames var="parameterNames" obj="config"/> + <assertNotNull actual="parameterNames" id="parameterNamesNotNull"/> + <for-each collection="parameterNames" member="parameterName"> + <!-- get the default value of this parameter --> + <getParameter var="paramValue" obj="config" name="parameterName"/> + <!-- should be able to set to default value --> + <canSetParameter var="canSet" obj="config" name="parameterName" value="paramValue"/> + <assertTrue actual="canSet" id="canSetToDefaultValue"/> + <setParameter obj="config" name="parameterName" value="paramValue"/> + <if> + <or> + <equals actual="parameterName" expected='"canonical-form"' ignoreCase="true"/> + <equals actual="parameterName" expected='"cdata-sections"' ignoreCase="true"/> + <equals actual="parameterName" expected='"check-character-normalization"' ignoreCase="true"/> + <equals actual="parameterName" expected='"comments"' ignoreCase="true"/> + <equals actual="parameterName" expected='"datatype-normalization"' ignoreCase="true"/> + <equals actual="parameterName" expected='"entities"' ignoreCase="true"/> + <equals actual="parameterName" expected='"error-handler"' ignoreCase="true"/> + <equals actual="parameterName" expected='"infoset"' ignoreCase="true"/> + <equals actual="parameterName" expected='"namespaces"' ignoreCase="true"/> + <equals actual="parameterName" expected='"namespace-declarations"' ignoreCase="true"/> + <equals actual="parameterName" expected='"normalize-characters"' ignoreCase="true"/> + <equals actual="parameterName" expected='"split-cdata-sections"' ignoreCase="true"/> + <equals actual="parameterName" expected='"validate"' ignoreCase="true"/> + <equals actual="parameterName" expected='"validate-if-schema"' ignoreCase="true"/> + <equals actual="parameterName" expected='"well-formed"' ignoreCase="true"/> + <equals actual="parameterName" expected='"element-content-whitespace"' ignoreCase="true"/> + <equals actual="parameterName" expected='"discard-default-content"' ignoreCase="true"/> + <equals actual="parameterName" expected='"format-pretty-print"' ignoreCase="true"/> + <equals actual="parameterName" expected='"ignore-unknown-character-denormalizations"' ignoreCase="true"/> + <equals actual="parameterName" expected='"xml-declaration"' ignoreCase="true"/> + </or> + <increment var="matchCount" value="1"/> + </if> + </for-each> + <assertEquals actual="matchCount" expected="20" id="definedParameterCount" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig3.xml b/test/testcases/tests/level3/ls/LSSerializerConfig3.xml new file mode 100644 index 0000000..2e5c3cf --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig3.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig3"> + <metadata> + <title>LSSerializerConfig3</title> + <creator>Curt Arnold</creator> + <description>Checks support of canonical-form.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"cAnonical-form"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <else> + <setParameter obj="config" name="propertyName" value="false"/> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_if_canSetParameter_false"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig4.xml b/test/testcases/tests/level3/ls/LSSerializerConfig4.xml new file mode 100644 index 0000000..c6b155d --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig4.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig4"> + <metadata> + <title>LSSerializerConfig4</title> + <creator>Curt Arnold</creator> + <description>Checks support of discard-default-content.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"dIscard-default-content"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalse"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrue"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig5.xml b/test/testcases/tests/level3/ls/LSSerializerConfig5.xml new file mode 100644 index 0000000..d6d4ec1 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig5.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig5"> + <metadata> + <title>LSSerializerConfig5</title> + <creator>Curt Arnold</creator> + <description>Checks support of format-pretty-print.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"fOrmat-pretty-print"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <else> + <setParameter obj="config" name="propertyName" value="false"/> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_if_canSetParameter_false"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="true"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig6.xml b/test/testcases/tests/level3/ls/LSSerializerConfig6.xml new file mode 100644 index 0000000..0e506bf --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig6.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig6"> + <metadata> + <title>LSSerializerConfig6</title> + <creator>Curt Arnold</creator> + <description>Checks support of ignore-unknown-character-denormalizations.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"iGnore-unknown-character-denormalizations"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <else> + <setParameter obj="config" name="propertyName" value="true"/> + <assertDOMException id="throw_NOT_SUPPORTED_ERR_if_canSetParameter_false"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig7.xml b/test/testcases/tests/level3/ls/LSSerializerConfig7.xml new file mode 100644 index 0000000..17f5393 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig7.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig7"> + <metadata> + <title>LSSerializerConfig7</title> + <creator>Curt Arnold</creator> + <description>Checks support of xml-declaration.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"xMl-declaration"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <assertTrue actual="canSet" id="canSetFalse"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalse"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrue"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig8.xml b/test/testcases/tests/level3/ls/LSSerializerConfig8.xml new file mode 100644 index 0000000..6ab2b0b --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig8.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig8"> + <metadata> + <title>LSSerializerConfig8</title> + <creator>Curt Arnold</creator> + <description>Checks support of well-formed.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"wEll-formed"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <if><isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <else> + <assertDOMException id="throw_NOT_SUPPORTED_EXCEPTION"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/LSSerializerConfig9.xml b/test/testcases/tests/level3/ls/LSSerializerConfig9.xml new file mode 100644 index 0000000..ff42555 --- /dev/null +++ b/test/testcases/tests/level3/ls/LSSerializerConfig9.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="LSSerializerConfig9"> + <metadata> + <title>LSSerializerConfig9</title> + <creator>Curt Arnold</creator> + <description>Checks support of namespaces.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-config"/> + </metadata> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="serializer" type="LSSerializer"/> + <var name="config" type="DOMConfiguration"/> + <var name="state" type="boolean"/> + <var name="canSet" type="boolean"/> + <var name="propertyName" type="DOMString" value='"nAmespaces"'/> + + <implementation var="domImpl"/> + <createLSSerializer var="serializer" obj="domImpl"/> + <domConfig var="config" obj="serializer" interface="LSSerializer"/> + <assertNotNull actual="config" id="configNotNull"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="defaultValue"/> + <canSetParameter var="canSet" obj="config" name="propertyName" value="true"/> + <assertTrue actual="canSet" id="canSetTrue"/> + <!-- TODO: Changed in anticipation of forthcoming spec change + will need to review final wording --> + <canSetParameter var="canSet" obj="config" name="propertyName" value="false"/> + <if> + <isTrue value="canSet"/> + <setParameter obj="config" name="propertyName" value="false"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertFalse actual="state" id="setFalseIsEffective"/> + <setParameter obj="config" name="propertyName" value="true"/> + <getParameter var="state" obj="config" name="propertyName"/> + <assertTrue actual="state" id="setTrueIsEffective"/> + <else> + <assertDOMException id="settingFalseWhenNotSupported"> + <NOT_SUPPORTED_ERR> + <setParameter obj="config" name="propertyName" value="false"/> + </NOT_SUPPORTED_ERR> + </assertDOMException> + </else> + </if> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/SystemId1.xml b/test/testcases/tests/level3/ls/SystemId1.xml new file mode 100644 index 0000000..ee463c6 --- /dev/null +++ b/test/testcases/tests/level3/ls/SystemId1.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="SystemId1"> + <metadata> + <title>SystemId1</title> + <creator>Curt Arnold</creator> + <description>Writes a document to a URL for a temporary file and rereads the document.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-systemId"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSOutput-systemId"/> + </metadata> + <implementationAttribute name="validating" value="false"/> + + <var name="testDoc" type="Document"/> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <var name="serializer" type="LSSerializer"/> + <var name="systemId" type="DOMString"/> + <var name="checkSystemId" type="DOMString"/> + <var name="status" type="boolean"/> + <var name="input" type="LSInput"/> + <var name="parser" type="LSParser"/> + <var name="checkDoc" type="Document"/> + <var name="docElem" type="Element"/> + <var name="docElemName" type="DOMString"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <load var="testDoc" href="test0" willBeModified="false"/> + <implementation var="domImpl"/> + + <!-- create an LSOutput and connect it to an stock LSWriter --> + <createLSOutput var="output" obj="domImpl"/> + <!-- check that it was initially null --> + <systemId var="checkSystemId" obj="output" interface="LSOutput"/> + <assertNull actual="checkSystemId" id="LSOutputSystemIdInitiallyNull"/> + <createTempURI var="systemId" scheme="file"/> + <systemId obj="output" value="systemId" interface="LSOutput"/> + <systemId var="checkSystemId" obj="output" interface="LSOutput"/> + <assertEquals expected="systemId" + actual="checkSystemId" + ignoreCase="false" + id="LSOutputSystemIdMatch"/> + + <!-- create a serializer and write a test document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <write var="status" obj="serializer" destination="output" nodeArg="testDoc"/> + <assertTrue actual="status" id="writeStatus"/> + + <!-- read the serialized document --> + <createLSInput var="input" obj="domImpl"/> + <systemId var="checkSystemId" obj="input" interface="LSInput"/> + <assertNull actual="checkSystemId" id="LSInputSystemIdInitiallyNull"/> + <systemId obj="input" value="systemId" interface="LSInput"/> + <systemId var="checkSystemId" obj="input" interface="LSInput"/> + <assertEquals expected="systemId" + actual="checkSystemId" + ignoreCase="false" + id="LSInputSystemIdMatch"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <parse var="checkDoc" obj="parser" input="input"/> + <assertNotNull actual="checkDoc" id="checkNotNull"/> + <documentElement var="docElem" obj="checkDoc"/> + <nodeName var="docElemName" obj="docElem"/> + <assertEquals expected='"elt0"' actual="docElemName" id="checkDocElemName" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/SystemId2.xml b/test/testcases/tests/level3/ls/SystemId2.xml new file mode 100644 index 0000000..2447617 --- /dev/null +++ b/test/testcases/tests/level3/ls/SystemId2.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="SystemId2"> + <metadata> + <title>SystemId2</title> + <creator>Curt Arnold</creator> + <description>Writes a document to a URL for a temporary http document and rereads the document.</description> + <date qualifier="created">2003-12-08</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSInput-systemId"/> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSOutput-systemId"/> + </metadata> + <implementationAttribute name="validating" value="false"/> + + <var name="testDoc" type="Document"/> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <var name="serializer" type="LSSerializer"/> + <var name="systemId" type="DOMString"/> + <var name="checkSystemId" type="DOMString"/> + <var name="status" type="boolean"/> + <var name="input" type="LSInput"/> + <var name="parser" type="LSParser"/> + <var name="checkDoc" type="Document"/> + <var name="docElem" type="Element"/> + <var name="docElemName" type="DOMString"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <load var="testDoc" href="test0" willBeModified="false"/> + <implementation var="domImpl"/> + + <!-- create an LSOutput and connect it to an stock LSWriter --> + <createLSOutput var="output" obj="domImpl"/> + <!-- check that it was initially null --> + <systemId var="checkSystemId" obj="output" interface="LSOutput"/> + <assertNull actual="checkSystemId" id="LSOutputSystemIdInitiallyNull"/> + <createTempURI var="systemId" scheme="http"/> + <systemId obj="output" value="systemId" interface="LSOutput"/> + <systemId var="checkSystemId" obj="output" interface="LSOutput"/> + <assertEquals expected="systemId" + actual="checkSystemId" + ignoreCase="false" + id="LSOutputSystemIdMatch"/> + + <!-- create a serializer and write a test document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <write var="status" obj="serializer" destination="output" nodeArg="testDoc"/> + <assertTrue actual="status" id="writeStatus"/> + + <!-- read the serialized document --> + <createLSInput var="input" obj="domImpl"/> + <systemId var="checkSystemId" obj="input" interface="LSInput"/> + <assertNull actual="checkSystemId" id="LSInputSystemIdInitiallyNull"/> + <systemId obj="input" value="systemId" interface="LSInput"/> + <systemId var="checkSystemId" obj="input" interface="LSInput"/> + <assertEquals expected="systemId" + actual="checkSystemId" + ignoreCase="false" + id="LSInputSystemIdMatch"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <parse var="checkDoc" obj="parser" input="input"/> + <assertNotNull actual="checkDoc" id="checkNotNull"/> + <documentElement var="docElem" obj="checkDoc"/> + <nodeName var="docElemName" obj="docElem"/> + <assertEquals expected='"elt0"' actual="docElemName" id="checkDocElemName" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/alltests.xml b/test/testcases/tests/level3/ls/alltests.xml new file mode 100644 index 0000000..13d2353 --- /dev/null +++ b/test/testcases/tests/level3/ls/alltests.xml @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003-2004 X-Hive Corporation + + All Rights Reserved. This work is distributed under the W3C(r) + Software License [1] in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE suite SYSTEM "dom3.dtd"> + +<suite xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="alltests"> + <metadata> + <title>DOM Level 3 LS Test Suite</title> + <creator>X-Hive Corporation</creator> + </metadata> + <suite.member href="DOMBuilderFilterTest0.xml"/> + <suite.member href="DOMBuilderFilterTest1.xml"/> + <suite.member href="DOMBuilderFilterTest2.xml"/> + <suite.member href="DOMBuilderTest0.xml"/> + <suite.member href="DOMBuilderTest1.xml"/> + <suite.member href="DOMBuilderTest2.xml"/> + <suite.member href="DOMBuilderTest3.xml"/> + <suite.member href="DOMBuilderTest4.xml"/> + <suite.member href="DOMBuilderTest5.xml"/> + <suite.member href="DOMBuilderTest6.xml"/> + <suite.member href="DOMBuilderTest8.xml"/> + <suite.member href="DOMEntityResolverTest0.xml"/> + <suite.member href="DOMEntityResolverTest1.xml"/> + <suite.member href="DOMEntityResolverTest2.xml"/> + <suite.member href="DOMImplementationLSTest0.xml"/> + <suite.member href="DOMImplementationLSTest1.xml"/> + <suite.member href="DOMImplementationLSTest2.xml"/> + <suite.member href="DOMImplementationLSTest3.xml"/> + <suite.member href="DOMImplementationLSTest4.xml"/> + <suite.member href="DOMImplementationLSTest5.xml"/> + <suite.member href="DOMInputSourceTest0.xml"/> + <suite.member href="DOMInputSourceTest1.xml"/> + <suite.member href="DOMInputSourceTest2.xml"/> + <suite.member href="DOMInputSourceTest3.xml"/> + <suite.member href="DOMInputSourceTest4.xml"/> + <suite.member href="DOMInputSourceTest5.xml"/> + <suite.member href="DOMInputSourceTest6.xml"/> + <suite.member href="DOMWriterFilterTest0.xml"/> + <suite.member href="DOMWriterFilterTest1.xml"/> + <suite.member href="DOMWriterFilterTest2.xml"/> + <suite.member href="DOMWriterFilterTest3.xml"/> + <suite.member href="DOMWriterTest0.xml"/> + <suite.member href="DOMWriterTest1.xml"/> + <suite.member href="DOMWriterTest2.xml"/> + <suite.member href="DOMWriterTest3.xml"/> + <suite.member href="DOMWriterTest4.xml"/> + <suite.member href="DOMWriterTest5.xml"/> + <suite.member href="DOMWriterTest6.xml"/> + + <suite.member href="encoding01.xml"/> + <suite.member href="GetFeature1.xml"/> + <suite.member href="GetFeature2.xml"/> + <suite.member href="HasFeature01.xml"/> + <suite.member href="HasFeature02.xml"/> + <suite.member href="HasFeature03.xml"/> + <suite.member href="HasFeature04.xml"/> + <suite.member href="HasFeature05.xml"/> + <suite.member href="CharacterStream1.xml"/> + <suite.member href="SystemId1.xml"/> + <suite.member href="SystemId2.xml"/> + <suite.member href="CertifiedText1.xml"/> + <suite.member href="LSParserConfig1.xml"/> + <suite.member href="LSParserConfig2.xml"/> + <suite.member href="LSParserConfig3.xml"/> + <suite.member href="LSParserConfig4.xml"/> + <suite.member href="LSParserConfig5.xml"/> + <suite.member href="LSParserConfig6.xml"/> + <suite.member href="LSParserConfig7.xml"/> + <suite.member href="LSParserConfig8.xml"/> + <suite.member href="LSParserConfig9.xml"/> + <suite.member href="LSSerializerConfig1.xml"/> + <suite.member href="LSSerializerConfig2.xml"/> + <suite.member href="LSSerializerConfig3.xml"/> + <suite.member href="LSSerializerConfig4.xml"/> + <suite.member href="LSSerializerConfig5.xml"/> + <suite.member href="LSSerializerConfig6.xml"/> + <suite.member href="LSSerializerConfig7.xml"/> + <suite.member href="LSSerializerConfig8.xml"/> + <suite.member href="LSSerializerConfig9.xml"/> + <suite.member href="LSSerializerConfig10.xml"/> + <suite.member href="writeToURI1.xml"/> + <suite.member href="writeToURI2.xml"/> + + <suite.member href="canonicalform01.xml"/> + <suite.member href="canonicalform03.xml"/> + <suite.member href="canonicalform04.xml"/> + <suite.member href="canonicalform05.xml"/> + <suite.member href="canonicalform06.xml"/> + <suite.member href="canonicalform08.xml"/> + <suite.member href="canonicalform09.xml"/> + <suite.member href="canonicalform10.xml"/> + <suite.member href="canonicalform11.xml"/> + <suite.member href="canonicalform12.xml"/> + <suite.member href="canonicalform13.xml"/> + + <suite.member href="cdatasections01.xml"/> + <suite.member href="cdatasections02.xml"/> + <suite.member href="cdatasections03.xml"/> + <suite.member href="cdatasections04.xml"/> + <suite.member href="checkcharacternormalization01.xml"/> + <suite.member href="checkcharacternormalization02.xml"/> + <suite.member href="checkcharacternormalization03.xml"/> + <suite.member href="checkcharacternormalization04.xml"/> + <suite.member href="comments01.xml"/> + <suite.member href="comments02.xml"/> + <suite.member href="comments03.xml"/> + <suite.member href="comments04.xml"/> + + <suite.member href="datatypenormalization01.xml"/> + <suite.member href="datatypenormalization02.xml"/> +<suite.member href="datatypenormalization03.xml"/> +<suite.member href="datatypenormalization04.xml"/> +<suite.member href="datatypenormalization05.xml"/> +<suite.member href="datatypenormalization06.xml"/> +<suite.member href="datatypenormalization07.xml"/> +<suite.member href="datatypenormalization08.xml"/> +<suite.member href="datatypenormalization09.xml"/> +<suite.member href="datatypenormalization10.xml"/> +<suite.member href="datatypenormalization11.xml"/> +<suite.member href="datatypenormalization12.xml"/> +<suite.member href="datatypenormalization13.xml"/> +<suite.member href="datatypenormalization14.xml"/> +<suite.member href="datatypenormalization15.xml"/> +<suite.member href="datatypenormalization16.xml"/> +<suite.member href="datatypenormalization17.xml"/> + +<suite.member href="disallowdoctype01.xml"/> +<suite.member href="discarddefaultcontent01.xml"/> +<suite.member href="discarddefaultcontent02.xml"/> + + <suite.member href="elementcontentwhitespace01.xml"/> + <suite.member href="elementcontentwhitespace02.xml"/> + <suite.member href="elementcontentwhitespace03.xml"/> + <suite.member href="entities01.xml"/> + <suite.member href="entities02.xml"/> + <suite.member href="entities03.xml"/> + <suite.member href="entities04.xml"/> + <suite.member href="entities05.xml"/> + <suite.member href="entities06.xml"/> + <suite.member href="entities07.xml"/> + <suite.member href="entities08.xml"/> + <suite.member href="entities09.xml"/> + + <suite.member href="infoset01.xml"/> + <suite.member href="infoset02.xml"/> + <suite.member href="infoset03.xml"/> + <suite.member href="infoset04.xml"/> + <suite.member href="infoset05.xml"/> + <suite.member href="infoset06.xml"/> + <suite.member href="infoset07.xml"/> + <suite.member href="infoset08.xml"/> + + <suite.member href="namespacedeclarations01.xml"/> + <suite.member href="namespacedeclarations02.xml"/> + <suite.member href="namespaces01.xml"/> + <suite.member href="namespaces02.xml"/> + + <suite.member href="newline01.xml"/> + <suite.member href="newline02.xml"/> + <suite.member href="newline03.xml"/> + + <suite.member href="noinputspecified01.xml"/> + <suite.member href="nooutputspecified01.xml"/> + + <suite.member href="normalizecharacters01.xml"/> + <suite.member href="normalizecharacters02.xml"/> + <suite.member href="normalizecharacters03.xml"/> + <suite.member href="normalizecharacters04.xml"/> + + <suite.member href="schemalocation01.xml"/> + <suite.member href="schemalocation02.xml"/> + <suite.member href="schemalocation03.xml"/> + <suite.member href="schemalocation04.xml"/> + <suite.member href="schematype01.xml"/> + <suite.member href="schematype02.xml"/> + <suite.member href="schematype03.xml"/> + <suite.member href="schematype04.xml"/> + + <suite.member href="splitcdatasections01.xml"/> + <suite.member href="splitcdatasections02.xml"/> + + <suite.member href="unsupportedencoding01.xml"/> + <suite.member href="validate01.xml"/> + <suite.member href="validate02.xml"/> + <suite.member href="validate03.xml"/> + <suite.member href="validate04.xml"/> + <suite.member href="validate05.xml"/> + <suite.member href="validate06.xml"/> + <suite.member href="validate07.xml"/> + <suite.member href="validate08.xml"/> + <suite.member href="validateifschema01.xml"/> + <suite.member href="validateifschema02.xml"/> + <suite.member href="validateifschema03.xml"/> + <suite.member href="validateifschema04.xml"/> + + <suite.member href="wellformed01.xml"/> + <suite.member href="wellformed02.xml"/> + <suite.member href="wellformed03.xml"/> + + <suite.member href="xmldeclaration01.xml"/> + <suite.member href="xmldeclaration02.xml"/> + +</suite> diff --git a/test/testcases/tests/level3/ls/canonicalform01.xml b/test/testcases/tests/level3/ls/canonicalform01.xml new file mode 100644 index 0000000..3c7d4a2 --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform01.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform01"> +<metadata> +<title>canonicalform01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with canonical-form = true and see that entity references are not present in +the element content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="1" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="acrContentIsText"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/canonicalform03.xml b/test/testcases/tests/level3/ls/canonicalform03.xml new file mode 100644 index 0000000..6646b0e --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform03.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform03"> +<metadata> +<title>canonicalform03</title> +<creator>Curt Arnold</creator> +<description> +Load a document with canonical-form = true and see that CDATASection are not present in +the parsed document. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="pList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="pList" index="1" interface="NodeList"/> +<lastChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="childIsText"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/canonicalform04.xml b/test/testcases/tests/level3/ls/canonicalform04.xml new file mode 100644 index 0000000..1107bfa --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform04.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform04"> +<metadata> +<title>canonicalform04</title> +<creator>Curt Arnold</creator> +<description> +Attempt to load a namespace invalid document with canonical-form = true. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"namespaces1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/canonicalform05.xml b/test/testcases/tests/level3/ls/canonicalform05.xml new file mode 100644 index 0000000..7ccc87d --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform05.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform05"> +<metadata> +<title>canonicalform05</title> +<creator>Curt Arnold</creator> +<description> +Load a document with canonical-form = true and see that attributes for namespace declarations are present. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="canSet" type="boolean"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="node" obj="elem" name='"xmlns:dmstc"'/> +<assertNotNull actual="node" id="nsAttrNotNull"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/canonicalform06.xml b/test/testcases/tests/level3/ls/canonicalform06.xml new file mode 100644 index 0000000..9a3999d --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform06.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform06"> +<metadata> +<title>canonicalform06</title> +<creator>Curt Arnold</creator> +<description> +Load a document with canonical-form and validate = true and check that +element content whitespace is not eliminated. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetCanonicalForm" type="boolean"/> +<var name="elemList" type="NodeList"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetCanonicalForm" obj="domConfig" name='"canonical-form"' value="true"/> +<if><and><isTrue value="canSetValidate"/><isTrue value="canSetCanonicalForm"/></and> +<setParameter obj="domConfig" name='"validate"' value="true"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="nodeIsText"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/canonicalform08.xml b/test/testcases/tests/level3/ls/canonicalform08.xml new file mode 100644 index 0000000..6e76d6a --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform08.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform08"> +<metadata> +<title>canonicalform08</title> +<creator>Curt Arnold</creator> +<description> +Normalize document based on section 3.1 with canonical-form set to true and check normalized document. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeValue" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="length" type="int"/> +<var name="text" type="Text"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetCanonicalForm" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetCanonicalForm" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSetCanonicalForm"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"canonicalform01"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<firstChild var="node" obj="doc" interface="Node"/> +<nodeType var="nodeType" obj="node" interface="Node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFirstChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="36" ignoreCase="false" id="piDataLength"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisSecondChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="secondChildLength"/> +<!-- next sibling is document element --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="1" actual="nodeType" ignoreCase="false" id="ElementisThirdChild"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisFourthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="fourthChildLength"/> +<!-- next sibling is a processing instruction --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFifthChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<assertEquals actual="nodeValue" expected='""' ignoreCase="false" id="trailingPIData"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisSixthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="sixthChildLength"/> +<!-- next sibling is a comment --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="8" actual="nodeType" ignoreCase="false" id="CommentisSeventhChild"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisEighthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="eighthChildLength"/> +<!-- next sibling is a comment --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="8" actual="nodeType" ignoreCase="false" id="CommentisNinthChild"/> +<!-- next sibling is a null --> +<nextSibling interface="Node" var="node" obj="node"/> +<assertNull actual="node" id="TenthIsNull"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/canonicalform09.xml b/test/testcases/tests/level3/ls/canonicalform09.xml new file mode 100644 index 0000000..035c499 --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform09.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform09"> +<metadata> +<title>canonicalform09</title> +<creator>Curt Arnold</creator> +<description> +Normalize document based on section 3.1 with canonical-form set to true +and comments to false and check normalized document. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="doc" type="Document"/> +<var name="bodyList" type="NodeList"/> +<var name="body" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="canSet" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="nodeValue" type="DOMString"/> +<var name="nodeType" type="int"/> +<var name="length" type="int"/> +<var name="text" type="Text"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetCanonicalForm" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetCanonicalForm" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSetCanonicalForm"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<setParameter obj="domConfig" name='"comments"' value="false"/> +<getResourceURI var="resourceURI" href='"canonicalform01"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<firstChild var="node" obj="doc" interface="Node"/> +<nodeType var="nodeType" obj="node" interface="Node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFirstChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="36" ignoreCase="false" id="piDataLength"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisSecondChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="secondChildLength"/> +<!-- next sibling is document element --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="1" actual="nodeType" ignoreCase="false" id="ElementisThirdChild"/> +<!-- next sibling is a #0A line feed --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="3" actual="nodeType" ignoreCase="false" id="TextisFourthChild"/> +<nodeValue var="nodeValue" obj="node"/> +<length var="length" obj="nodeValue" interface="DOMString"/> +<assertEquals actual="length" expected="1" ignoreCase="false" id="fourthChildLength"/> +<!-- next sibling is a processing instruction --> +<nextSibling interface="Node" var="node" obj="node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals expected="7" actual="nodeType" ignoreCase="false" id="PIisFifthChild"/> +<data var="nodeValue" obj="node" interface="ProcessingInstruction"/> +<assertEquals actual="nodeValue" expected='""' ignoreCase="false" id="trailingPIData"/> +<!-- next sibling is a null --> +<nextSibling interface="Node" var="node" obj="node"/> +<assertNull actual="node" id="SixthIsNull"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/canonicalform10.xml b/test/testcases/tests/level3/ls/canonicalform10.xml new file mode 100644 index 0000000..6149186 --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform10.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform10"> +<metadata> +<title>canonicalform10</title> +<creator>Curt Arnold</creator> +<description> +Check elimination of unnecessary namespace prefixes when +normalized with canonical-form = true. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="divList" type="NodeList"/> +<var name="div" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="node" type="Node"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetCanonicalForm" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetCanonicalForm" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSetCanonicalForm"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"canonicalform03"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="divList" obj="doc" + tagname='"div"' interface="Document"/> +<item var="div" obj="divList" index="5" interface="NodeList"/> +<getAttributeNode var="node" obj="div" name='"xmlns"'/> +<assertNotNull actual="node" id="xmlnsPresent"/> +<getAttributeNode var="node" obj="div" name='"xmlns:a"'/> +<assertNull actual="node" id="xmlnsANotPresent"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/canonicalform11.xml b/test/testcases/tests/level3/ls/canonicalform11.xml new file mode 100644 index 0000000..126ac06 --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform11.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform11"> +<metadata> +<title>canonicalform11</title> +<creator>Curt Arnold</creator> +<description> +Check that default attributes are made explicitly specified. +</description> +<date qualifier="created">2004-02-26</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<implementationAttribute name="validating" value="false"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="attr" type="Attr"/> +<var name="attrValue" type="DOMString"/> +<var name="attrSpecified" type="boolean"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetCanonicalForm" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetCanonicalForm" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSetCanonicalForm"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"canonicalform03"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" + tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="attr" obj="elem" name='"title"'/> +<assertNotNull actual="attr" id="titlePresent"/> +<specified var="attrSpecified" obj="attr"/> +<assertTrue actual="attrSpecified" id="titleSpecified"/> +<nodeValue var="attrValue" obj="attr"/> +<assertEquals actual="attrValue" expected='"default"' ignoreCase="false" + id="titleValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/canonicalform12.xml b/test/testcases/tests/level3/ls/canonicalform12.xml new file mode 100644 index 0000000..5a4e6aa --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform12.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform12"> +<metadata> +<title>canonicalform12</title> +<creator>Curt Arnold</creator> +<description> +Load a document with canonical-form = true and see that the DocumentType node is eliminated. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="doc" type="Document"/> +<var name="doctype" type="DocumentType"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"canonical-form"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<doctype var="doctype" obj="doc"/> +<assertNull actual="doctype" id="doctypeIsNull"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/canonicalform13.xml b/test/testcases/tests/level3/ls/canonicalform13.xml new file mode 100644 index 0000000..6399714 --- /dev/null +++ b/test/testcases/tests/level3/ls/canonicalform13.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canonicalform13"> +<metadata> +<title>canonicalform13</title> +<creator>Curt Arnold</creator> +<description> +Serializing an XML 1.1 document when canonical-form raises a SERIALIZE_ERR. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSet" obj="domConfig" name='"canonical-form"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='""' value="true"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<try> + <xmlVersion obj="doc" value='"1.1"' interface="Document"/> + <catch> + <DOMException code="NOT_SUPPORTED_ERR"> + <return/> + </DOMException> + </catch> +</try> +<assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + </SERIALIZE_ERR> +</assertLSException> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/cdatasections01.xml b/test/testcases/tests/level3/ls/cdatasections01.xml new file mode 100644 index 0000000..133c753 --- /dev/null +++ b/test/testcases/tests/level3/ls/cdatasections01.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="cdatasections01"> +<metadata> +<title>cdatasections01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with cdata-sections = false and see that CDATASection are not present in +the parsed document. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="false"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="pList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="pList" index="1" interface="NodeList"/> +<lastChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="childIsText"/> +</test> + diff --git a/test/testcases/tests/level3/ls/cdatasections02.xml b/test/testcases/tests/level3/ls/cdatasections02.xml new file mode 100644 index 0000000..aa60454 --- /dev/null +++ b/test/testcases/tests/level3/ls/cdatasections02.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="cdatasections02"> +<metadata> +<title>cdatasections02</title> +<creator>Curt Arnold</creator> +<description> +Load a document with cdata-sections = true and see that CDATASection are present in +the parsed document. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="pList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="pList" index="1" interface="NodeList"/> +<lastChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="4" ignoreCase="false" id="childIsCDATA"/> +</test> + diff --git a/test/testcases/tests/level3/ls/cdatasections03.xml b/test/testcases/tests/level3/ls/cdatasections03.xml new file mode 100644 index 0000000..0e03e82 --- /dev/null +++ b/test/testcases/tests/level3/ls/cdatasections03.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="cdatasections03"> +<metadata> +<title>cdatasections03</title> +<creator>Curt Arnold</creator> +<description> +CDATASections should be preserved when cdata-sections is true. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<createCDATASection var="newNode" obj="doc" data='"foo"'/> +<appendChild var="retNode" obj="docElem" newChild="newNode"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="true"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertTrue id="containsCDATA"><contains obj="output" str='"![CDATA[foo]]"' interface="DOMString"/></assertTrue> +</test> + + diff --git a/test/testcases/tests/level3/ls/cdatasections04.xml b/test/testcases/tests/level3/ls/cdatasections04.xml new file mode 100644 index 0000000..78b9110 --- /dev/null +++ b/test/testcases/tests/level3/ls/cdatasections04.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="cdatasections04"> +<metadata> +<title>cdatasections04</title> +<creator>Curt Arnold</creator> +<description> +CDATASections should be eliminated when cdata-sections is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<createCDATASection var="newNode" obj="doc" data='"foo"'/> +<appendChild var="retNode" obj="docElem" newChild="newNode"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertTrue id="containsCDATA"><contains obj="output" str='">foo</"' interface="DOMString"/></assertTrue> +</test> + + diff --git a/test/testcases/tests/level3/ls/checkcharacternormalization01.xml b/test/testcases/tests/level3/ls/checkcharacternormalization01.xml new file mode 100644 index 0000000..4b55e4e --- /dev/null +++ b/test/testcases/tests/level3/ls/checkcharacternormalization01.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="checkcharacternormalization01"> +<metadata> +<title>checkcharacternormalization01</title> +<creator>Curt Arnold</creator> +<description> +Parsing a non-Unicode normalized document should not raise an exception if check-character-normalization +is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"check-character-normalization"' value="false"/> +<getResourceURI var="resourceURI" href='"characternormalization1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/checkcharacternormalization02.xml b/test/testcases/tests/level3/ls/checkcharacternormalization02.xml new file mode 100644 index 0000000..06217fa --- /dev/null +++ b/test/testcases/tests/level3/ls/checkcharacternormalization02.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="checkcharacternormalization02"> +<metadata> +<title>checkcharacternormalization02</title> +<creator>Curt Arnold</creator> +<description> +Parsing a non-Unicode normalized document should raise PARSE_ERR if check-character-normalization +is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="errorCount" type="int" value="0"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"check-character-normalization"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"check-character-normalization"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"characternormalization1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><greater actual="severity" expected="1"/> + <assertEquals actual="severity" expected="2" id="isError" ignoreCase="false"/> + <assertEquals actual="type" expected='"check-character-normalization-failure"' id="isCheck_Failure" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/checkcharacternormalization03.xml b/test/testcases/tests/level3/ls/checkcharacternormalization03.xml new file mode 100644 index 0000000..ae2012d --- /dev/null +++ b/test/testcases/tests/level3/ls/checkcharacternormalization03.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="checkcharacternormalization03"> +<metadata> +<title>checkcharacternormalization03</title> +<creator>Curt Arnold</creator> +<description> +Characters should not be checked for normalization on serialization if check-character-normalization = false. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"suçon"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"check-character-normalization"' value="false"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/checkcharacternormalization04.xml b/test/testcases/tests/level3/ls/checkcharacternormalization04.xml new file mode 100644 index 0000000..b79fb89 --- /dev/null +++ b/test/testcases/tests/level3/ls/checkcharacternormalization04.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="checkcharacternormalization04"> +<metadata> +<title>checkcharacternormalization04</title> +<creator>Curt Arnold</creator> +<description> +Characters should be checked for normalization on serialization if check-character-normalization = true. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="errorCount" type="int" value="0"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"suçon"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSet" obj="domConfig" name='"check-character-normalization"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"check-character-normalization"' value="true"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + </SERIALIZE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><equals actual="type" expected='"check-character-normalization-failure"' ignoreCase="false"/> + <assertEquals actual="severity" expected="2" ignoreCase="false" id="severityError"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertTrue id="hasErrors"><greater actual="errorCount" expected="0"/></assertTrue> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/comments01.xml b/test/testcases/tests/level3/ls/comments01.xml new file mode 100644 index 0000000..9fec420 --- /dev/null +++ b/test/testcases/tests/level3/ls/comments01.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="comments01"> +<metadata> +<title>comments01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with comments = false and see that comments are not present in +the parsed document. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"comments"' value="false"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<documentElement var="docElem" obj="doc"/> +<previousSibling var="node" obj="docElem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="10" ignoreCase="false" id="nodeIsDocType"/> +</test> + diff --git a/test/testcases/tests/level3/ls/comments02.xml b/test/testcases/tests/level3/ls/comments02.xml new file mode 100644 index 0000000..1fc4a49 --- /dev/null +++ b/test/testcases/tests/level3/ls/comments02.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="comments02"> +<metadata> +<title>comments02</title> +<creator>Curt Arnold</creator> +<description> +Load a document with comments = true and see that comments are present in +the parsed document. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"comments"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<documentElement var="docElem" obj="doc"/> +<previousSibling var="node" obj="docElem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="8" ignoreCase="false" id="nodeIsDocType"/> +</test> + diff --git a/test/testcases/tests/level3/ls/comments03.xml b/test/testcases/tests/level3/ls/comments03.xml new file mode 100644 index 0000000..771d7fb --- /dev/null +++ b/test/testcases/tests/level3/ls/comments03.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="comments03"> +<metadata> +<title>comments03</title> +<creator>Curt Arnold</creator> +<description> +Comments should be preserved when comments is true. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<createComment var="newNode" obj="doc" data='"foo"'/> +<appendChild var="retNode" obj="docElem" newChild="newNode"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"comments"' value="true"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertTrue id="hasComment"><contains obj="output" str='"><!--foo--></"' interface="DOMString"/></assertTrue> +</test> + + diff --git a/test/testcases/tests/level3/ls/comments04.xml b/test/testcases/tests/level3/ls/comments04.xml new file mode 100644 index 0000000..e7d4686 --- /dev/null +++ b/test/testcases/tests/level3/ls/comments04.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="comments04"> +<metadata> +<title>comments04</title> +<creator>Curt Arnold</creator> +<description> +Comments should be discarded when comments is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<createComment var="newNode" obj="doc" data='"foo"'/> +<appendChild var="retNode" obj="docElem" newChild="newNode"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"comments"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertFalse id="noComment"><contains obj="output" str='"<!--"' interface="DOMString"/></assertFalse> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization01.xml b/test/testcases/tests/level3/ls/datatypenormalization01.xml new file mode 100644 index 0000000..b2e70e8 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization01.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization01"> +<metadata> +<title>datatypenormalization01</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if double values were normalized. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"double"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-31415926.00E-7 2.718"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"INF -INF"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-0"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization02.xml b/test/testcases/tests/level3/ls/datatypenormalization02.xml new file mode 100644 index 0000000..6b386f6 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization02.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization02"> +<metadata> +<title>datatypenormalization02</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if decimal values were normalized. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"decimal"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"+0003.141592600"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"+0003.141592600"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"+10 .1"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"01"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"01"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-.001"' ignoreCase="false" id="secondList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization03.xml b/test/testcases/tests/level3/ls/datatypenormalization03.xml new file mode 100644 index 0000000..6389807 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization03.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization03"> +<metadata> +<title>datatypenormalization03</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if boolean values were whitespace normalized. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"boolean"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"true"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"false"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"false true false"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"0"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"0 1 0"' ignoreCase="false" id="secondList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization04.xml b/test/testcases/tests/level3/ls/datatypenormalization04.xml new file mode 100644 index 0000000..951acc9 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization04.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization04"> +<metadata> +<title>datatypenormalization04</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if float values were normalized. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"float"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"+0003.141592600E+0000"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-31415926.00E-7 2.718"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"NaN"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"INF -INF"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"1"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"-0"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization05.xml b/test/testcases/tests/level3/ls/datatypenormalization05.xml new file mode 100644 index 0000000..3c62344 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization05.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization05"> +<metadata> +<title>datatypenormalization05</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if dateTime values were correctly normalized. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"dateTime"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00-05:00"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"2004-01-21T20:30:00-05:00"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00 2004-01-21T15:30:00Z"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0000-05:00"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0000-05:00"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0000"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0001-05:00"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0001-05:00"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"2004-01-21T15:30:00.0001"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization06.xml b/test/testcases/tests/level3/ls/datatypenormalization06.xml new file mode 100644 index 0000000..ef03628 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization06.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization06"> +<metadata> +<title>datatypenormalization06</title> +<creator>Curt Arnold</creator> +<description> +Normalize document with datatype-normalization set to true. +Check if time values were normalized. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"time"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"15:30:00-05:00"' ignoreCase="false" id="firstValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"15:30:00-05:00"' ignoreCase="false" id="firstUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"15:30:00"' ignoreCase="false" id="firstList"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"15:30:00.0000-05:00"' ignoreCase="false" id="secondValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"15:30:00.0000-05:00"' ignoreCase="false" id="secondUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"15:30:00.0000"' ignoreCase="false" id="secondList"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <getAttribute var="str" obj="element" name='"value"'/> + <assertEquals actual="str" expected='"15:30:00.0001-05:00"' ignoreCase="false" id="thirdValue"/> + <getAttribute var="str" obj="element" name='"union"'/> + <assertEquals actual="str" expected='"15:30:00.0001-05:00"' ignoreCase="false" id="thirdUnion"/> + <textContent var="str" obj="element"/> + <assertEquals actual="str" expected='"15:30:00.0001"' ignoreCase="false" id="thirdList"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization07.xml b/test/testcases/tests/level3/ls/datatypenormalization07.xml new file mode 100644 index 0000000..a2faadd --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization07.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization07"> +<metadata> +<title>datatypenormalization07</title> +<creator>Curt Arnold</creator> +<description> +The default value for the double element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"double"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"3.1415926E0"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization08.xml b/test/testcases/tests/level3/ls/datatypenormalization08.xml new file mode 100644 index 0000000..e16df49 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization08.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization08"> +<metadata> +<title>datatypenormalization08</title> +<creator>Curt Arnold</creator> +<description> +The default value for the decimal element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<implementationAttribute name="namespaceAware" value="true"/> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"decimal"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"3.1415926"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization09.xml b/test/testcases/tests/level3/ls/datatypenormalization09.xml new file mode 100644 index 0000000..8320ed2 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization09.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization09"> +<metadata> +<title>datatypenormalization09</title> +<creator>Curt Arnold</creator> +<description> +The default value for the boolean element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"boolean"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"true"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization10.xml b/test/testcases/tests/level3/ls/datatypenormalization10.xml new file mode 100644 index 0000000..f146b95 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization10.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization10"> +<metadata> +<title>datatypenormalization10</title> +<creator>Curt Arnold</creator> +<description> +The default value for the float element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"float"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <assertEquals actual="str" expected='"3.1415926E0"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization11.xml b/test/testcases/tests/level3/ls/datatypenormalization11.xml new file mode 100644 index 0000000..dee2231 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization11.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization11"> +<metadata> +<title>datatypenormalization11</title> +<creator>Curt Arnold</creator> +<description> +The default value for the dateTime element must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"dateTime"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <!-- .0 would not be correct, see http://www.w3.org/2001/05/xmlschema-errata#E2-63 --> + <assertEquals actual="str" expected='"2004-01-21T20:30:00Z"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization12.xml b/test/testcases/tests/level3/ls/datatypenormalization12.xml new file mode 100644 index 0000000..9cc9132 --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization12.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization12"> +<metadata> +<title>datatypenormalization12</title> +<creator>Curt Arnold</creator> +<description> +Default values must be provided in canonical lexical form. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' + localName='"time"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <getAttribute var="str" obj="element" name='"default"'/> + <!-- .0 would not be correct, see http://www.w3.org/2001/05/xmlschema-errata#E2-63 --> + <assertEquals actual="str" expected='"20:30:00Z"' ignoreCase="false" id="firstValue"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization13.xml b/test/testcases/tests/level3/ls/datatypenormalization13.xml new file mode 100644 index 0000000..efee98f --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization13.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization13"> +<metadata> +<title>datatypenormalization13</title> +<creator>Curt Arnold</creator> +<description> +Parse document with datatype-normalization set to true. +Check if string values were normalized per default whitespace +facet of xsd:string. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization2"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization2"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"em"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <assertNotNull actual="childNode" id="childNodeNotNull"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='" EMP 0001 "' ignoreCase="false" id="content"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization14.xml b/test/testcases/tests/level3/ls/datatypenormalization14.xml new file mode 100644 index 0000000..eca745a --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization14.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization14"> +<metadata> +<title>datatypenormalization14</title> +<creator>Curt Arnold</creator> +<description> +Parse document with datatype-normalization set to true. +Check if string values were normalized per explicit whitespace=preserve. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization2"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization2"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"acronym"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <assertNotNull actual="childNode" id="childNodeNotNull"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='" EMP 0001 "' ignoreCase="false" id="content"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization15.xml b/test/testcases/tests/level3/ls/datatypenormalization15.xml new file mode 100644 index 0000000..f7bc3cf --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization15.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization15"> +<metadata> +<title>datatypenormalization15</title> +<creator>Curt Arnold</creator> +<description> +Parse document with datatype-normalization set to true. +Check if string values were normalized per an explicit whitespace=collapse. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization2"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization2"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"code"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content1"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content3"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization16.xml b/test/testcases/tests/level3/ls/datatypenormalization16.xml new file mode 100644 index 0000000..02af8ce --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization16.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization16"> +<metadata> +<title>datatypenormalization16</title> +<creator>Curt Arnold</creator> +<description> +Parse document with datatype-normalization set to true. +Check if string values were normalized per explicit whitespace=replace. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetNormalization" type="boolean"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/><return/></if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization2"' value="true"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if> + <and> + <isTrue value="canSetNormalization"/> + <isTrue value="canSetValidate"/> + <isTrue value="canSetXMLSchema"/> + </and> + <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"datatype_normalization2"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"sup"' + interface="Document"/> + <item var="element" obj="elemList" interface="NodeList" index="0"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='" EMP 0001 "' ignoreCase="false" id="content1"/> + <item var="element" obj="elemList" interface="NodeList" index="1"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> + <item var="element" obj="elemList" interface="NodeList" index="2"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content3"/> + <item var="element" obj="elemList" interface="NodeList" index="3"/> + <firstChild var="childNode" obj="element" interface="Node"/> + <nodeValue var="childValue" obj="childNode"/> + <assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content4"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/datatypenormalization17.xml b/test/testcases/tests/level3/ls/datatypenormalization17.xml new file mode 100644 index 0000000..32918fc --- /dev/null +++ b/test/testcases/tests/level3/ls/datatypenormalization17.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization17"> +<metadata> +<title>datatypenormalization17</title> +<creator>Curt Arnold</creator> +<description> +Parse document with datatype-normalization set to false. +Check if string values were not normalized per an explicit whitespace=collapse. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/> + <createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +</if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSetValidate"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> +</if> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if><isTrue value="canSetXMLSchema"/> + <setParameter obj="domConfig" name='"schema-type"' value="xsdNS"/> +</if> +<setParameter obj="domConfig" name='"datatype-normalization"' value="false"/> +<getResourceURI var="resourceURI" href='"datatype_normalization2"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"code"' + interface="Document"/> +<item var="element" obj="elemList" interface="NodeList" index="1"/> +<firstChild var="childNode" obj="element" interface="Node"/> +<nodeValue var="childValue" obj="childNode"/> +<assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/disallowdoctype01.xml b/test/testcases/tests/level3/ls/disallowdoctype01.xml new file mode 100644 index 0000000..68da959 --- /dev/null +++ b/test/testcases/tests/level3/ls/disallowdoctype01.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="disallowdoctype01"> +<metadata> +<title>disallowdoctype01</title> +<creator>Curt Arnold</creator> +<description> +Parsing a document with a doctype should throw a PARSE_ERR if disallow-doctype is true. +is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-disallow-doctype"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="errorCount" type="int" value="0"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"disallow-doctype"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"disallow-doctype"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"test3"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><greater actual="severity" expected="1"/> + <assertEquals actual="severity" expected="3" id="isFatalError" ignoreCase="false"/> + <assertEquals actual="type" expected='"doctype-not-allowed"' id="isDoctypeNotAllowed" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/discarddefaultcontent01.xml b/test/testcases/tests/level3/ls/discarddefaultcontent01.xml new file mode 100644 index 0000000..9f363e7 --- /dev/null +++ b/test/testcases/tests/level3/ls/discarddefaultcontent01.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="discarddefaultcontent01"> +<metadata> +<title>discarddefaultcontent01</title> +<creator>Curt Arnold</creator> +<description> +Default attributes should be not be serialized if discard-default-content is true. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-discard-default-content"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"discard-default-content"' value="true"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<!-- explicit dir='rtl' should not appear in serialized document --> +<assertFalse id="noDirAttr"><contains obj="output" str='"dir="' interface="DOMString"/></assertFalse> +</test> diff --git a/test/testcases/tests/level3/ls/discarddefaultcontent02.xml b/test/testcases/tests/level3/ls/discarddefaultcontent02.xml new file mode 100644 index 0000000..f3d1bba --- /dev/null +++ b/test/testcases/tests/level3/ls/discarddefaultcontent02.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="discarddefaultcontent02"> +<metadata> +<title>discarddefaultcontent02</title> +<creator>Curt Arnold</creator> +<description> +Default attributes should be explicitly serialized if discard-default-content is false. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-discard-default-content"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"discard-default-content"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<!-- explicit dir='rtl' should appear in serialized document --> +<assertTrue id="hasDirAttr"><contains obj="output" str='"dir="' interface="DOMString"/></assertTrue> +</test> diff --git a/test/testcases/tests/level3/ls/dom3tests.ent b/test/testcases/tests/level3/ls/dom3tests.ent new file mode 100644 index 0000000..cfa23ad --- /dev/null +++ b/test/testcases/tests/level3/ls/dom3tests.ent @@ -0,0 +1,78 @@ +<!ENTITY level3 "http://www.w3.org/2001/DOM-Test-Suite/Level-3"> +<!ENTITY spec "http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save"> +<!ENTITY date "<date qualifier='created'>2002-03-23</date>"> +<!ENTITY contributor "<contributor>X-Hive Corporation</contributor>"> +<!ENTITY creator "<creator>Jeroen van Rotterdam</creator>"> + +<!ENTITY vars " + <var name='implementation' type='DOMImplementation'/> + <var name='lsImplementation' type='DOMImplementationLS'/> + <var name='inputSource' type='LSInput'/> + <var name='document' type='Document'/> + <var name='writer' type='LSSerializer'/> + <var name='parser' type='LSParser'/> + + <!-- constants --> + <var name='MODE_SYNCHRONOUS' type='short' value='1'/> + <var name='MODE_ASYNCHRONOUS' type='short' value='2'/> + <var name='DTD_SCHEMATYPE' type='DOMString' value='"http://www.w3.org/TR/REC-xml"'/> + <var name='SCHEMA_SCHEMATYPE' type='DOMString' value='"http://www.w3.org/2001/XMLSchema"'/> + <var name='NULL_SCHEMATYPE' type='DOMString' isNull='true'/> + + <!-- action types DOMParser.parseWithContext --> + <var name='ACTION_REPLACE_CHILDREN' type='short' value='2'/> + <var name='ACTION_APPEND_AS_CHILDREN' type='short' value='1'/> + <var name='ACTION_INSERT_AFTER' type='short' value='4'/> + <var name='ACTION_INSERT_BEFORE' type='short' value='3'/> + <var name='ACTION_REPLACE' type='short' value='5'/> + + + <!-- testfiles --> + <var name='TEST0' type='DOMString' value='"test0"'/> + <var name='TEST1' type='DOMString' value='"test1"'/> + <var name='TEST2' type='DOMString' value='"test2"'/> + <var name='TEST3' type='DOMString' value='"test3"'/> + <var name='TEST4' type='DOMString' value='"test4"'/> + <var name='TEST5' type='DOMString' value='"test5"'/> + <var name='TEST6' type='DOMString' value='"test6"'/> + <var name='TEST7' type='DOMString' value='"test7"'/> + <var name='TESTPDF' type='DOMString' value='"testpdf"'/> + + <implementation var='implementation'/> + <assign var='lsImplementation' value='implementation'/> + "> + +<!ENTITY filterVars ""> + +<!ENTITY errorHandlerVars " + <var name='error' type='DOMError'/> + <var name='severity' type='short'/> + <var name='message' type='DOMString'/> + <var name='type' type='DOMString'/> + <var name='location' type='DOMLocator'/> + "> + +<!ENTITY assignErrorHandlerVars " + <severity var='severity' obj='error' interface='DOMError'/> + <message var='message' obj='error' interface='DOMError'/> + <type var='type' obj='error' interface='DOMError'/> + <location var='location' obj='error' interface='DOMError'/> + "> + + +<!ENTITY init "<createLSParser var='parser' obj='lsImplementation' mode='MODE_SYNCHRONOUS' schemaType='NULL_SCHEMATYPE'/> + <createLSSerializer var='writer' obj='lsImplementation'/> + <createLSInput var='inputSource' obj='lsImplementation'/>"> + +<!ENTITY parser.setFilter_myfilter "<filter obj='parser' value='myfilter' interface='LSParser'/>"> + +<!ENTITY SHOW_ELEMENT "1"> +<!ENTITY SHOW_TEXT '4'> +<!ENTITY SHOW_ALL '65535'> +<!ENTITY SHOW_ATTRIBUTE '2'> +<!ENTITY SHOW_COMMENT '128'> +<!ENTITY FILTER_ACCEPT '1'> +<!ENTITY FILTER_REJECT '2'> +<!ENTITY FILTER_SKIP '3'> + + diff --git a/test/testcases/tests/level3/ls/elementcontentwhitespace01.xml b/test/testcases/tests/level3/ls/elementcontentwhitespace01.xml new file mode 100644 index 0000000..75d286d --- /dev/null +++ b/test/testcases/tests/level3/ls/elementcontentwhitespace01.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementcontentwhitespace01"> +<metadata> +<title>elementcontentwhitespace01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with element-content-whitespace = false and validation = true and check that +element content whitespace is eliminated. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetWhitespace" type="boolean"/> +<var name="elemList" type="NodeList"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetWhitespace" obj="domConfig" name='"element-content-whitespace"' value="false"/> +<if><and><isTrue value="canSetValidate"/><isTrue value="canSetWhitespace"/></and> +<setParameter obj="domConfig" name='"validate"' value="true"/> +<setParameter obj="domConfig" name='"element-content-whitespace"' value="false"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="1" ignoreCase="false" id="nodeIsElem"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/elementcontentwhitespace02.xml b/test/testcases/tests/level3/ls/elementcontentwhitespace02.xml new file mode 100644 index 0000000..48f1c0a --- /dev/null +++ b/test/testcases/tests/level3/ls/elementcontentwhitespace02.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementcontentwhitespace02"> +<metadata> +<title>elementcontentwhitespace02</title> +<creator>Curt Arnold</creator> +<description> +Load a document with element-content-whitespace and validate = true and check that +element content whitespace is not eliminated. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="elemList" type="NodeList"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate"' value="true"/> +</if> +<setParameter obj="domConfig" name='"element-content-whitespace"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="nodeIsText"/> +</test> + diff --git a/test/testcases/tests/level3/ls/elementcontentwhitespace03.xml b/test/testcases/tests/level3/ls/elementcontentwhitespace03.xml new file mode 100644 index 0000000..0d6fb58 --- /dev/null +++ b/test/testcases/tests/level3/ls/elementcontentwhitespace03.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="elementcontentwhitespace03"> +<metadata> +<title>elementcontentwhitespace03</title> +<creator>Curt Arnold</creator> +<description> +Serialize a document when element-content-whitespace is false, element content whitespace should be eliminated. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="serializerDomConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="output" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetWhitespace" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig var="serializerDomConfig" obj="lsSerializer" interface="LSSerializer"/> +<canSetParameter var="canSetWhitespace" obj="serializerDomConfig" name='"element-content-whitespace"' value="false"/> +<if><and><isTrue value="canSetValidate"/><isTrue value="canSetWhitespace"/></and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> + <domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + <setParameter obj="domConfig" name='"validate"' value="false"/> + <getResourceURI var="resourceURI" href='"test3"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <setParameter obj="serializerDomConfig" name='"element-content-whitespace"' value="false"/> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + <assertTrue id="noWhitespace"><contains obj="output" str='"<elt0><elt1>"' interface="DOMString"/></assertTrue> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/encoding01.xml b/test/testcases/tests/level3/ls/encoding01.xml new file mode 100644 index 0000000..8456e38 --- /dev/null +++ b/test/testcases/tests/level3/ls/encoding01.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="encoding01"> +<metadata> +<title>encoding01</title> +<creator>Curt Arnold</creator> +<description> +createLSOutput should create an LSOutput, encoding should be mutable. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSOutput"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSOutput-encoding"/> +</metadata> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsOutput" type="LSOutput"/> +<var name="encoding" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSOutput var="lsOutput" obj="domImplLS"/> +<encoding var="encoding" obj="lsOutput" interface="LSOutput"/> +<!-- no definitive statement of expected default value --> +<encoding obj="lsOutput" value='"ISO-8859-1"' interface="LSOutput"/> +<encoding var="encoding" obj="lsOutput" interface="LSOutput"/> +<assertEquals actual="encoding" expected='"ISO-8859-1"' id="isLatin1" ignoreCase="true"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/entities01.xml b/test/testcases/tests/level3/ls/entities01.xml new file mode 100644 index 0000000..fdad0b7 --- /dev/null +++ b/test/testcases/tests/level3/ls/entities01.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities01"> +<metadata> +<title>entites01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with entities = false and see that entity references are not present in +the element content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="1" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="acrContentIsText"/> +</test> + diff --git a/test/testcases/tests/level3/ls/entities02.xml b/test/testcases/tests/level3/ls/entities02.xml new file mode 100644 index 0000000..d3d6590 --- /dev/null +++ b/test/testcases/tests/level3/ls/entities02.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities02"> +<metadata> +<title>entites02</title> +<creator>Curt Arnold</creator> +<description> +Load a document with entities = false and see that entity references are not present in +attribute content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="attributes" type="NamedNodeMap"/> +<var name="docType" type="DocumentType"/> +<var name="entities" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="classAttr" type="Attr"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<attributes var="attributes" obj="elem"/> +<getNamedItem var="classAttr" obj="attributes" name='"class"'/> +<lastChild var="node" obj="classAttr" interface="Node"/> +<assertNotNull actual="classAttr" id="classAttrChildNotNull"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="classAttrChildIsText"/> +</test> + diff --git a/test/testcases/tests/level3/ls/entities03.xml b/test/testcases/tests/level3/ls/entities03.xml new file mode 100644 index 0000000..388abfe --- /dev/null +++ b/test/testcases/tests/level3/ls/entities03.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities03"> +<metadata> +<title>entites03</title> +<creator>Curt Arnold</creator> +<description> +Load a document with entities = false and see that entity definitions are preserved. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="docType" type="DocumentType"/> +<var name="entities" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<doctype var="docType" obj="doc"/> +<assertNotNull actual="docType" id="docTypeNotNull"/> +<entities var="entities" obj="docType"/> +<getNamedItem var="entity" obj="entities" name='"alpha"'/> +<assertNotNull actual="entity" id="entityNotNull"/> +</test> + diff --git a/test/testcases/tests/level3/ls/entities04.xml b/test/testcases/tests/level3/ls/entities04.xml new file mode 100644 index 0000000..acb0424 --- /dev/null +++ b/test/testcases/tests/level3/ls/entities04.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities04"> +<metadata> +<title>entites04</title> +<creator>Curt Arnold</creator> +<description> +Load a document with entities = true and see that entity references are present in +the element content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"entities"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="1" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="5" ignoreCase="false" id="acrContentIsEntRef"/> +</test> + diff --git a/test/testcases/tests/level3/ls/entities05.xml b/test/testcases/tests/level3/ls/entities05.xml new file mode 100644 index 0000000..07be045 --- /dev/null +++ b/test/testcases/tests/level3/ls/entities05.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities05"> +<metadata> +<title>entites05</title> +<creator>Curt Arnold</creator> +<description> +Load a document with entities = true and see that entity references are present in +attribute content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="attributes" type="NamedNodeMap"/> +<var name="docType" type="DocumentType"/> +<var name="entities" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<var name="classAttr" type="Attr"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"entities"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="3" interface="NodeList"/> +<attributes var="attributes" obj="elem"/> +<getNamedItem var="classAttr" obj="attributes" name='"class"'/> +<lastChild var="node" obj="classAttr" interface="Node"/> +<assertNotNull actual="classAttr" id="classAttrChildNotNull"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="5" ignoreCase="false" id="classAttrChildIsEntRef"/> +</test> + diff --git a/test/testcases/tests/level3/ls/entities06.xml b/test/testcases/tests/level3/ls/entities06.xml new file mode 100644 index 0000000..f9649a6 --- /dev/null +++ b/test/testcases/tests/level3/ls/entities06.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities06"> +<metadata> +<title>entites06</title> +<creator>Curt Arnold</creator> +<description> +Load a document with entities = true and see that entity definitions are preserved. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="docType" type="DocumentType"/> +<var name="entities" type="NamedNodeMap"/> +<var name="entity" type="Entity"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"entities"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<doctype var="docType" obj="doc"/> +<assertNotNull actual="docType" id="docTypeNotNull"/> +<entities var="entities" obj="docType"/> +<getNamedItem var="entity" obj="entities" name='"alpha"'/> +<assertNotNull actual="entity" id="entityNotNull"/> +</test> + diff --git a/test/testcases/tests/level3/ls/entities07.xml b/test/testcases/tests/level3/ls/entities07.xml new file mode 100644 index 0000000..79d5c40 --- /dev/null +++ b/test/testcases/tests/level3/ls/entities07.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities07"> +<metadata> +<title>entities07</title> +<creator>Curt Arnold</creator> +<description> +A warning should be dispatched if the base URI of a processing instruction can not be preserved. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="warningCount" type="int" value="0"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"pibase"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><equals actual="type" expected='"pi-base-uri-not-preserved"' ignoreCase="false"/> + <assertEquals actual="severity" expected="1" id="isError" ignoreCase="false"/> + <increment var="warningCount" value="1"/> + </if> +</for-each> +<assertEquals actual="warningCount" expected="1" ignoreCase="false" id="hadWarning"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/entities08.xml b/test/testcases/tests/level3/ls/entities08.xml new file mode 100644 index 0000000..9b18c0a --- /dev/null +++ b/test/testcases/tests/level3/ls/entities08.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities08"> +<metadata> +<title>entities08</title> +<creator>Curt Arnold</creator> +<description> +Entity references should be preserved when entities is true. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="output" type="DOMString"/> +<var name="varList" type="NodeList"/> +<var name="varNode" type="Node"/> +<var name="child" type="Node"/> +<var name="childType" type="int"/> +<var name="entRef" type="EntityReference"/> +<var name="retNode" type="Node"/> +<implementation var="domImplLS"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<!-- entity references may be expanded on load + if so, create and insert an entity reference into the document --> +<getElementsByTagName var="varList" obj="doc" + tagname='"var"' interface="Document"/> +<item var="varNode" obj="varList" index="2" interface="NodeList"/> +<firstChild var="child" obj="varNode" interface="Node"/> +<nodeType var="childType" obj="child"/> +<if><equals actual="childType" expected="1" ignoreCase="false"/> + <createEntityReference var="entRef" obj="doc" + name='"ent4"'/> + <appendChild var="retNode" obj="varNode" newChild="entRef"/> +</if> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"entities"' value="true"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertTrue id="hasEntRef"><contains obj="output" str='"ent4;"' interface="DOMString"/></assertTrue> +</test> + + diff --git a/test/testcases/tests/level3/ls/entities09.xml b/test/testcases/tests/level3/ls/entities09.xml new file mode 100644 index 0000000..3f22880 --- /dev/null +++ b/test/testcases/tests/level3/ls/entities09.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="entities09"> +<metadata> +<title>entities09</title> +<creator>Curt Arnold</creator> +<description> +Entity references should be expanded when entities is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<load var="doc" href="hc_staff" willBeModified="true"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"entities"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertFalse id="noEntRef"><contains obj="output" str='"ent4;"' interface="DOMString"/></assertFalse> +<assertTrue id="entDef"><contains obj="output" str='"!ENTITY"' interface="DOMString"/></assertTrue> +</test> + + diff --git a/test/testcases/tests/level3/ls/files/CVS/Entries b/test/testcases/tests/level3/ls/files/CVS/Entries new file mode 100644 index 0000000..d374c52 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/CVS/Entries @@ -0,0 +1,37 @@ +D/subdir//// +/canonicalform01.xml/1.1/Fri Apr 3 02:47:57 2009// +/canonicalform02.xml/1.1/Fri Apr 3 02:47:57 2009// +/canonicalform03.xml/1.1/Fri Apr 3 02:47:57 2009// +/characternormalization1.xml/1.1/Fri Apr 3 02:47:57 2009// +/datatype_normalization.svg.xsd/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/datatype_normalization.xml/1.1/Fri Apr 3 02:47:57 2009// +/datatype_normalization.xsd/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/datatype_normalization2.xml/1.1/Fri Apr 3 02:47:57 2009// +/datatype_normalization2.xsd/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/hc_staff.svg/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/hc_staff.svg.xsd/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/hc_staff.xhtml/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/hc_staff.xml/1.1/Fri Apr 3 02:47:57 2009// +/hc_staff.xsd/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/namespaces1.xml/1.1/Fri Apr 3 02:47:57 2009// +/pibase.xml/1.1/Fri Apr 3 02:47:57 2009// +/schematype1.xml/1.1/Fri Apr 3 02:47:57 2009// +/svgtest.js/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/svgunit.js/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/test0.svg/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/test0.xml/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/test1.xml/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/test2.xml/1.3/Fri Apr 3 02:47:57 2009/-kb/ +/test3.xml/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/test4.xml/1.3/Fri Apr 3 02:47:57 2009/-kb/ +/test5.xml/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/test7.xml/1.3/Fri Apr 3 02:47:57 2009/-kb/ +/testpdf.pdf/1.1/Fri Apr 3 02:47:57 2009/-kb/ +/testsvg.dtd/1.2/Fri Apr 3 02:47:57 2009/-kb/ +/unsupportedencoding1.xml/1.1/Fri Apr 3 02:47:57 2009// +/validate1.xml/1.1/Fri Apr 3 02:47:57 2009// +/validateschema1.xml/1.1/Fri Apr 3 02:47:57 2009// +/wellformed1.xml/1.2/Fri Apr 3 02:47:57 2009// +/wellformed2.xml/1.2/Fri Apr 3 02:47:57 2009// +/wellformed3.xml/1.1/Fri Apr 3 02:47:57 2009// +/xhtml1-strict.dtd/1.1/Fri Apr 3 02:47:57 2009/-kb/ diff --git a/test/testcases/tests/level3/ls/files/CVS/Repository b/test/testcases/tests/level3/ls/files/CVS/Repository new file mode 100644 index 0000000..fe2d5cb --- /dev/null +++ b/test/testcases/tests/level3/ls/files/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/ls/files diff --git a/test/testcases/tests/level3/ls/files/CVS/Root b/test/testcases/tests/level3/ls/files/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/ls/files/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/ls/files/CVS/Template b/test/testcases/tests/level3/ls/files/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/CVS/Template diff --git a/test/testcases/tests/level3/ls/files/canonicalform01.xml b/test/testcases/tests/level3/ls/files/canonicalform01.xml new file mode 100644 index 0000000..ac9b7c8 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/canonicalform01.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> + +<?xml-stylesheet href="doc.xsl" + type="text/xsl" ?> + +<!DOCTYPE html SYSTEM "xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform01</title></head><body onload="parent.loadComplete()"> +<p>Hello, world!<!-- Comment 1 --></p></body></html> + +<?pi-without-data ?> + +<!-- Comment 2 --> + +<!-- Comment 3 --> diff --git a/test/testcases/tests/level3/ls/files/canonicalform02.xml b/test/testcases/tests/level3/ls/files/canonicalform02.xml new file mode 100644 index 0000000..f949cfc --- /dev/null +++ b/test/testcases/tests/level3/ls/files/canonicalform02.xml @@ -0,0 +1,11 @@ +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform02</title></head><body onload="parent.loadComplete()"> + <acronym> </acronym> + <em> A B </em> + <p> + A + <acronym> </acronym> + B + <em> A B </em> + C + </p> +</body></html> diff --git a/test/testcases/tests/level3/ls/files/canonicalform03.xml b/test/testcases/tests/level3/ls/files/canonicalform03.xml new file mode 100644 index 0000000..d1257bc --- /dev/null +++ b/test/testcases/tests/level3/ls/files/canonicalform03.xml @@ -0,0 +1,18 @@ +<!DOCTYPE html [<!ATTLIST acronym title CDATA "default">]> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform03</title></head><body onload="parent.loadComplete()"> + <br /> + <br ></br> + <div name = "elem3" id="elem3" /> + <div name="elem4" id="elem4" ></div> + <div a:attr="out" b:attr="sorted" name="all" class="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://example.org"/> + <div xmlns="" xmlns:a="http://www.w3.org"> + <div xmlns="http://www.ietf.org"> + <div xmlns="" xmlns:a="http://www.w3.org"> + <acronym xmlns="" xmlns:a="http://www.ietf.org"/> + </div> + </div> + </div> +</body></html> diff --git a/test/testcases/tests/level3/ls/files/characternormalization1.xml b/test/testcases/tests/level3/ls/files/characternormalization1.xml new file mode 100644 index 0000000..786cfa1 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/characternormalization1.xml @@ -0,0 +1,4 @@ +<!DOCTYPE suçon [ +<!ELEMENT suçon EMPTY> +]> +<suçon/>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/datatype_normalization.svg.xsd b/test/testcases/tests/level3/ls/files/datatype_normalization.svg.xsd new file mode 100644 index 0000000..e2cdde3 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/datatype_normalization.svg.xsd @@ -0,0 +1,60 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for SVG
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:data="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization">
+
+ <xsd:import namespace="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization" schemaLocation="datatype_normalization.xsd"/>
+
+ <xsd:element name="svg">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="rect"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="data:data"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="rect">
+ <xsd:complexType>
+ <xsd:attribute name="x" type="xsd:double" use="required"/>
+ <xsd:attribute name="y" type="xsd:double" use="required"/>
+ <xsd:attribute name="height" type="xsd:double" use="required"/>
+ <xsd:attribute name="width" type="xsd:double" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/ls/files/datatype_normalization.xml b/test/testcases/tests/level3/ls/files/datatype_normalization.xml new file mode 100644 index 0000000..cced1b9 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/datatype_normalization.xml @@ -0,0 +1,90 @@ +<!DOCTYPE svg [ +<!ENTITY svgunit SYSTEM "svgunit.js"> +<!ENTITY svgtest SYSTEM "svgtest.js"> +<!ELEMENT svg (rect, script, data)> +<!ATTLIST svg + xmlns CDATA #IMPLIED + xmlns:xsi CDATA #IMPLIED + xsi:schemaLocation CDATA #IMPLIED> + <!ELEMENT rect EMPTY> + <!ATTLIST rect + x CDATA #REQUIRED + y CDATA #REQUIRED + width CDATA #REQUIRED + height CDATA #REQUIRED> + <!ELEMENT script (#PCDATA)> + <!ATTLIST script type CDATA #IMPLIED> + <!ELEMENT data (double*, boolean*, decimal*, float*, dateTime*, time*)> + <!ATTLIST data xmlns CDATA #IMPLIED> + <!ELEMENT double (#PCDATA)> + <!ATTLIST double + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT boolean (#PCDATA)> + <!ATTLIST boolean + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT decimal (#PCDATA)> + <!ATTLIST decimal + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT float (#PCDATA)> + <!ATTLIST float + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT dateTime (#PCDATA)> + <!ATTLIST dateTime + value CDATA #IMPLIED + union CDATA #IMPLIED> + <!ELEMENT time (#PCDATA)> + <!ATTLIST time + value CDATA #IMPLIED + union CDATA #IMPLIED> + +]> +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.w3.org/2000/svg datatype_normalization.svg.xsd"> +<rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script> +<data xmlns='http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization'> +<double value=" + +0003.141592600E+0000 " union=" +0003.141592600E+0000 + "> -31415926.00E-7 +2.718</double> +<double value=" NaN" union="NaN "> INF -INF </double> +<double value=" +1 " union="1 +"> -0</double> +<boolean value=" + true" union="false + "> false true false </boolean> +<boolean value=" + 1" union=" 0 + ">0 1 0 </boolean> +<decimal value=" +0003.141592600 " union=" +0003.141592600 "> +10 .1 </decimal> +<decimal value=" 01 " union=" 01 "> -.001 </decimal> +<float value=" +0003.141592600E+0000 " union=" +0003.141592600E+0000 "> -31415926.00E-7 +2.718</float> +<float value=" NaN " union=" NaN "> INF -INF </float> +<float value=" +1 " union="1 +">-0</float> +<dateTime value=" +2004-01-21T15:30:00-05:00" union="2004-01-21T20:30:00-05:00 +">2004-01-21T15:30:00 +2004-01-21T15:30:00Z</dateTime> +<dateTime value=" +2004-01-21T15:30:00.0000-05:00" union="2004-01-21T15:30:00.0000-05:00 +"> 2004-01-21T15:30:00.0000 </dateTime> +<dateTime value="2004-01-21T15:30:00.0001-05:00" union="2004-01-21T15:30:00.0001-05:00">2004-01-21T15:30:00.0001</dateTime> +<time value=" +15:30:00-05:00" union="15:30:00-05:00 +"> 15:30:00 </time> +<time value=" + 15:30:00.0000-05:00" union=" 15:30:00.0000-05:00 + ">15:30:00.0000</time> +<time value=" + 15:30:00.0001-05:00" union="15:30:00.0001-05:00 + ">15:30:00.0001</time> +</data> +</svg>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/datatype_normalization.xsd b/test/testcases/tests/level3/ls/files/datatype_normalization.xsd new file mode 100644 index 0000000..2b3a789 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/datatype_normalization.xsd @@ -0,0 +1,212 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"
+ xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization">
+
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="double"/>
+ <xsd:element ref="boolean"/>
+ <xsd:element ref="decimal"/>
+ <xsd:element ref="float"/>
+ <xsd:element ref="dateTime"/>
+ <xsd:element ref="time"/>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="myDouble">
+ <xsd:restriction base="xsd:double"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDoubleList">
+ <xsd:list itemType="myDouble"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDoubleUnion">
+ <xsd:union memberTypes="myDouble xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="double">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myDoubleList">
+ <xsd:attribute name="value" type="myDouble" use="required"/>
+ <xsd:attribute name="union" type="myDoubleUnion" use="required"/>
+ <xsd:attribute name="default" type="myDouble"
+ default="+0003.141592600E+0000" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myBoolean">
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myBooleanList">
+ <xsd:list itemType="myBoolean"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myBooleanUnion">
+ <xsd:union memberTypes="myBoolean xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="boolean">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myBooleanList">
+ <xsd:attribute name="value" type="myBoolean" use="required"/>
+ <xsd:attribute name="union" type="myDoubleUnion" use="required"/>
+ <xsd:attribute name="default" type="myBoolean"
+ default="1" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myDecimal">
+ <xsd:restriction base="xsd:decimal"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDecimalList">
+ <xsd:list itemType="myDecimal"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDecimalUnion">
+ <xsd:union memberTypes="myDecimal xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="decimal">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myDecimalList">
+ <xsd:attribute name="value" type="myDecimal" use="required"/>
+ <xsd:attribute name="union" type="myDecimalUnion" use="required"/>
+ <xsd:attribute name="default" type="myDecimal"
+ default="+0003.141592600" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="myFloat">
+ <xsd:restriction base="xsd:float"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myFloatList">
+ <xsd:list itemType="myFloat"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myFloatUnion">
+ <xsd:union memberTypes="myFloat xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="float">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myFloatList">
+ <xsd:attribute name="value" type="myFloat" use="required"/>
+ <xsd:attribute name="union" type="myFloatUnion" use="required"/>
+ <xsd:attribute name="default" type="myDouble"
+ default="+0003.141592600E+0000" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myDateTime">
+ <xsd:restriction base="xsd:dateTime"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDateTimeList">
+ <xsd:list itemType="myDateTime"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myDateTimeUnion">
+ <xsd:union memberTypes="myDateTime xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="dateTime">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myDateTimeList">
+ <xsd:attribute name="value" type="myDateTime" use="required"/>
+ <xsd:attribute name="union" type="myDateTimeUnion" use="required"/>
+ <xsd:attribute name="default" type="myDateTime"
+ default="2004-01-21T15:30:00-05:00" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myTime">
+ <xsd:restriction base="xsd:time"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myTimeList">
+ <xsd:list itemType="myTime"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myTimeUnion">
+ <xsd:union memberTypes="myTime xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="time">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myTimeList">
+ <xsd:attribute name="value" type="myTime" use="required"/>
+ <xsd:attribute name="union" type="myTimeUnion" use="required"/>
+ <xsd:attribute name="default" type="myTime"
+ default="15:30:00-05:00" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:simpleType name="myUnion">
+ <xsd:union memberTypes="xsd:integer xsd:string"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myUnionList">
+ <xsd:list itemType="myUnion"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="myUnionUnion">
+ <xsd:union memberTypes="myUnion xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:element name="union">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="myUnionList">
+ <xsd:attribute name="value" type="myUnion" use="required"/>
+ <xsd:attribute name="union" type="myUnionUnion" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/ls/files/datatype_normalization2.xml b/test/testcases/tests/level3/ls/files/datatype_normalization2.xml new file mode 100644 index 0000000..19d9415 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/datatype_normalization2.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "xhtml1-strict.dtd" [ + <!ATTLIST html + xmlns:xsi CDATA #IMPLIED + xsi:schemaLocation CDATA #IMPLIED> +]> +<html xmlns='http://www.w3.org/1999/xhtml' + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.w3.org/1999/xhtml datatype_normalization2.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>datatype_normalization2</title></head><body onload="parent.loadComplete()"> + <p> + <!-- preserve, string default --> + <em> EMP 0001 </em> + <!-- explicit preserve --> + <acronym> EMP 0001 </acronym> + <!-- explicit collapse --> + <code> + EMP 0001 +</code> + <code>EMP 0001</code> + <code>EMP 0001</code> + <!-- explicit replace --> + <sup> + EMP 0001 +</sup> + <sup>EMP 0001</sup> + <sup>EMP 0001</sup> + <sup>EMP +0001</sup> + </p> +</body> +</html> diff --git a/test/testcases/tests/level3/ls/files/datatype_normalization2.xsd b/test/testcases/tests/level3/ls/files/datatype_normalization2.xsd new file mode 100644 index 0000000..c7a7903 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/datatype_normalization2.xsd @@ -0,0 +1,99 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is intended to support specific DOM L3 tests is no way intended to
+be a general purpose schema for XHTML
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsd:element name="html">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="head"/>
+ <xsd:element ref="body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="head">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="meta"/>
+ <xsd:element ref="title"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="title" type="xsd:string"/>
+ <xsd:element name="meta">
+ <xsd:complexType>
+ <xsd:attribute name="http-equiv" type="xsd:string" use="required"/>
+ <xsd:attribute name="content" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="body">
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="p"/>
+ </xsd:sequence>
+ <xsd:attribute name="onload" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="p">
+ <xsd:complexType>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="em"/>
+ <xsd:element ref="code"/>
+ <xsd:element ref="sup"/>
+ <xsd:element ref="acronym"/>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="em" type="xsd:string"/>
+
+ <xsd:simpleType name="acronym">
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="preserve"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="acronym" type="acronym"/>
+
+ <xsd:simpleType name="code">
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="code" type="code"/>
+
+ <xsd:simpleType name="sup">
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="replace"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="sup" type="sup"/>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/ls/files/hc_staff.svg b/test/testcases/tests/level3/ls/files/hc_staff.svg new file mode 100644 index 0000000..e11e135 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/hc_staff.svg @@ -0,0 +1,87 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE svg
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "α">
+ <!ENTITY beta "β">
+ <!ENTITY gamma "γ">
+ <!ENTITY delta "δ">
+ <!ENTITY epsilon "ε">
+ <!ENTITY alpha "ζ">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST p
+ dir CDATA 'rtl'
+ xmlns:dmstc CDATA #IMPLIED
+ xmlns:nm CDATA #IMPLIED
+ xmlns:emp2 CDATA #IMPLIED>
+ <!ATTLIST html
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED>
+ <!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>">
+ <!ATTLIST span xmlns CDATA #IMPLIED>
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+ <!ELEMENT svg (rect, script, body)>
+ <!ATTLIST svg
+ xmlns CDATA #IMPLIED
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ATTLIST body xmlns CDATA #IMPLIED>
+]>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2000/svg hc_staff.svg.xsd">
+<rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script><body xmlns="http://www.w3.org/1999/xhtml">
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0002</em>
+ <strong>Martha Raynolds
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">β Dallas, γ
+ 98554</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.netzero.com">
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&ent4;</var>
+ <acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p xmlns:nm="http://www.altavista.com">
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yα" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p xmlns:emp2="http://www.nist.gov">
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></svg>
diff --git a/test/testcases/tests/level3/ls/files/hc_staff.svg.xsd b/test/testcases/tests/level3/ls/files/hc_staff.svg.xsd new file mode 100644 index 0000000..52335a3 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/hc_staff.svg.xsd @@ -0,0 +1,60 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for SVG
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+ <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="hc_staff.xsd"/>
+
+ <xsd:element name="svg">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="rect"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="xhtml:body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="rect">
+ <xsd:complexType>
+ <xsd:attribute name="x" type="xsd:double" use="required"/>
+ <xsd:attribute name="y" type="xsd:double" use="required"/>
+ <xsd:attribute name="height" type="xsd:double" use="required"/>
+ <xsd:attribute name="width" type="xsd:double" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/testcases/tests/level3/ls/files/hc_staff.xhtml b/test/testcases/tests/level3/ls/files/hc_staff.xhtml new file mode 100644 index 0000000..f2b6e71 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/hc_staff.xhtml @@ -0,0 +1,73 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "α">
+ <!ENTITY beta "β">
+ <!ENTITY gamma "γ">
+ <!ENTITY delta "δ">
+ <!ENTITY epsilon "ε">
+ <!ENTITY alpha "ζ">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST p
+ dir CDATA 'rtl'
+ xmlns:dmstc CDATA #IMPLIED
+ xmlns:nm CDATA #IMPLIED
+ xmlns:emp2 CDATA #IMPLIED>
+ <!ATTLIST html
+ xmlns:xsi CDATA #IMPLIED
+ xsi:schemaLocation CDATA #IMPLIED>
+ <!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED>
+ <!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>">
+ <!ATTLIST span xmlns CDATA #IMPLIED>
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/1999/xhtml hc_staff.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="svgunit.js"/><script charset="UTF-8" type="text/javascript" src="svgtest.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="parent.loadComplete()">
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.usa.com">
+ <em>EMP0002</em>
+ <strong>Martha Raynolds
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">β Dallas, γ
+ 98554</acronym>
+ </p>
+ <p xmlns:dmstc="http://www.netzero.com">
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&ent4;</var>
+ <acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p xmlns:nm="http://www.altavista.com">
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yα" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p xmlns:emp2="http://www.nist.gov">
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/test/testcases/tests/level3/ls/files/hc_staff.xml b/test/testcases/tests/level3/ls/files/hc_staff.xml new file mode 100644 index 0000000..0366a05 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/hc_staff.xml @@ -0,0 +1,73 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "xhtml1-strict.dtd" [ + <!ENTITY alpha "α"> + <!ENTITY beta "β"> + <!ENTITY gamma "γ"> + <!ENTITY delta "δ"> + <!ENTITY epsilon "ε"> + <!ENTITY alpha "ζ"> + <!NOTATION notation1 PUBLIC "notation1File"> + <!NOTATION notation2 SYSTEM "notation2File"> + <!ATTLIST p + dir CDATA 'rtl' + xmlns:dmstc CDATA #IMPLIED + xmlns:nm CDATA #IMPLIED + xmlns:emp2 CDATA #IMPLIED> + <!ATTLIST html + xmlns:xsi CDATA #IMPLIED + xsi:schemaLocation CDATA #IMPLIED> + <!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED> + <!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>"> + <!ATTLIST span xmlns CDATA #IMPLIED> +]> +<!-- This is comment number 1.--> +<html xmlns='http://www.w3.org/1999/xhtml' + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.w3.org/1999/xhtml hc_staff.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="svgunit.js"/><script charset="UTF-8" type="text/javascript" src="svgtest.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="parent.loadComplete()"> + <p xmlns:dmstc="http://www.usa.com"> + <em>EMP0001</em> + <strong>Margaret Martin</strong> + <code>Accountant</code> + <sup>56,000</sup> + <var>Female</var> + <acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym> + </p> + <p xmlns:dmstc="http://www.usa.com"> + <em>EMP0002</em> + <strong>Martha Raynolds +<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]> +<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong> + <code>Secretary</code> + <sup>35,000</sup> + <var>Female</var> + <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">β Dallas, γ + 98554</acronym> + </p> + <p xmlns:dmstc="http://www.netzero.com"> + <em>EMP0003</em> + <strong>Roger + Jones</strong> + <code>Department Manager</code> + <sup>100,000</sup> + <var>&ent4;</var> + <acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym> + </p> + <p xmlns:nm="http://www.altavista.com"> + <em>EMP0004</em> + <strong>Jeny Oconnor</strong> + <code>Personnel Director</code> + <sup>95,000</sup> + <var>Female</var> + <acronym title="Yes" class="Yα" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym> + </p> + <p xmlns:emp2="http://www.nist.gov"> + <em>EMP0005</em> + <strong>Robert Myers</strong> + <code>Computer Specialist</code> + <sup>90,000</sup> + <var>male</var> + <acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym> + </p> +</body></html> diff --git a/test/testcases/tests/level3/ls/files/hc_staff.xsd b/test/testcases/tests/level3/ls/files/hc_staff.xsd new file mode 100644 index 0000000..915cba0 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/hc_staff.xsd @@ -0,0 +1,250 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This schema is attempts to use every construct that could
+be interrogated by DOM Level 3 and is no way intended to
+be a general purpose schema for XHTML
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsd:element name="html">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="head"/>
+ <xsd:element ref="body"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="head">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="meta"/>
+ <xsd:element ref="title"/>
+ <xsd:element ref="script" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="meta">
+ <xsd:complexType>
+ <xsd:attribute name="http-equiv" type="xsd:string" use="required"/>
+ <xsd:attribute name="content" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="script">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="src" type="xsd:string" use="optional"/>
+ <xsd:attribute name="charset" type="xsd:string" use="optional"/>
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="title" type="xsd:string"/>
+
+ <xsd:element name="body">
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="p"/>
+ </xsd:sequence>
+ <xsd:attribute name="onload" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="classType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Yes"/>
+ <xsd:enumeration value="No"/>
+ <xsd:enumeration value="Yα"/>
+ <xsd:enumeration value="Y"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="part1">
+ <xsd:sequence>
+ <xsd:element ref="em"/>
+ <xsd:element ref="strong"/>
+ <xsd:element ref="code"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="pType">
+ <xsd:complexContent>
+ <xsd:extension base="part1">
+ <xsd:sequence>
+ <xsd:element ref="sup"/>
+ <xsd:element ref="var"/>
+ <xsd:element ref="acronym"/>
+ </xsd:sequence>
+ <xsd:attribute name="title" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="classType" use="optional"/>
+ <xsd:attribute name="dir" type="dirType" use="optional" default="rtl"/>
+ <xsd:attribute name="foo" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:element name="p">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:restriction base="pType">
+ <xsd:sequence>
+ <xsd:element ref="em"/>
+ <xsd:element ref="strong"/>
+ <xsd:element ref="code"/>
+ <xsd:element ref="sup"/>
+ <xsd:element ref="var"/>
+ <xsd:element ref="acronym"/>
+ </xsd:sequence>
+ <xsd:attribute name="title" type="xsd:string" use="optional"/>
+ <xsd:attribute name="class" type="classType" use="optional"/>
+ <xsd:attribute name="dir" type="dirType" use="optional" default="rtl"/>
+ <xsd:attribute name="foo" type="xsd:string" use="prohibited"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:simpleType name="emp0001_3Type">
+ <xsd:restriction base="xsd:ID">
+ <xsd:enumeration value="EMP0001"/>
+ <xsd:enumeration value="EMP0002"/>
+ <xsd:enumeration value="EMP0003"/>
+ <xsd:enumeration value="EMP0004"/>
+ <xsd:enumeration value="EMP0005"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="emp0004_5Type">
+ <xsd:restriction base="xsd:ID">
+ <xsd:enumeration value="EMP0006"/>
+ <xsd:enumeration value="EMP0007"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="unboundedEmType">
+ <xsd:union memberTypes="emp0001_3Type emp0004_5Type"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="emType">
+ <xsd:restriction base="unboundedEmType">
+ <xsd:pattern value="EMP[0-9]*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:element name="em" type="emType"/>
+
+ <xsd:simpleType name="unboundedStrongType">
+ <xsd:list itemType="xsd:string"/>
+ </xsd:simpleType>
+
+
+ <xsd:simpleType name="strongType">
+ <xsd:restriction base="unboundedStrongType">
+ <xsd:maxLength value="100"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="strong" type="strongType"/>
+
+ <!-- union of union and union of list -->
+ <xsd:simpleType name="integers">
+ <xsd:list itemType="xsd:integer"/>
+ </xsd:simpleType>
+
+
+ <xsd:simpleType name="sup">
+ <xsd:union memberTypes="emType integers xsd:string"/>
+ </xsd:simpleType>
+ <xsd:element name="sup" type="sup"/>
+
+ <!-- list of union of union -->
+ <xsd:simpleType name="supervisoryTitle">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Specialist"/>
+ <xsd:enumeration value="Director"/>
+ <xsd:enumeration value="Manager"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="nonSupervisoryTitle">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Accountant"/>
+ <xsd:enumeration value="Secretary"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="title">
+ <xsd:union memberTypes="supervisoryTitle nonSupervisoryTitle"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="field">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Department"/>
+ <xsd:enumeration value="Personnel"/>
+ <xsd:enumeration value="Computer"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="codeItem">
+ <xsd:union memberTypes="field title"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="code">
+ <xsd:list itemType="codeItem"/>
+ </xsd:simpleType>
+ <xsd:element name="code" type="code"/>
+
+ <xsd:element name="span" type="xsd:string"/>
+
+ <xsd:complexType name="var" mixed="true">
+ <xsd:sequence>
+ <xsd:element ref="span" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="var" type="var"/>
+
+ <xsd:simpleType name="dirType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="ltr"/>
+ <xsd:enumeration value="rtl"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="acronym">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="class" type="classType" use="optional"/>
+ <xsd:attribute name="title" type="xsd:string" use="optional"/>
+ <xsd:attribute name="id" type="xsd:ID" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/test/testcases/tests/level3/ls/files/namespaces1.xml b/test/testcases/tests/level3/ls/files/namespaces1.xml new file mode 100644 index 0000000..45a188b --- /dev/null +++ b/test/testcases/tests/level3/ls/files/namespaces1.xml @@ -0,0 +1 @@ +<bad:ns:tag/>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/pibase.xml b/test/testcases/tests/level3/ls/files/pibase.xml new file mode 100644 index 0000000..36d7cb2 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/pibase.xml @@ -0,0 +1,10 @@ +<!DOCTYPE root [ +<!ELEMENT root (one, more)> +<!ELEMENT one (two)> +<!ELEMENT two EMPTY> +<!ELEMENT more EMPTY> +<!ENTITY e SYSTEM 'subdir/myentity.ent'> +]> +<root> +&e; +</root>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/schematype1.xml b/test/testcases/tests/level3/ls/files/schematype1.xml new file mode 100644 index 0000000..de17a17 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/schematype1.xml @@ -0,0 +1,2 @@ +<elt0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="validateschema1.xml"/> diff --git a/test/testcases/tests/level3/ls/files/subdir/CVS/Entries b/test/testcases/tests/level3/ls/files/subdir/CVS/Entries new file mode 100644 index 0000000..b65eed8 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/subdir/CVS/Entries @@ -0,0 +1,2 @@ +/myentity.ent/1.1/Fri Apr 3 02:47:57 2009/-kb/ +D diff --git a/test/testcases/tests/level3/ls/files/subdir/CVS/Repository b/test/testcases/tests/level3/ls/files/subdir/CVS/Repository new file mode 100644 index 0000000..544ad2e --- /dev/null +++ b/test/testcases/tests/level3/ls/files/subdir/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/ls/files/subdir diff --git a/test/testcases/tests/level3/ls/files/subdir/CVS/Root b/test/testcases/tests/level3/ls/files/subdir/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/ls/files/subdir/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/ls/files/subdir/CVS/Template b/test/testcases/tests/level3/ls/files/subdir/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/subdir/CVS/Template diff --git a/test/testcases/tests/level3/ls/files/subdir/myentity.ent b/test/testcases/tests/level3/ls/files/subdir/myentity.ent new file mode 100644 index 0000000..2046b58 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/subdir/myentity.ent @@ -0,0 +1,5 @@ +<one>
+ <two/>
+</one>
+<?pi 3.14159?>
+<more/>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/svgtest.js b/test/testcases/tests/level3/ls/files/svgtest.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/svgtest.js diff --git a/test/testcases/tests/level3/ls/files/svgunit.js b/test/testcases/tests/level3/ls/files/svgunit.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/svgunit.js diff --git a/test/testcases/tests/level3/ls/files/test0.svg b/test/testcases/tests/level3/ls/files/test0.svg new file mode 100644 index 0000000..84e7c9b --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test0.svg @@ -0,0 +1,11 @@ +<?xml version="1.0"?>
+<!DOCTYPE svg [
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns='http://www.w3.org/2000/svg'><rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+ <elt0 xmlns="http://www.example.com">
+ <elt1>the first element elt1</elt1><elt1>the second element elt1</elt1>
+ <elt2/>
+ </elt0>
+</svg>
diff --git a/test/testcases/tests/level3/ls/files/test0.xml b/test/testcases/tests/level3/ls/files/test0.xml new file mode 100644 index 0000000..039777a --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test0.xml @@ -0,0 +1,5 @@ +<?xml version="1.0"?>
+ <elt0>
+ <elt1>the first element elt1</elt1><elt1>the second element elt1</elt1>
+ <elt2/>
+ </elt0>
diff --git a/test/testcases/tests/level3/ls/files/test1.xml b/test/testcases/tests/level3/ls/files/test1.xml new file mode 100644 index 0000000..0bdbedc --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test1.xml @@ -0,0 +1 @@ +<?xml version="1.0"?><elt0><elt1>remove me</elt1></elt0>
diff --git a/test/testcases/tests/level3/ls/files/test2.xml b/test/testcases/tests/level3/ls/files/test2.xml new file mode 100644 index 0000000..157a6ef --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test2.xml @@ -0,0 +1 @@ +<elt2><elt3>an element</elt3></elt2>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/test3.xml b/test/testcases/tests/level3/ls/files/test3.xml new file mode 100644 index 0000000..16b9953 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test3.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?>
+<!DOCTYPE elt0 [
+
+ <!ELEMENT elt0 (elt1+)>
+
+ <!ELEMENT elt1 (#PCDATA)>
+ <!ATTLIST elt1 attr1 CDATA #FIXED "attr1">
+
+]>
+ <elt0>
+ <elt1>an element</elt1>
+ </elt0>
diff --git a/test/testcases/tests/level3/ls/files/test4.xml b/test/testcases/tests/level3/ls/files/test4.xml new file mode 100644 index 0000000..24eedc6 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test4.xml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<!DOCTYPE elt0 [ + + <!ELEMENT elt0 (elt1+,elt2?)> + + <!ELEMENT elt1 (#PCDATA)> + <!ELEMENT elt2 EMPTY> + <!ENTITY ref SYSTEM "test5.xml"> +]> + <elt0> + <elt1>first elt1</elt1> + &ref; + </elt0> diff --git a/test/testcases/tests/level3/ls/files/test5.xml b/test/testcases/tests/level3/ls/files/test5.xml new file mode 100644 index 0000000..a6b2915 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test5.xml @@ -0,0 +1 @@ +<elt1>second elt1</elt1>
diff --git a/test/testcases/tests/level3/ls/files/test7.xml b/test/testcases/tests/level3/ls/files/test7.xml new file mode 100644 index 0000000..5d4853e --- /dev/null +++ b/test/testcases/tests/level3/ls/files/test7.xml @@ -0,0 +1,18 @@ +<?xml version="1.0"?>
+<!DOCTYPE elt0 [
+
+ <!ELEMENT elt0 (elt1+)>
+ <!ATTLIST elt0 base CDATA #IMPLIED>
+
+ <!ENTITY logo SYSTEM "logo.png" NDATA PNG>
+ <!NOTATION PNG SYSTEM "image/png">
+
+ <!ELEMENT elt1 (#PCDATA)>
+ <!ATTLIST elt1 source ENTITY #REQUIRED>
+
+ <!ENTITY ref PUBLIC "-//X-Hive//native xml storage//EN" "test5.xml">
+]>
+ <elt0 base="base">
+ <elt1 source="logo">first elt1</elt1>
+ &ref;
+ </elt0>
diff --git a/test/testcases/tests/level3/ls/files/testpdf.pdf b/test/testcases/tests/level3/ls/files/testpdf.pdf new file mode 100644 index 0000000..039777a --- /dev/null +++ b/test/testcases/tests/level3/ls/files/testpdf.pdf @@ -0,0 +1,5 @@ +<?xml version="1.0"?>
+ <elt0>
+ <elt1>the first element elt1</elt1><elt1>the second element elt1</elt1>
+ <elt2/>
+ </elt0>
diff --git a/test/testcases/tests/level3/ls/files/testsvg.dtd b/test/testcases/tests/level3/ls/files/testsvg.dtd new file mode 100644 index 0000000..3555b90 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/testsvg.dtd @@ -0,0 +1,13 @@ +<!ELEMENT svg (rect, script, (elt0|elt1)*)>
+<!ATTLIST svg
+ xmlns CDATA #FIXED "http://www.w3.org/2000/svg"
+ name CDATA #IMPLIED>
+<!ELEMENT rect EMPTY>
+<!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script type CDATA #IMPLIED>
+
diff --git a/test/testcases/tests/level3/ls/files/unsupportedencoding1.xml b/test/testcases/tests/level3/ls/files/unsupportedencoding1.xml new file mode 100644 index 0000000..7f296ef --- /dev/null +++ b/test/testcases/tests/level3/ls/files/unsupportedencoding1.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-90210"?> +<html/> diff --git a/test/testcases/tests/level3/ls/files/validate1.xml b/test/testcases/tests/level3/ls/files/validate1.xml new file mode 100644 index 0000000..9d9ab3d --- /dev/null +++ b/test/testcases/tests/level3/ls/files/validate1.xml @@ -0,0 +1,4 @@ +<!DOCTYPE elt0 [ + <!ELEMENT elt0 (elt0)> +]> +<elt0/> diff --git a/test/testcases/tests/level3/ls/files/validateschema1.xml b/test/testcases/tests/level3/ls/files/validateschema1.xml new file mode 100644 index 0000000..72def22 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/validateschema1.xml @@ -0,0 +1,23 @@ +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" > + + <xsd:element name="elt0"> + <xsd:complexType/> + </xsd:element> + +</xsd:schema> + diff --git a/test/testcases/tests/level3/ls/files/wellformed1.xml b/test/testcases/tests/level3/ls/files/wellformed1.xml new file mode 100644 index 0000000..0248e2e --- /dev/null +++ b/test/testcases/tests/level3/ls/files/wellformed1.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<!DOCTYPE html SYSTEM 'xhtml1-strict.dtd'> +<html> + <head><title>wellformed1</title></head> + <body> + <h×2/> + </body> +</html>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/wellformed2.xml b/test/testcases/tests/level3/ls/files/wellformed2.xml new file mode 100644 index 0000000..888a285 --- /dev/null +++ b/test/testcases/tests/level3/ls/files/wellformed2.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<!DOCTYPE html SYSTEM 'xhtml1-strict.dtd'> +<html> + <head><title>Not well-formed</title></head> + <body> + <p wor×ld='bad name'/> + </body> +</html>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/wellformed3.xml b/test/testcases/tests/level3/ls/files/wellformed3.xml new file mode 100644 index 0000000..7f49b2c --- /dev/null +++ b/test/testcases/tests/level3/ls/files/wellformed3.xml @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!DOCTYPE html SYSTEM 'xhtml1-strict.dtd'> +<html> + <head><title>wellformed1</title></head> + <body title="<"> + </body> +</html>
\ No newline at end of file diff --git a/test/testcases/tests/level3/ls/files/xhtml1-strict.dtd b/test/testcases/tests/level3/ls/files/xhtml1-strict.dtd new file mode 100644 index 0000000..c83c35d --- /dev/null +++ b/test/testcases/tests/level3/ls/files/xhtml1-strict.dtd @@ -0,0 +1,65 @@ +<!--
+
+Copyright (c) 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+-->
+
+<!--
+
+This is a radically simplified DTD for use in the DOM Test Suites
+due to a XML non-conformance of one implementation in processing
+parameter entities. When that non-conformance is resolved,
+this DTD can be replaced by the normal DTD for XHTML.
+
+-->
+
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html xmlns CDATA #IMPLIED>
+<!ELEMENT head (meta?,title,script*)>
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ http-equiv CDATA #IMPLIED
+ content CDATA #IMPLIED>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT body (p*)>
+<!ATTLIST body onload CDATA #IMPLIED>
+<!ELEMENT p (#PCDATA|em|strong|code|sup|var|acronym|abbr)*>
+<!ATTLIST p
+ xmlns:dmstc CDATA #IMPLIED
+ xmlns:nm CDATA #IMPLIED
+ xmlns:emp2 CDATA #IMPLIED
+ id ID #IMPLIED
+>
+<!ELEMENT em (#PCDATA)>
+<!ELEMENT span (#PCDATA)>
+<!ELEMENT strong (#PCDATA)>
+<!ELEMENT code (#PCDATA)>
+<!ELEMENT sup (#PCDATA)>
+<!ELEMENT var (#PCDATA|span)*>
+<!ELEMENT acronym (#PCDATA)>
+<!ATTLIST acronym
+ title CDATA #IMPLIED
+ class CDATA #IMPLIED
+ id ID #IMPLIED
+>
+<!ELEMENT abbr (#PCDATA)>
+<!ATTLIST abbr
+ title CDATA #IMPLIED
+ class CDATA #IMPLIED
+ id ID #IMPLIED
+>
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ type CDATA #IMPLIED
+ src CDATA #IMPLIED
+ charset CDATA #IMPLIED>
diff --git a/test/testcases/tests/level3/ls/infoset01.xml b/test/testcases/tests/level3/ls/infoset01.xml new file mode 100644 index 0000000..95677d2 --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset01.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset01"> +<metadata> +<title>infoset01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with a DTD that doesn't match content with infoset=true, should load without complaint. +</description> +<date qualifier="created">2004-03-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-infoset"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="elem" obj="doc"/> +<assertNotNull actual="elem" id="docElemNotNull"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</test> + diff --git a/test/testcases/tests/level3/ls/infoset02.xml b/test/testcases/tests/level3/ls/infoset02.xml new file mode 100644 index 0000000..1ead9c6 --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset02.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset02"> +<metadata> +<title>infoset02</title> +<creator>Curt Arnold</creator> +<description> +Load a document with entities = false and see that entity references are not present in +the element content. +</description> +<date qualifier="created">2004-03-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-infoset"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"acronym"' interface="Document"/> +<item var="elem" obj="elemList" index="1" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="acrContentIsText"/> +</test> + diff --git a/test/testcases/tests/level3/ls/infoset03.xml b/test/testcases/tests/level3/ls/infoset03.xml new file mode 100644 index 0000000..c4cf82c --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset03.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset03"> +<metadata> +<title>infoset03</title> +<creator>Curt Arnold</creator> +<description> +Parse document with infoset set to true. +Check if string values were not normalized per an explicit whitespace=collapse. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-datatype-normalization"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="element" type="Element"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="str" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetXMLSchema" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="childNode" type="Node"/> +<var name="childValue" type="DOMString"/> + +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="xsdNS"/> +<if><isNull obj="lsParser"/> + <createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +</if> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSetValidate"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> +</if> +<canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> +<if><isTrue value="canSetXMLSchema"/> + <setParameter obj="domConfig" name='"schema-type"' value="xsdNS"/> +</if> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"datatype_normalization2"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagNameNS + var="elemList" + obj="doc" + namespaceURI='"http://www.w3.org/1999/xhtml"' + localName='"code"' + interface="Document"/> +<item var="element" obj="elemList" interface="NodeList" index="1"/> +<firstChild var="childNode" obj="element" interface="Node"/> +<nodeValue var="childValue" obj="childNode"/> +<assertEquals actual="childValue" expected='"EMP 0001"' ignoreCase="false" id="content2"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/infoset04.xml b/test/testcases/tests/level3/ls/infoset04.xml new file mode 100644 index 0000000..3c9064d --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset04.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset04"> +<metadata> +<title>infoset04</title> +<creator>Curt Arnold</creator> +<description> +Load a document with infoset = true and see that CDATASection are not present in +the parsed document. +</description> +<date qualifier="created">2004-03-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-infoset"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="pList" type="NodeList"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="pList" obj="doc" tagname='"strong"' interface="Document"/> +<item var="elem" obj="pList" index="1" interface="NodeList"/> +<lastChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="childIsText"/> +</test> + diff --git a/test/testcases/tests/level3/ls/infoset05.xml b/test/testcases/tests/level3/ls/infoset05.xml new file mode 100644 index 0000000..35ce4f0 --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset05.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset05"> +<metadata> +<title>infoset05</title> +<creator>Curt Arnold</creator> +<description> +Load a document with infoset = true and see that attributes for namespace declarations are present. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-infoset"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="node" obj="elem" name='"xmlns:dmstc"'/> +<assertNotNull actual="node" id="nsAttrNotNull"/> +</test> + diff --git a/test/testcases/tests/level3/ls/infoset06.xml b/test/testcases/tests/level3/ls/infoset06.xml new file mode 100644 index 0000000..e78abdc --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset06.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset06"> +<metadata> +<title>infoset06</title> +<creator>Curt Arnold</creator> +<description> +Load a document with infoset and validate = true and check that +element content whitespace is not eliminated. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-infoset"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="elemList" type="NodeList"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate"' value="true"/> +</if> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<firstChild var="node" obj="elem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="3" ignoreCase="false" id="nodeIsText"/> +</test> + diff --git a/test/testcases/tests/level3/ls/infoset07.xml b/test/testcases/tests/level3/ls/infoset07.xml new file mode 100644 index 0000000..741ac3c --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset07.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2001-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset07"> +<metadata> +<title>infoset07</title> +<creator>Curt Arnold</creator> +<description> +Load a document with infoset = true and see that comments are present in +the parsed document. +</description> +<date qualifier="created">2004-03-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-infoset"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<documentElement var="docElem" obj="doc"/> +<previousSibling var="node" obj="docElem" interface="Node"/> +<nodeType var="nodeType" obj="node"/> +<assertEquals actual="nodeType" expected="8" ignoreCase="false" id="nodeIsDocType"/> +</test> + diff --git a/test/testcases/tests/level3/ls/infoset08.xml b/test/testcases/tests/level3/ls/infoset08.xml new file mode 100644 index 0000000..23c6e71 --- /dev/null +++ b/test/testcases/tests/level3/ls/infoset08.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="infoset08"> +<metadata> +<title>infoset08</title> +<creator>Curt Arnold</creator> +<description> +Attempt to load a namespace invalid document with infoset = true. +</description> +<date qualifier="created">2004-03-30</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-infoset"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"infoset"' value="true"/> +<getResourceURI var="resourceURI" href='"namespaces1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +</test> + diff --git a/test/testcases/tests/level3/ls/metadata.xml b/test/testcases/tests/level3/ls/metadata.xml new file mode 100644 index 0000000..c3c6e71 --- /dev/null +++ b/test/testcases/tests/level3/ls/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
+<!--
+Copyright (c) 2003 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+-->
+<!DOCTYPE metadata SYSTEM "dom3.dtd">
+
+<!-- This file contains additional metadata about DOM L3 Validation tests.
+ Allowing additional documentation without modifying the tests themselves. -->
+<metadata xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3">
+</metadata>
diff --git a/test/testcases/tests/level3/ls/namespacedeclarations01.xml b/test/testcases/tests/level3/ls/namespacedeclarations01.xml new file mode 100644 index 0000000..e9b3955 --- /dev/null +++ b/test/testcases/tests/level3/ls/namespacedeclarations01.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="namespacedeclarations01"> +<metadata> +<title>namespacedeclarations01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with namespace-declarations = false and see that attributes +for namespace declarations are not present. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"namespace-declarations"' value="false"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="node" obj="elem" name='"xmlns:dmstc"'/> +<assertNull actual="node" id="nsAttrNull"/> +</test> + diff --git a/test/testcases/tests/level3/ls/namespacedeclarations02.xml b/test/testcases/tests/level3/ls/namespacedeclarations02.xml new file mode 100644 index 0000000..00de26c --- /dev/null +++ b/test/testcases/tests/level3/ls/namespacedeclarations02.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="namespacedeclarations02"> +<metadata> +<title>namespacedeclarations02</title> +<creator>Curt Arnold</creator> +<description> +Load a document with namespace-declarations = true and see that attributes for namespace declarations are present. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations"/> +</metadata> +<var name="doc" type="Document"/> +<var name="docElem" type="Element"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"namespace-declarations"' value="true"/> +<getResourceURI var="resourceURI" href='"hc_staff"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<getElementsByTagName var="elemList" obj="doc" tagname='"p"' interface="Document"/> +<item var="elem" obj="elemList" index="0" interface="NodeList"/> +<getAttributeNode var="node" obj="elem" name='"xmlns:dmstc"'/> +<assertNotNull actual="node" id="nsAttrNotNull"/> +</test> + diff --git a/test/testcases/tests/level3/ls/namespaces01.xml b/test/testcases/tests/level3/ls/namespaces01.xml new file mode 100644 index 0000000..34382be --- /dev/null +++ b/test/testcases/tests/level3/ls/namespaces01.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="namespaces01"> +<metadata> +<title>namespaces01</title> +<creator>Curt Arnold</creator> +<description> +Attempt to load a namespace invalid document with namespaces = true. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-namespaces"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"namespaces"' value="true"/> +<getResourceURI var="resourceURI" href='"namespaces1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +</test> + diff --git a/test/testcases/tests/level3/ls/namespaces02.xml b/test/testcases/tests/level3/ls/namespaces02.xml new file mode 100644 index 0000000..01d514e --- /dev/null +++ b/test/testcases/tests/level3/ls/namespaces02.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="namespaces02"> +<metadata> +<title>namespaces02</title> +<creator>Curt Arnold</creator> +<description> +Attempt to load a namespace invalid document with namespaces = false. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-namespaces"/> +</metadata> +<var name="doc" type="Document"/> +<var name="node" type="Node"/> +<var name="nodeType" type="int"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="docElem" type="Element"/> +<var name="tagName" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"namespaces"' value="false"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"namespaces"' value="false"/> +<getResourceURI var="resourceURI" href='"namespaces1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="tagName" obj="docElem"/> +<assertEquals actual="tagName" expected='"bad:ns:tag"' ignoreCase="false" id="tagName"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/newline01.xml b/test/testcases/tests/level3/ls/newline01.xml new file mode 100644 index 0000000..49da210 --- /dev/null +++ b/test/testcases/tests/level3/ls/newline01.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="newline01"> +<metadata> +<title>newline01</title> +<creator>Curt Arnold</creator> +<description> +LSSerializer.newLine should contain the platform default new line. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSSerializer"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-newLine"/> +</metadata> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="newLine" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<newLine var="newLine" obj="lsSerializer"/> +<assertNotNull actual="newLine" id="newLineNotNull"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/newline02.xml b/test/testcases/tests/level3/ls/newline02.xml new file mode 100644 index 0000000..9bb4999 --- /dev/null +++ b/test/testcases/tests/level3/ls/newline02.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="newline02"> +<metadata> +<title>newline02</title> +<creator>Curt Arnold</creator> +<description> +Setting LSSerializer.newLine should change the value retrieved subsequent calls. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSSerializer"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-newLine"/> +</metadata> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="newLine" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<newLine obj="lsSerializer" value='"crlf"'/> +<newLine var="newLine" obj="lsSerializer"/> +<assertEquals actual="newLine" expected='"crlf"' id="newLine" ignoreCase="false"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/newline03.xml b/test/testcases/tests/level3/ls/newline03.xml new file mode 100644 index 0000000..eea282e --- /dev/null +++ b/test/testcases/tests/level3/ls/newline03.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="newline03"> +<metadata> +<title>newline03</title> +<creator>Curt Arnold</creator> +<description> +Setting LSSerializer.newLine to null should reset the default value. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-DOMImplementationLS-createLSSerializer"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-newLine"/> +</metadata> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="newLine" type="DOMString"/> +<var name="origNewLine" type="DOMString"/> +<var name="nullString" type="DOMString" isNull="true"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<newLine var="origNewLine" obj="lsSerializer"/> +<newLine obj="lsSerializer" value="nullString"/> +<newLine var="newLine" obj="lsSerializer"/> +<assertEquals actual="newLine" expected='origNewLine' id="newLine" ignoreCase="false"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/noinputspecified01.xml b/test/testcases/tests/level3/ls/noinputspecified01.xml new file mode 100644 index 0000000..b01a54b --- /dev/null +++ b/test/testcases/tests/level3/ls/noinputspecified01.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noinputspecified01"> +<metadata> +<title>noinputspecified01</title> +<creator>Curt Arnold</creator> +<description> +Parsing using an uninitialized LSInput should result in a PARSE_ERR. +is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parse"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="lsInput" type="LSInput"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="errorCount" type="int" value="0"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<createLSInput var="lsInput" obj="domImplLS"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parse var="doc" obj="lsParser" input="lsInput"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><greater actual="severity" expected="1"/> + <assertEquals actual="severity" expected="3" id="isFatalError" ignoreCase="false"/> + <assertEquals actual="type" expected='"no-input-specified"' id="noInputSpecified" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/nooutputspecified01.xml b/test/testcases/tests/level3/ls/nooutputspecified01.xml new file mode 100644 index 0000000..80ff02d --- /dev/null +++ b/test/testcases/tests/level3/ls/nooutputspecified01.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nooutputspecified01"> +<metadata> +<title>nooutputspecified01</title> +<creator>Curt Arnold</creator> +<description> +Writing to an uninitialized LSOutput should result in a SERIALIZATION_ERR. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-write"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="lsOutput" type="LSOutput"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="errorCount" type="int" value="0"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="retval" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createLSOutput var="lsOutput" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.w3.org/1999/xhtml"' + qualifiedName='"html"' doctype="docType"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <write var="retval" obj="lsSerializer" nodeArg="doc" destination="lsOutput"/> + </SERIALIZE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><greater actual="severity" expected="1"/> + <assertEquals actual="severity" expected="3" id="isFatalError" ignoreCase="false"/> + <assertEquals actual="type" expected='"no-output-specified"' id="noOutputSpecified" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/normalizecharacters01.xml b/test/testcases/tests/level3/ls/normalizecharacters01.xml new file mode 100644 index 0000000..2561b9c --- /dev/null +++ b/test/testcases/tests/level3/ls/normalizecharacters01.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters01"> +<metadata> +<title>normalizecharacters01</title> +<creator>Curt Arnold</creator> +<description> +Parsing a non-Unicode normalized document not have characters normalized if normalize-characters is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-normalize-characters"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="tagName" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<getResourceURI var="resourceURI" href='"characternormalization1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="tagName" obj="docElem"/> +<assertEquals actual="tagName" expected='"suçon"' ignoreCase="false" id="notNormalized"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/normalizecharacters02.xml b/test/testcases/tests/level3/ls/normalizecharacters02.xml new file mode 100644 index 0000000..5783e07 --- /dev/null +++ b/test/testcases/tests/level3/ls/normalizecharacters02.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters02"> +<metadata> +<title>normalizecharacters02</title> +<creator>Curt Arnold</creator> +<description> +Parsing a non-Unicode normalized document should result in Unicode-normalized content if normalize-characters is true.. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-normalize-characters"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSet" type="boolean"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="tagName" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"normalize-characters"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="true"/> +<getResourceURI var="resourceURI" href='"characternormalization1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="docElem" obj="doc"/> +<tagName var="tagName" obj="docElem"/> +<assertEquals actual="tagName" expected='"suçon"' ignoreCase="false" id="charNormalized"/> +</if> +</test> + + diff --git a/test/testcases/tests/level3/ls/normalizecharacters03.xml b/test/testcases/tests/level3/ls/normalizecharacters03.xml new file mode 100644 index 0000000..e968623 --- /dev/null +++ b/test/testcases/tests/level3/ls/normalizecharacters03.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters03"> +<metadata> +<title>normalizecharacters03</title> +<creator>Curt Arnold</creator> +<description> +Characters should be normalized on serialization if normalize-characters is true. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-normalize-characters"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSet" obj="domConfig" name='"normalize-characters"' value="true"/> +<if><isTrue value="canSet"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"suçon"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="true"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertTrue id="notNormalized"><contains obj="output" str='"suçon"' interface="DOMString"/></assertTrue> +</if> +</test> diff --git a/test/testcases/tests/level3/ls/normalizecharacters04.xml b/test/testcases/tests/level3/ls/normalizecharacters04.xml new file mode 100644 index 0000000..35023fd --- /dev/null +++ b/test/testcases/tests/level3/ls/normalizecharacters04.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="normalizecharacters04"> +<metadata> +<title>normalizecharacters04</title> +<creator>Curt Arnold</creator> +<description> +Characters should be not normalized on serialization if normalize-characters is false. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-normalize-characters"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"suçon"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<setParameter obj="domConfig" name='"normalize-characters"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertTrue id="notNormalized"><contains obj="output" str='"suçon"' interface="DOMString"/></assertTrue> +</test> diff --git a/test/testcases/tests/level3/ls/schemalocation01.xml b/test/testcases/tests/level3/ls/schemalocation01.xml new file mode 100644 index 0000000..cee3ab7 --- /dev/null +++ b/test/testcases/tests/level3/ls/schemalocation01.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schemalocation01"> +<metadata> +<title>schemalocation01</title> +<creator>Curt Arnold</creator> +<description> +Validate a document with no DTD against an externally specified schema that matches its content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-location"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="canSetSchemaLocation" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<getResourceURI var="resourceURI" href='"validateschema1"' contentType="text/xml"/> +<canSetParameter var="canSetSchemaLocation" obj="domConfig" name='"schema-location"' value="resourceURI"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + <isTrue value="canSetSchemaLocation"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"schema-location"' value="resourceURI"/> + <getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <assertNotNull actual="doc" id="docNotNull"/> + <documentElement var="elem" obj="doc"/> + <assertNotNull actual="elem" id="docElemNotNull"/> + <nodeName var="nodeName" obj="elem"/> + <assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/schemalocation02.xml b/test/testcases/tests/level3/ls/schemalocation02.xml new file mode 100644 index 0000000..287d724 --- /dev/null +++ b/test/testcases/tests/level3/ls/schemalocation02.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schemalocation02"> +<metadata> +<title>schemalocation02</title> +<creator>Curt Arnold</creator> +<description> +Validate a document with no DTD against an externally specified schema that does not match its content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-location"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="canSetSchemaLocation" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="errorCount" type="int" value="0"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<getResourceURI var="resourceURI" href='"validateschema1"' contentType="text/xml"/> +<canSetParameter var="canSetSchemaLocation" obj="domConfig" name='"schema-location"' value="resourceURI"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + <isTrue value="canSetSchemaLocation"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"schema-location"' value="resourceURI"/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <getResourceURI var="resourceURI" href='"test3"' contentType="text/xml"/> + <assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> + </assertLSException> + <allErrors var="errors" obj="errorMonitor"/> + <for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if><equals actual="severity" expected="2" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> + </for-each> + <assertTrue id="atLeastOneError"><greater actual="errorCount" expected="0"/></assertTrue> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/schemalocation03.xml b/test/testcases/tests/level3/ls/schemalocation03.xml new file mode 100644 index 0000000..235fb95 --- /dev/null +++ b/test/testcases/tests/level3/ls/schemalocation03.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schemalocation03"> +<metadata> +<title>schemalocation03</title> +<creator>Curt Arnold</creator> +<description> +Serialize a document with no DTD against an externally specified schema that matches its content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-location"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="canSetSchemaLocation" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<var name="doctype" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<getResourceURI var="resourceURI" href='"validateschema1"' contentType="text/xml"/> +<canSetParameter var="canSetSchemaLocation" obj="domConfig" name='"schema-location"' value="resourceURI"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + <isTrue value="canSetSchemaLocation"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"schema-location"' value="resourceURI"/> + <createDocument var="doc" obj="domImplLS" namespaceURI="nullNS" qualifiedName='"elt0"' doctype="doctype"/> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/schemalocation04.xml b/test/testcases/tests/level3/ls/schemalocation04.xml new file mode 100644 index 0000000..8eea1ed --- /dev/null +++ b/test/testcases/tests/level3/ls/schemalocation04.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schemalocation04"> +<metadata> +<title>schemalocation04</title> +<creator>Curt Arnold</creator> +<description> +Serialize a document with no DTD against an externally specified schema that matches its content. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-location"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="canSetSchemaLocation" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<var name="doctype" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<getResourceURI var="resourceURI" href='"validateschema1"' contentType="text/xml"/> +<canSetParameter var="canSetSchemaLocation" obj="domConfig" name='"schema-location"' value="resourceURI"/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + <isTrue value="canSetSchemaLocation"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"schema-location"' value="resourceURI"/> + <createDocument var="doc" obj="domImplLS" namespaceURI="nullNS" qualifiedName='"elt2"' doctype="doctype"/> + <assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + </SERIALIZE_ERR> + </assertLSException> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/schematype01.xml b/test/testcases/tests/level3/ls/schematype01.xml new file mode 100644 index 0000000..48b5fd7 --- /dev/null +++ b/test/testcases/tests/level3/ls/schematype01.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schematype01"> +<metadata> +<title>schematype01</title> +<creator>Curt Arnold</creator> +<description> +Specify schema validation for a document with a DTD but no specified schema. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="errorCount" type="int" value="0"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> + <getResourceURI var="resourceURI" href='"test3"' contentType="text/xml"/> + <assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> + </assertLSException> + <allErrors var="errors" obj="errorMonitor"/> + <for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if><equals actual="severity" expected="2" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> + </for-each> + <assertTrue id="atLeastOneError"><greater actual="errorCount" expected="0"/></assertTrue> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/schematype02.xml b/test/testcases/tests/level3/ls/schematype02.xml new file mode 100644 index 0000000..ef87613 --- /dev/null +++ b/test/testcases/tests/level3/ls/schematype02.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schematype02"> +<metadata> +<title>schematype02</title> +<creator>Curt Arnold</creator> +<description> +Specify DTD validation for a document with a matching DTD. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="dtdNS" type="DOMString" value='"http://www.w3.org/TR/REC-xml"'/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='dtdNS'/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='dtdNS'/> + <getResourceURI var="resourceURI" href='"test3"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <assertNotNull actual="doc" id="docNotNull"/> + <documentElement var="elem" obj="doc"/> + <assertNotNull actual="elem" id="docElemNotNull"/> + <nodeName var="nodeName" obj="elem"/> + <assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/schematype03.xml b/test/testcases/tests/level3/ls/schematype03.xml new file mode 100644 index 0000000..4ade8b4 --- /dev/null +++ b/test/testcases/tests/level3/ls/schematype03.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schematype03"> +<metadata> +<title>schematype03</title> +<creator>Curt Arnold</creator> +<description> +Specify schema validation for a document with no DTD but schema location hints. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <getResourceURI var="resourceURI" href='"schematype1"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <assertNotNull actual="doc" id="docNotNull"/> + <documentElement var="elem" obj="doc"/> + <assertNotNull actual="elem" id="docElemNotNull"/> + <nodeName var="nodeName" obj="elem"/> + <assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/schematype04.xml b/test/testcases/tests/level3/ls/schematype04.xml new file mode 100644 index 0000000..2fc6145 --- /dev/null +++ b/test/testcases/tests/level3/ls/schematype04.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="schematype04"> +<metadata> +<title>schematype04</title> +<creator>Curt Arnold</creator> +<description> +Serialize a document with schema validation but no available schema. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="resourceURI" type="DOMString"/> +<var name="canSetValidate" type="boolean"/> +<var name="canSetSchemaType" type="boolean"/> +<var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<var name="doctype" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> +<canSetParameter var="canSetSchemaType" obj="domConfig" name='"schema-type"' value='xsdNS'/> +<if> + <and> + <isTrue value="canSetValidate"/> + <isTrue value="canSetSchemaType"/> + </and> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> + <createDocument var="doc" obj="domImplLS" namespaceURI="nullNS" qualifiedName='"elt0"' doctype="doctype"/> + <assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + </SERIALIZE_ERR> + </assertLSException> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/splitcdatasections01.xml b/test/testcases/tests/level3/ls/splitcdatasections01.xml new file mode 100644 index 0000000..9dcde32 --- /dev/null +++ b/test/testcases/tests/level3/ls/splitcdatasections01.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="splitcdatasections01"> +<metadata> +<title>splitcdatasections01</title> +<creator>Curt Arnold</creator> +<description> +CDATASections containing unrepresentable characters should be split when split-cdata-sections is true. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<createCDATASection var="newNode" obj="doc" data='"this is not ]]> good"'/> +<appendChild var="retNode" obj="docElem" newChild="newNode"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"split-cdata-sections"' value="true"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="true"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertFalse id="notNaive"><contains obj="output" str='"this is not ]]> good"' interface="DOMString"/></assertFalse> +</test> + + diff --git a/test/testcases/tests/level3/ls/splitcdatasections02.xml b/test/testcases/tests/level3/ls/splitcdatasections02.xml new file mode 100644 index 0000000..c74b177 --- /dev/null +++ b/test/testcases/tests/level3/ls/splitcdatasections02.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="splitcdatasections02"> +<metadata> +<title>splitcdatasections02</title> +<creator>Curt Arnold</creator> +<description> +CDATASections containing unrepresentable characters raise a SERIALIZE_ERR when +split-cdata-sections is false and well-formed is true. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="docElem" type="Element"/> +<var name="newNode" type="Node"/> +<var name="output" type="DOMString"/> +<var name="retNode" type="Node"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="errorCount" type="int" value="0"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<documentElement var="docElem" obj="doc"/> +<createCDATASection var="newNode" obj="doc" data='"this is not ]]> good"'/> +<appendChild var="retNode" obj="docElem" newChild="newNode"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"split-cdata-sections"' value="false"/> +<setParameter obj="domConfig" name='"cdata-sections"' value="true"/> +<setParameter obj="domConfig" name='"well-formed"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + </SERIALIZE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><equals actual="type" expected='"wf-invalid-character"' ignoreCase="false"/> + <assertEquals actual="severity" expected="2" ignoreCase="false" id="severityError"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertTrue id="hasWfErrors"><greater actual="errorCount" expected="0"/></assertTrue> +</test> + + diff --git a/test/testcases/tests/level3/ls/unsupportedencoding01.xml b/test/testcases/tests/level3/ls/unsupportedencoding01.xml new file mode 100644 index 0000000..d0eb19d --- /dev/null +++ b/test/testcases/tests/level3/ls/unsupportedencoding01.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="unsupportedencoding01"> +<metadata> +<title>checkcharacternormalization02</title> +<creator>Curt Arnold</creator> +<description> +Parsing a document with a unsupported encoding should raise a PARSE_ERR and dispatch a "unsupported-encoding" +DOM error. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="resourceURI" type="DOMString"/> +<var name="nullSchemaLanguage" type="DOMString" isNull="true"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<var name="errorCount" type="int" value="0"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaLanguage"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"unsupportedencoding1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <type var="type" obj="error" interface="DOMError"/> + <if><equals actual="type" expected='"unsupported-encoding"' ignoreCase="true"/> + <assertEquals actual="severity" expected="3" id="isError" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneError"/> +</test> + + diff --git a/test/testcases/tests/level3/ls/validate01.xml b/test/testcases/tests/level3/ls/validate01.xml new file mode 100644 index 0000000..9d899c7 --- /dev/null +++ b/test/testcases/tests/level3/ls/validate01.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate01"> +<metadata> +<title>validate01</title> +<creator>Curt Arnold</creator> +<description> +Load a document without a DTD with validate=false, should load without complaint. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"validate"' value="false"/> +<getResourceURI var="resourceURI" href='"test0"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="elem" obj="doc"/> +<assertNotNull actual="elem" id="docElemNotNull"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</test> + diff --git a/test/testcases/tests/level3/ls/validate02.xml b/test/testcases/tests/level3/ls/validate02.xml new file mode 100644 index 0000000..9071403 --- /dev/null +++ b/test/testcases/tests/level3/ls/validate02.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate02"> +<metadata> +<title>validate02</title> +<creator>Curt Arnold</creator> +<description> +Load a document without a DTD with validate=true, should throw PARSE_ERR. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="canSet" type="boolean"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"test0"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if><equals actual="severity" expected="2" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertTrue id="atLeastOneError"><greater actual="errorCount" expected="0"/></assertTrue> +</if> +</test> diff --git a/test/testcases/tests/level3/ls/validate03.xml b/test/testcases/tests/level3/ls/validate03.xml new file mode 100644 index 0000000..12e0108 --- /dev/null +++ b/test/testcases/tests/level3/ls/validate03.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate03"> +<metadata> +<title>validate03</title> +<creator>Curt Arnold</creator> +<description> +Load a document with a DTD that doesn't match content with validate=false, should load without complaint. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"validate"' value="false"/> +<getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="elem" obj="doc"/> +<assertNotNull actual="elem" id="docElemNotNull"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</test> + diff --git a/test/testcases/tests/level3/ls/validate04.xml b/test/testcases/tests/level3/ls/validate04.xml new file mode 100644 index 0000000..34a9091 --- /dev/null +++ b/test/testcases/tests/level3/ls/validate04.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate04"> +<metadata> +<title>validate04</title> +<creator>Curt Arnold</creator> +<description> +Load a document with mismatched DTD with validate=true, should throw PARSE_ERR. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="canSet" type="boolean"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if><equals actual="severity" expected="2" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertTrue id="atLeastOneError"><greater actual="errorCount" expected="0"/></assertTrue> +</if> +</test> diff --git a/test/testcases/tests/level3/ls/validate05.xml b/test/testcases/tests/level3/ls/validate05.xml new file mode 100644 index 0000000..805647a --- /dev/null +++ b/test/testcases/tests/level3/ls/validate05.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate05"> +<metadata> +<title>validate05</title> +<creator>Curt Arnold</creator> +<description> +A document without a DTD should serialize without complaint if validate is false. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"validate"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +</test> diff --git a/test/testcases/tests/level3/ls/validate06.xml b/test/testcases/tests/level3/ls/validate06.xml new file mode 100644 index 0000000..a637b35 --- /dev/null +++ b/test/testcases/tests/level3/ls/validate06.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate06"> +<metadata> +<title>validate06</title> +<creator>Curt Arnold</creator> +<description> +A document without a DTD should throw a SERIALIZE_ERR if validate is true. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSet"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + </SERIALIZE_ERR> + </assertLSException> +</if> +</test> diff --git a/test/testcases/tests/level3/ls/validate07.xml b/test/testcases/tests/level3/ls/validate07.xml new file mode 100644 index 0000000..3065835 --- /dev/null +++ b/test/testcases/tests/level3/ls/validate07.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate07"> +<metadata> +<title>validate07</title> +<creator>Curt Arnold</creator> +<description> +Load and serialize a document with a DTD that doesn't match content with validate=false, should load and serialize without complaint. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"validate"' value="false"/> +<getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="elem" obj="doc"/> +<assertNotNull actual="elem" id="docElemNotNull"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"validate"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +</test> + diff --git a/test/testcases/tests/level3/ls/validate08.xml b/test/testcases/tests/level3/ls/validate08.xml new file mode 100644 index 0000000..8272054 --- /dev/null +++ b/test/testcases/tests/level3/ls/validate08.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validate08"> +<metadata> +<title>validate08</title> +<creator>Curt Arnold</creator> +<description> +Load a document with a DTD that doesn't match content, then attempt to serialize when validate is true which +should result in a SERIALIZE_ERR. +</description> +<date qualifier="created">2004-04-01</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="output" type="DOMString"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate"' value="true"/> +<if><isTrue value="canSet"/> + <setParameter obj="domConfig" name='"validate"' value="true"/> + <createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> + <domConfig obj="lsParser" var="domConfig" interface="LSParser"/> + <setParameter obj="domConfig" name='"validate"' value="false"/> + <getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + <assertLSException id="throw_SERIALIZE_ERR"> + <SERIALIZE_ERR> + <writeToString var="output" obj="lsSerializer" nodeArg="doc"/> + </SERIALIZE_ERR> + </assertLSException> +</if> +</test> + diff --git a/test/testcases/tests/level3/ls/validateifschema01.xml b/test/testcases/tests/level3/ls/validateifschema01.xml new file mode 100644 index 0000000..118fa3d --- /dev/null +++ b/test/testcases/tests/level3/ls/validateifschema01.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validateifschema01"> +<metadata> +<title>validateifschema01</title> +<creator>Curt Arnold</creator> +<description> +Load a document without a DTD with validate-if-schema=false, should load without complaint. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"validate-if-schema"' value="false"/> +<getResourceURI var="resourceURI" href='"test0"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="elem" obj="doc"/> +<assertNotNull actual="elem" id="docElemNotNull"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</test> + diff --git a/test/testcases/tests/level3/ls/validateifschema02.xml b/test/testcases/tests/level3/ls/validateifschema02.xml new file mode 100644 index 0000000..7c53eeb --- /dev/null +++ b/test/testcases/tests/level3/ls/validateifschema02.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validateifschema02"> +<metadata> +<title>validateifschema02</title> +<creator>Curt Arnold</creator> +<description> +Load a document without a DTD with validate-if-schema=true should successfully complete. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="canSet" type="boolean"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate-if-schema"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate-if-schema"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"test0"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<assertLowerSeverity id="noErrors" obj="errorMonitor" severity="SEVERITY_ERROR"/> +<documentElement var="elem" obj="doc"/> +<assertNotNull actual="elem" id="docElemNotNull"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</if> +</test> diff --git a/test/testcases/tests/level3/ls/validateifschema03.xml b/test/testcases/tests/level3/ls/validateifschema03.xml new file mode 100644 index 0000000..5dd1aa7 --- /dev/null +++ b/test/testcases/tests/level3/ls/validateifschema03.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validateifschema03"> +<metadata> +<title>validateifschema03</title> +<creator>Curt Arnold</creator> +<description> +Load a document with a DTD that doesn't match content with validate-if-schema=false, should load without complaint. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"validate-if-schema"' value="false"/> +<getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> +<parseURI var="doc" obj="lsParser" uri="resourceURI"/> +<assertNotNull actual="doc" id="docNotNull"/> +<documentElement var="elem" obj="doc"/> +<assertNotNull actual="elem" id="docElemNotNull"/> +<nodeName var="nodeName" obj="elem"/> +<assertEquals actual="nodeName" expected='"elt0"' ignoreCase="false" id="docElemName"/> +</test> + diff --git a/test/testcases/tests/level3/ls/validateifschema04.xml b/test/testcases/tests/level3/ls/validateifschema04.xml new file mode 100644 index 0000000..90f504d --- /dev/null +++ b/test/testcases/tests/level3/ls/validateifschema04.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validateifschema04"> +<metadata> +<title>validateifschema04</title> +<creator>Curt Arnold</creator> +<description> +Load a document with mismatched DTD with validate-if-schema=true, should throw PARSE_ERR. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="canSet" type="boolean"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<canSetParameter var="canSet" obj="domConfig" name='"validate-if-schema"' value="true"/> +<if><isTrue value="canSet"/> +<setParameter obj="domConfig" name='"validate-if-schema"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"validate1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <severity var="severity" obj="error"/> + <if><equals actual="severity" expected="2" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertTrue id="atLeastOneError"><greater actual="errorCount" expected="0"/></assertTrue> +</if> +</test> diff --git a/test/testcases/tests/level3/ls/wellformed01.xml b/test/testcases/tests/level3/ls/wellformed01.xml new file mode 100644 index 0000000..2dcd46e --- /dev/null +++ b/test/testcases/tests/level3/ls/wellformed01.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="wellformed01"> +<metadata> +<title>wellformed01</title> +<creator>Curt Arnold</creator> +<description> +Load a document with an invalid character in a tagname. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"well-formed"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"wellformed1"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <type interface="DOMError" var="type" obj="error"/> + <severity var="severity" obj="error"/> + <if><greater actual="severity" expected="1"/> + <assertEquals actual="type" expected='"wf-invalid-character-in-node-name"' ignoreCase="false" id="type"/> + <assertEquals actual="severity" expected="2" id="severityError" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneWFError"/> +</test> + diff --git a/test/testcases/tests/level3/ls/wellformed02.xml b/test/testcases/tests/level3/ls/wellformed02.xml new file mode 100644 index 0000000..68310e3 --- /dev/null +++ b/test/testcases/tests/level3/ls/wellformed02.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="wellformed02"> +<metadata> +<title>wellformed02</title> +<creator>Curt Arnold</creator> +<description> +Load a document with an invalid character in an attribute name. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"well-formed"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"wellformed2"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <type interface="DOMError" var="type" obj="error"/> + <severity var="severity" obj="error"/> + <if><greater actual="severity" expected="1"/> + <assertEquals actual="type" expected='"wf-invalid-character-in-node-name"' ignoreCase="false" id="type"/> + <assertEquals actual="severity" expected="2" id="severityError" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneWFError"/> +</test> + diff --git a/test/testcases/tests/level3/ls/wellformed03.xml b/test/testcases/tests/level3/ls/wellformed03.xml new file mode 100644 index 0000000..4c6faaf --- /dev/null +++ b/test/testcases/tests/level3/ls/wellformed03.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="wellformed03"> +<metadata> +<title>wellformed03</title> +<creator>Curt Arnold</creator> +<description> +Load a document with an invalid character in an attribute value, should throw a PARSE_ERR and +dispatch a DOMError with type 'wf-invalid-character'. +</description> +<date qualifier="created">2004-03-29</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-parseURI"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed"/> +</metadata> +<var name="doc" type="Document"/> +<var name="elem" type="Element"/> +<var name="node" type="Node"/> +<var name="nodeName" type="DOMString"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsParser" type="LSParser"/> +<var name="nullSchemaType" type="DOMString" isNull="true"/> +<var name="resourceURI" type="DOMString"/> +<var name="errorMonitor" type="DOMErrorMonitor"/> +<var name="errors" type="List"/> +<var name="error" type="DOMError"/> +<var name="errorCount" type="int" value="0"/> +<var name="severity" type="int"/> +<var name="type" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSParser var="lsParser" obj="domImplLS" mode="1" schemaType="nullSchemaType"/> +<domConfig obj="lsParser" var="domConfig" interface="LSParser"/> +<setParameter obj="domConfig" name='"well-formed"' value="true"/> +<setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> +<getResourceURI var="resourceURI" href='"wellformed3"' contentType="text/xml"/> +<assertLSException id="throw_PARSE_ERR"> + <PARSE_ERR> + <parseURI var="doc" obj="lsParser" uri="resourceURI"/> + </PARSE_ERR> +</assertLSException> +<allErrors var="errors" obj="errorMonitor"/> +<for-each member="error" collection="errors"> + <type interface="DOMError" var="type" obj="error"/> + <severity var="severity" obj="error"/> + <if><equals actual="type" expected='"wf-invalid-character"' ignoreCase="false"/> + <assertEquals actual="severity" expected="2" id="severityError" ignoreCase="false"/> + <increment var="errorCount" value="1"/> + </if> +</for-each> +<assertEquals actual="errorCount" expected="1" ignoreCase="false" id="oneWFError"/> +</test> + diff --git a/test/testcases/tests/level3/ls/writeToURI1.xml b/test/testcases/tests/level3/ls/writeToURI1.xml new file mode 100644 index 0000000..96ef040 --- /dev/null +++ b/test/testcases/tests/level3/ls/writeToURI1.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="writeToURI1"> + <metadata> + <title>writeToURI1</title> + <creator>Curt Arnold</creator> + <description>Writes a document to a URL for a temporary file + using LSSerializer.writeToURI and rereads the document.</description> + <date qualifier="created">2003-12-30</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToURI"/> + </metadata> + <implementationAttribute name="validating" value="false"/> + + <var name="testDoc" type="Document"/> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <var name="serializer" type="LSSerializer"/> + <var name="systemId" type="DOMString"/> + <var name="checkSystemId" type="DOMString"/> + <var name="status" type="boolean"/> + <var name="input" type="LSInput"/> + <var name="parser" type="LSParser"/> + <var name="checkDoc" type="Document"/> + <var name="docElem" type="Element"/> + <var name="docElemName" type="DOMString"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <load var="testDoc" href="test0" willBeModified="false"/> + <implementation var="domImpl"/> + + <createTempURI var="systemId" scheme="file"/> + + <!-- create a serializer and write a test document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <writeToURI var="status" obj="serializer" nodeArg="testDoc" uri="systemId"/> + <assertTrue actual="status" id="writeStatus"/> + + <!-- read the serialized document --> + <createLSInput var="input" obj="domImpl"/> + <systemId obj="input" value="systemId" interface="LSInput"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <parse var="checkDoc" obj="parser" input="input"/> + <assertNotNull actual="checkDoc" id="checkNotNull"/> + <documentElement var="docElem" obj="checkDoc"/> + <nodeName var="docElemName" obj="docElem"/> + <assertEquals expected='"elt0"' actual="docElemName" id="checkDocElemName" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/writeToURI2.xml b/test/testcases/tests/level3/ls/writeToURI2.xml new file mode 100644 index 0000000..89509bd --- /dev/null +++ b/test/testcases/tests/level3/ls/writeToURI2.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="writeToURI2"> + <metadata> + <title>writeToURI2</title> + <creator>Curt Arnold</creator> + <description>Writes a document to a URL for a http server + using LSSerializer.writeToURI and rereads the document.</description> + <date qualifier="created">2003-12-30</date> + <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToURI"/> + </metadata> + <implementationAttribute name="validating" value="false"/> + + <var name="testDoc" type="Document"/> + <var name="domImpl" type="DOMImplementationLS"/> + <var name="output" type="LSOutput"/> + <var name="serializer" type="LSSerializer"/> + <var name="systemId" type="DOMString"/> + <var name="checkSystemId" type="DOMString"/> + <var name="status" type="boolean"/> + <var name="input" type="LSInput"/> + <var name="parser" type="LSParser"/> + <var name="checkDoc" type="Document"/> + <var name="docElem" type="Element"/> + <var name="docElemName" type="DOMString"/> + <var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/> + + <load var="testDoc" href="test0" willBeModified="false"/> + <implementation var="domImpl"/> + + <createTempURI var="systemId" scheme="http"/> + + <!-- create a serializer and write a test document --> + <createLSSerializer var="serializer" obj="domImpl"/> + <writeToURI var="status" obj="serializer" nodeArg="testDoc" uri="systemId"/> + <assertTrue actual="status" id="writeStatus"/> + + <!-- read the serialized document --> + <createLSInput var="input" obj="domImpl"/> + <systemId obj="input" value="systemId" interface="LSInput"/> + <createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/> + <parse var="checkDoc" obj="parser" input="input"/> + <assertNotNull actual="checkDoc" id="checkNotNull"/> + <documentElement var="docElem" obj="checkDoc"/> + <nodeName var="docElemName" obj="docElem"/> + <assertEquals expected='"elt0"' actual="docElemName" id="checkDocElemName" ignoreCase="false"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/ls/xmldeclaration01.xml b/test/testcases/tests/level3/ls/xmldeclaration01.xml new file mode 100644 index 0000000..c5d1939 --- /dev/null +++ b/test/testcases/tests/level3/ls/xmldeclaration01.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="xmldeclaration01"> +<metadata> +<title>xmldeclaration01</title> +<creator>Curt Arnold</creator> +<description> +XML declarations should be serialized if xml-declaration is true. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-xml-declaration"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"xml-declaration"' value="true"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertTrue id="containsXMLDecl"><contains obj="output" str='"<?xml"' interface="DOMString"/></assertTrue> +<assertTrue id="containsUTF16"><contains obj="output" str='"UTF-16"' interface="DOMString"/></assertTrue> +<assertTrue id="contains1_0"><contains obj="output" str='"1.0"' interface="DOMString"/></assertTrue> +</test> + + diff --git a/test/testcases/tests/level3/ls/xmldeclaration02.xml b/test/testcases/tests/level3/ls/xmldeclaration02.xml new file mode 100644 index 0000000..ce391b1 --- /dev/null +++ b/test/testcases/tests/level3/ls/xmldeclaration02.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="xmldeclaration02"> +<metadata> +<title>xmldeclaration02</title> +<creator>Curt Arnold</creator> +<description> +XML declarations should not be serialized if xml-declaration is false. +</description> +<date qualifier="created">2004-03-31</date> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSSerializer-writeToString"/> +<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#parameter-xml-declaration"/> +</metadata> +<var name="doc" type="Document"/> +<var name="domConfig" type="DOMConfiguration"/> +<var name="domImplLS" type="DOMImplementationLS"/> +<var name="lsSerializer" type="LSSerializer"/> +<var name="docType" type="DocumentType" isNull="true"/> +<var name="output" type="DOMString"/> +<implementation var="domImplLS"/> +<createLSSerializer var="lsSerializer" obj="domImplLS"/> +<createDocument var="doc" obj="domImplLS" namespaceURI='"http://www.example.org"' + qualifiedName='"test"' doctype="docType"/> +<domConfig obj="lsSerializer" var="domConfig" interface="LSSerializer"/> +<setParameter obj="domConfig" name='"xml-declaration"' value="false"/> +<writeToString var="output" obj="lsSerializer" nodeArg="doc"/> +<assertFalse id="containsXMLDecl"><contains obj="output" str='"<?xml"' interface="DOMString"/></assertFalse> +<assertFalse id="containsUTF16"><contains obj="output" str='"UTF-16"' interface="DOMString"/></assertFalse> +<assertFalse id="contains1_0"><contains obj="output" str='"1.0"' interface="DOMString"/></assertFalse> +</test> + + diff --git a/test/testcases/tests/level3/validation/.cvsignore b/test/testcases/tests/level3/validation/.cvsignore new file mode 100644 index 0000000..182530a --- /dev/null +++ b/test/testcases/tests/level3/validation/.cvsignore @@ -0,0 +1,3 @@ +dom3.dtd +dom3.xsd +test-to-html.xsl diff --git a/test/testcases/tests/level3/validation/CVS/Entries b/test/testcases/tests/level3/validation/CVS/Entries new file mode 100644 index 0000000..6b23816 --- /dev/null +++ b/test/testcases/tests/level3/validation/CVS/Entries @@ -0,0 +1,47 @@ +D/files//// +/.cvsignore/1.1/Fri Apr 3 02:47:58 2009// +/allowedAttributes.xml/1.6/Fri Apr 3 02:47:58 2009// +/allowedChildren.xml/1.6/Fri Apr 3 02:47:58 2009// +/allowedFirstChildren.xml/1.3/Fri Apr 3 02:47:58 2009// +/allowedNextSiblings.xml/1.5/Fri Apr 3 02:47:58 2009// +/allowedParents.xml/1.3/Fri Apr 3 02:47:58 2009// +/allowedPreviousSiblings.xml/1.5/Fri Apr 3 02:47:58 2009// +/alltests.xml/1.5/Fri Apr 3 02:47:58 2009// +/canAppendChildFalse.xml/1.4/Fri Apr 3 02:47:58 2009// +/canAppendChildTrue.xml/1.4/Fri Apr 3 02:47:58 2009// +/canAppendData.xml/1.4/Fri Apr 3 02:47:58 2009// +/canDeleteData.xml/1.4/Fri Apr 3 02:47:58 2009// +/canInsertBeforeFalse.xml/1.4/Fri Apr 3 02:47:58 2009// +/canInsertBeforeTrue.xml/1.4/Fri Apr 3 02:47:58 2009// +/canInsertData.xml/1.4/Fri Apr 3 02:47:58 2009// +/canRemoveAttributeFalse.xml/1.3/Fri Apr 3 02:47:58 2009// +/canRemoveAttributeNS.xml/1.4/Fri Apr 3 02:47:58 2009// +/canRemoveAttributeNode.xml/1.3/Fri Apr 3 02:47:58 2009// +/canRemoveAttributeTrue.xml/1.3/Fri Apr 3 02:47:58 2009// +/canRemoveChildFalse.xml/1.3/Fri Apr 3 02:47:58 2009// +/canRemoveChildTrue.xml/1.3/Fri Apr 3 02:47:58 2009// +/canReplaceChildFalse.xml/1.4/Fri Apr 3 02:47:58 2009// +/canReplaceChildTrue.xml/1.4/Fri Apr 3 02:47:58 2009// +/canReplaceDataFalse.xml/1.4/Fri Apr 3 02:47:58 2009// +/canReplaceDataTrue.xml/1.4/Fri Apr 3 02:47:58 2009// +/canSetAttributeFalse.xml/1.3/Fri Apr 3 02:47:58 2009// +/canSetAttributeNS.xml/1.4/Fri Apr 3 02:47:58 2009// +/canSetAttributeNode.xml/1.3/Fri Apr 3 02:47:58 2009// +/canSetAttributeTrue.xml/1.3/Fri Apr 3 02:47:58 2009// +/canSetData.xml/1.4/Fri Apr 3 02:47:58 2009// +/contentType.xml/1.3/Fri Apr 3 02:47:58 2009// +/defaultValue.xml/1.3/Fri Apr 3 02:47:58 2009// +/definedElements.xml/1.6/Fri Apr 3 02:47:58 2009// +/enumeratedValues.xml/1.5/Fri Apr 3 02:47:58 2009// +/getFeature01.xml/1.1/Fri Apr 3 02:47:58 2009// +/getFeature02.xml/1.1/Fri Apr 3 02:47:58 2009// +/hasFeature01.xml/1.1/Fri Apr 3 02:47:58 2009// +/hasFeature02.xml/1.1/Fri Apr 3 02:47:58 2009// +/hasFeature03.xml/1.2/Fri Apr 3 02:47:58 2009// +/hasFeature04.xml/1.1/Fri Apr 3 02:47:58 2009// +/isElementDefined.xml/1.3/Fri Apr 3 02:47:58 2009// +/isElementDefinedNS.xml/1.3/Fri Apr 3 02:47:58 2009// +/metadata.xml/1.1/Fri Apr 3 02:47:58 2009// +/nodeValidity.xml/1.4/Fri Apr 3 02:47:58 2009// +/requiredAttributes.xml/1.3/Fri Apr 3 02:47:58 2009// +/validateDocument.xml/1.3/Fri Apr 3 02:47:58 2009// diff --git a/test/testcases/tests/level3/validation/CVS/Repository b/test/testcases/tests/level3/validation/CVS/Repository new file mode 100644 index 0000000..180e30a --- /dev/null +++ b/test/testcases/tests/level3/validation/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/validation diff --git a/test/testcases/tests/level3/validation/CVS/Root b/test/testcases/tests/level3/validation/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/validation/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/validation/CVS/Template b/test/testcases/tests/level3/validation/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/validation/CVS/Template diff --git a/test/testcases/tests/level3/validation/allowedAttributes.xml b/test/testcases/tests/level3/validation/allowedAttributes.xml new file mode 100644 index 0000000..ac6f9d1 --- /dev/null +++ b/test/testcases/tests/level3/validation/allowedAttributes.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> + +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="allowedAttributes"> +<metadata> + +<title>allowedAttributes</title> +<creator>Kongyi Zhou</creator> +<description> + The method getAllowedAttributes returns the NameList of allowed attributes for + the element. +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#ElementEditVAL-allowedAttributes"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="attrlist" type="NameList"/> +<var name="attname" type="DOMString"/> +<var name="allowedAttributesLength" type="int"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<allowedAttributes obj="root" var="attrlist"/> +<assertNotNull actual="attrlist" id="allowedAttributesNotNull"/> +<length var="allowedAttributesLength" obj="attrlist" interface="NameList"/> +<assertEquals actual="allowedAttributesLength" expected="2" id="allowedAttributes" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level3/validation/allowedChildren.xml b/test/testcases/tests/level3/validation/allowedChildren.xml new file mode 100644 index 0000000..61769a6 --- /dev/null +++ b/test/testcases/tests/level3/validation/allowedChildren.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="allowedChildren"> +<metadata> + +<title>allowedChildren</title> +<creator>Kongyi Zhou</creator> +<description> + The method getAllowedChildren returns the NameList of allowed child elements. + should return NameList of length 7 +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#ElementEditVAL-allowedChildren"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="nlist" type="NameList"/> +<var name="allowedChildrenLength" type="int"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<allowedChildren obj="root" var="nlist"/> +<assertNotNull actual="nlist" id="allowedChildrenNotNull"/> +<length var="allowedChildrenLength" obj="nlist" interface="NameList"/> +<assertEquals actual="allowedChildrenLength" expected="7" id="allowedChildren" ignoreCase="false"/> +</test> + + + diff --git a/test/testcases/tests/level3/validation/allowedFirstChildren.xml b/test/testcases/tests/level3/validation/allowedFirstChildren.xml new file mode 100644 index 0000000..4b7d941 --- /dev/null +++ b/test/testcases/tests/level3/validation/allowedFirstChildren.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="allowedFirstChildren"> +<metadata> + +<title>allowedFirstChildren</title> +<creator>Kongyi Zhou</creator> +<description> + The method getAllowedFirstChildren returns the NameList of allowed first child elements. + should return NameList containing name 'title'. +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#ElementEditVAL-allowedFirstChildElements"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="nlist" type="NameList"/> +<var name="childname" type="DOMString"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<allowedFirstChildren obj="root" var="nlist"/> +<assertNotNull actual="nlist" id="allowedFirstChildrenNotNull"/> +<getName interface="NameList" obj="nlist" index="0" var="childname"/> +<assertEquals actual="childname" expected='"title"' ignoreCase="false" id="allowedFirstChildren"/> +</test> diff --git a/test/testcases/tests/level3/validation/allowedNextSiblings.xml b/test/testcases/tests/level3/validation/allowedNextSiblings.xml new file mode 100644 index 0000000..9f9c55b --- /dev/null +++ b/test/testcases/tests/level3/validation/allowedNextSiblings.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="allowedNextSiblings"> +<metadata> + +<title>allowedNextSiblings</title> +<creator>Kongyi Zhou</creator> +<description> + The method getAllowedNextSiblings return the NameList of elements that may be + inserted, should return empty list. +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#ElementEditVAL-allowedNextSiblings"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elem" type="ElementEditVAL"/> +<var name="nlist" type="NameList"/> +<var name="elemList" type="NodeList"/> +<var name="childname" type="DOMString"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"author"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<allowedNextSiblings obj="elem" var="nlist"/> +<assertNotNull actual="nlist" id="allowedNextSiblingsNotNull"/> +<getName interface="NameList" obj="nlist" index="0" var="childname"/> +<!-- since ISBN is already present, no insertable sibling --> +<assertNull actual="childname" id="noAllowableNextSibling"/> +</test>
\ No newline at end of file diff --git a/test/testcases/tests/level3/validation/allowedParents.xml b/test/testcases/tests/level3/validation/allowedParents.xml new file mode 100644 index 0000000..7b16854 --- /dev/null +++ b/test/testcases/tests/level3/validation/allowedParents.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="allowedParents"> +<metadata> + +<title>allowedParents</title> +<creator>Kongyi Zhou</creator> +<description> + The method getAllowedParents returns the NameList of elements that may be the + the parent of current node + should return NameList containing name 'book'. +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#ElementEditVAL-allowedParents"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elem" type="ElementEditVAL"/> +<var name="nlist" type="NameList"/> +<var name="elemList" type="NodeList"/> +<var name="childname" type="DOMString"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"author"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<allowedParents obj="elem" var="nlist"/> +<assertNotNull actual="nlist" id="allowedParentsNotNull"/> +<getName interface="NameList" obj="nlist" index="0" var="childname"/> +<assertEquals actual="childname" expected='"book"' ignoreCase="false" id="allowedParents"/> +</test> diff --git a/test/testcases/tests/level3/validation/allowedPreviousSiblings.xml b/test/testcases/tests/level3/validation/allowedPreviousSiblings.xml new file mode 100644 index 0000000..8f6bb75 --- /dev/null +++ b/test/testcases/tests/level3/validation/allowedPreviousSiblings.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="allowedPreviousSiblings"> +<metadata> + +<title>allowedPreviousSiblings</title> +<creator>Kongyi Zhou</creator> +<description> + The method getAllowedPreviousSiblings return the NameList of elements that may be the + previous siblings, should return empty list. +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#ElementEditVAL-allowedPreviousSiblings"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elem" type="ElementEditVAL"/> +<var name="nlist" type="NameList"/> +<var name="elemList" type="NodeList"/> +<var name="childname" type="DOMString"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"author"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<allowedPreviousSiblings obj="elem" var="nlist"/> +<assertNotNull actual="nlist" id="allowedPreviousSiblingsNotNull"/> +<getName interface="NameList" obj="nlist" index="0" var="childname"/> +<assertNull actual="childname" id="noPreviousSiblings"/> +</test>
\ No newline at end of file diff --git a/test/testcases/tests/level3/validation/alltests.xml b/test/testcases/tests/level3/validation/alltests.xml new file mode 100644 index 0000000..417ec13 --- /dev/null +++ b/test/testcases/tests/level3/validation/alltests.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> + +<!DOCTYPE suite SYSTEM "dom3.dtd"> + +<suite xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="alltests"> + <metadata> + <title>DOM Level 3 Validation Test Suite</title> + <creator>DOM Test Suite Project</creator> + </metadata> + <suite.member href="allowedAttributes.xml"/> + <suite.member href="allowedChildren.xml"/> + <suite.member href="allowedFirstChildren.xml"/> + <suite.member href="allowedNextSiblings.xml"/> + <suite.member href="allowedParents.xml"/> + <suite.member href="allowedPreviousSiblings.xml"/> + <suite.member href="canAppendChildFalse.xml"/> + <suite.member href="canAppendChildTrue.xml"/> + <suite.member href="canAppendData.xml"/> + <suite.member href="canDeleteData.xml"/> + <suite.member href="canInsertBeforeFalse.xml"/> + <suite.member href="canInsertBeforeTrue.xml"/> + <suite.member href="canInsertData.xml"/> + <suite.member href="canRemoveAttributeFalse.xml"/> + <suite.member href="canRemoveAttributeNS.xml"/> + <suite.member href="canRemoveAttributeNode.xml"/> + <suite.member href="canRemoveAttributeTrue.xml"/> + <suite.member href="canRemoveChildFalse.xml"/> + <suite.member href="canRemoveChildTrue.xml"/> + <suite.member href="canReplaceChildFalse.xml"/> + <suite.member href="canReplaceChildTrue.xml"/> + <suite.member href="canReplaceDataFalse.xml"/> + <suite.member href="canReplaceDataTrue.xml"/> + <suite.member href="canSetAttributeFalse.xml"/> + <suite.member href="canSetAttributeNS.xml"/> + <suite.member href="canSetAttributeNode.xml"/> + <suite.member href="canSetAttributeTrue.xml"/> + <suite.member href="canSetData.xml"/> + <suite.member href="contentType.xml"/> + <suite.member href="defaultValue.xml"/> + <suite.member href="definedElements.xml"/> + <suite.member href="enumeratedValues.xml"/> + <suite.member href="isElementDefined.xml"/> + <suite.member href="isElementDefinedNS.xml"/> + <suite.member href="nodeValidity.xml"/> + <suite.member href="requiredAttributes.xml"/> + <suite.member href="validateDocument.xml"/> + + <suite.member href="hasFeature01.xml"/> + <suite.member href="hasFeature02.xml"/> + <suite.member href="hasFeature03.xml"/> + <suite.member href="hasFeature04.xml"/> + <suite.member href="getFeature01.xml"/> + <suite.member href="getFeature02.xml"/> + +</suite> diff --git a/test/testcases/tests/level3/validation/canAppendChildFalse.xml b/test/testcases/tests/level3/validation/canAppendChildFalse.xml new file mode 100644 index 0000000..c2041d6 --- /dev/null +++ b/test/testcases/tests/level3/validation/canAppendChildFalse.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canAppendChildFalse"> +<metadata> + +<title>canAppendChildFalse</title> +<creator>Kongyi Zhou</creator> +<description> + The method canAppendChild checks with schema to see if the child node can be appended + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canAppendChild"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="newchild" type="Element"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<createElementNS obj="doc" interface="Document" namespaceURI="nullNS" qualifiedName='"editor"' var="newchild"/> +<canAppendChild obj="root" newChild="newchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canAppendChildFalse"/> +</test>
\ No newline at end of file diff --git a/test/testcases/tests/level3/validation/canAppendChildTrue.xml b/test/testcases/tests/level3/validation/canAppendChildTrue.xml new file mode 100644 index 0000000..5f08832 --- /dev/null +++ b/test/testcases/tests/level3/validation/canAppendChildTrue.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canAppendChildTrue"> +<metadata> + +<title>canAppendChildTrue</title> +<creator>Kongyi Zhou</creator> +<description> + The method canAppendChild checks with schema to see if the child node can be appended + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canAppendChild"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="newchild" type="Element"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<createElementNS obj="doc" interface="Document" namespaceURI="nullNS" qualifiedName='"year"' var="newchild"/> +<canAppendChild obj="root" newChild="newchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="canAppendChildTrue"/> +</test>
\ No newline at end of file diff --git a/test/testcases/tests/level3/validation/canAppendData.xml b/test/testcases/tests/level3/validation/canAppendData.xml new file mode 100644 index 0000000..305fa69 --- /dev/null +++ b/test/testcases/tests/level3/validation/canAppendData.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canAppendData"> +<metadata> + +<title>canAppendData</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if given charactors can be appended + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-CharacterDataEditVAL-canAppendData"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="valboolean" type="short"/> +<var name="chars" type="CharacterDataEditVAL"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<firstChild interface="Node" obj="elem" var="chars"/> +<canAppendData obj="chars" arg='"USD60"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canAppendData"/> +</test> diff --git a/test/testcases/tests/level3/validation/canDeleteData.xml b/test/testcases/tests/level3/validation/canDeleteData.xml new file mode 100644 index 0000000..c6ef93a --- /dev/null +++ b/test/testcases/tests/level3/validation/canDeleteData.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canDeleteData"> +<metadata> + +<title>canDeleteData</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if given characters can be deleted from exitsting text + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-CharacterDataEditVAL-canDeleteData"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="valboolean" type="short"/> +<var name="chars" type="CharacterDataEditVAL"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<firstChild interface="Node" obj="elem" var="chars"/> +<canDeleteData obj="chars" offset="0" count="10" var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canDeleteData"/> +</test> diff --git a/test/testcases/tests/level3/validation/canInsertBeforeFalse.xml b/test/testcases/tests/level3/validation/canInsertBeforeFalse.xml new file mode 100644 index 0000000..b060309 --- /dev/null +++ b/test/testcases/tests/level3/validation/canInsertBeforeFalse.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canInsertBeforeFalse"> +<metadata> + +<title>canInsertBeforeFalse</title> +<creator>Kongyi Zhou</creator> +<description> + The method canInsertBefore checks with schema to see if a new child can be inserted + before reference node + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canInsertBefore"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="oldchild" type="Node"/> +<var name="nlist" type="NodeList"/> +<var name="newchild" type="Element"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"ISBN"' var="nlist"/> +<item obj="nlist" index="0" var="oldchild" interface="NodeList"/> +<documentElement obj="doc" var="root"/> +<createElementNS obj="doc" namespaceURI="nullNS" qualifiedName='"editor"' var="newchild"/> +<canInsertBefore obj="root" newChild="newchild" refChild="oldchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canInsertBeforeFalse"/> +</test> diff --git a/test/testcases/tests/level3/validation/canInsertBeforeTrue.xml b/test/testcases/tests/level3/validation/canInsertBeforeTrue.xml new file mode 100644 index 0000000..fb341a7 --- /dev/null +++ b/test/testcases/tests/level3/validation/canInsertBeforeTrue.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canInsertBeforeTrue"> +<metadata> + +<title>canInsertBeforeTrue</title> +<creator>Kongyi Zhou</creator> +<description> + The method canInsertBefore checks with schema to see if a new child can be inserted + before reference node + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canInsertBefore"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="oldchild" type="Node"/> +<var name="refchild" type="Node"/> +<var name="nlist" type="NodeList"/> +<var name="newchild" type="Element"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"ISBN"' var="nlist"/> +<item obj="nlist" index="0" var="refchild" interface="NodeList"/> +<documentElement obj="doc" var="root"/> +<createElementNS obj="doc" namespaceURI="nullNS" qualifiedName='"editor"' var="newchild"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"author"' var="nlist"/> +<item obj="nlist" index="0" var="oldchild" interface="NodeList"/> +<removeChild obj="root" oldChild="oldchild" var="oldchild"/> +<canInsertBefore obj="root" newChild="newchild" refChild="refchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="canInsertBeforeTrue"/> +</test> diff --git a/test/testcases/tests/level3/validation/canInsertData.xml b/test/testcases/tests/level3/validation/canInsertData.xml new file mode 100644 index 0000000..ef17ce3 --- /dev/null +++ b/test/testcases/tests/level3/validation/canInsertData.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canInsertData"> +<metadata> + +<title>canInsertData</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if given characters can be inserted into exitsting text + at given position + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-CharacterDataEditVAL-canInsertData"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="valboolean" type="short"/> +<var name="chars" type="CharacterDataEditVAL"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<firstChild interface="Node" obj="elem" var="chars"/> +<canInsertData obj="chars" offset="0" arg='"USD60"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canInsertData"/> +</test> diff --git a/test/testcases/tests/level3/validation/canRemoveAttributeFalse.xml b/test/testcases/tests/level3/validation/canRemoveAttributeFalse.xml new file mode 100644 index 0000000..b4e86c9 --- /dev/null +++ b/test/testcases/tests/level3/validation/canRemoveAttributeFalse.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canRemoveAttributeFalse"> +<metadata> + +<title>canRemoveAttributeFalse</title> +<creator>Kongyi Zhou</creator> +<description> + The method canSteAttribute checks if the 'inStock' attribute can be removed + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-canRemoveAttribute"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<canRemoveAttribute obj="root" attrname='"inStock"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canRemoveAttributeFalse"/> +</test> diff --git a/test/testcases/tests/level3/validation/canRemoveAttributeNS.xml b/test/testcases/tests/level3/validation/canRemoveAttributeNS.xml new file mode 100644 index 0000000..80e5606 --- /dev/null +++ b/test/testcases/tests/level3/validation/canRemoveAttributeNS.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canRemoveAttributeNS"> +<metadata> + +<title>canRemoveAttributeNS</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if the attribute with given namesapce and name can be removed + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-canRemoveAttributeNS"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<canRemoveAttributeNS obj="root" namespaceURI="nullNS" localName='"inStock"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canRemoveAttributeNS"/> +</test> + + diff --git a/test/testcases/tests/level3/validation/canRemoveAttributeNode.xml b/test/testcases/tests/level3/validation/canRemoveAttributeNode.xml new file mode 100644 index 0000000..892668c --- /dev/null +++ b/test/testcases/tests/level3/validation/canRemoveAttributeNode.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canRemoveAttributeNode"> +<metadata> + +<title>canRemoveAttribute</title> +<creator>Kongyi Zhou</creator> +<description> + The method canRemoveAttributeNode checks if given attribute node can be removed + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-canRemoveAttributeNode"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="attr" type="Attr"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<getAttributeNode obj="root" name='"inStock"' var="attr"/> +<canRemoveAttributeNode obj="root" attrNode="attr" var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canRemoveAttributeNode"/> +</test> diff --git a/test/testcases/tests/level3/validation/canRemoveAttributeTrue.xml b/test/testcases/tests/level3/validation/canRemoveAttributeTrue.xml new file mode 100644 index 0000000..3468828 --- /dev/null +++ b/test/testcases/tests/level3/validation/canRemoveAttributeTrue.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canRemoveAttributeTrue"> +<metadata> + +<title>canRemoveAttributeTrue</title> +<creator>Kongyi Zhou</creator> +<description> + The method canSteAttribute checks if the 'price' attribute can be removed + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-canRemoveAttribute"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<canRemoveAttribute obj="root" attrname='"price"' var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="canRemoveAttributeTrue"/> +</test> diff --git a/test/testcases/tests/level3/validation/canRemoveChildFalse.xml b/test/testcases/tests/level3/validation/canRemoveChildFalse.xml new file mode 100644 index 0000000..6bd0966 --- /dev/null +++ b/test/testcases/tests/level3/validation/canRemoveChildFalse.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canRemoveChildFalse"> +<metadata> + +<title>canRemoveChildFalse</title> +<creator>Kongyi Zhou</creator> +<description> + The method canRemoveChild checks if schema allows the child to be removed + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canRemoveChild"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="oldchild" type="Node"/> +<var name="nlist" type="NodeList"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"ISBN"' var="nlist"/> +<item obj="nlist" index="0" var="oldchild" interface="NodeList"/> +<documentElement obj="doc" var="root"/> +<canRemoveChild obj="root" oldChild="oldchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canRemoveChildFalse"/> +</test> + + + + diff --git a/test/testcases/tests/level3/validation/canRemoveChildTrue.xml b/test/testcases/tests/level3/validation/canRemoveChildTrue.xml new file mode 100644 index 0000000..0fcbe59 --- /dev/null +++ b/test/testcases/tests/level3/validation/canRemoveChildTrue.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canRemoveChildTrue"> +<metadata> + +<title>canRemoveChildTrue</title> +<creator>Kongyi Zhou</creator> +<description> + The method canRemoveChild checks if schema allows the child to be removed + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canRemoveChild"/> +</metadata> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="oldchild" type="Node"/> +<var name="nlist" type="NodeList"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"edition"' var="nlist"/> +<item obj="nlist" index="0" var="oldchild" interface="NodeList"/> +<documentElement obj="doc" var="root"/> +<canRemoveChild obj="root" oldChild="oldchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="canRemoveChildTrue"/> +</test> + + + + diff --git a/test/testcases/tests/level3/validation/canReplaceChildFalse.xml b/test/testcases/tests/level3/validation/canReplaceChildFalse.xml new file mode 100644 index 0000000..1b47e9f --- /dev/null +++ b/test/testcases/tests/level3/validation/canReplaceChildFalse.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canReplaceChildFalse"> +<metadata> + +<title>canReplaceChildFalse</title> +<creator>Kongyi Zhou</creator> +<description> + The method canReplaceChild checks with schema to see if new child 'editor' can replace + old child title + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canReplaceChild"/> +</metadata> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="oldchild" type="Node"/> +<var name="nlist" type="NodeList"/> +<var name="newchild" type="Element"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"title"' var="nlist"/> +<item obj="nlist" index="0" var="oldchild" interface="NodeList"/> +<documentElement obj="doc" var="root"/> +<createElementNS obj="doc" namespaceURI="nullNS" qualifiedName='"editor"' var="newchild"/> +<canReplaceChild obj="root" newChild="newchild" oldChild="oldchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canReplaceChildFalse"/> +</test>
\ No newline at end of file diff --git a/test/testcases/tests/level3/validation/canReplaceChildTrue.xml b/test/testcases/tests/level3/validation/canReplaceChildTrue.xml new file mode 100644 index 0000000..a74d93a --- /dev/null +++ b/test/testcases/tests/level3/validation/canReplaceChildTrue.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canReplaceChildTrue"> +<metadata> + +<title>canReplaceChildTrue</title> +<creator>Kongyi Zhou</creator> +<description> + The method canReplaceChild checks with schema to see if new child 'editor' can replace + old child 'author' + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-NodeEditVAL-canReplaceChild"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="oldchild" type="Node"/> +<var name="nlist" type="NodeList"/> +<var name="newchild" type="Element"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" tagname='"author"' var="nlist"/> +<item obj="nlist" index="0" var="oldchild" interface="NodeList"/> +<documentElement obj="doc" var="root"/> +<createElementNS obj="doc" namespaceURI="nullNS" qualifiedName='"editor"' var="newchild"/> +<canReplaceChild obj="root" newChild="newchild" oldChild="oldchild" var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="canReplaceChildTrue"/> +</test>
\ No newline at end of file diff --git a/test/testcases/tests/level3/validation/canReplaceDataFalse.xml b/test/testcases/tests/level3/validation/canReplaceDataFalse.xml new file mode 100644 index 0000000..2f91b83 --- /dev/null +++ b/test/testcases/tests/level3/validation/canReplaceDataFalse.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canReplaceDataFalse"> +<metadata> + +<title>canReplaceDataFalse</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if given characters can replace exitsting text + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-CharacterDataEditVAL-canReplaceData"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="valboolean" type="short"/> +<var name="chars" type="CharacterDataEditVAL"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<firstChild interface="Node" obj="elem" var="chars"/> +<canReplaceData obj="chars" offset="0" count="5" arg='"2nd"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canReplaceDataFalse"/> +</test> diff --git a/test/testcases/tests/level3/validation/canReplaceDataTrue.xml b/test/testcases/tests/level3/validation/canReplaceDataTrue.xml new file mode 100644 index 0000000..7400e7b --- /dev/null +++ b/test/testcases/tests/level3/validation/canReplaceDataTrue.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canReplaceDataTrue"> +<metadata> + +<title>canReplaceDataTrue</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if given characters can replace exitsting text + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-CharacterDataEditVAL-canReplaceData"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="valboolean" type="short"/> +<var name="chars" type="CharacterDataEditVAL"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<firstChild interface="Node" obj="elem" var="chars"/> +<canReplaceData obj="chars" offset="0" count="6" arg='"First"' var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="canReplaceDataTrue"/> +</test> diff --git a/test/testcases/tests/level3/validation/canSetAttributeFalse.xml b/test/testcases/tests/level3/validation/canSetAttributeFalse.xml new file mode 100644 index 0000000..c2c9d17 --- /dev/null +++ b/test/testcases/tests/level3/validation/canSetAttributeFalse.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canSetAttributeFalse"> +<metadata> + +<title>canSetAttributeFalse</title> +<creator>Kongyi Zhou</creator> +<description> + The method canSetAttribute checks if a new attribute 'attr' can be set + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-ElementEditVAL-canSetAttribute"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<canSetAttribute obj="root" attrname='"attr"' attrval='"No"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canSetAttributeFalse"/> +</test> diff --git a/test/testcases/tests/level3/validation/canSetAttributeNS.xml b/test/testcases/tests/level3/validation/canSetAttributeNS.xml new file mode 100644 index 0000000..d060237 --- /dev/null +++ b/test/testcases/tests/level3/validation/canSetAttributeNS.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canSetAttributeNS"> +<metadata> + +<title>canSetAttributeNS</title> +<creator>Kongyi Zhou</creator> +<description> + The method canSetAttributeNS checks if an attribute with given namespace and name can be set + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-canSetAttributeNS"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="nullNS" type="DOMString" isNull="true"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<canSetAttributeNS obj="root" namespaceURI="nullNS" qualifiedName='"inStock"' value ='"out"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canSetAttributeNS"/> +</test> + diff --git a/test/testcases/tests/level3/validation/canSetAttributeNode.xml b/test/testcases/tests/level3/validation/canSetAttributeNode.xml new file mode 100644 index 0000000..f713bf2 --- /dev/null +++ b/test/testcases/tests/level3/validation/canSetAttributeNode.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canSetAttributeNode"> +<metadata> + +<title>canSetAttributeNode</title> +<creator>Kongyi Zhou</creator> +<description> + The method canSteAttribute checks if a new attribute node 'attname' can be set + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-canSetAttributeNode"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> +<var name="attr" type="Attr"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<createAttribute obj="doc" var="attr" name='"attname"'/> +<canSetAttributeNode obj="root" attrNode="attr" var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canSetAttributeNode"/> +</test> diff --git a/test/testcases/tests/level3/validation/canSetAttributeTrue.xml b/test/testcases/tests/level3/validation/canSetAttributeTrue.xml new file mode 100644 index 0000000..863ec84 --- /dev/null +++ b/test/testcases/tests/level3/validation/canSetAttributeTrue.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canSetAttributeTrue"> +<metadata> + +<title>canSetAttributeTrue</title> +<creator>Kongyi Zhou</creator> +<description> + The method canSetAttribute checks if value attribute 'inStock' can be set + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-ElementEditVAL-canSetAttribute"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<canSetAttribute obj="root" attrname='"inStock"' attrval='"No"' var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="canSetAttributeTrue"/> +</test> diff --git a/test/testcases/tests/level3/validation/canSetData.xml b/test/testcases/tests/level3/validation/canSetData.xml new file mode 100644 index 0000000..e345140 --- /dev/null +++ b/test/testcases/tests/level3/validation/canSetData.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="canSetData"> +<metadata> + +<title>canSetData</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if given characters can be set as the content of element 'edition' + should return VAL_FALSE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-CharacterDataEditVAL-canSetData"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elemList" type="NodeList"/> +<var name="elem" type="Element"/> +<var name="valboolean" type="short"/> +<var name="chars" type="CharacterDataEditVAL"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<firstChild interface="Node" obj="elem" var="chars"/> +<canSetData obj="chars" arg='"USD60"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="canSetData"/> +</test> diff --git a/test/testcases/tests/level3/validation/contentType.xml b/test/testcases/tests/level3/validation/contentType.xml new file mode 100644 index 0000000..ba23531 --- /dev/null +++ b/test/testcases/tests/level3/validation/contentType.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="contentType"> +<metadata> + +<title>contentType</title> +<creator>Kongyi Zhou</creator> +<description> + get the content type of element, should return VAL_ELEMENTS_CONTENTTYPE + should return 4 +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-ElementEditVAL-contentType"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="content" type="short"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<contentType interface="ElementEditVAL" obj="root" var="content"/> +<assertEquals actual="content" expected="4" ignoreCase="false" id="contentType"/> +</test>
\ No newline at end of file diff --git a/test/testcases/tests/level3/validation/defaultValue.xml b/test/testcases/tests/level3/validation/defaultValue.xml new file mode 100644 index 0000000..5ebb43e --- /dev/null +++ b/test/testcases/tests/level3/validation/defaultValue.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="defaultValue"> +<metadata> + +<title>defaultValue</title> +<creator>Kongyi Zhou</creator> +<description> + This method returns the default value of the element. + Should return null +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#NodeEditVAL-defaultValue"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elem" type="ElementEditVAL"/> +<var name="elemList" type="NodeList"/> +<var name="value" type="DOMString"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName obj="doc" interface="Document" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<defaultValue interface="NodeEditVAL" obj="elem" var="value"/> +<assertEquals actual="value" expected='"First"' ignoreCase="false" id="defaultValue"/></test> + + diff --git a/test/testcases/tests/level3/validation/definedElements.xml b/test/testcases/tests/level3/validation/definedElements.xml new file mode 100644 index 0000000..9feae1f --- /dev/null +++ b/test/testcases/tests/level3/validation/definedElements.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="definedElements"> +<metadata> + +<title>definedElements</title> +<creator>Kongyi Zhou</creator> +<description> + This method retrieves all element declarations defined by schema + should return a NameList of length 8 +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#DocumentEditVAL-getDefinedElements"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="DocumentEditVAL"/> +<var name="nameList" type="NameList"/> +<var name="nullNS" type="DOMString" isNull="true"/> +<var name="definedElementsLength" type="int"/> +<load var="doc" href="book" willBeModified="false"/> +<getDefinedElements obj="doc" interface="DocumentEditVAL" namespaceURI="nullNS" var="nameList"/> +<assertNotNull actual="nameList" id="definedElementsNotNull"/> +<length var="definedElementsLength" obj="nameList" interface="NameList"/> +<assertEquals expected="8" actual="definedElementsLength" id="definedElements" ignoreCase="false"/> +</test> + diff --git a/test/testcases/tests/level3/validation/enumeratedValues.xml b/test/testcases/tests/level3/validation/enumeratedValues.xml new file mode 100644 index 0000000..22b907e --- /dev/null +++ b/test/testcases/tests/level3/validation/enumeratedValues.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="enumeratedValues"> +<metadata> + +<title>enumeratedValuess</title> +<creator>Kongyi Zhou</creator> +<description> + The method enumeratedValues returns a DOMStringList of enumerated values for + the element. +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#NodeEditVAL-enumeratedValues"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elem" type="NodeEditVAL"/> +<var name="elemList" type="NodeList"/> +<var name="strlist" type="DOMStringList"/> +<var name="enumeratedValuesLength" type="int"/> +<load var="doc" href="book" willBeModified="false"/> +<getElementsByTagName interface="Document" obj="doc" var="elemList" tagname='"edition"'/> +<item interface="NodeList" obj="elemList" index="0" var="elem"/> +<enumeratedValues interface="NodeEditVAL" obj="elem" var="strlist"/> +<assertNotNull actual="strlist" id="enumeratedValuesNotNull"/> +<length var="enumeratedValuesLength" obj="strlist" interface="DOMStringList"/> +<assertEquals actual="enumeratedValuesLength" expected="5" id="enumeratedValues" ignoreCase="false"/> +</test> + + diff --git a/test/testcases/tests/level3/validation/files/CVS/Entries b/test/testcases/tests/level3/validation/files/CVS/Entries new file mode 100644 index 0000000..04dec85 --- /dev/null +++ b/test/testcases/tests/level3/validation/files/CVS/Entries @@ -0,0 +1,3 @@ +/book.xml/1.1/Fri Apr 3 02:47:58 2009// +/book.xsd/1.1/Fri Apr 3 02:47:58 2009// +D diff --git a/test/testcases/tests/level3/validation/files/CVS/Repository b/test/testcases/tests/level3/validation/files/CVS/Repository new file mode 100644 index 0000000..edccdc4 --- /dev/null +++ b/test/testcases/tests/level3/validation/files/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/validation/files diff --git a/test/testcases/tests/level3/validation/files/CVS/Root b/test/testcases/tests/level3/validation/files/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/validation/files/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/validation/files/CVS/Template b/test/testcases/tests/level3/validation/files/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/validation/files/CVS/Template diff --git a/test/testcases/tests/level3/validation/files/book.xml b/test/testcases/tests/level3/validation/files/book.xml new file mode 100644 index 0000000..b999b98 --- /dev/null +++ b/test/testcases/tests/level3/validation/files/book.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?>
+<book inStock="Yes" price="64.28" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="book.xsd">
+<title>Compilers: Principles, Techniques, and Tools</title>
+<author>Alfred V.Aho, Ravi Sethi, Jeffrey D. Ullman</author>
+<ISBN>0-201-10088-6</ISBN>
+<edition>Second</edition>
+<publisher>Addison Wesley</publisher>
+</book>
+
diff --git a/test/testcases/tests/level3/validation/files/book.xsd b/test/testcases/tests/level3/validation/files/book.xsd new file mode 100644 index 0000000..1f395cd --- /dev/null +++ b/test/testcases/tests/level3/validation/files/book.xsd @@ -0,0 +1,52 @@ +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="book" type="bookType"/>
+
+
+ <xsd:complexType name="bookType">
+ <xsd:sequence>
+ <xsd:element ref="title"/>
+ <xsd:choice>
+ <xsd:element ref="author"/>
+ <xsd:element ref="editor"/>
+ </xsd:choice>
+ <xsd:element ref="ISBN"/>
+ <xsd:element ref="edition" minOccurs ="0"/>
+ <xsd:element ref="publisher"/>
+ <xsd:element ref="year" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="price" type="xsd:decimal"/>
+ <xsd:attribute name="inStock" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Yes"/>
+ <xsd:enumeration value="No"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:element name="title" type="xsd:string"/>
+ <xsd:element name="author" type="xsd:string"/>
+ <xsd:element name="ISBN" type="xsd:string"/>
+ <xsd:element name="edition" default="First">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="First"/>
+ <xsd:enumeration value="Second"/>
+ <xsd:enumeration value="Third"/>
+ <xsd:enumeration value="Fourth"/>
+ <xsd:enumeration value="Fifth"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="publisher" type="xsd:string"/>
+ <xsd:element name="editor" type ="xsd:string"/>
+ <xsd:element name="year">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value ="[0-9]{4}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+</xsd:schema>
diff --git a/test/testcases/tests/level3/validation/getFeature01.xml b/test/testcases/tests/level3/validation/getFeature01.xml new file mode 100644 index 0000000..dc1ab17 --- /dev/null +++ b/test/testcases/tests/level3/validation/getFeature01.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="getFeature01"> + <metadata> + <title>getFeature01</title> + <creator>Curt Arnold</creator> + <description>Call DOMImplementation.getFeature("Validation", "3.0"). + Not sure what should happen. Have requested clarification from WG.</description> + <date qualifier="created">2004-01-05</date> + <!-- DOMImplementation.getFeature --> + <subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core#DOMImplementation3-getFeature"/> + </metadata> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="domImpl" type="DOMImplementation"/> + <var name="domImplVAL" type="DOMImplementation"/> + <implementation var="domImpl"/> + <getFeature var="domImplVAL" obj="domImpl" + feature='"Validation"' version='"3.0"' interface="DOMImplementation"/> + <!-- TODO: Request for clarification. The spec doesn't address case where + feature does not introduce new interface --> + <assertNull actual="domImplVAL" id="getFeatureReturnsNull"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/validation/getFeature02.xml b/test/testcases/tests/level3/validation/getFeature02.xml new file mode 100644 index 0000000..c30f2a0 --- /dev/null +++ b/test/testcases/tests/level3/validation/getFeature02.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="getFeature02"> + <metadata> + <title>getFeature02</title> + <creator>Curt Arnold</creator> + <description>Call DOMImplementation.getFeature("+vAlIdAtIoN", "3.0").</description> + <date qualifier="created">2004-01-05</date> + <!-- DOMImplementation.getFeature --> + <subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core#DOMImplementation3-getFeature"/> + </metadata> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="domImpl" type="DOMImplementation"/> + <var name="domImplVAL" type="DOMImplementation"/> + <implementation var="domImpl"/> + <getFeature var="domImplVAL" obj="domImpl" feature='"+vAlIdAtIoN"' + version='"3.0"' interface="DOMImplementation"/> + <assertNull actual="domImplVAL" id="domImplVALNull"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/validation/hasFeature01.xml b/test/testcases/tests/level3/validation/hasFeature01.xml new file mode 100644 index 0000000..e0f0831 --- /dev/null +++ b/test/testcases/tests/level3/validation/hasFeature01.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature01"> + <metadata> + <title>hasFeature01</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("vAlIdAtIoN", "3.0").</description> + <date qualifier="created">2004-01-05</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core#ID-5CED94D7"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasVAL" type="boolean"/> + <implementation var="domImpl"/> + <hasFeature var="hasVAL" obj="domImpl" feature='"vAlIdAtIoN"' version='"3.0"'/> + <assertTrue actual="hasVAL" id="hasFeature_VAL3"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/validation/hasFeature02.xml b/test/testcases/tests/level3/validation/hasFeature02.xml new file mode 100644 index 0000000..08cb26d --- /dev/null +++ b/test/testcases/tests/level3/validation/hasFeature02.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature02"> + <metadata> + <title>HasFeature02</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("vAlIdAtIoN", null).</description> + <date qualifier="created">2004-01-05</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core#ID-5CED94D7"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasVAL" type="boolean"/> + <var name="version" type="DOMString" isNull="true"/> + <implementation var="domImpl"/> + <hasFeature var="hasVAL" obj="domImpl" feature='"vAlIdAtIoN"' version="version"/> + <assertTrue actual="hasVAL" id="hasFeature_VAL"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/validation/hasFeature03.xml b/test/testcases/tests/level3/validation/hasFeature03.xml new file mode 100644 index 0000000..1fb2615 --- /dev/null +++ b/test/testcases/tests/level3/validation/hasFeature03.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature03"> + <metadata> + <title>hasFeature03</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("cOrE", "2.0") and hasFeature("cOrE", null).</description> + <date qualifier="created">2004-01-05</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core#ID-5CED94D7"/> + </metadata> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasCore" type="boolean"/> + <var name="nullVersion" type="DOMString" isNull="true"/> + <implementation var="domImpl"/> + <hasFeature var="hasCore" obj="domImpl" feature='"cOrE"' version='"2.0"'/> + <assertTrue actual="hasCore" id="hasFeature_Core2"/> + <hasFeature var="hasCore" obj="domImpl" feature='"cOrE"' version="nullVersion"/> + <assertTrue actual="hasCore" id="hasFeature_Core"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/validation/hasFeature04.xml b/test/testcases/tests/level3/validation/hasFeature04.xml new file mode 100644 index 0000000..f63ec01 --- /dev/null +++ b/test/testcases/tests/level3/validation/hasFeature04.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" standalone="no"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + +Copyright (c) 2003-2004 World Wide Web Consortium, +(Massachusetts Institute of Technology, Institut National de +Recherche en Informatique et en Automatique, Keio University). All +Rights Reserved. This program is distributed under the W3C's Software +Intellectual Property License. This program is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +See W3C License http://www.w3.org/Consortium/Legal/ for more details. + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> + + +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="hasFeature04"> + <metadata> + <title>hasFeature04</title> + <creator>Curt Arnold</creator> + <description>Implementations should return true for hasFeature("+vAlIdAtIoN", "3.0").</description> + <date qualifier="created">2003-12-09</date> + <!-- DOMImplementation.hasFeature --> + <subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core#ID-5CED94D7"/> + </metadata> + <!-- + on feature names requires L3 Core --> + <hasFeature feature='"Core"' version='"3.0"'/> + <var name="domImpl" type="DOMImplementation"/> + <var name="hasVAL" type="boolean"/> + <implementation var="domImpl"/> + <hasFeature var="hasVAL" obj="domImpl" feature='"+vAlIdAtIoN"' version='"3.0"'/> + <assertTrue actual="hasVAL" id="hasFeature_VAL3"/> +</test> + + + + + diff --git a/test/testcases/tests/level3/validation/isElementDefined.xml b/test/testcases/tests/level3/validation/isElementDefined.xml new file mode 100644 index 0000000..54cbc01 --- /dev/null +++ b/test/testcases/tests/level3/validation/isElementDefined.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="isElementDefined"> +<metadata> + +<title>isElementDefined</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if element with given name is defined or not + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-isElementDefined"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<isElementDefined obj="root" name='"editor"' var="valboolean"/> +<assertEquals actual="valboolean" expected="5" ignoreCase="false" id="isElementDefined"/> +</test> + + + diff --git a/test/testcases/tests/level3/validation/isElementDefinedNS.xml b/test/testcases/tests/level3/validation/isElementDefinedNS.xml new file mode 100644 index 0000000..d97190e --- /dev/null +++ b/test/testcases/tests/level3/validation/isElementDefinedNS.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="isElementDefinedNS"> +<metadata> + +<title>isElementDefinedNS</title> +<creator>Kongyi Zhou</creator> +<description> + This method checks if element with given namespace and name is defined or not + should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-ElementEditVAL-isElementDefined"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="valboolean" type="short"/> + +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<isElementDefinedNS obj="root" namespaceURI='"http://dom3.validation.examples"' name='"editor"' var="valboolean"/> +<assertEquals actual="valboolean" expected="6" ignoreCase="false" id="isElementDefinedNS"/> +</test> + + + diff --git a/test/testcases/tests/level3/validation/metadata.xml b/test/testcases/tests/level3/validation/metadata.xml new file mode 100644 index 0000000..c3c6e71 --- /dev/null +++ b/test/testcases/tests/level3/validation/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
+<!--
+Copyright (c) 2003 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+-->
+<!DOCTYPE metadata SYSTEM "dom3.dtd">
+
+<!-- This file contains additional metadata about DOM L3 Validation tests.
+ Allowing additional documentation without modifying the tests themselves. -->
+<metadata xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3">
+</metadata>
diff --git a/test/testcases/tests/level3/validation/nodeValidity.xml b/test/testcases/tests/level3/validation/nodeValidity.xml new file mode 100644 index 0000000..d115ccb --- /dev/null +++ b/test/testcases/tests/level3/validation/nodeValidity.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeValidity"> +<metadata> + +<title>nodeValidity</title> +<creator>Kongyi Zhou</creator> +<description> + check node validity, should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#NodeEditVAL-nodeValidity"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="elem" type="ElementEditVAL"/> +<var name="result" type="short"/> +<var name="checkLevel" type="short" value="4"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="elem"/> +<nodeValidity obj="elem" valType="checkLevel" var="result"/> +<assertEquals actual="result" expected="5" ignoreCase="false" id="nodevalidity"/> +</test> diff --git a/test/testcases/tests/level3/validation/requiredAttributes.xml b/test/testcases/tests/level3/validation/requiredAttributes.xml new file mode 100644 index 0000000..acfa3c8 --- /dev/null +++ b/test/testcases/tests/level3/validation/requiredAttributes.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="requiredAttributes"> +<metadata> + +<title>requiredAttributes</title> +<creator>Kongyi Zhou</creator> +<description> + The method requiredAttributes returns the NameList of required attributes for + the element. +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#ElementEditVAL-requiredAttributes"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="Document"/> +<var name="root" type="ElementEditVAL"/> +<var name="attrlist" type="NameList"/> +<var name="attname" type="DOMString"/> +<load var="doc" href="book" willBeModified="false"/> +<documentElement obj="doc" var="root"/> +<requiredAttributes interface="ElementEditVAL" obj="root" var="attrlist"/> +<assertNotNull actual="attrlist" id="requiredAttributesNotNull"/> +<getName interface="NameList" obj="attrlist" index="0" var="attname"/> +<assertEquals actual="attname" expected='"inStock"' ignoreCase="false" id="requiredAttributes"/> +</test> + + diff --git a/test/testcases/tests/level3/validation/validateDocument.xml b/test/testcases/tests/level3/validation/validateDocument.xml new file mode 100644 index 0000000..dd8b380 --- /dev/null +++ b/test/testcases/tests/level3/validation/validateDocument.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +Copyright (c) 2003 Oracle + +All Rights Reserved. This program is distributed under the W3C's +Software Intellectual Property License [1]. This program is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. + +[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +--> +<!DOCTYPE test SYSTEM "dom3.dtd"> +<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="validateDocument"> +<metadata> + +<title>validateDocument</title> +<creator>Kongyi Zhou</creator> +<description> + validate the document, should return VAL_TRUE +</description> +<contributor>Oracle Corp.</contributor> +<date qualifier="created">2003-03-01</date> +<subject resource="http://www.w3.org/TR/2003/CR-DOM-Level-3-Val-20030730/validation#VAL-Interfaces-DocumentEditVAL-validateDocument"/> +</metadata> +<implementationAttribute name="schemaValidating" value="true"/> + +<var name="doc" type="DocumentEditVAL"/> +<var name="result" type="short"/> +<load var="doc" href="book" willBeModified="false"/> +<validateDocument obj="doc" var="result"/> +<assertEquals actual="result" expected="5" ignoreCase="false" id="validateDocument"/> +</test> diff --git a/test/testcases/tests/level3/xpath/.cvsignore b/test/testcases/tests/level3/xpath/.cvsignore new file mode 100644 index 0000000..182530a --- /dev/null +++ b/test/testcases/tests/level3/xpath/.cvsignore @@ -0,0 +1,3 @@ +dom3.dtd +dom3.xsd +test-to-html.xsl diff --git a/test/testcases/tests/level3/xpath/Attribute_Nodes.xml b/test/testcases/tests/level3/xpath/Attribute_Nodes.xml new file mode 100644 index 0000000..0e45a09 --- /dev/null +++ b/test/testcases/tests/level3/xpath/Attribute_Nodes.xml @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Attribute_Nodes"> + <metadata> + <title>Attribute_Nodes</title> + <creator>Bob Clary</creator> + <description> + S1.2.2 Attribute Nodes - + Create ANY_TYPE XPathResult matching //@*, + check that each matching Node is an Attribute Node, + that parentNodes of returned Attributes are null, + and that ownerElements are in fact Elements. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#Mapping"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""//@*"" /> + <var name="xpathType" type="short" value="ANY_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="nodeType" type="int"/> + <var name="parent" type="Node"/> + <var name="owner" type="Node"/> + <var name="ownerType" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" /> + + <!-- Test Body --> + + <iterateNext var="outNode" obj="outresult"/> + <while> + <notNull obj="outNode"/> + + <nodeType var="nodeType" obj="outNode" /> + <assertEquals id="S1.2.2-Attribute-Nodes-nodeType" + actual="nodeType" + expected="2" + ignoreCase="false"/> + + <parentNode var="parent" obj="outNode" interface="Node"/> + <assertNull id="S1.2.2-Attribute-Nodes-parentNode" actual="parent"/> + + <ownerElement var="owner" obj="outNode" interface="Attr"/> + <nodeType var="ownerType" obj="owner"/> + <assertEquals id="S1.2.2-Attribute-Nodes-owner-nodeType" + actual="ownerType" + expected="1" + ignoreCase="false"/> + + <iterateNext var="outNode" obj="outresult"/> + </while> + +</test> diff --git a/test/testcases/tests/level3/xpath/Attribute_Nodes_xmlns.xml b/test/testcases/tests/level3/xpath/Attribute_Nodes_xmlns.xml new file mode 100644 index 0000000..ed854ba --- /dev/null +++ b/test/testcases/tests/level3/xpath/Attribute_Nodes_xmlns.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Attribute_Nodes_xmlns"> + <metadata> + <title>Attribute_Nodes_xmlns</title> + <creator>Bob Clary</creator> + <description> + S1.2.2 Attribute Nodes - + Create ANY_TYPE XPathResult matching //@xmlns, + check that there are no matching Nodes by + checking for XPathResult.iterateNext == null + since namespace attributes are not retrievable. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#Mapping"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""//@xmlns""/> + <var name="xpathType" type="short" value="ANY_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + + <!-- Load Test Document --> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" /> + + <!-- Test Body --> + + <iterateNext var="outNode" obj="outresult"/> + <assertNull id="Attribute_Nodes_xmlnsxmlns" actual="outNode"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/CVS/Entries b/test/testcases/tests/level3/xpath/CVS/Entries new file mode 100644 index 0000000..8d355b2 --- /dev/null +++ b/test/testcases/tests/level3/xpath/CVS/Entries @@ -0,0 +1,70 @@ +D/files//// +/.cvsignore/1.1/Fri Apr 3 02:47:58 2009// +/Attribute_Nodes.xml/1.2/Fri Apr 3 02:47:58 2009// +/Attribute_Nodes_xmlns.xml/1.2/Fri Apr 3 02:47:58 2009// +/Comment_Nodes.xml/1.2/Fri Apr 3 02:47:58 2009// +/Conformance_Expressions.xml/1.2/Fri Apr 3 02:47:58 2009// +/Conformance_ID.xml/1.2/Fri Apr 3 02:47:58 2009// +/Conformance_hasFeature_3.xml/1.1/Fri Apr 3 02:47:58 2009// +/Conformance_hasFeature_empty.xml/1.1/Fri Apr 3 02:47:58 2009// +/Conformance_hasFeature_null.xml/1.1/Fri Apr 3 02:47:58 2009// +/Conformance_isSupported_3.xml/1.1/Fri Apr 3 02:47:58 2009// +/Conformance_isSupported_empty.xml/1.1/Fri Apr 3 02:47:58 2009// +/Conformance_isSupported_null.xml/1.1/Fri Apr 3 02:47:58 2009// +/Element_Nodes.xml/1.2/Fri Apr 3 02:47:58 2009// +/Processing_Instruction_Nodes.xml/1.2/Fri Apr 3 02:47:58 2009// +/Text_Nodes.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathEvaluatorCast01.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createExpression_NAMESPACE_ERR_01.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createExpression_NAMESPACE_ERR_02.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createExpression_NS.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createExpression_no_NS.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createNSResolver_all.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createNSResolver_document.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_createNSResolver_documentElement.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_evaluate_NAMESPACE_ERR.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_evaluate_TYPE_ERR.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_evaluate_document.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathEvaluator_evaluate_documentElement.xml/1.1/Fri Apr 3 02:47:58 2009// +/XPathExpression_evaluate_NOT_SUPPORTED_ERR.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathExpression_evaluate_document.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathExpression_evaluate_documentElement.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathNSResolver_lookupNamespaceURI_nist_dmstc.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathNSResolver_lookupNamespaceURI_null.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathNSResolver_lookupNamespaceURI_prefix.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathNSResolver_lookupNamespaceURI_xml.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_TYPE_ERR.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_booleanValue_false.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_booleanValue_true.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_ANY_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_BOOLEAN_TYPE.xml/1.4/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_NUMBER_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_STRING_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_iterateNext_INVALID_STATE_ERR.xml/1.3/Fri Apr 3 02:47:58 2009// +/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_numberValue.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_resultType.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.xml/1.2/Fri Apr 3 02:47:58 2009// +/XPathResult_stringValue.xml/1.3/Fri Apr 3 02:47:58 2009// +/alltests.xml/1.6/Fri Apr 3 02:47:58 2009// +/dom3xpathents.ent/1.4/Fri Apr 3 02:47:58 2009// +/metadata.xml/1.2/Fri Apr 3 02:47:58 2009// diff --git a/test/testcases/tests/level3/xpath/CVS/Repository b/test/testcases/tests/level3/xpath/CVS/Repository new file mode 100644 index 0000000..8a011cd --- /dev/null +++ b/test/testcases/tests/level3/xpath/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/xpath diff --git a/test/testcases/tests/level3/xpath/CVS/Root b/test/testcases/tests/level3/xpath/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/xpath/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/xpath/CVS/Template b/test/testcases/tests/level3/xpath/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/xpath/CVS/Template diff --git a/test/testcases/tests/level3/xpath/Comment_Nodes.xml b/test/testcases/tests/level3/xpath/Comment_Nodes.xml new file mode 100644 index 0000000..51f7cbe --- /dev/null +++ b/test/testcases/tests/level3/xpath/Comment_Nodes.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Comment_Nodes"> + <metadata> + <title>Comment_Nodes</title> + <creator>Bob Clary</creator> + <description> + S1.2.6 Comment Nodes - + Create ANY_TYPE XPathResult matching //comment(), + check that each matching Node is a Comment Node. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#Mapping"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""//comment()""/> + <var name="xpathType" type="short" value="ANY_TYPE" /> + + <!-- Test Variables --> + + <var name="currNode" type="Node"/> + <var name="nodeType" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" /> + + <!-- Test Body --> + + <iterateNext var="currNode" obj="outresult"/> + <while> + <notNull obj="currNode"/> + + <nodeType var="nodeType" obj="currNode" /> + <assertEquals id="S1.2.6-Comment-Nodes-nodeType" + actual="nodeType" + expected="8" + ignoreCase="false"/> + + <iterateNext var="currNode" obj="outresult"/> + + </while> + +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_Expressions.xml b/test/testcases/tests/level3/xpath/Conformance_Expressions.xml new file mode 100644 index 0000000..d3d1f38 --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_Expressions.xml @@ -0,0 +1,280 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_Expressions"> + <metadata> + <title>Conformance_Expressions</title> + <creator>Bob Clary</creator> + <description> + 1.3 Conformance - Iterate over a list of strings containing + valid XPath expressions, calling XPathEvaluator.createExpression + for each. If no expections are thrown and each result is non-null, + then the test passes. + </description> + <date qualifier="created">2003-11-18</date> + <subject resource="&spec;#Conformance"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-createExpression"/> + <subject resource="&spec;#XPathNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="doc" type="Document"/> + <var name="resolver" type="XPathNSResolver"/> + <var name="evaluator" type="XPathEvaluator"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString"/> + + <!-- Test Variables --> + + <var name="expressionList" type="List"/> + <var name="xpathexpression" type="XPathExpression"/> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <createXPathEvaluator var='evaluator' document='doc'/> + + <createNSResolver var="resolver" obj="evaluator" nodeResolver="doc"/> + + <!-- test root absolute expression --> + <append collection="expressionList" item=""/""/> + + <!-- test verbose axes and basic node tests --> + <append collection="expressionList" item=""child::comment()""/> + <append collection="expressionList" item=""child::text()""/> + <append collection="expressionList" item=""child::processing-instruction()""/> + <append collection="expressionList" item=""child::processing-instruction('name')""/> + <append collection="expressionList" item=""child::node()""/> + <append collection="expressionList" item=""child::*""/> + <append collection="expressionList" item=""child::nist:*""/> + <append collection="expressionList" item=""child::employee""/> + + <append collection="expressionList" item=""descendant::comment()""/> + <append collection="expressionList" item=""descendant::text()""/> + <append collection="expressionList" item=""descendant::processing-instruction()""/> + <append collection="expressionList" item=""descendant::processing-instruction('name')""/> + <append collection="expressionList" item=""descendant::node()""/> + <append collection="expressionList" item=""descendant::*""/> + <append collection="expressionList" item=""descendant::nist:*""/> + <append collection="expressionList" item=""descendant::employee""/> + + <append collection="expressionList" item=""parent::comment()""/> + <append collection="expressionList" item=""parent::text()""/> + <append collection="expressionList" item=""parent::processing-instruction()""/> + <append collection="expressionList" item=""parent::processing-instruction('name')""/> + <append collection="expressionList" item=""parent::node()""/> + <append collection="expressionList" item=""parent::*""/> + <append collection="expressionList" item=""parent::nist:*""/> + <append collection="expressionList" item=""parent::employee""/> + + <append collection="expressionList" item=""ancestor::comment()""/> + <append collection="expressionList" item=""ancestor::text()""/> + <append collection="expressionList" item=""ancestor::processing-instruction()""/> + <append collection="expressionList" item=""ancestor::processing-instruction('name')""/> + <append collection="expressionList" item=""ancestor::node()""/> + <append collection="expressionList" item=""ancestor::*""/> + <append collection="expressionList" item=""ancestor::nist:*""/> + <append collection="expressionList" item=""ancestor::employee""/> + + <append collection="expressionList" item=""following-sibling::comment()""/> + <append collection="expressionList" item=""following-sibling::text()""/> + <append collection="expressionList" item=""following-sibling::processing-instruction()""/> + <append collection="expressionList" item=""following-sibling::processing-instruction('name')""/> + <append collection="expressionList" item=""following-sibling::node()""/> + <append collection="expressionList" item=""following-sibling::*""/> + <append collection="expressionList" item=""following-sibling::nist:*""/> + <append collection="expressionList" item=""following-sibling::employee""/> + + <append collection="expressionList" item=""preceding-sibling::comment()""/> + <append collection="expressionList" item=""preceding-sibling::text()""/> + <append collection="expressionList" item=""preceding-sibling::processing-instruction()""/> + <append collection="expressionList" item=""preceding-sibling::processing-instruction('name')""/> + <append collection="expressionList" item=""preceding-sibling::node()""/> + <append collection="expressionList" item=""preceding-sibling::*""/> + <append collection="expressionList" item=""preceding-sibling::nist:*""/> + <append collection="expressionList" item=""preceding-sibling::employee""/> + + <append collection="expressionList" item=""following::comment()""/> + <append collection="expressionList" item=""following::text()""/> + <append collection="expressionList" item=""following::processing-instruction()""/> + <append collection="expressionList" item=""following::processing-instruction('name')""/> + <append collection="expressionList" item=""following::node()""/> + <append collection="expressionList" item=""following::*""/> + <append collection="expressionList" item=""following::nist:*""/> + <append collection="expressionList" item=""following::employee""/> + + <append collection="expressionList" item=""preceding::comment()""/> + <append collection="expressionList" item=""preceding::text()""/> + <append collection="expressionList" item=""preceding::processing-instruction()""/> + <append collection="expressionList" item=""preceding::processing-instruction('name')""/> + <append collection="expressionList" item=""preceding::node()""/> + <append collection="expressionList" item=""preceding::*""/> + <append collection="expressionList" item=""preceding::nist:*""/> + <append collection="expressionList" item=""preceding::employee""/> + + <append collection="expressionList" item=""attribute::comment()""/> + <append collection="expressionList" item=""attribute::text()""/> + <append collection="expressionList" item=""attribute::processing-instruction()""/> + <append collection="expressionList" item=""attribute::processing-instruction('name')""/> + <append collection="expressionList" item=""attribute::node()""/> + <append collection="expressionList" item=""attribute::*""/> + <append collection="expressionList" item=""attribute::nist:*""/> + <append collection="expressionList" item=""attribute::employee""/> + + <append collection="expressionList" item=""namespace::comment()""/> + <append collection="expressionList" item=""namespace::text()""/> + <append collection="expressionList" item=""namespace::processing-instruction()""/> + <append collection="expressionList" item=""namespace::processing-instruction('name')""/> + <append collection="expressionList" item=""namespace::node()""/> + <append collection="expressionList" item=""namespace::*""/> + <append collection="expressionList" item=""namespace::nist:*""/> + <append collection="expressionList" item=""namespace::employee""/> + + <append collection="expressionList" item=""self::comment()""/> + <append collection="expressionList" item=""self::text()""/> + <append collection="expressionList" item=""self::processing-instruction()""/> + <append collection="expressionList" item=""self::processing-instruction('name')""/> + <append collection="expressionList" item=""self::node()""/> + <append collection="expressionList" item=""self::*""/> + <append collection="expressionList" item=""self::nist:*""/> + <append collection="expressionList" item=""self::employee""/> + + <append collection="expressionList" item=""descendant-or-self::comment()""/> + <append collection="expressionList" item=""descendant-or-self::text()""/> + <append collection="expressionList" item=""descendant-or-self::processing-instruction()""/> + <append collection="expressionList" item=""descendant-or-self::processing-instruction('name')""/> + <append collection="expressionList" item=""descendant-or-self::node()""/> + <append collection="expressionList" item=""descendant-or-self::*""/> + <append collection="expressionList" item=""descendant-or-self::nist:*""/> + <append collection="expressionList" item=""descendant-or-self::employee""/> + + <append collection="expressionList" item=""ancestor-or-self::comment()""/> + <append collection="expressionList" item=""ancestor-or-self::text()""/> + <append collection="expressionList" item=""ancestor-or-self::processing-instruction()""/> + <append collection="expressionList" item=""ancestor-or-self::processing-instruction('name')""/> + <append collection="expressionList" item=""ancestor-or-self::node()""/> + <append collection="expressionList" item=""ancestor-or-self::*""/> + <append collection="expressionList" item=""ancestor-or-self::nist:*""/> + <append collection="expressionList" item=""ancestor-or-self::employee""/> + + <!-- test common abbreviations --> + <append collection="expressionList" item=""comment()""/> + <append collection="expressionList" item=""text()""/> + <append collection="expressionList" item=""processing-instruction()""/> + <append collection="expressionList" item=""processing-instruction('name')""/> + <append collection="expressionList" item=""node()""/> + <append collection="expressionList" item=""*""/> + <append collection="expressionList" item=""nist:*""/> + <append collection="expressionList" item=""employee""/> + + <append collection="expressionList" item="".//comment()""/> + <append collection="expressionList" item="".//text()""/> + <append collection="expressionList" item="".//processing-instruction()""/> + <append collection="expressionList" item="".//processing-instruction('name')""/> + <append collection="expressionList" item="".//node()""/> + <append collection="expressionList" item="".//*""/> + <append collection="expressionList" item="".//nist:*""/> + <append collection="expressionList" item="".//employee""/> + + <append collection="expressionList" item=""../comment()""/> + <append collection="expressionList" item=""../text()""/> + <append collection="expressionList" item=""../processing-instruction()""/> + <append collection="expressionList" item=""../processing-instruction('name')""/> + <append collection="expressionList" item=""../node()""/> + <append collection="expressionList" item=""../*""/> + <append collection="expressionList" item=""../nist:*""/> + <append collection="expressionList" item=""../employee""/> + + <append collection="expressionList" item=""@attributename""/> + + <append collection="expressionList" item=""./comment()""/> + <append collection="expressionList" item=""./text()""/> + <append collection="expressionList" item=""./processing-instruction()""/> + <append collection="expressionList" item=""./processing-instruction('name')""/> + <append collection="expressionList" item=""./node()""/> + <append collection="expressionList" item=""./*""/> + <append collection="expressionList" item=""./nist:*""/> + <append collection="expressionList" item=""./employee""/> + + <!-- test Union --> + <append collection="expressionList" item=""comment() | text() | processing-instruction() | node()""/> + + <!-- test various predicates --> + + <append collection="expressionList" item=""employee[address]""/> + <append collection="expressionList" item=""employee/address[@street]""/> + <append collection="expressionList" item=""employee[position='Computer Specialist']""/> + <append collection="expressionList" item=""employee[position!='Computer Specialist']""/> + <append collection="expressionList" item=""employee[gender='Male' or gender='Female']""/> + <append collection="expressionList" item=""employee[gender!='Male' and gender!='Female']""/> + <append collection="expressionList" item=""employee/address[@street='Yes']""/> + <append collection="expressionList" item=""employee/address[@street!='Yes']""/> + <append collection="expressionList" item=""employee[position()=1]""/> + <append collection="expressionList" item=""employee[1]""/> + <append collection="expressionList" item=""employee[position()=last()]""/> + <append collection="expressionList" item=""employee[last()]""/> + <append collection="expressionList" item=""employee[position()>1 and position<last()]""/> + <append collection="expressionList" item=""employee[position()>=1 and position<=last()]""/> + <append collection="expressionList" item=""employee[count(.)>0]""/> + <append collection="expressionList" item=""employee[position() mod 2=0]""/> + <append collection="expressionList" item=""employee[position() mod -2=0]""/> + <append collection="expressionList" item=""employee[position() div 2=0]""/> + <append collection="expressionList" item=""employee[position() div -2=-1]""/> + <append collection="expressionList" item=""employee[position() div 2 * 2=position()]""/> + <append collection="expressionList" item=""employee[3 > 2 > 1]""/> + <append collection="expressionList" item=""id('CANADA')""/> + <append collection="expressionList" item=""*[local-name()='employee']""/> + <append collection="expressionList" item=""*[local-name(.)='employee']""/> + <append collection="expressionList" item=""*[local-name(employee)='employee']""/> + <append collection="expressionList" item=""*[local-name()='employee']""/> + <append collection="expressionList" item=""*[namespace-uri()='http://www.nist.gov']""/> + <append collection="expressionList" item=""*[name()='nist:employee']""/> + <append collection="expressionList" item=""*[string()]""/> + <append collection="expressionList" item=""*[string(10 div foo)='NaN']""/> + <append collection="expressionList" item=""*[concat('a', 'b', 'c')]""/> + <append collection="expressionList" item=""*[starts-with('employee', 'emp')]""/> + <append collection="expressionList" item=""*[contains('employee', 'emp')]""/> + <append collection="expressionList" item=""*[substring-before('employeeId', 'Id')]""/> + <append collection="expressionList" item=""*[substring-after('employeeId', 'employee')]""/> + <append collection="expressionList" item=""*[substring('employeeId', 4)]""/> + <append collection="expressionList" item=""*[substring('employeeId', 4, 5)]""/> + <append collection="expressionList" item=""*[string-length()=2]""/> + <append collection="expressionList" item=""*[string-length(.)=string-length(normalize-space(.))]""/> + <append collection="expressionList" item=""*[translate('bar', 'abc', 'ABC')='BAr']""/> + <append collection="expressionList" item=""*[boolean(.)]""/> + <append collection="expressionList" item=""*[not(boolean(.))]""/> + <append collection="expressionList" item=""*[true()]""/> + <append collection="expressionList" item=""*[false()]""/> + <append collection="expressionList" item=""*[lang('en')]""/> + <append collection="expressionList" item=""*[number()]""/> + <append collection="expressionList" item=""*[number('4')]""/> + <append collection="expressionList" item=""*[floor(.)]>0""/> + <append collection="expressionList" item=""*[ceiling(.)]<1""/> + <append collection="expressionList" item=""*[round(number(.))=0]<1""/> + + <for-each collection="expressionList" member="expression"> + <createExpression var="xpathexpression" + obj="evaluator" + resolver="resolver" + expression="expression"/> + </for-each> +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_ID.xml b/test/testcases/tests/level3/xpath/Conformance_ID.xml new file mode 100644 index 0000000..bc288da --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_ID.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_ID"> + <metadata> + <title>Conformance_ID</title> + <creator>Bob Clary</creator> + <description> + 1.3 Conformance - Check that the element returned by XPath id() function + returns the same element as Document.getElementById + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#Conformance"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document"/> + <var name="resolver" type="XPathNSResolver"/> + <var name="evaluator" type="XPathEvaluator"/> + <var name="contextNode" type="Node"/> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""id('child1')""/> + <var name="xpathType" type="short" value="ANY_TYPE"/> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="child1Element" type="Node"/> + + <!-- Load Test Document --> + + <load var="doc" href="internaldtd" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" /> + + <!-- Test Body --> + + <iterateNext var="outNode" obj="outresult"/> + + <getElementById var="child1Element" + obj="doc" + elementId=""child1""/> + + <assertSame id="S1.3-Conformance-ID" + actual="outNode" + expected="child1Element"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_hasFeature_3.xml b/test/testcases/tests/level3/xpath/Conformance_hasFeature_3.xml new file mode 100644 index 0000000..be0e75c --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_hasFeature_3.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_hasFeature_3"> + <metadata> + <title>Conformance_hasFeature_3</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + 1.3 Conformance - Test if + Document.implementation.hasFeature('XPath', "3.0") returns true + </description> + <date qualifier="created">2003-11-29</date> + <subject resource="&spec;#Conformance"/> + </metadata> + + <var name="doc" type="Document"/> + <var name="state" type="boolean"/> + <var name="impl" type='DOMImplementation'/> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <implementation obj="doc" var="impl"/> + + <hasFeature obj="impl" + feature=""xpATH"" + version=""3.0"" + var="state"/> + + <assertTrue actual="state" id="hasFeature-XPath-3.0"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_hasFeature_empty.xml b/test/testcases/tests/level3/xpath/Conformance_hasFeature_empty.xml new file mode 100644 index 0000000..362588a --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_hasFeature_empty.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_hasFeature_empty"> + <metadata> + <title>Conformance_hasFeature_empty</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + 1.3 Conformance - Test if + Document.implementation.hasFeature('XPath', "") returns true + </description> + <date qualifier="created">2003-11-29</date> + <subject resource="&spec;#Interfaces"/> + </metadata> + + <var name="doc" type="Document"/> + <var name="state" type="boolean"/> + <var name="impl" type='DOMImplementation'/> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <implementation obj="doc" var="impl"/> + + <hasFeature obj="impl" + feature=""xpATH"" + version="""" + var="state"/> + + <assertTrue actual="state" id="hasFeature-XPath-empty"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_hasFeature_null.xml b/test/testcases/tests/level3/xpath/Conformance_hasFeature_null.xml new file mode 100644 index 0000000..c69dedc --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_hasFeature_null.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_hasFeature_null"> + <metadata> + <title>Conformance_hasFeature_null</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + 1.3 Conformance - Test if + Document.implementation.hasFeature('XPath', null) returns true + </description> + <date qualifier="created">2003-11-29</date> + <subject resource="&spec;#Conformance"/> + </metadata> + + <var name="doc" type="Document"/> + <var name="state" type="boolean"/> + <var name="impl" type='DOMImplementation'/> + <var name="nullValue" type="DOMString" isNull="true"/> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <implementation obj="doc" var="impl"/> + + <hasFeature obj="impl" + feature=""xpATH"" + version="nullValue" + var="state"/> + + <assertTrue actual="state" id="hasFeature-XPath-null"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_isSupported_3.xml b/test/testcases/tests/level3/xpath/Conformance_isSupported_3.xml new file mode 100644 index 0000000..c5d3459 --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_isSupported_3.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_isSupported_3"> + <metadata> + <title>Conformance_isSupported_3</title> + <creator>Philippe Le Hégaret</creator> + <description> + 1.3 Conformance - The "feature" parameter in the + "Node.isSupported(feature,version)" + method is the name of the feature and the version is the version + number of the feature to test. XPath is the legal value for the + XPath module. The method should return "true". + + Retrieve the DOM document on which the + "isSupported(feature,version)" method is invoked with "feature" + equal to "XPath" and version to "3.0". The method should return a + boolean "true". + </description> + <date qualifier="created">2002-04-24</date> + <date qualifier="modified">2003-11-29</date> + <subject resource="&spec;#Conformance"/> + </metadata> + <var name="doc" type="Document"/> + <var name="state" type="boolean"/> + <load var="doc" href="staffNS" willBeModified="false"/> + <isSupported obj="doc" feature=""xpATH"" + version=""3.0"" var="state"/> + <assertTrue actual="state" id="isSupported-XPath-3.0"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_isSupported_empty.xml b/test/testcases/tests/level3/xpath/Conformance_isSupported_empty.xml new file mode 100644 index 0000000..d441cbe --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_isSupported_empty.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_isSupported_empty"> + <metadata> + <title>Conformance_isSupported_empty</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + 1.3 Conformance - The "feature" parameter in the + "Node.isSupported(feature,version)" + method is the name of the feature and the version is the version + number of the feature to test. XPath is the legal value for the + XPath module. The method should return "true". + + Retrieve the DOM document on which the + "isSupported(feature,version)" method is invoked with "feature" + equal to "XPath" and version to the empty string "". The method + should return a boolean "true" if the implementation claims support + for some version for XPath. + </description> + <date qualifier="created">2002-04-24</date> + <date qualifier="modified">2003-11-29</date> + <subject resource="&spec;#Conformance"/> + </metadata> + <var name="doc" type="Document"/> + <var name="state" type="boolean"/> + <load var="doc" href="staffNS" willBeModified="false"/> + <isSupported obj="doc" feature=""xpATH"" + version="""" var="state"/> + <assertTrue actual="state" id="isSupported-XPath-empty"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/Conformance_isSupported_null.xml b/test/testcases/tests/level3/xpath/Conformance_isSupported_null.xml new file mode 100644 index 0000000..a88377f --- /dev/null +++ b/test/testcases/tests/level3/xpath/Conformance_isSupported_null.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Conformance_isSupported_null"> + <metadata> + <title>Conformance_isSupported_null</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + 1.3 Conformance - Test if + Document.isSupported('XPath', null) returns true + </description> + <date qualifier="created">2003-11-29</date> + <subject resource="&spec;#Conformance"/> + </metadata> + + <var name="doc" type="Document"/> + <var name="state" type="boolean"/> + <var name="nullValue" type="DOMString" isNull="true"/> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <isSupported obj="doc" + feature=""xpATH"" + version="nullValue" + var="state"/> + + <assertTrue actual="state" id="isSupported-XPath-null"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/Element_Nodes.xml b/test/testcases/tests/level3/xpath/Element_Nodes.xml new file mode 100644 index 0000000..9809277 --- /dev/null +++ b/test/testcases/tests/level3/xpath/Element_Nodes.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Element_Nodes"> + <metadata> + <title>Element_Nodes</title> + <creator>Bob Clary</creator> + <description> + 1.2.1- Element Nodes - Evaluate /staff/employee, + check that each matching Node in the result + is an Element. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#Mapping"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document"/> + <var name="resolver" type="XPathNSResolver"/> + <var name="evaluator" type="XPathEvaluator"/> + <var name="contextNode" type="Node"/> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="ANY_TYPE"/> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="nodeType" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" /> + + <!-- Test Body --> + + <iterateNext var="outNode" obj="outresult"/> + <while> + <notNull obj="outNode"/> + + <nodeType var="nodeType" obj="outNode" /> + <assertEquals id="S1.2.1-Element-Nodes-nodeType" + actual="nodeType" + expected="1" + ignoreCase="false"/> + <iterateNext var="outNode" obj="outresult"/> + + </while> + +</test> diff --git a/test/testcases/tests/level3/xpath/Processing_Instruction_Nodes.xml b/test/testcases/tests/level3/xpath/Processing_Instruction_Nodes.xml new file mode 100644 index 0000000..cc98ea0 --- /dev/null +++ b/test/testcases/tests/level3/xpath/Processing_Instruction_Nodes.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Processing_Instruction_Nodes"> + <metadata> + <title>Processing_Instruction_Nodes</title> + <creator>Bob Clary</creator> + <description> + S1.2.7 Processing Instruction Nodes - + Create ANY_TYPE XPathResult matching //processing-instruction(), + check that each matching Node is a Processing Instruction Node. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#Mapping"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" + value=""//processing-instruction()""/> + <var name="xpathType" type="short" value="ANY_TYPE" /> + + <!-- Test Variables --> + + <var name="currNode" type="Node"/> + <var name="nodeType" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" /> + + <!-- Test Body --> + + <iterateNext var="currNode" obj="outresult"/> + <while> + <notNull obj="currNode"/> + + <nodeType var="nodeType" obj="currNode" /> + <assertEquals id="S1.2.7-Processing-Instruction-Nodes-nodetype" + actual="nodeType" + expected="7" + ignoreCase="false"/> + + <iterateNext var="currNode" obj="outresult"/> + + </while> + +</test> diff --git a/test/testcases/tests/level3/xpath/Text_Nodes.xml b/test/testcases/tests/level3/xpath/Text_Nodes.xml new file mode 100644 index 0000000..4897c12 --- /dev/null +++ b/test/testcases/tests/level3/xpath/Text_Nodes.xml @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="Text_Nodes"> + <metadata> + <title>Text_Nodes</title> + <creator>Bob Clary</creator> + <description> + 1.2.4 Text Nodes - + Create ANY_TYPE XPathResult matching //text(), + check that each matching Node is a Text Node, and + that no pair of nodes in the result are siblings. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#Mapping"/> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""//text()"" /> + <var name="xpathType" type="short" value="ANY_TYPE" /> + + <!-- Test Variables --> + + <var name="currNode" type="Node"/> + <var name="nextNode" type="Node"/> + <var name="currNodeNextSibling" type="Node"/> + <var name="nextNodePrevSibling" type="Node"/> + <var name="nodeType" type="int"/> + <var name="isTextNode" type="DOMString" /> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc" /> + <createNSResolver var="resolver" obj="evaluator" nodeResolver="doc" /> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" /> + + <!-- Test Body --> + + <iterateNext var="currNode" obj="outresult" /> + + <while> <notNull obj="currNode"/> + + <nodeType var="nodeType" obj="currNode" /> + + <assign var="isTextNode" value=""true""/> + <if> + <and> + <notEquals actual="nodeType" expected="3"/> + <notEquals actual="nodeType" expected="4"/> + </and> + + <assign var="isTextNode" value=""false""/> + </if> + <assertEquals id="S1.2.4-Text-Nodes-nodeType" + actual="isTextNode" + expected=""true"" + ignoreCase="true"/> + + <iterateNext var="nextNode" obj="outresult"/> + + <if> + <notNull obj="nextNode"/> + + <nextSibling var="currNodeNextSibling" + obj="currNode" interface="Node"/> + <if> + <same actual="currNodeNextSibling" expected="nextNode"/> + <comment>dummy statement</comment> + <else> + <assertTrue id="S1.2.4-Text-Nodes-Adjacent-Next" + actual="false" + /> + </else> + </if> + + <previousSibling var="nextNodePrevSibling" + obj="nextNode" interface="Node"/> + <if> + <same actual="currNode" expected="nextNodePrevSibling"/> + <comment>dummy statement</comment> + <else> + <assertTrue id="S1.2.4-Text-Nodes-Adjacent-Prev" + actual="false" + /> + </else> + </if> + + </if> + + <assign var="currNode" value="nextNode"/> + + </while> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluatorCast01.xml b/test/testcases/tests/level3/xpath/XPathEvaluatorCast01.xml new file mode 100644 index 0000000..e0cf751 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluatorCast01.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluatorCast01"> +<metadata> +<title>XPathEvaluatorCast01</title> +<creator>Philippe Le Hégaret</creator> +<description> +A document is created using implementation.createDocument and +cast to a XPathEvaluator interface. +</description> +<date qualifier="created">2002-04-24</date> +<subject resource="&spec;#XPathEvaluator"/> +</metadata> + &vars; + + &findXPathEvaluator; + + <assertNotNull actual="xpEvaluator" id="notnull"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.xml new file mode 100644 index 0000000..c477127 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR"> + <metadata> + <title>XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR</title> + <creator>Philippe Le Hégaret</creator> + <description> + The XPathEvaluator can create a "XPathExpression" using the method + "createExpression(expression, resolver)". + + Retrieve the DOM document on which the + 'createExpression("12a", null)' method is + invoked with the document element. The method should fail to create + pre-compiled expression and throws + XPathException.INVALID_EXPRESSION_ERR + since "12a" is not an XPath expression. + </description> + <date qualifier="created">2002-04-26</date> + <subject resource="&spec;#XPathEvaluator-createExpression"/> + </metadata> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + &vars; + <var name="exp" type="XPathExpression"/> + + &findXPathEvaluator; + + <assertXPathException id="throw_INVALID_EXPRESSION_ERR"> + <INVALID_EXPRESSION_ERR> + <createExpression obj='xpEvaluator' var='exp' + expression='"12a"' resolver='nullNSResolver' /> + </INVALID_EXPRESSION_ERR> + </assertXPathException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.xml new file mode 100644 index 0000000..d909308 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createExpression_NAMESPACE_ERR_01"> + <metadata> + <title>XPathEvaluator_createExpression_NAMESPACE_ERR_01</title> + <creator>Philippe Le Hégaret</creator> + <description> + The XPathEvaluator can create a "XPathExpression" using the method + "createExpression(expression, resolver)". + + Retrieve the DOM document on which the + 'createExpression("/jfouffa:employee", null)' method is + invoked with the document element. The method should fail to create + pre-compiled expression and throws DOMException.NAMESPACE_ERR + since the prefix jfouffa is not mapped. + </description> + <date qualifier="created">2002-04-26</date> + <subject resource="&spec;#XPathEvaluator-createExpression"/> + </metadata> + &vars; + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="exp" type="XPathExpression"/> + + &findXPathEvaluator; + + <assertDOMException id="throw_NAMESPACE_ERR"> + <NAMESPACE_ERR> + <createExpression obj='xpEvaluator' var='exp' + expression='"/jfouffa:employee"' resolver='nullNSResolver' /> + </NAMESPACE_ERR> + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.xml new file mode 100644 index 0000000..5a197ed --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createExpression_NAMESPACE_ERR_02"> + <metadata> + <title>XPathEvaluator_createExpression_NAMESPACE_ERR_02</title> + <creator>Philippe Le Hégaret</creator> + <description> + The XPathEvaluator can create a "XPathExpression" using the method + "createExpression(expression, resolver)". + + Retrieve the DOM document on which the + 'createExpression("/staff/jfouffa:employee", resolver)' method is + invoked with the document element. The method should fail to create + pre-compiled expression and throws DOMException.NAMESPACE_ERR + since the prefix jfouffa is not mapped. + </description> + <date qualifier="created">2002-04-26</date> + <subject resource="&spec;#XPathEvaluator-createExpression"/> + </metadata> + &vars; + <var name="exp" type="XPathExpression"/> + <var name="root" type='Element'/> + <var name="resolver" type="XPathNSResolver"/> + + &findXPathEvaluator; + + <documentElement obj='doc' var='root'/> + + <createNSResolver obj="xpEvaluator" nodeResolver="root" + var="resolver"/> + + <assertDOMException id="throw_NAMESPACE_ERR"> + <NAMESPACE_ERR> + <createExpression obj='xpEvaluator' var='exp' + expression='"/staff/jfouffa:employee"' resolver='resolver' /> + </NAMESPACE_ERR> + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NS.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NS.xml new file mode 100644 index 0000000..0f66b72 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_NS.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createExpression_NS"> + <metadata> + <title>XPathEvaluator_createExpression_NS</title> + <creator>Philippe Le Hégaret</creator> + <description> + The XPathEvaluator can create a "XPathExpression" using the method + "createExpression(expression, resolver)". + + Retrieve the DOM document on which the + 'createExpression("/staff/nist:employee", resolver)' method is + invoked with the document element. The method should return a + pre-compiled expression. + </description> + <date qualifier="created">2002-04-26</date> + <subject resource="&spec;#XPathEvaluator-createExpression"/> + </metadata> + &vars; + <var name="exp" type="XPathExpression"/> + <var name="root" type='Element'/> + <var name="resolver" type="XPathNSResolver"/> + + &findXPathEvaluator; + + <documentElement obj='doc' var='root'/> + + <createNSResolver obj="xpEvaluator" nodeResolver="root" + var="resolver"/> + + <createExpression obj='xpEvaluator' var='exp' + expression='"/staff/nist:employee"' resolver='resolver' /> + + <assertNotNull actual="exp" id="notnull"/> + + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_no_NS.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_no_NS.xml new file mode 100644 index 0000000..862f2ba --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createExpression_no_NS.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createExpression_no_NS"> + <metadata> + <title>XPathEvaluator_createExpression_no_NS</title> + <creator>Philippe Le Hégaret</creator> + <description> + The XPathEvaluator can create a "XPathExpression" using the method + "createExpression(expression, resolver)". + + Retrieve the DOM document on which the + "createExpression("/", null)" method is invoked with the document + element. The method should return a pre-compiled expression. + </description> + <date qualifier="created">2002-04-26</date> + <subject resource="&spec;#XPathEvaluator-createExpression"/> + </metadata> + &vars; + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="exp" type="XPathExpression"/> + + &findXPathEvaluator; + + <createExpression obj='xpEvaluator' var='exp' + expression='"/"' resolver='nullNSResolver' /> + + <assertNotNull actual="exp" id="notnull"/> + + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_all.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_all.xml new file mode 100644 index 0000000..a4a1b76 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_all.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createNSResolver_all"> + <metadata> + <title>XPathEvaluator_createNSResolver_all</title> + <creator>Bob Clary</creator> + <description> + Iterate over all nodes in the test document, creating + XPathNSResolvers checking that none return a null object. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <var name="doc" type="Document"/> + <var name="staff" type="Element"/> + <var name="staffchildren" type="NodeList"/> + <var name="staffchild" type="Node"/> + <var name="staffgrandchildren" type="NodeList"/> + <var name="staffgrandchild" type="Node"/> + <var name="staffgreatgrandchildren" type="NodeList"/> + <var name="staffgreatgrandchild" type="Node"/> + <var name="resolver" type="XPathNSResolver"/> + <var name="evaluator" type="XPathEvaluator"/> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <createXPathEvaluator var='evaluator' + document='doc'/> + + <createNSResolver var="resolver" + obj="evaluator" + nodeResolver="doc"/> + + <assertNotNull id="documentnotnull" + actual="resolver"/> + + <documentElement var="staff" + obj="doc"/> + + <createNSResolver var="resolver" + obj="evaluator" + nodeResolver="staff"/> + + <assertNotNull id="documentElementnotnull" + actual="resolver"/> + + <childNodes var="staffchildren" + obj="staff"/> + + <for-each member="staffchild" + collection="staffchildren"> + + <createNSResolver var="resolver" + obj="evaluator" + nodeResolver="staffchild"/> + + <assertNotNull id="staffchildnotnull" + actual="resolver"/> + + <childNodes var="staffgrandchildren" + obj="staffchild"/> + + <for-each member="staffgrandchild" + collection="staffgrandchildren"> + + <createNSResolver var="resolver" + obj="evaluator" + nodeResolver="staffgrandchild"/> + + <assertNotNull id="staffgrandchildnotnull" + actual="resolver"/> + + <childNodes var="staffgreatgrandchildren" + obj="staffgrandchild"/> + + <for-each member="staffgreatgrandchild" + collection="staffgreatgrandchildren"> + + <createNSResolver var="resolver" + obj="evaluator" + nodeResolver="staffgreatgrandchild"/> + + <assertNotNull id="staffgreatgrandchildnotnull" + actual="resolver"/> + + </for-each> + + </for-each> + + </for-each> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_document.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_document.xml new file mode 100644 index 0000000..5d77b39 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_document.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createNSResolver_document"> + <metadata> + <title>XPathEvaluator_createNSResolver_document</title> + <creator>Philippe Le Hégaret</creator> + <description> + The XPathEvaluator can create "XPathNSResolver" using the method + "createNSResolver(nodeResolver)". + + Retrieve the DOM document on which the + "createNSResolver(nodeResolver)" method is invoked with the document + itself. The method should return a resolver. + </description> + <date qualifier="created">2002-04-26</date> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + &vars; + <var name="resolver" type="XPathNSResolver"/> + + &findXPathEvaluator; + + <createNSResolver obj="xpEvaluator" nodeResolver="doc" var="resolver"/> + + <assertNotNull actual="resolver" id="notnull"/> + + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_documentElement.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_documentElement.xml new file mode 100644 index 0000000..263cd54 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_createNSResolver_documentElement.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_createNSResolver_documentElement"> + <metadata> + <title>XPathEvaluator_createNSResolver_documentElement</title> + <creator>Philippe Le Hégaret</creator> + <description> + The XPathEvaluator can create "XPathNSResolver" using the method + "createNSResolver(nodeResolver)". + + Retrieve the DOM document on which the + "createNSResolver(nodeResolver)" method is invoked with the document + element. The method should return a resolver. + </description> + <date qualifier="created">2002-04-26</date> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + &vars; + <var name="resolver" type="XPathNSResolver"/> + <var name="root" type='Element'/> + + &findXPathEvaluator; + + <documentElement obj='doc' var='root'/> + + <createNSResolver obj="xpEvaluator" nodeResolver="root" + var="resolver"/> + + <assertNotNull actual="resolver" id="notnull"/> + + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.xml new file mode 100644 index 0000000..51b4de4 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR"> + <metadata> + <title>XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + Test if XPathEvaluator.evaluate properly throws INVALID_EXPRESSION_ERROR + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + </metadata> + + &vars; + + <var name="root" type='Element'/> + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + + &findXPathEvaluator; + + <documentElement obj='doc' var='root'/> + + <assertXPathException id="throw_INVALID_EXPRESSION_ERR"> + <INVALID_EXPRESSION_ERR> + <evaluate interface="XPathEvaluator" + obj='xpEvaluator' + var='result' + expression='"12a"' + contextNode='root' + resolver='nullNSResolver' + type='0' + result='nullResult'/> + </INVALID_EXPRESSION_ERR> + + </assertXPathException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.xml new file mode 100644 index 0000000..1123424 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_evaluate_NAMESPACE_ERR"> + <metadata> + <title>XPathEvaluator_evaluate_NAMESPACE_ERR</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + Test if XPathEvaluator.evaluate properly throws NAMESPACE_ERROR + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + </metadata> + + &vars; + + <var name="root" type='Element'/> + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + + &findXPathEvaluator; + + <documentElement obj='doc' + var='root'/> + + <assertDOMException id="throw_NAMESPACE_ERR"> + <NAMESPACE_ERR> + <evaluate interface="XPathEvaluator" + obj='xpEvaluator' + var='result' + expression='"//foo:bar"' + contextNode='root' + resolver='nullNSResolver' + type='0' + result='nullResult'/> + </NAMESPACE_ERR> + + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.xml new file mode 100644 index 0000000..c2dd8d6 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_evaluate_NOT_SUPPORTED_ERR"> + <metadata> + <title>XPathEvaluator_evaluate_NOT_SUPPORTED_ERR</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + Test if XPathEvaluator.evaluate properly throws NOT_SUPPORTED_ERROR + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + </metadata> + + <var name='doc' type='Document'/> + <var name='xpEvaluator' type='XPathEvaluator'/> + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + <var name="contextNode" type="Node"/> + + <load var='doc' href='staffNS' willBeModified='false'/> + + <createXPathEvaluator var='xpEvaluator' document='doc'/> + + <createEntityReference var="contextNode" obj="doc" name=""entityname""/> + + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <evaluate interface="XPathEvaluator" + obj='xpEvaluator' + var='result' + expression='"//foo:bar"' + contextNode='contextNode' + resolver='nullNSResolver' + type='0' + result='nullResult'/> + </NOT_SUPPORTED_ERR> + + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.xml new file mode 100644 index 0000000..152874e --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_evaluate_TYPE_ERR"> + <metadata> + <title>XPathEvaluator_evaluate_TYPE_ERR</title> + <creator>Curt Arnold</creator> + <description> +Evaluate "string(/)" and request that the result be a FIRST_ORDERED_NODE_TYPE, should +result in a TYPE_ERR. + </description> + <date qualifier="created">2004-01-10</date> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=508"/> + </metadata> + &vars; + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + + &findXPathEvaluator; + + <assertXPathException id="throw_TYPE_ERR"> + <TYPE_ERR> + <evaluate interface="XPathEvaluator" obj='xpEvaluator' var='result' + expression='"string(/)"' contextNode='doc' resolver='nullNSResolver' type='9' result='nullResult'/> + </TYPE_ERR> + </assertXPathException> +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.xml new file mode 100644 index 0000000..a01a856 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR"> + <metadata> + <title>XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + Test if XPathEvaluator.evaluate properly throws WRONG_DOCUMENT_ERROR + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + </metadata> + + <var name='doc1' type='Document'/> + <var name='doc2' type='Document'/> + <var name='xpEvaluator' type='XPathEvaluator'/> + <var name="root" type='Element'/> + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + + <load var='doc1' href='staffNS' willBeModified='false'/> + <load var='doc2' href='staff' willBeModified='false'/> + + <createXPathEvaluator var='xpEvaluator' document='doc1'/> + + <documentElement obj='doc2' var='root'/> + + <assertDOMException id="throw_WRONG_DOCUMENT_ERR"> + <WRONG_DOCUMENT_ERR> + <evaluate interface="XPathEvaluator" + obj='xpEvaluator' + var='result' + expression='"//foo:bar"' + contextNode='root' + resolver='nullNSResolver' + type='0' + result='nullResult'/> + </WRONG_DOCUMENT_ERR> + + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_document.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_document.xml new file mode 100644 index 0000000..5c053d8 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_document.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_evaluate_document"> + <metadata> + <title>XPathEvaluator_evaluate_document</title> + <creator>Philippe Le Hégaret</creator> + <description> + Retrieve the XPathEvaluator on which the + "evaluate("/", document, null, 0, null)" method is invoked with the document + element. The method should return an XPathResult. + </description> + <date qualifier="created">2002-04-28</date> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + </metadata> + &vars; + <var name="root" type='Element'/> + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + + &findXPathEvaluator; + + <assign value='doc' var='root'/> + + <evaluate interface="XPathEvaluator" obj='xpEvaluator' var='result' + expression='"/"' contextNode='root' resolver='nullNSResolver' type='0' result='nullResult'/> + + <assertNotNull actual="result" id="notnull"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_documentElement.xml b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_documentElement.xml new file mode 100644 index 0000000..ec07e23 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathEvaluator_evaluate_documentElement.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathEvaluator_evaluate_documentElement"> + <metadata> + <title>XPathEvaluator_evaluate_documentElement</title> + <creator>Philippe Le Hégaret</creator> + <description> + Retrieve the XPathEvaluator on which the + "evaluate("/", documentElement, null, 0, null)" method is invoked with the document + element. The method should return an XPathResult. + </description> + <date qualifier="created">2002-04-28</date> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + </metadata> + &vars; + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="root" type='Element'/> + <var name="result" type="XPathResult"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + + &findXPathEvaluator; + + <documentElement obj='doc' var='root'/> + + <evaluate interface="XPathEvaluator" obj='xpEvaluator' var='result' + expression='"/"' contextNode='root' resolver='nullNSResolver' type='0' result='nullResult'/> + + <assertNotNull actual="result" id="notnull"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.xml b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.xml new file mode 100644 index 0000000..6d4af91 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathExpression_evaluate_NOT_SUPPORTED_ERR"> + <metadata> + <title>XPathEvaluator_expression_NOT_SUPPORTED_ERR</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + Test if XPathExpression.evaluate properly throws NOT_SUPPORTED_ERROR + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathExpression-evaluate"/> + </metadata> + + <var name='doc' type='Document'/> + <var name='xpEvaluator' type='XPathEvaluator'/> + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + <var name="contextNode" type="Node"/> + <var name="xpathExpression" type="XPathExpression"/> + + <load var='doc' href='staffNS' willBeModified='false'/> + + <createXPathEvaluator var='xpEvaluator' document='doc'/> + + <createExpression interface="XPathEvaluator" + obj='xpEvaluator' + var='xpathExpression' + expression='"//foo"' + resolver='nullNSResolver' + /> + + <createEntityReference var="contextNode" obj="doc" name=""entityname""/> + + <assertDOMException id="throw_NOT_SUPPORTED_ERR"> + <NOT_SUPPORTED_ERR> + <evaluate interface="XPathExpression" + obj='xpathExpression' + var='result' + contextNode='contextNode' + type='0' + result='nullResult'/> + </NOT_SUPPORTED_ERR> + + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.xml b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.xml new file mode 100644 index 0000000..4b7f790 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathExpression_evaluate_WRONG_DOCUMENT_ERR"> + <metadata> + <title>XPathExpression_evaluate_WRONG_DOCUMENT_ERR</title> + <creator>Philippe Le Hégaret</creator> + <contributor>Bob Clary</contributor> + <description> + Test if XPathExpression.evaluate properly throws WRONG_DOCUMENT_ERROR + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathExpression-evaluate"/> + </metadata> + + <var name='doc1' type='Document'/> + <var name='doc2' type='Document'/> + <var name='xpEvaluator' type='XPathEvaluator'/> + <var name="root" type='Element'/> + <var name="result" type="XPathResult"/> + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + <var name="xpathExpression" type="XPathExpression"/> + + <load var='doc1' href='staffNS' willBeModified='false'/> + <load var='doc2' href='staff' willBeModified='false'/> + + <createXPathEvaluator var='xpEvaluator' document='doc1'/> + + <createExpression interface="XPathEvaluator" + obj='xpEvaluator' + var='xpathExpression' + expression='"//foo"' + resolver='nullNSResolver' + /> + + <documentElement obj='doc2' var='root'/> + + <assertDOMException id="throw_WRONG_DOCUMENT_ERR"> + <WRONG_DOCUMENT_ERR> + <evaluate interface="XPathExpression" + obj='xpathExpression' + var='result' + contextNode='root' + type='0' + result='nullResult'/> + </WRONG_DOCUMENT_ERR> + + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathExpression_evaluate_document.xml b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_document.xml new file mode 100644 index 0000000..9892982 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_document.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathExpression_evaluate_document"> + <metadata> + <title>XPathExpression_evaluate_document</title> + <creator>Philippe Le Hégaret</creator> + <description> + Test if XPathExpression.evaluate returns non-null result + using Document as contextNode. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathExpression-evaluate"/> + </metadata> + &vars; + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="contextNode" type='Element'/> + <var name="xpathResult" type="XPathResult"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + <var name="xpathExpression" type="XPathExpression"/> + <var name="expression" type="DOMString" value=""/""/> + + &findXPathEvaluator; + + <assign value='doc' var='contextNode'/> + + <createExpression interface="XPathEvaluator" + obj='xpEvaluator' + var='xpathExpression' + expression='expression' + resolver='nullNSResolver' + /> + + <evaluate interface="XPathExpression" + obj='xpathExpression' + var='xpathResult' + contextNode='contextNode' + type='0' + result='nullResult'/> + + <assertNotNull actual="xpathResult" id="notnull"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathExpression_evaluate_documentElement.xml b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_documentElement.xml new file mode 100644 index 0000000..f022664 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathExpression_evaluate_documentElement.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathExpression_evaluate_documentElement"> + <metadata> + <title>XPathExpression_evaluate_documentElement</title> + <creator>Philippe Le Hégaret</creator> + <creator>Bob Clary</creator> + <description> + Test if XPathExpression.evaluate returns non-null result + using Document.documentElement as contextNode. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathExpression-evaluate"/> + <subject resource="&spec;#XPathEvaluator-createExpression"/> + </metadata> + + &vars; + + <var name="nullNSResolver" type="XPathNSResolver" isNull="true"/> + <var name="contextNode" type='Element'/> + <var name="xpathResult" type="XPathResult"/> + <var name="nullResult" type="XPathResult" isNull="true"/> + <var name="xpathExpression" type="XPathExpression"/> + <var name="expression" type="DOMString" value=""/""/> + + &findXPathEvaluator; + + <documentElement obj='doc' var='contextNode'/> + + <createExpression interface="XPathEvaluator" + obj='xpEvaluator' + var='xpathExpression' + expression='expression' + resolver='nullNSResolver' + /> + + <evaluate interface="XPathExpression" + obj='xpathExpression' + var='xpathResult' + contextNode='contextNode' + type='0' + result='nullResult'/> + + <assertNotNull actual="xpathResult" id="notnull"/> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.xml b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.xml new file mode 100644 index 0000000..7467381 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathNSResolver_lookupNamespaceURI_nist_dmstc"> + <metadata> + <title>XPathNSResolver_lookupNamespaceURI_nist_dmstc</title> + <creator>Bob Clary</creator> + <description> + Interate over all employee elements with xmlns:dmstc attribute + in the test document, creating nsresolvers checking that + for all children the prefix 'nist' resolves to + http://www.nist.gov and that prefix 'dmstc' resolves to the same + value as employee.getAttribute('xmlns:dmstc'). + </description> + <date qualifier="created">2003-12-09</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathNSResolver-lookupNamespaceURI"/> + </metadata> + + <!-- Standard Variables --> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + + <!-- Test Variables --> + + <var name="lookupNamespaceURI" type="DOMString"/> + <var name="namespaceURI" type="DOMString"/> + <var name="child" type="Element"/> + <var name="children" type="NodeList"/> + <var name="employee" type="Element"/> + <var name="employees" type="NodeList"/> + + <!-- Load Test Document --> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <getElementsByTagNameNS obj="doc" + interface="Document" + var="employees" + namespaceURI=""*"" + localName=""employee"" + /> + + <createXPathEvaluator var='evaluator' + document='doc'/> + + + <for-each member="employee" + collection="employees"> + + + <getAttribute obj="employee" + interface="Element" + name=""xmlns:dmstc"" + var="namespaceURI" + /> + + <getElementsByTagNameNS obj="employee" + interface="Element" + var="children" + namespaceURI=""*"" + localName=""*"" + /> + + <for-each member="child" + collection="children"> + + <createNSResolver obj="evaluator" + var="resolver" + nodeResolver="child" + /> + + <lookupNamespaceURI obj="resolver" + interface="XPathNSResolver" + var="lookupNamespaceURI" + prefix=""dmstc"" + /> + + <assertEquals id="dmstcequal" + actual="lookupNamespaceURI" + expected="namespaceURI" + ignoreCase="false" + /> + + <lookupNamespaceURI obj="resolver" + interface="XPathNSResolver" + var="lookupNamespaceURI" + prefix=""nist"" + /> + + <assertEquals id="nistequal" + actual="lookupNamespaceURI" + expected=""http://www.nist.gov"" + ignoreCase="false" + /> + </for-each> + + </for-each> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.xml b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.xml new file mode 100644 index 0000000..b628bfa --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2004 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathNSResolver_lookupNamespaceURI_null"> + <metadata> + <title>XPathNSResolver_lookupNamespaceURI_null</title> + <creator>Bob Clary</creator> + <description> + Iterate over all elements in the test document, creating + nsresolvers checking that looking up non-existent prefixes + always returns null. + </description> + <date qualifier="created">2004-12-09</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathNSResolver-lookupNamespaceURI"/> + </metadata> + + <!-- Standard Variables --> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + + <!-- Test Variables --> + + <var name="element" type="Element"/> + <var name="elements" type="NodeList"/> + <var name="lookupNamespaceURI" type="DOMString"/> + <var name="namespaceURI" type="DOMString"/> + <var name="prefix" type="DOMString"/> + + <!-- Load Test Document --> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <!-- Test Body --> + + <getElementsByTagNameNS obj="doc" + interface="Document" + var="elements" + namespaceURI=""*"" + localName=""*"" + /> + + <createXPathEvaluator var='evaluator' + document='doc'/> + + + <for-each member="element" + collection="elements"> + + + <createNSResolver obj="evaluator" + var="resolver" + nodeResolver="element" + /> + + <lookupNamespaceURI obj="resolver" + interface="XPathNSResolver" + var="lookupNamespaceURI" + prefix=""foobar"" + /> + + <assertNull id="notnull" + actual="lookupNamespaceURI" + /> + </for-each> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.xml b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.xml new file mode 100644 index 0000000..e682843 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathNSResolver_lookupNamespaceURI_prefix"> + <metadata> + <title>XPathNSResolver_lookupNamespaceURI_prefix</title> + <creator>Bob Clary</creator> + <description> + Iterate over all Elements in the test document, creating + nsresolvers checking that if the Element has a prefix, then + lookupNamespaceURI returns the same value as Element.namespaceURI + </description> + <date qualifier="created">2003-12-09</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathNSResolver-lookupNamespaceURI"/> + </metadata> + + <!-- Standard Variables --> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + + <!-- Test Variables --> + + <var name="element" type="Element"/> + <var name="elements" type="NodeList"/> + <var name="lookupNamespaceURI" type="DOMString"/> + <var name="namespaceURI" type="DOMString"/> + <var name="prefix" type="DOMString"/> + + <!-- Load Test Document --> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <!-- Test Body --> + + <getElementsByTagNameNS obj="doc" + interface="Document" + var="elements" + namespaceURI=""*"" + localName=""*"" + /> + + <createXPathEvaluator var='evaluator' + document='doc'/> + + + <for-each member="element" + collection="elements"> + + <prefix obj="element" + var="prefix"/> + + <if> + <notNull obj="prefix"/> + + <createNSResolver obj="evaluator" + var="resolver" + nodeResolver="element" + /> + + <namespaceURI obj="element" + interface="Node" + var="namespaceURI" + /> + + <lookupNamespaceURI obj="resolver" + interface="XPathNSResolver" + var="lookupNamespaceURI" + prefix="prefix" + /> + + <assertEquals id="equal" + actual="namespaceURI" + expected="lookupNamespaceURI" + ignoreCase="false" + /> + </if> + </for-each> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.xml b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.xml new file mode 100644 index 0000000..a060439 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathNSResolver_lookupNamespaceURI_xml"> + <metadata> + <title>XPathNSResolver_lookupNamespaceURI_xml</title> + <creator>Bob Clary</creator> + <description> + Iterate over all elements in the test document, creating + nsresolvers checking that looking up the xml prefix returns + http://www.w3.org/XML/1998/namespace. + </description> + <date qualifier="created">2003-12-09</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathNSResolver-lookupNamespaceURI"/> + </metadata> + + <!-- Standard Variables --> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + + <!-- Test Variables --> + + <var name="element" type="Element"/> + <var name="elements" type="NodeList"/> + <var name="lookupNamespaceURI" type="DOMString"/> + <var name="namespaceURI" type="DOMString"/> + <var name="prefix" type="DOMString"/> + + <!-- Load Test Document --> + + <load var="doc" href="staffNS" willBeModified="false"/> + + <!-- Test Body --> + + <getElementsByTagNameNS obj="doc" + interface="Document" + var="elements" + namespaceURI=""*"" + localName=""*"" + /> + + <createXPathEvaluator var='evaluator' + document='doc'/> + + + <for-each member="element" + collection="elements"> + + + <createNSResolver obj="evaluator" + var="resolver" + nodeResolver="element" + /> + + <lookupNamespaceURI obj="resolver" + interface="XPathNSResolver" + var="lookupNamespaceURI" + prefix=""xml"" + /> + + <assertEquals id="equal" + actual="lookupNamespaceURI" + expected=""http://www.w3.org/XML/1998/namespace"" + ignoreCase="false" + /> + </for-each> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_TYPE_ERR.xml b/test/testcases/tests/level3/xpath/XPathResult_TYPE_ERR.xml new file mode 100644 index 0000000..29cae68 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_TYPE_ERR.xml @@ -0,0 +1,457 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_TYPE_ERR"> + <metadata> + <title>XPathResult_TYPE_ERR</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult for the expression /staff/employee + for each type of XPathResultType, checking that TYPE_ERR + is thrown when inappropriate properties and methods are accessed. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#TYPE_ERR"/> + <subject resource="&spec;#XPathException"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathResult-resultType"/> + <subject resource="&spec;#XPathResult-booleanValue"/> + <subject resource="&spec;#XPathResult-numberValue"/> + <subject resource="&spec;#XPathResult-singleNodeValue"/> + <subject resource="&spec;#XPathResult-snapshot-length"/> + <subject resource="&spec;#XPathResult-stringValue"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + <subject resource="&spec;#XPathResult-snapshotItem"/> + </metadata> + + <var name="doc" type="Document"/> + <var name="resolver" type="XPathNSResolver"/> + <var name="evaluator" type="XPathEvaluator"/> + <var name="expression" type="DOMString" + value=""/staff/employee""/> + <var name="contextNode" type="Node"/> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + <var name="inNodeType" type="short"/> + <var name="outNodeType" type="short"/> + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="booleanValue" type="boolean"/> + <var name="shortValue" type="short"/> + <var name="intValue" type="int"/> + <var name="doubleValue" type="double"/> + <var name="nodeValue" type="Node"/> + <var name="stringValue" type="DOMString"/> + + <var name="nodeTypeList" type="List"> + <member type="short">0</member> + <member type="short">1</member> + <member type="short">2</member> + <member type="short">3</member> + <member type="short">4</member> + <member type="short">5</member> + <member type="short">6</member> + <member type="short">7</member> + <member type="short">8</member> + <member type="short">9</member> + </var> + + <load var="doc" href="staff" willBeModified="false"/> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <for-each collection="nodeTypeList" member="inNodeType"> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="inNodeType" + result="inresult" + interface="XPathEvaluator" + /> + + <resultType obj="outresult" + var="outNodeType"/> + + <if> + <equals expected="outNodeType" actual="NUMBER_TYPE"/> + <assertXPathException id="number_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="number_singleNodeValue_TYPE_ERR"> + <TYPE_ERR> + <singleNodeValue obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="number_snapshotLength_TYPE_ERR"> + <TYPE_ERR> + <snapshotLength obj="outresult" + var="intValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="number_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="number_iterateNext_TYPE_ERR"> + <TYPE_ERR> + <iterateNext obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="number_snapshotItem_TYPE_ERR"> + <TYPE_ERR> + <snapshotItem obj="outresult" + var="nodeValue" + index="0"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="STRING_TYPE"/> + <assertXPathException id="string_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="string_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="string_singleNodeValue_TYPE_ERR"> + <TYPE_ERR> + <singleNodeValue obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="string_snapshotLength_TYPE_ERR"> + <TYPE_ERR> + <snapshotLength obj="outresult" + var="intValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="string_iterateNext_TYPE_ERR"> + <TYPE_ERR> + <iterateNext obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="string_snapshotItem_TYPE_ERR"> + <TYPE_ERR> + <snapshotItem obj="outresult" + var="nodeValue" + index="0"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="BOOLEAN_TYPE"/> + <assertXPathException id="boolean_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="boolean_singleNodeValue_TYPE_ERR"> + <TYPE_ERR> + <singleNodeValue obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="boolean_snapshotLength_TYPE_ERR"> + <TYPE_ERR> + <snapshotLength obj="outresult" + var="intValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="boolean_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="boolean_iterateNext_TYPE_ERR"> + <TYPE_ERR> + <iterateNext obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="boolean_snapshotItem_TYPE_ERR"> + <TYPE_ERR> + <snapshotItem obj="outresult" + var="nodeValue" + index="0"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="UNORDERED_NODE_ITERATOR_TYPE"/> + <assertXPathException id="unordered_node_iterator_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_iterator_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_iterator_singleNodeValue_TYPE_ERR"> + <TYPE_ERR> + <singleNodeValue obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_iterator_snapshotLength_TYPE_ERR"> + <TYPE_ERR> + <snapshotLength obj="outresult" + var="intValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_iterator_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_iterator_snapshotItem_TYPE_ERR"> + <TYPE_ERR> + <snapshotItem obj="outresult" + var="nodeValue" + index="0"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="ORDERED_NODE_ITERATOR_TYPE"/> + <assertXPathException id="ordered_node_iterator_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_iterator_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_iterator_singleNodeValue_TYPE_ERR"> + <TYPE_ERR> + <singleNodeValue obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_iterator_snapshotLength_TYPE_ERR"> + <TYPE_ERR> + <snapshotLength obj="outresult" + var="intValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_iterator_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_iterator_snapshotItem_TYPE_ERR"> + <TYPE_ERR> + <snapshotItem obj="outresult" + var="nodeValue" + index="0"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="UNORDERED_NODE_SNAPSHOT_TYPE"/> + <assertXPathException id="unordered_node_snapshot_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_snapshot_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_snapshot_singleNodeValue_TYPE_ERR"> + <TYPE_ERR> + <singleNodeValue obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_snapshot_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="unordered_node_snapshot_iterateNext_TYPE_ERR"> + <TYPE_ERR> + <iterateNext obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="ORDERED_NODE_SNAPSHOT_TYPE"/> + <assertXPathException id="ordered_node_snapshot_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_snapshot_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_snapshot_singleNodeValue_TYPE_ERR"> + <TYPE_ERR> + <singleNodeValue obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_snapshot_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="ordered_node_snapshot_iterateNext_TYPE_ERR"> + <TYPE_ERR> + <iterateNext obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="ANY_UNORDERED_NODE_TYPE"/> + <assertXPathException id="any_unordered_node_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="any_unordered_node_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="any_unordered_node_snapshotLength_TYPE_ERR"> + <TYPE_ERR> + <snapshotLength obj="outresult" + var="intValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="any_unordered_node_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="any_unordered_node_iterateNext_TYPE_ERR"> + <TYPE_ERR> + <iterateNext obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="any_unordered_node_snapshotItem_TYPE_ERR"> + <TYPE_ERR> + <snapshotItem obj="outresult" + var="nodeValue" + index="0"/> + </TYPE_ERR> + </assertXPathException> + </if> + <if> + <equals expected="outNodeType" actual="FIRST_ORDERED_NODE_TYPE"/> + <assertXPathException id="first_ordered_node_booleanValue_TYPE_ERR"> + <TYPE_ERR> + <booleanValue obj="outresult" + var="booleanValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="first_ordered_node_numberValue_TYPE_ERR"> + <TYPE_ERR> + <numberValue obj="outresult" + var="doubleValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="first_ordered_node_snapshotLength_TYPE_ERR"> + <TYPE_ERR> + <snapshotLength obj="outresult" + var="intValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="first_ordered_node_stringValue_TYPE_ERR"> + <TYPE_ERR> + <stringValue obj="outresult" + var="stringValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="first_ordered_node_iterateNext_TYPE_ERR"> + <TYPE_ERR> + <iterateNext obj="outresult" + var="nodeValue"/> + </TYPE_ERR> + </assertXPathException> + <assertXPathException id="first_ordered_node_snapshotItem_TYPE_ERR"> + <TYPE_ERR> + <snapshotItem obj="outresult" + var="nodeValue" + index="0"/> + </TYPE_ERR> + </assertXPathException> + </if> + + </for-each> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_booleanValue_false.xml b/test/testcases/tests/level3/xpath/XPathResult_booleanValue_false.xml new file mode 100644 index 0000000..bb513f0 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_booleanValue_false.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_booleanValue_false"> + <metadata> + <title>XPathResult_booleanValue_false</title> + <creator>Bob Clary</creator> + <description> + Create BOOLEAN_TYPE XPathResult matching /staff/workerbee, + checking that XPathResult.booleanValue == false + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-booleanValue"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/workerbee""/> + <var name="xpathType" type="short" value="BOOLEAN_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="nodeType" type="int"/> + <var name="parent" type="Node"/> + <var name="owner" type="Node"/> + <var name="ownerType" type="int"/> + <var name="booleanValue" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <booleanValue obj="outresult" + var="booleanValue" + /> + + <assertFalse id="false" + actual="booleanValue" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_booleanValue_true.xml b/test/testcases/tests/level3/xpath/XPathResult_booleanValue_true.xml new file mode 100644 index 0000000..ad52246 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_booleanValue_true.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_booleanValue_true"> + <metadata> + <title>XPathResult_booleanValue_true</title> + <creator>Bob Clary</creator> + <description> + Create BOOLEAN_TYPE XPathResult matching /staff/employee, + checking that XPathResult.booleanValue == true + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-booleanValue"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="BOOLEAN_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="nodeType" type="int"/> + <var name="parent" type="Node"/> + <var name="owner" type="Node"/> + <var name="ownerType" type="int"/> + <var name="booleanValue" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <booleanValue obj="outresult" + var="booleanValue" + /> + + <assertTrue id="true" + actual="booleanValue" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.xml new file mode 100644 index 0000000..5a19d48 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_ANY_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_ANY_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a ANY_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are invalidated XPathResult.invalidIteratorState == true. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="ANY_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertTrue id="true" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.xml new file mode 100644 index 0000000..83ad159 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a ANY_UNORDERED_NODE_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are not invalidated XPathResult.invalidIteratorState == false. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="ANY_UNORDERED_NODE_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.xml new file mode 100644 index 0000000..09679ed --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_BOOLEAN_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_BOOLEAN_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a BOOLEAN_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are not invalidated XPathResult.invalidIteratorState == false. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="BOOLEAN_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.xml new file mode 100644 index 0000000..99931f4 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a FIRST_ORDERED_NODE_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are not invalidated XPathResult.invalidIteratorState == false. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="FIRST_ORDERED_NODE_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.xml new file mode 100644 index 0000000..f845eb3 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_NUMBER_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_NUMBER_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a NUMBER_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are not invalidated XPathResult.invalidIteratorState == false. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="NUMBER_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.xml new file mode 100644 index 0000000..9da142c --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a ORDERED_NODE_ITERATOR_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are invalidated XPathResult.invalidIteratorState == true. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="ORDERED_NODE_ITERATOR_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertTrue id="true" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.xml new file mode 100644 index 0000000..ed41282 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a ORDERED_NODE_SNAPSHOT_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are not invalidated XPathResult.invalidIteratorState == false. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="ORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.xml new file mode 100644 index 0000000..5348d82 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_STRING_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_STRING_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a STRING_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are not invalidated XPathResult.invalidIteratorState == false. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="STRING_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.xml new file mode 100644 index 0000000..92c0a36 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a UNORDERED_NODE_ITERATOR_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are invalidated XPathResult.invalidIteratorState == true. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="UNORDERED_NODE_ITERATOR_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertTrue id="true" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.xml new file mode 100644 index 0000000..f4c02d5 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE"> + <metadata> + <title>XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create a UNORDERED_NODE_SNAPSHOT_TYPE XPathResult matching /staff/employee, + modify the Document, then check that iterator XPathResults + are not invalidated XPathResult.invalidIteratorState == false. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult-invalid-iterator-state"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="UNORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + <var name="invalidIteratorState" type="boolean"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <invalidIteratorState obj="outresult" + var="invalidIteratorState" + /> + + <assertFalse id="false" + actual="invalidIteratorState" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.xml b/test/testcases/tests/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.xml new file mode 100644 index 0000000..cfec132 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_iterateNext_INVALID_STATE_ERR"> + <metadata> + <title>XPathResult_iterateNext_INVALID_STATE_ERR</title> + <creator>Bob Clary</creator> + <description> + Create a ANY_TYPE XPathResult matching /staff/employee, + modify the Document, then check that XPathResults.iterateNext + throws DOMException INVALID_STATE_ERR. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathEvaluator"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathNSResolver"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResult-iterateNext"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="xpathType" type="short" value="ANY_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="nodeType" type="int"/> + <var name="parent" type="Node"/> + <var name="owner" type="Node"/> + <var name="ownerType" type="int"/> + <var name="employee" type="Node"/> + <var name="docElement" type="Node"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="true"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <!-- Test Body --> + + <documentElement obj="doc" + var="docElement"/> + + <createElement obj="doc" + var="employee" + tagName=""employee""/> + + <appendChild obj="docElement" + newChild="employee" + var="employee"/> + + <assertDOMException id="throw_INVALID_STATE_ERR"> + <INVALID_STATE_ERR> + <iterateNext var="outNode" obj="outresult"/> + </INVALID_STATE_ERR> + </assertDOMException> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.xml new file mode 100644 index 0000000..3a41bfd --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.xml @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE"> + <metadata> + <title>XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult ORDERED_NODE_ITERATOR_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.iteratorNext returns the nodes in document order, + and that the correct number is returned. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-iteratorNext"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="ORDERED_NODE_ITERATOR_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="index" type="int"/> + <var name="text" type="DOMString" /> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <assign var="index" + value="0" + /> + + <iterateNext var="outNode" obj="outresult"/> + <while> + <notNull obj="outNode"/> + + <data obj="outNode" + interface="CharacterData" + var="text" + /> + + <if><equals actual="index" expected="0" /> + + <assertEquals id="first" + actual="text" + expected=""EMP0001"" + ignoreCase="false" + /> + </if> + + <if><equals actual="index" expected="1" /> + + <assertEquals id="second" + actual="text" + expected=""EMP0002"" + ignoreCase="false" + /> + </if> + + <if><equals actual="index" expected="2" /> + + <assertEquals id="third" + actual="text" + expected=""EMP0003"" + ignoreCase="false" + /> + </if> + + <if><equals actual="index" expected="3" /> + + <assertEquals id="fourth" + actual="text" + expected=""EMP0004"" + ignoreCase="false" + /> + </if> + + <if><equals actual="index" expected="4" /> + + <assertEquals id="fifth" + actual="text" + expected=""EMP0005"" + ignoreCase="false" + /> + </if> + + <increment var="index" + value="1" + /> + + <iterateNext var="outNode" obj="outresult"/> + + </while> + + <assertEquals id="count" + actual="index" + expected="5" + ignoreCase="false" + /> +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE.xml new file mode 100644 index 0000000..ff0629b --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE"> + <metadata> + <title>XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult UNORDERED_NODE_ITERATOR_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.iteratorNext contains the correct number of nodes. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-iteratorNext"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="UNORDERED_NODE_ITERATOR_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="nodeType" type="int"/> + <var name="parent" type="Node"/> + <var name="owner" type="Node"/> + <var name="ownerType" type="int"/> + <var name="index" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <assign var="index" + value="0" + /> + + <iterateNext var="outNode" obj="outresult"/> + <while> + <notNull obj="outNode"/> + + <increment var="index" + value="1" + /> + + <iterateNext var="outNode" obj="outresult"/> + + </while> + + <assertEquals id="count" + actual="index" + expected="4" + ignoreCase="false" + /> +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_numberValue.xml b/test/testcases/tests/level3/xpath/XPathResult_numberValue.xml new file mode 100644 index 0000000..dd6a2ee --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_numberValue.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_numberValue"> + <metadata> + <title>XPathResult_numberValue</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult NUMBER_VALUE XPathResultType for expression + /staff/employee/salary[text() = '56,000'] checking that the + XPathResult.numberValue == 56.0 + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-numberValue"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""substring-before(/staff/employee/salary[text() = '56,000'], ',')""/> + <var name="xpathType" type="short" value="NUMBER_TYPE" /> + + <!-- Test Variables --> + + <var name="numberValue" type="double"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <numberValue obj="outresult" + var="numberValue" + /> + + <assertEquals id="same" + actual="numberValue" + expected="56.0" + ignoreCase="false" + /> +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_resultType.xml b/test/testcases/tests/level3/xpath/XPathResult_resultType.xml new file mode 100644 index 0000000..05b4414 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_resultType.xml @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_resultType"> + <metadata> + <title>XPathResult_resultType</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult for the expression /staff/employee + for each type of XPathResultType, checking that the resultType + of the XPathResult matches the requested type. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + <subject resource="&spec;#XPathEvaluator-evaluate"/> + <subject resource="&spec;#XPathResult-resultType"/> + <subject resource="&spec;#XPathException"/> + + </metadata> + + <var name="doc" type="Document"/> + <var name="resolver" type="XPathNSResolver"/> + <var name="evaluator" type="XPathEvaluator"/> + <var name="expression" type="DOMString" value=""/staff/employee""/> + <var name="contextNode" type="Node"/> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + <var name="inNodeType" type="short"/> + <var name="outNodeType" type="short"/> + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + <var name="isTypeEqual" type="boolean"/> + + <var name="nodeTypeList" type="List"> + <member type="short">0</member> + <member type="short">1</member> + <member type="short">2</member> + <member type="short">3</member> + <member type="short">4</member> + <member type="short">5</member> + <member type="short">6</member> + <member type="short">7</member> + <member type="short">8</member> + <member type="short">9</member> + </var> + + + <load var="doc" href="staff" willBeModified="false"/> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <for-each collection="nodeTypeList" member="inNodeType"> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="inNodeType" + result="inresult" + interface="XPathEvaluator" + /> + + <resultType obj="outresult" + var="outNodeType"/> + + <if> + <equals expected="inNodeType" actual="ANY_TYPE"/> + <assertEquals id="ANY_TYPE_resulttype" + actual="outNodeType" + expected="UNORDERED_NODE_ITERATOR_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="NUMBER_TYPE"/> + <assertEquals id="NUMBER_TYPE_resulttype" + actual="outNodeType" + expected="NUMBER_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="STRING_TYPE"/> + <assertEquals id="STRING_TYPE_resulttype" + actual="outNodeType" + expected="STRING_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="BOOLEAN_TYPE"/> + <assertEquals id="BOOLEAN_TYPE_resulttype" + actual="outNodeType" + expected="BOOLEAN_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="UNORDERED_NODE_ITERATOR_TYPE"/> + <assertEquals id="UNORDERED_NODE_ITERATOR_TYPE_resulttype" + actual="outNodeType" + expected="UNORDERED_NODE_ITERATOR_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="ORDERED_NODE_ITERATOR_TYPE"/> + <assertEquals id="ORDERED_NODE_ITERATOR_TYPE_resulttype" + actual="outNodeType" + expected="ORDERED_NODE_ITERATOR_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="UNORDERED_NODE_SNAPSHOT_TYPE"/> + <assertEquals id="UNORDERED_NODE_SNAPSHOT_TYPE_resulttype" + actual="outNodeType" + expected="UNORDERED_NODE_SNAPSHOT_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="ORDERED_NODE_SNAPSHOT_TYPE"/> + <assertEquals id="ORDERED_NODE_SNAPSHOT_TYPE_resulttype" + actual="outNodeType" + expected="ORDERED_NODE_SNAPSHOT_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="ANY_UNORDERED_NODE_TYPE"/> + <assertEquals id="ANY_UNORDERED_NODE_TYPE_resulttype" + actual="outNodeType" + expected="ANY_UNORDERED_NODE_TYPE" + ignoreCase="false" + /> + </if> + <if> + <equals expected="inNodeType" actual="FIRST_ORDERED_NODE_TYPE"/> + <assertEquals id="FIRST_ORDERED_NODE_TYPE_resulttype" + actual="outNodeType" + expected="FIRST_ORDERED_NODE_TYPE" + ignoreCase="false" + /> + </if> + + </for-each> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.xml new file mode 100644 index 0000000..dacbe43 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE"> + <metadata> + <title>XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create ANY_UNORDERED_NODE_TYPE XPathResult matching /staff/employee/employeeId, + checking that XPathResult.singleNodeValue matches. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId""/> + <var name="xpathType" type="short" value="ANY_UNORDERED_NODE_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="employeeId" type="Node"/> + <var name="localName" type="DOMString"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <singleNodeValue obj="outresult" + var="outNode" + /> + + <localName obj="outNode" + var="localName" + /> + + <assertEquals id="equals" + actual="localName" + expected=""employeeId"" + ignoreCase="false" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.xml new file mode 100644 index 0000000..67e497e --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE"> + <metadata> + <title>XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create FIRST_ORDERED_NODE_TYPE XPathResult matching /staff/employee/employeeId/text(), + checking that XPathResult.singleNodeValue matches the first EMP0001. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="FIRST_ORDERED_NODE_TYPE" /> + + <!-- Test Variables --> + + <var name="outNode" type="Node"/> + <var name="data" type="DOMString"/> + <var name="nodeName" type="DOMString"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <singleNodeValue obj="outresult" + var="outNode" + /> + + <data obj="outNode" + interface="CharacterData" + var="data" + /> + + <assertEquals id="equals" + actual="data" + expected=""EMP0001"" + ignoreCase="false" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.xml b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.xml new file mode 100644 index 0000000..a7f6daa --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.xml @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null"> + <metadata> + <title>XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult ORDERED_NODE_SNAPSHOT_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.snapshotItem(xPathResult.snapshotLength) == null, + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-snapshot-length"/> + <subject resource="&spec;#XPathResult-snapshotItem"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="ORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="snapshotItem" type="Node"/> + <var name="snapshotLength" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <snapshotLength obj="outresult" + var="snapshotLength" + /> + + <snapshotItem obj="outresult" + var="snapshotItem" + index="snapshotLength" + /> + + <assertNull id="null" + actual="snapshotItem" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.xml b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.xml new file mode 100644 index 0000000..63bdb69 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.xml @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order"> + <metadata> + <title>XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult ORDERED_NODE_SNAPSHOT_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.snapshotItem(0..3) are in document order. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-snapshot-length"/> + <subject resource="&spec;#XPathResult-snapshotItem"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="ORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="snapshotItem" type="Node"/> + <var name="snapshotLength" type="int"/> + <var name="index" type="int"/> + <var name="text" type="DOMString" /> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <assign var="index" + value="0" + /> + + <while> + <less actual="index" + expected="4" + /> + + <snapshotItem obj="outresult" + var="snapshotItem" + index="index" + /> + + <data obj="snapshotItem" + interface="CharacterData" + var="text" + /> + + <if><equals actual="index" expected="0" /> + + <assertEquals id="first" + actual="text" + expected=""EMP0001"" + ignoreCase="false" + /> + </if> + + <if><equals actual="index" expected="1" /> + + <assertEquals id="second" + actual="text" + expected=""EMP0002"" + ignoreCase="false" + /> + </if> + + <if><equals actual="index" expected="2" /> + + <assertEquals id="third" + actual="text" + expected=""EMP0003"" + ignoreCase="false" + /> + </if> + + <if><equals actual="index" expected="3" /> + + <assertEquals id="fourth" + actual="text" + expected=""EMP0004"" + ignoreCase="false" + /> + </if> + + <increment var="index" + value="1" + /> + + </while> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.xml b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.xml new file mode 100644 index 0000000..6d3b708 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count"> + <metadata> + <title>XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult UNORDERED_NODE_SNAPSHOT_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.snapshotItem(0..3) exist. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-snapshot-length"/> + <subject resource="&spec;#XPathResult-snapshotItem"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="UNORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="snapshotItem" type="Node"/> + <var name="snapshotLength" type="int"/> + <var name="index" type="int"/> + <var name="text" type="DOMString" /> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <assign var="index" + value="0" + /> + + <while> + <less actual="index" + expected="5" + /> + + <snapshotItem obj="outresult" + var="snapshotItem" + index="index" + /> + + <assertNotNull id="notnull" + actual="snapshotItem" + /> + + <increment var="index" + value="1" + /> + + </while> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.xml b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.xml new file mode 100644 index 0000000..b10271f --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.xml @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null"> + <metadata> + <title>XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult UNORDERED_NODE_SNAPSHOT_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.snapshotItem(xPathResult.snapshotLength) == null, + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-snapshot-length"/> + <subject resource="&spec;#XPathResult-snapshotItem"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="UNORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="snapshotItem" type="Node"/> + <var name="snapshotLength" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <snapshotLength obj="outresult" + var="snapshotLength" + /> + + <snapshotItem obj="outresult" + var="snapshotItem" + index="snapshotLength" + /> + + <assertNull id="null" + actual="snapshotItem" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.xml new file mode 100644 index 0000000..2e7774c --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE"> + <metadata> + <title>XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult ORDERED_NODE_SNAPSHOT_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.snapshotLength is correct value. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-snapshot-length"/> + <subject resource="&spec;#XPathResult-snapshotItem"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="ORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="snapshotItem" type="Node"/> + <var name="snapshotLength" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <snapshotLength obj="outresult" + var="snapshotLength" + /> + + <assertEquals id="same" + actual="snapshotLength" + expected="5" + ignoreCase="false" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.xml b/test/testcases/tests/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.xml new file mode 100644 index 0000000..5146a4f --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE"> + <metadata> + <title>XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult UNORDERED_NODE_SNAPSHOT_TYPE XPathResultType for + expression /staff/employee/employeeId/text() checking that: + XPathResult.snapshotLength is correct value. + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-snapshot-length"/> + <subject resource="&spec;#XPathResult-snapshotItem"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/employeeId/text()""/> + <var name="xpathType" type="short" value="UNORDERED_NODE_SNAPSHOT_TYPE" /> + + <!-- Test Variables --> + + <var name="snapshotItem" type="Node"/> + <var name="snapshotLength" type="int"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <snapshotLength obj="outresult" + var="snapshotLength" + /> + + <assertEquals id="same" + actual="snapshotLength" + expected="5" + ignoreCase="false" + /> + +</test> diff --git a/test/testcases/tests/level3/xpath/XPathResult_stringValue.xml b/test/testcases/tests/level3/xpath/XPathResult_stringValue.xml new file mode 100644 index 0000000..bc68069 --- /dev/null +++ b/test/testcases/tests/level3/xpath/XPathResult_stringValue.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE test SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<test xmlns="&level3;" name="XPathResult_stringValue"> + <metadata> + <title>XPathResult_stringValue</title> + <creator>Bob Clary</creator> + <description> + Create an XPathResult STRING_VALUE XPathResultType for expression + /staff/employee/salary[text()='56,000'] checking that the + XPathResult.stringValue == "56,000" + </description> + <date qualifier="created">2003-12-02</date> + <subject resource="&spec;#XPathResult-stringValue"/> + <subject resource="&spec;#XPathResult"/> + <subject resource="&spec;#XPathResultType"/> + <subject resource="&spec;#XPathEvaluator-createNSResolver"/> + </metadata> + + <!-- Standard Variables --> + + <var name="ANY_TYPE" type="short" value="0"/> + <var name="NUMBER_TYPE" type="short" value="1"/> + <var name="STRING_TYPE" type="short" value="2"/> + <var name="BOOLEAN_TYPE" type="short" value="3"/> + <var name="UNORDERED_NODE_ITERATOR_TYPE" type="short" value="4"/> + <var name="ORDERED_NODE_ITERATOR_TYPE" type="short" value="5"/> + <var name="UNORDERED_NODE_SNAPSHOT_TYPE" type="short" value="6"/> + <var name="ORDERED_NODE_SNAPSHOT_TYPE" type="short" value="7"/> + <var name="ANY_UNORDERED_NODE_TYPE" type="short" value="8"/> + <var name="FIRST_ORDERED_NODE_TYPE" type="short" value="9"/> + + <var name="doc" type="Document" /> + <var name="resolver" type="XPathNSResolver" /> + <var name="evaluator" type="XPathEvaluator" /> + <var name="contextNode" type="Node" /> + <var name="inresult" type="XPathResult" isNull="true"/> + <var name="outresult" type="XPathResult" isNull="true"/> + + <!-- Inputs --> + + <var name="expression" type="DOMString" value=""/staff/employee/salary[text()='56,000']""/> + <var name="xpathType" type="short" value="STRING_TYPE" /> + + <!-- Test Variables --> + + <var name="stringValue" type="DOMString"/> + + <!-- Load Test Document --> + + <load var="doc" href="staff" willBeModified="false"/> + + <!-- Get XPathResult --> + + <createXPathEvaluator var="evaluator" document="doc"/> + + <createNSResolver obj="evaluator" var="resolver" nodeResolver="doc"/> + + <assign var="contextNode" value="doc"/> + + <evaluate obj="evaluator" + var="outresult" + expression="expression" + contextNode="contextNode" + resolver="resolver" + type="xpathType" + result="inresult" + interface="XPathEvaluator" + /> + + <stringValue obj="outresult" + var="stringValue" + /> + + <assertEquals id="same" + actual="stringValue" + expected=""56,000"" + ignoreCase="false" + /> + + +</test> diff --git a/test/testcases/tests/level3/xpath/alltests.xml b/test/testcases/tests/level3/xpath/alltests.xml new file mode 100644 index 0000000..b5187c6 --- /dev/null +++ b/test/testcases/tests/level3/xpath/alltests.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE suite SYSTEM "dom3.dtd" [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<suite xmlns="&level3;" name="alltests"> + <metadata> + <title>DOM Level 3 XPath Test Suite</title> + <creator>DOM Test Suite Project</creator> + </metadata> + <suite.member href="XPathEvaluatorCast01.xml"/> + <suite.member href="Element_Nodes.xml"/> + <suite.member href="Attribute_Nodes.xml"/> + <suite.member href="Attribute_Nodes_xmlns.xml"/> + <suite.member href="Text_Nodes.xml"/> + <suite.member href="Comment_Nodes.xml"/> + <suite.member href="Processing_Instruction_Nodes.xml"/> + <suite.member href="Conformance_Expressions.xml"/> + <suite.member href="Conformance_hasFeature_3.xml"/> + <suite.member href="Conformance_hasFeature_empty.xml"/> + <suite.member href="Conformance_hasFeature_null.xml"/> + <suite.member href="Conformance_ID.xml"/> + <suite.member href="Conformance_isSupported_3.xml"/> + <suite.member href="Conformance_isSupported_empty.xml"/> + <suite.member href="Conformance_isSupported_null.xml"/> + <suite.member href="XPathEvaluator_createExpression_no_NS.xml"/> + <suite.member href="XPathEvaluator_createExpression_NS.xml"/> + <suite.member href="XPathEvaluator_createExpression_NAMESPACE_ERR_01.xml"/> + <suite.member href="XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.xml"/> + <suite.member href="XPathEvaluator_createExpression_NAMESPACE_ERR_02.xml"/> + <suite.member href="XPathEvaluator_createNSResolver_document.xml"/> + <suite.member href="XPathEvaluator_createNSResolver_documentElement.xml"/> + <suite.member href="XPathEvaluator_createNSResolver_all.xml"/> + <suite.member href="XPathEvaluator_evaluate_documentElement.xml"/> + <suite.member href="XPathEvaluator_evaluate_document.xml"/> + <suite.member href="XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.xml"/> + <suite.member href="XPathEvaluator_evaluate_NAMESPACE_ERR.xml"/> + <suite.member href="XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.xml"/> + <suite.member href="XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.xml"/> + <suite.member href="XPathEvaluator_evaluate_TYPE_ERR.xml"/> + <suite.member href="XPathExpression_evaluate_documentElement.xml"/> + <suite.member href="XPathExpression_evaluate_document.xml"/> + <suite.member href="XPathExpression_evaluate_WRONG_DOCUMENT_ERR.xml"/> + <suite.member href="XPathExpression_evaluate_NOT_SUPPORTED_ERR.xml"/> + <suite.member href="XPathNSResolver_lookupNamespaceURI_prefix.xml"/> + <suite.member href="XPathNSResolver_lookupNamespaceURI_nist_dmstc.xml"/> + <suite.member href="XPathNSResolver_lookupNamespaceURI_xml.xml"/> + <suite.member href="XPathNSResolver_lookupNamespaceURI_null.xml"/> + <suite.member href="XPathResult_booleanValue_true.xml"/> + <suite.member href="XPathResult_booleanValue_false.xml"/> + <suite.member href="XPathResult_iterateNext_INVALID_STATE_ERR.xml"/> + <suite.member href="XPathResult_invalidIteratorState_ANY_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_BOOLEAN_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_NUMBER_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_STRING_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.xml"/> + <suite.member href="XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.xml"/> + <suite.member href="XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.xml"/> + <suite.member href="XPathResult_numberValue.xml"/> + <suite.member href="XPathResult_resultType.xml"/> + <suite.member href="XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.xml"/> + <suite.member href="XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.xml"/> + <suite.member href="XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.xml"/> + <suite.member href="XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.xml"/> + <suite.member href="XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.xml"/> + <suite.member href="XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.xml"/> + <suite.member href="XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.xml"/> + <suite.member href="XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.xml"/> + <suite.member href="XPathResult_stringValue.xml"/> + <suite.member href="XPathResult_TYPE_ERR.xml"/> +</suite> + diff --git a/test/testcases/tests/level3/xpath/dom3xpathents.ent b/test/testcases/tests/level3/xpath/dom3xpathents.ent new file mode 100644 index 0000000..8dd1053 --- /dev/null +++ b/test/testcases/tests/level3/xpath/dom3xpathents.ent @@ -0,0 +1,16 @@ +<!ENTITY level3 "http://www.w3.org/2001/DOM-Test-Suite/Level-3"> +<!ENTITY spec "http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath"> + +<!ENTITY vars + " + <!-- common variables --> + <var name='doc' type='Document'/> + <var name='xpEvaluator' type='XPathEvaluator'/> + "> + +<!-- the following entity requires the entity vars as well --> +<!ENTITY findXPathEvaluator + " + <load var='doc' href='staffNS' willBeModified='false'/> + <createXPathEvaluator var='xpEvaluator' document='doc'/> +"> diff --git a/test/testcases/tests/level3/xpath/files/CVS/Entries b/test/testcases/tests/level3/xpath/files/CVS/Entries new file mode 100644 index 0000000..6a27afe --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/CVS/Entries @@ -0,0 +1,11 @@ +/internaldtd.svg/1.2/Fri Apr 3 02:47:58 2009/-kb/ +/internaldtd.xml/1.1/Fri Apr 3 02:47:58 2009// +/staff.dtd/1.1/Fri Apr 3 02:47:58 2009// +/staff.svg/1.1/Fri Apr 3 02:47:58 2009/-kb/ +/staff.xml/1.1/Fri Apr 3 02:47:58 2009// +/staffNS.dtd/1.1/Fri Apr 3 02:47:58 2009// +/staffNS.svg/1.1/Fri Apr 3 02:47:58 2009/-kb/ +/staffNS.xml/1.1/Fri Apr 3 02:47:58 2009// +/svgtest.js/1.1/Fri Apr 3 02:47:58 2009/-kb/ +/svgunit.js/1.1/Fri Apr 3 02:47:58 2009/-kb/ +D diff --git a/test/testcases/tests/level3/xpath/files/CVS/Repository b/test/testcases/tests/level3/xpath/files/CVS/Repository new file mode 100644 index 0000000..b343eb6 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/CVS/Repository @@ -0,0 +1 @@ +2001/DOM-Test-Suite/tests/level3/xpath/files diff --git a/test/testcases/tests/level3/xpath/files/CVS/Root b/test/testcases/tests/level3/xpath/files/CVS/Root new file mode 100644 index 0000000..3c7177e --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.w3.org:/sources/public diff --git a/test/testcases/tests/level3/xpath/files/CVS/Template b/test/testcases/tests/level3/xpath/files/CVS/Template new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/CVS/Template diff --git a/test/testcases/tests/level3/xpath/files/internaldtd.svg b/test/testcases/tests/level3/xpath/files/internaldtd.svg new file mode 100644 index 0000000..2464ef1 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/internaldtd.svg @@ -0,0 +1,29 @@ +<?xml version="1.0"?>
+<!DOCTYPE svg [
+ <!ELEMENT test (child)+ >
+ <!ATTLIST test xmlns CDATA #IMPLIED>
+ <!ELEMENT child EMPTY>
+ <!ATTLIST child id ID #IMPLIED>
+ <!ATTLIST child check CDATA #IMPLIED>
+ <!ELEMENT svg (rect, script, test)>
+ <!ATTLIST svg
+ xmlns CDATA #FIXED "http://www.w3.org/2000/svg"
+ name CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ELEMENT script (#PCDATA)>
+ <!ATTLIST script type CDATA #IMPLIED>
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+<test xmlns="http://www.example.org">
+ <child id="child1" check="child1"/>
+ <child id="child2" check="child2"/>
+</test>
+</svg>
+
diff --git a/test/testcases/tests/level3/xpath/files/internaldtd.xml b/test/testcases/tests/level3/xpath/files/internaldtd.xml new file mode 100644 index 0000000..0844f5c --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/internaldtd.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE test [ + <!ELEMENT test (child)+ > + <!ELEMENT child EMPTY> + <!ATTLIST child id ID #IMPLIED> + <!ATTLIST child check CDATA #IMPLIED> +]> +<test> + <child id="child1" check="child1"/> + <child id="child2" check="child2"/> +</test> + diff --git a/test/testcases/tests/level3/xpath/files/staff.dtd b/test/testcases/tests/level3/xpath/files/staff.dtd new file mode 100644 index 0000000..02a994d --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/staff.dtd @@ -0,0 +1,17 @@ +<!ELEMENT employeeId (#PCDATA)> +<!ELEMENT name (#PCDATA)> +<!ELEMENT position (#PCDATA)> +<!ELEMENT salary (#PCDATA)> +<!ELEMENT address (#PCDATA)> +<!ELEMENT entElement ( #PCDATA ) > +<!ELEMENT gender ( #PCDATA | entElement )* > +<!ELEMENT employee (employeeId, name, position, salary, gender, address) > +<!ELEMENT staff (employee)+> +<!ATTLIST entElement + attr1 CDATA "Attr"> +<!ATTLIST address + domestic CDATA #IMPLIED + street CDATA "Yes"> +<!ATTLIST entElement + domestic CDATA "MALE" > + diff --git a/test/testcases/tests/level3/xpath/files/staff.svg b/test/testcases/tests/level3/xpath/files/staff.svg new file mode 100644 index 0000000..abc7a98 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/staff.svg @@ -0,0 +1,72 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE svg SYSTEM "staff.dtd" [
+ <!ENTITY ent1 "es">
+ <!ENTITY ent2 "1900 Dallas Road">
+ <!ENTITY ent3 "Texas">
+ <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>">
+ <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>
+ <!ENTITY ent1 "This entity should be discarded">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST employee xmlns CDATA #IMPLIED>
+ <!ELEMENT svg (rect, script, employee+)>
+ <!ATTLIST svg
+ xmlns CDATA #FIXED "http://www.w3.org/2000/svg"
+ name CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ELEMENT script (#PCDATA)>
+ <!ATTLIST script type CDATA #IMPLIED>
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<!-- This is comment number 1.-->
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">
+ <employeeId>EMP0001</employeeId>
+ <name>Margaret Martin</name>
+ <position>Accountant</position>
+ <salary>56,000</salary>
+ <gender>Female</gender>
+ <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>
+ </employee>
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">
+ <employeeId>EMP0002</employeeId>
+ <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>
+ <position>Secretary</position>
+ <salary>35,000</salary>
+ <gender>Female</gender>
+ <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3;
+ 98554</address>
+ </employee>
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">
+ <employeeId>EMP0003</employeeId>
+ <name>Roger
+ Jones</name>
+ <position>Department Manager</position>
+ <salary>100,000</salary>
+ <gender>&ent4;</gender>
+ <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>
+ </employee>
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">
+ <employeeId>EMP0004</employeeId>
+ <name>Jeny Oconnor</name>
+ <position>Personnel Director</position>
+ <salary>95,000</salary>
+ <gender>Female</gender>
+ <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address>
+ </employee>
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">
+ <employeeId>EMP0005</employeeId>
+ <name>Robert Myers</name>
+ <position>Computer Specialist</position>
+ <salary>90,000</salary>
+ <gender>male</gender>
+ <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address>
+ </employee>
+ </svg>
diff --git a/test/testcases/tests/level3/xpath/files/staff.xml b/test/testcases/tests/level3/xpath/files/staff.xml new file mode 100644 index 0000000..f89c510 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/staff.xml @@ -0,0 +1,57 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?> +<!DOCTYPE staff SYSTEM "staff.dtd" [ + <!ENTITY ent1 "es"> + <!ENTITY ent2 "1900 Dallas Road"> + <!ENTITY ent3 "Texas"> + <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>"> + <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1> + <!ENTITY ent1 "This entity should be discarded"> + <!NOTATION notation1 PUBLIC "notation1File"> + <!NOTATION notation2 SYSTEM "notation2File"> +]> +<!-- This is comment number 1.--> +<staff> + <employee> + <employeeId>EMP0001</employeeId> + <name>Margaret Martin</name> + <position>Accountant</position> + <salary>56,000</salary> + <gender>Female</gender> + <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address> + </employee> + <employee> + <employeeId>EMP0002</employeeId> + <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]> +<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name> + <position>Secretary</position> + <salary>35,000</salary> + <gender>Female</gender> + <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3; + 98554</address> + </employee> + <employee> + <employeeId>EMP0003</employeeId> + <name>Roger + Jones</name> + <position>Department Manager</position> + <salary>100,000</salary> + <gender>&ent4;</gender> + <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address> + </employee> + <employee> + <employeeId>EMP0004</employeeId> + <name>Jeny Oconnor</name> + <position>Personnel Director</position> + <salary>95,000</salary> + <gender>Female</gender> + <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address> + </employee> + <employee> + <employeeId>EMP0005</employeeId> + <name>Robert Myers</name> + <position>Computer Specialist</position> + <salary>90,000</salary> + <gender>male</gender> + <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address> + </employee> + </staff> diff --git a/test/testcases/tests/level3/xpath/files/staffNS.dtd b/test/testcases/tests/level3/xpath/files/staffNS.dtd new file mode 100644 index 0000000..877a943 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/staffNS.dtd @@ -0,0 +1,47 @@ +<!ELEMENT staff (employee+,emp:employee,employee) > +<!ATTLIST staff xmlns CDATA #IMPLIED> +<!ATTLIST staff xmlns:nist CDATA #IMPLIED> +<!ELEMENT employee (employeeId,name,position,salary,gender,address) > +<!ATTLIST employee xmlns CDATA #IMPLIED> +<!ATTLIST employee xmlns:dmstc CDATA #IMPLIED> +<!ATTLIST employee xmlns:emp2 CDATA #IMPLIED> + +<!ELEMENT employeeId (#PCDATA) > + +<!ELEMENT name (#PCDATA) > + +<!ELEMENT position (#PCDATA) > + +<!ELEMENT salary (#PCDATA) > + +<!ELEMENT entElement1 (#PCDATA) > +<!ELEMENT gender (#PCDATA | entElement1)* > +<!ATTLIST entElement1 xmlns:local1 CDATA #IMPLIED > + +<!ELEMENT address (#PCDATA) > +<!ATTLIST address dmstc:domestic CDATA #IMPLIED> +<!ATTLIST address street CDATA #IMPLIED> +<!ATTLIST address domestic CDATA #IMPLIED> +<!ATTLIST address xmlns CDATA #IMPLIED> + +<!ELEMENT emp:employee (emp:employeeId,nm:name,emp:position,emp:salary,emp:gender,emp:address) > +<!ATTLIST emp:employee xmlns:emp CDATA #IMPLIED> +<!ATTLIST emp:employee xmlns:nm CDATA #IMPLIED> +<!ATTLIST emp:employee defaultAttr CDATA 'defaultVal'> + +<!ELEMENT emp:employeeId (#PCDATA) > + +<!ELEMENT nm:name (#PCDATA) > + +<!ELEMENT emp:position (#PCDATA) > + +<!ELEMENT emp:salary (#PCDATA) > + +<!ELEMENT emp:gender (#PCDATA) > + +<!ELEMENT emp:address (#PCDATA) > +<!ATTLIST emp:address emp:domestic CDATA #IMPLIED> +<!ATTLIST emp:address street CDATA #IMPLIED> +<!ATTLIST emp:address emp:zone ID #IMPLIED> +<!ATTLIST emp:address emp:district CDATA 'DISTRICT'> +<!ATTLIST emp:address emp:local1 CDATA 'FALSE'> diff --git a/test/testcases/tests/level3/xpath/files/staffNS.svg b/test/testcases/tests/level3/xpath/files/staffNS.svg new file mode 100644 index 0000000..d7c620d --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/staffNS.svg @@ -0,0 +1,73 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd"
+[
+ <!ENTITY ent1 "es">
+ <!ENTITY ent2 "1900 Dallas Road">
+ <!ENTITY ent3 "Texas">
+ <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">
+ <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>
+ <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>
+ <!ENTITY ent1 "This entity should be discarded">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>
+ <!ATTLIST svg
+ xmlns CDATA #FIXED "http://www.w3.org/2000/svg"
+ name CDATA #IMPLIED>
+ <!ELEMENT rect EMPTY>
+ <!ATTLIST rect
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED>
+ <!ELEMENT script (#PCDATA)>
+ <!ATTLIST script type CDATA #IMPLIED>
+ <!ENTITY svgunit SYSTEM "svgunit.js">
+ <!ENTITY svgtest SYSTEM "svgtest.js">
+]>
+<!-- This is comment number 1.-->
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script>
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">
+ <employeeId>EMP0001</employeeId>
+ <name>Margaret Martin</name>
+ <position>Accountant</position>
+ <salary>56,000</salary>
+ <gender>Female</gender>
+ <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>
+ </employee>
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">
+ <employeeId>EMP0002</employeeId>
+ <name>Martha Raynolds
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>
+ <position>Secretary</position>
+ <salary>35,000</salary>
+ <gender>Female</gender>
+ <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;
+ 98554</address>
+ </employee>
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">
+ <employeeId>EMP0003</employeeId>
+ <name>Roger
+ Jones</name>
+ <position>Department Manager</position>
+ <salary>100,000</salary>
+ <gender>&ent4;</gender>
+ <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>
+ </employee>
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" > <emp:employeeId>EMP0004</emp:employeeId>
+ <nm:name>Jeny Oconnor</nm:name>
+ <emp:position>Personnel Director</emp:position>
+ <emp:salary>95,000</emp:salary>
+ <emp:gender>Female</emp:gender>
+ <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>
+ </emp:employee>
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">
+ <employeeId>EMP0005</employeeId>
+ <name>Robert Myers</name>
+ <position>Computer Specialist</position>
+ <salary>90,000</salary>
+ <gender>male</gender>
+ <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>
+ </employee>
+ </svg>
diff --git a/test/testcases/tests/level3/xpath/files/staffNS.xml b/test/testcases/tests/level3/xpath/files/staffNS.xml new file mode 100644 index 0000000..e46a7c5 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/staffNS.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?><?TEST-STYLE PIDATA?> +<!DOCTYPE staff PUBLIC "STAFF" "staffNS.dtd"> +<staff xmlns="http://www.nist.gov" xmlns:nist="http://www.nist.gov"> + <employee xmlns:dmstc="http://www.usa.com"> + <employeeId>EMP0001</employeeId> + <name>Margaret Martin</name> + <position>Accountant</position> + <salary>56,000</salary> + <gender>Female</gender> + <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address> + </employee> + <employee xmlns:dmstc="http://www.usa.com"> + <employeeId>EMP0002</employeeId> + <name>Martha Raynolds</name> + <position>Secretary</position> + <salary>35,000</salary> + <gender>Female</gender> + <address dmstc:domestic="Yes" street="Yes">1900 Dallas Road Dallas, Texas 98554</address> + </employee> + <employee xmlns:dmstc="http://www.netzero.com"> + <employeeId>EMP0003</employeeId> + <name>Roger + Jones</name> + <position>Department Manager</position> + <salary>100,000</salary> + <gender>Male</gender> + <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address> + </employee> + <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" > <emp:employeeId>EMP0004</emp:employeeId> + <nm:name>Jeny Oconnor</nm:name> + <emp:position>Personnel Director</emp:position> + <emp:salary>95,000</emp:salary> + <emp:gender>Female</emp:gender> + <emp:address emp:domestic="Yes" street="Yes" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address> + </emp:employee> + <employee xmlns:emp2="http://www.nist.gov"> + <employeeId>EMP0005</employeeId> + <name>Robert Myers</name> + <position>Computer Specialist</position> + <salary>90,000</salary> + <gender>male</gender> + <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address> + </employee> +</staff> diff --git a/test/testcases/tests/level3/xpath/files/svgtest.js b/test/testcases/tests/level3/xpath/files/svgtest.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/svgtest.js diff --git a/test/testcases/tests/level3/xpath/files/svgunit.js b/test/testcases/tests/level3/xpath/files/svgunit.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/testcases/tests/level3/xpath/files/svgunit.js diff --git a/test/testcases/tests/level3/xpath/metadata.xml b/test/testcases/tests/level3/xpath/metadata.xml new file mode 100644 index 0000000..4a47a00 --- /dev/null +++ b/test/testcases/tests/level3/xpath/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2003 World Wide Web Consortium, + + (Massachusetts Institute of Technology, European Research Consortium for + Informatics and Mathematics, Keio University). All Rights Reserved. This + work is distributed under the W3C(r) Software License [1] in the hope that + it will be useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +--> + +<!DOCTYPE metadata SYSTEM 'dom3.dtd' [ + <!ENTITY % entities SYSTEM "dom3xpathents.ent"> + %entities; +]> +<metadata xmlns="&level3;"> +</metadata> |