summaryrefslogtreecommitdiffstats
path: root/LayoutTests
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-07-09 16:04:25 +0100
committerSteve Block <steveblock@google.com>2010-07-22 17:08:17 +0100
commitc95a81d8cfc937ef06eedc21d60cce1aa1a92463 (patch)
tree57c417d0dfb7b74dc0f7b91c6537ab09ce20305f /LayoutTests
parenta8d0e5a36718ee59b84a577053458bded49e369a (diff)
downloadexternal_webkit-c95a81d8cfc937ef06eedc21d60cce1aa1a92463.zip
external_webkit-c95a81d8cfc937ef06eedc21d60cce1aa1a92463.tar.gz
external_webkit-c95a81d8cfc937ef06eedc21d60cce1aa1a92463.tar.bz2
Add dom/xhtml/level3 layout tests at WebKit r63173
These all pass. Note that the Android-V8-specific results are required because these tests rely on Error.line, which is non-standard and not provided by V8. A further 15 tests have no expected results so will be added to the DumpRenderTree ignore list. None of these tests are run on Chromium. Change-Id: I6b7ea492586fa2d9cd60858f06641941c87ede14
Diffstat (limited to 'LayoutTests')
-rw-r--r--LayoutTests/dom/xhtml/level3/core/Yes28
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.xhtml10
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid01.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid02.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid03.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid04.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid05.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid06.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid07.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/attrisid07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform01.js148
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform02.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform03.js143
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform04.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform05.js201
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform06.js174
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform07.js155
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform07.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform08.js203
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform08.xhtml14
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform09.js177
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform09.xhtml14
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform10.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform10.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform11.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform11.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform12.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/canonicalform12.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/cdatasections01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/cdatasections01.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/cdatasections01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.js164
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/comments01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/comments01.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/comments01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatype_normalization.svg.xsd60
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatype_normalization.xsd212
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatype_normalization2.svg.xsd60
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatype_normalization2.xsd99
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization13.js146
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization13.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization14.js145
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization14.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization15-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization15.js156
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization15.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization16.js162
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization16.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization17-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization17.js154
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization17.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization18.js156
-rw-r--r--LayoutTests/dom/xhtml/level3/core/datatypenormalization18.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode01.js165
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode02.js185
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode03.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode04.js152
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode05.js155
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode06.js175
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode07.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode08.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode09-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode09.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode10.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode11.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode12.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode13-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode13.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode14-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode14.js145
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode15-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode15.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode16-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode16.js170
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode17-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode17.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode18.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode19.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode20-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode20.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode21-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode21.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode22.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode22.xhtml-disabled73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode23-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode23.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode23.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode24-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode24.js136
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode24.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode25-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode25.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode26-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode26.js144
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode26.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode27-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode27.js146
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode27.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode28-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode28.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode28.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode30-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode30.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode30.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode31-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode31.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode31.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode32-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode32.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode32.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode33-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode33.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode33.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode34-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode34.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode34.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode35-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode35.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode35.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode36-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode36.js157
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentadoptnode36.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdoctype01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.js143
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.js106
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.xhtmlbin0 -> 1082 bytes
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.xhtml28
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.js106
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.xhtml28
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.xhtmlbin0 -> 1660 bytes
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.xhtml28
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.xhtml26
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.xhtml26
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.js146
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.js150
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.js144
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.js193
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.js218
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.xhtml-disabled25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.js202
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.js167
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.js172
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.js151
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.js174
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.js193
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode01.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode02.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode03.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode04.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode05.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode06.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode07.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode08.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode09.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode10.js140
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode11.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode12.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode13.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode14.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode15-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode15.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode16.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode17-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode17.js136
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode17.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode18.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode18.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode19.js140
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode20-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode20.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode20.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode21-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode21.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode22-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode22.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode22.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode23-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode23.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode23.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode24-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode24.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode24.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode25-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode25.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode26-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode26.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode26.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode27-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode27.js189
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode27.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode28-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode28.js140
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode28.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode29-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode29.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentrenamenode29.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.js109
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.js109
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.js150
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcomments1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcomments1.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigcomments1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.js110
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigentities1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigentities1.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigentities1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.js152
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfiginfoset1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespaces1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespaces2-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.js107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigparameternames01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.js148
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigschematype1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigschematype1.js170
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigschematype1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigvalidate1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigwellformed1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.js109
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.js110
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.js93
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.js102
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.js100
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.js102
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.js100
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.js105
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.js100
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.xhtml-disabled25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry15-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry17-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.js101
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry20-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry21-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry22-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.xhtml-disabled25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry24-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.js97
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry25-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.js104
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistcontains01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistcontains02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistitem01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistitem01.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistitem01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistitem02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistitem02.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/domstringlistitem02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.js150
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.js143
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.js155
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.xhtml10
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.js143
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.js148
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.js142
-rw-r--r--LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities01.js143
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities02.js147
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities03.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities04.js142
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entities04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.xhtmlbin0 -> 1082 bytes
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.xhtmlbin0 -> 1082 bytes
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/external_foo.entbin0 -> 86 bytes
-rw-r--r--LayoutTests/dom/xhtml/level3/core/external_foobr.ent1
-rw-r--r--LayoutTests/dom/xhtml/level3/core/external_widget.ent1
-rw-r--r--LayoutTests/dom/xhtml/level3/core/handleerror01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/handleerror01.js190
-rw-r--r--LayoutTests/dom/xhtml/level3/core/handleerror01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/handleerror02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/handleerror02.js172
-rw-r--r--LayoutTests/dom/xhtml/level3/core/handleerror02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature01.js94
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature02.js93
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature03.js93
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature04.js94
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hasFeature04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hc_staff.svg.xsd60
-rw-r--r--LayoutTests/dom/xhtml/level3/core/hc_staff.xsd250
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset01.js147
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset02.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset03.js156
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset03.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset04.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset05.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset06.js166
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset07.js167
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset07.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset08.js148
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset08.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset09.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/infoset09.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/namespacedeclarations01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/namespacedeclarations02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeappendchild01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeappendchild01.js136
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeappendchild01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeappendchild02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeappendchild02.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeappendchild02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.js106
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07-expected.txt4
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.xhtml-disabled73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.xhtml-disabled73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.xhtml29
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.xhtml33
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature01.js202
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature02.js202
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature03.js203
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature04.js202
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature05.js203
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature06.js202
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature07.js202
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature07.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature08.js204
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature08.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature09.js203
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature09.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature10.js207
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature10.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature11.js202
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature11.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature12.js208
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature12.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature13.js208
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetfeature13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent09-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent13-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent14-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent15-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent17-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.js110
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.js140
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.js142
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.js145
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.js149
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.js177
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.js125
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.js109
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.js161
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode13-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode15-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode16-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode17-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode18-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode19-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode20-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.js110
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode21-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode22-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode25-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode26-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode27-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode28-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode29-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode31-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode32-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode01.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode02.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode03.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode04.js110
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode05.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode06.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode07.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode08.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode09.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode10.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodeissamenode10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.js108
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.xhtml26
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.js111
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix09-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix13-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix14-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix15-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix16-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix17-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix18-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.xhtml26
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix20-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild01.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild02.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild03.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild03.xhtml-disabled73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild04.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild05.js147
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild07.js144
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild08.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild09-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild09.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild10.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild10.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild11.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild12.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild13.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild14.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild15-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild15.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild16.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild17-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild17.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild18-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild18.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild19.js162
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild20-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild20.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild21-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild21.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild22-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild22.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild22.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild23-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild23.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild23.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild24-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild24.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild24.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild25-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild25.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild26-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild26.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild26.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild27-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild27.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild27.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild28-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild28.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild28.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild29-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild29.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild29.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild30-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild30.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild30.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild31-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild31.js170
-rw-r--r--LayoutTests/dom/xhtml/level3/core/noderemovechild31.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild01.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild02.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild03.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild04.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild06.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild06.xhtml-disabled73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild07.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild07.xhtml-disabled73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild08.js142
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild08.xhtml-disabled25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild10.js158
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild12.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild12.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild13-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild13.js144
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild14-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild14.js132
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild15-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild15.js128
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild16-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild16.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild17-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild17.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild18-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild18.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild19-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild19.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild20-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild20.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild21-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild21.js161
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild22-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild22.js145
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild22.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild23-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild23.js178
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild23.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild24-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild24.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild24.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild25-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild25.js143
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild26-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild26.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild26.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild27-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild27.js145
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild27.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild28-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild28.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild28.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild29-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild29.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild29.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild30-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild30.js168
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild30.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild31-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild31.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild31.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild32-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild32.js129
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild32.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild33-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild33.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild33.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild34-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild34.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild34.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild35-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild35.js124
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild35.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild36-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild36.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild36.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild37-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild37.js138
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild37.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild38-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild38.js196
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild38.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild39-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild39.js136
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild39.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild40-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild40.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodereplacechild40.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.js130
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent08-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent10-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent11-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.js135
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent12-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.js131
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.js142
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.js137
-rw-r--r--LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters01.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters02.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters03.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters04.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters05.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters06.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters07.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters07.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters08.js141
-rw-r--r--LayoutTests/dom/xhtml/level3/core/normalizecharacters08.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/resources/COPYRIGHT.xhtml106
-rw-r--r--LayoutTests/dom/xhtml/level3/core/selfxhtml.js743
-rw-r--r--LayoutTests/dom/xhtml/level3/core/splitcdatasections01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/splitcdatasections01.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/splitcdatasections01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.js109
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.js134
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.js143
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.js144
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.js109
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.js133
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext07-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.js139
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.js126
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext01.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext02.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext03-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext03.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/textwholetext03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfo.svg.xsd60
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfo.xsd107
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypename03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypename04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.js122
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.js127
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.js123
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.js113
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.js115
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.js118
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.js114
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.js112
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.xhtml18
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.js120
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.js119
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.js121
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.js117
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.js116
-rw-r--r--LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.xhtml73
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler01.js181
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler02.js168
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler03.js183
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler04.js183
-rw-r--r--LayoutTests/dom/xhtml/level3/core/userdatahandler04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed01-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed01.js166
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed01.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed02-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed02.js154
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed02.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed03.js167
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed03.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed04-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed04.js161
-rw-r--r--LayoutTests/dom/xhtml/level3/core/wellformed04.xhtml25
-rw-r--r--LayoutTests/dom/xhtml/level3/core/xhtml-lat1.ent196
-rw-r--r--LayoutTests/dom/xhtml/level3/core/xhtml-special.ent80
-rw-r--r--LayoutTests/dom/xhtml/level3/core/xhtml-symbol.ent237
-rw-r--r--LayoutTests/dom/xhtml/level3/core/xhtml1-frameset.dtd1235
-rw-r--r--LayoutTests/dom/xhtml/level3/core/xhtml1-strict.dtd978
-rw-r--r--LayoutTests/dom/xhtml/level3/core/xhtml1-transitional.dtd1201
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform11-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform12-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/cdatasections01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/comments01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization13-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization14-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization15-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization16-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization17-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization18-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode17-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode18-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode19-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode20-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode15-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode16-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode17-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode28-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcomments1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigentities1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfiginfoset1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces2-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschematype1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidate1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigwellformed1-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry11-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry13-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry14-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry15-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry16-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry17-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry18-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry19-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry20-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry21-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry22-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry24-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry25-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute11-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens11-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens12-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens13-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens14-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature11-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature12-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature13-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent15-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent16-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent18-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode25-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode26-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode27-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix12-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild24-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild25-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild26-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild27-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild21-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild25-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild38-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent13-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata09-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata10-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters07-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters08-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/splitcdatasections01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler01-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler02-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler03-expected.txt3
-rw-r--r--LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler04-expected.txt3
2356 files changed, 139993 insertions, 0 deletions
diff --git a/LayoutTests/dom/xhtml/level3/core/Yes b/LayoutTests/dom/xhtml/level3/core/Yes
new file mode 100644
index 0000000..b480455
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01-expected.txt
new file mode 100644
index 0000000..50c9b6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo01
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.js
new file mode 100644
index 0000000..f605922
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call getSchemaTypeInfo on title attribute for the first acronym element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function attrgetschematypeinfo01() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo01") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var typeNS;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsCDATA","CDATA",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertEquals("nsIsXML","http://www.w3.org/TR/REC-xml",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.xhtml
new file mode 100644
index 0000000..0531db9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrgetschematypeinfo01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02-expected.txt
new file mode 100644
index 0000000..d8f90c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo02
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.js
new file mode 100644
index 0000000..48a9bc7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call getSchemaTypeInfo on id attribute for the third acronym element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function attrgetschematypeinfo02() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo02") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var typeNS;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("id");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsID","ID",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertEquals("nsIsXML","http://www.w3.org/TR/REC-xml",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.xhtml
new file mode 100644
index 0000000..a5ec8fd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrgetschematypeinfo02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03-expected.txt
new file mode 100644
index 0000000..c519823
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo03
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.js
new file mode 100644
index 0000000..61dbc62
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call getSchemaTypeInfo on title attribute for the first acronym element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function attrgetschematypeinfo03() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo03") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var typeNS;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","string",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertEquals("nsIsXML","http://www.w3.org/2001/XMLSchema",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.xhtml
new file mode 100644
index 0000000..0ef7054
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrgetschematypeinfo03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04-expected.txt
new file mode 100644
index 0000000..a6ae34a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo04
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.js
new file mode 100644
index 0000000..295b0ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call getSchemaTypeInfo on id attribute for the third acronym element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function attrgetschematypeinfo04() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo04") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var typeNS;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("id");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsID","ID",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertEquals("nsIsXmlSchema","http://www.w3.org/2001/XMLSchema",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.xhtml
new file mode 100644
index 0000000..e34f20b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrgetschematypeinfo04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05-expected.txt
new file mode 100644
index 0000000..8bbb8a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo05
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.js
new file mode 100644
index 0000000..c76cd0d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call getSchemaTypeInfo on class attribute for the third acronym element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function attrgetschematypeinfo05() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo05") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var typeNS;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsClassType","classType",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertEquals("nsIsXHTML","http://www.w3.org/1999/xhtml",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.xhtml
new file mode 100644
index 0000000..2318d63
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrgetschematypeinfo05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06-expected.txt
new file mode 100644
index 0000000..eb3115b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo06
+Status failure
+Message typeInfoNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.js
new file mode 100644
index 0000000..62f3152
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_nodtdstaff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attr.schemaTypeInfo should return null if not validating or schema validating.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function attrgetschematypeinfo06() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo06") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var elem;
+ var attr;
+ var typeInfo;
+ var typeName;
+ var typeNS;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_nodtdstaff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertNull("typeName",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertNull("typeNS",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.xhtml
new file mode 100644
index 0000000..062898e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo06.xhtml
@@ -0,0 +1,10 @@
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>hc_nodtdstaff</title><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='attrgetschematypeinfo06.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07-expected.txt
new file mode 100644
index 0000000..f186248
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo07
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.js
new file mode 100644
index 0000000..754cf2e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+*/
+function attrgetschematypeinfo07() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo07") != null) return;
+ var doc;
+ var elemList;
+ var acElem;
+ var attr;
+ var attrTypeInfo;
+ var typeName;
+ var typeNamespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acElem = elemList.item(3);
+ attr = acElem.getAttributeNode("id");
+ attrTypeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",attrTypeInfo);
+typeName = attrTypeInfo.typeName;
+
+ typeNamespace = attrTypeInfo.typeNamespace;
+
+ assertEquals("attrgetschematypeinfo07_typeName","ID",typeName);
+ assertEquals("attrgetschematypeinfo07_typeNamespace","http://www.w3.org/2001/XMLSchema",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.xhtml
new file mode 100644
index 0000000..74f808a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrgetschematypeinfo07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08-expected.txt
new file mode 100644
index 0000000..20c7ef2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo08
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.js b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.js
new file mode 100644
index 0000000..571b9aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrgetschematypeinfo08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-schemaTypeInfo
+*/
+function attrgetschematypeinfo08() {
+ var success;
+ if(checkInitialization(builder, "attrgetschematypeinfo08") != null) return;
+ var doc;
+ var elemList;
+ var acElem;
+ var attr;
+ var attrTypeInfo;
+ var typeName;
+ var typeNamespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acElem = elemList.item(0);
+ attr = acElem.getAttributeNode("title");
+ attrTypeInfo = attr.schemaTypeInfo;
+
+ typeName = attrTypeInfo.typeName;
+
+ typeNamespace = attrTypeInfo.typeNamespace;
+
+ assertEquals("attrgetschematypeinfo08_typeName","string",typeName);
+ assertEquals("attrgetschematypeinfo08_typeNamespace","http://www.w3.org/2001/XMLSchema",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ attrgetschematypeinfo08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.xhtml b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.xhtml
new file mode 100644
index 0000000..251a053
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrgetschematypeinfo08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrgetschematypeinfo08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrisid01-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrisid01-expected.txt
new file mode 100644
index 0000000..c2ed073
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid01.js b/LayoutTests/dom/xhtml/level3/core/attrisid01.js
new file mode 100644
index 0000000..a6e7ab2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid01.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the third acronyms element's class attribute, whose type is not ID.
+ Invoke isID on the class attribute, this should return false.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId
+*/
+function attrisid01() {
+ var success;
+ if(checkInitialization(builder, "attrisid01") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ id = attr.isId;
+
+ assertFalse("AttrIsIDFalse01",id);
+
+}
+
+
+
+
+function runTest() {
+ attrisid01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid01.xhtml b/LayoutTests/dom/xhtml/level3/core/attrisid01.xhtml
new file mode 100644
index 0000000..3835b0f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrisid01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrisid02-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrisid02-expected.txt
new file mode 100644
index 0000000..952597d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid02
+Status error
+Message Line 107: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid02.js b/LayoutTests/dom/xhtml/level3/core/attrisid02.js
new file mode 100644
index 0000000..68c7a9c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid02.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId
+*/
+function attrisid02() {
+ var success;
+ if(checkInitialization(builder, "attrisid02") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+ var xmlNS = "http://www.w3.org/XML/1998/namespace";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ acronymElem.setAttributeNS(xmlNS,"xml:lang","FR-fr");
+ acronymElem.setIdAttributeNS(xmlNS,"lang",true);
+ attr = acronymElem.getAttributeNodeNS(xmlNS,"lang");
+ id = attr.isId;
+
+ assertTrue("AttrIsIDTrue02",id);
+
+}
+
+
+
+
+function runTest() {
+ attrisid02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid02.xhtml b/LayoutTests/dom/xhtml/level3/core/attrisid02.xhtml
new file mode 100644
index 0000000..6432289
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrisid02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrisid03-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrisid03-expected.txt
new file mode 100644
index 0000000..8ec5b57
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid03
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid03.js b/LayoutTests/dom/xhtml/level3/core/attrisid03.js
new file mode 100644
index 0000000..9c85fb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid03.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke setIdAttribute(false) on a newly created attribute and then check Attr.isID.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId
+*/
+function attrisid03() {
+ var success;
+ if(checkInitialization(builder, "attrisid03") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+ var xmlNS = "http://www.w3.org/XML/1998/namespace";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ acronymElem.setAttributeNS(xmlNS,"xml:lang","FR-fr");
+ acronymElem.setIdAttributeNS(xmlNS,"lang",false);
+ attr = acronymElem.getAttributeNodeNS(xmlNS,"lang");
+ id = attr.isId;
+
+ assertFalse("AttrIsIDFalse03",id);
+
+}
+
+
+
+
+function runTest() {
+ attrisid03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid03.xhtml b/LayoutTests/dom/xhtml/level3/core/attrisid03.xhtml
new file mode 100644
index 0000000..3f61b97
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrisid03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrisid04-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrisid04-expected.txt
new file mode 100644
index 0000000..2cd58bd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid04.js b/LayoutTests/dom/xhtml/level3/core/attrisid04.js
new file mode 100644
index 0000000..24608b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid04.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ //
+ // WebKit modification:
+ //
+ // Remove the following line otherwise test case skipped.
+ //
+ //setImplementationAttribute("validating", true);
+ //
+ // End WebKit modification
+ //
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attr.isID should return true for the id attribute on the fourth acronym node
+since its type is ID.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId
+*/
+function attrisid04() {
+ var success;
+ if(checkInitialization(builder, "attrisid04") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var clonedacronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(3);
+ attr = acronymElem.getAttributeNode("id");
+ id = attr.isId;
+
+ assertTrue("AttrIsIDTrue04",id);
+
+}
+
+
+
+
+function runTest() {
+ attrisid04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid04.xhtml b/LayoutTests/dom/xhtml/level3/core/attrisid04.xhtml
new file mode 100644
index 0000000..8c8f93c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrisid04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrisid05-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrisid05-expected.txt
new file mode 100644
index 0000000..6a9f6be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid05.js b/LayoutTests/dom/xhtml/level3/core/attrisid05.js
new file mode 100644
index 0000000..772fa68
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid05.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ //
+ // WebKit modification:
+ //
+ // Remove the following line otherwise test case skipped.
+ //
+ //setImplementationAttribute("validating", true);
+ //
+ // End WebKit modification
+ //
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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???
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId
+*/
+function attrisid05() {
+ var success;
+ if(checkInitialization(builder, "attrisid05") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var clonedacronymElem;
+ var acronymParentElem;
+ var appendedNode;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(3);
+ acronymParentElem = acronymElem.parentNode;
+
+ clonedacronymElem = acronymElem.cloneNode(true);
+ appendedNode = acronymParentElem.appendChild(clonedacronymElem);
+ attr = acronymElem.getAttributeNode("id");
+ id = attr.isId;
+
+ assertTrue("AttrIsIDTrue05",id);
+
+}
+
+
+
+
+function runTest() {
+ attrisid05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid05.xhtml b/LayoutTests/dom/xhtml/level3/core/attrisid05.xhtml
new file mode 100644
index 0000000..9f21168
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrisid05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrisid06-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrisid06-expected.txt
new file mode 100644
index 0000000..7f3dd7f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid06.js b/LayoutTests/dom/xhtml/level3/core/attrisid06.js
new file mode 100644
index 0000000..7ca4f64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid06.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke isId on a new Attr node. Check if the value returned is false.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId
+*/
+function attrisid06() {
+ var success;
+ if(checkInitialization(builder, "attrisid06") != null) return;
+ var doc;
+ var attr;
+ var id = false;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ id = attr.isId;
+
+ assertFalse("AttrIsIDFalse06",id);
+
+}
+
+
+
+
+function runTest() {
+ attrisid06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid06.xhtml b/LayoutTests/dom/xhtml/level3/core/attrisid06.xhtml
new file mode 100644
index 0000000..e0b21fd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrisid06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/attrisid07-expected.txt b/LayoutTests/dom/xhtml/level3/core/attrisid07-expected.txt
new file mode 100644
index 0000000..bc3883b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid07
+Status error
+Message Line 113: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid07.js b/LayoutTests/dom/xhtml/level3/core/attrisid07.js
new file mode 100644
index 0000000..42706b6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid07.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId
+*/
+function attrisid07() {
+ var success;
+ if(checkInitialization(builder, "attrisid07") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var attrImported;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ acronymElem = elemList.item(2);
+ acronymElem.setAttributeNS("http://www.w3.org/DOM","dom3:newAttr","null");
+ acronymElem.setIdAttributeNS("http://www.w3.org/DOM","newAttr",true);
+ attr = acronymElem.getAttributeNodeNS("http://www.w3.org/DOM","newAttr");
+ id = attr.isId;
+
+ assertTrue("AttrIsIDTrue07_1",id);
+attrImported = doc.importNode(attr,false);
+ id = attrImported.isId;
+
+ assertFalse("AttrIsID07_isFalseforImportedNode",id);
+
+}
+
+
+
+
+function runTest() {
+ attrisid07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/attrisid07.xhtml b/LayoutTests/dom/xhtml/level3/core/attrisid07.xhtml
new file mode 100644
index 0000000..eaf948b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/attrisid07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="attrisid07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/canonicalform01-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform01-expected.txt
new file mode 100644
index 0000000..7731c3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform01
+Status error
+Message Line 114: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform01.js b/LayoutTests/dom/xhtml/level3/core/canonicalform01.js
new file mode 100644
index 0000000..18b2abd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform01.js
@@ -0,0 +1,148 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with 'canonical-form' set to true, check that
+entity references are expanded and unused entity declaration are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform01() {
+ var success;
+ if(checkInitialization(builder, "canonicalform01") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var entRef;
+ var childValue;
+ var entities;
+ var ent2;
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = doc.createEntityReference("ent1");
+ child = pElem.appendChild(entRef);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ child = pElem.lastChild;
+
+ assertNotNull("lastChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChildName","#text",childName);
+ childValue = child.nodeValue;
+
+ assertEquals("firstChildValue","barfoo",childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform01.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform01.xhtml
new file mode 100644
index 0000000..60a55f6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform02-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform02-expected.txt
new file mode 100644
index 0000000..8035867
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform02
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform02.js b/LayoutTests/dom/xhtml/level3/core/canonicalform02.js
new file mode 100644
index 0000000..232e9be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform02.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with normalize-characters set to false, check that
+characters are not normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function canonicalform02() {
+ var success;
+ if(checkInitialization(builder, "canonicalform02") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform02.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform02.xhtml
new file mode 100644
index 0000000..e69873b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform03-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform03-expected.txt
new file mode 100644
index 0000000..dbe819c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform03
+Status error
+Message Line 117: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform03.js b/LayoutTests/dom/xhtml/level3/core/canonicalform03.js
new file mode 100644
index 0000000..828ab02
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform03.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("coalescing", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize a document with the 'canonical-form' parameter set to true and
+check that a CDATASection has been eliminated.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform03() {
+ var success;
+ if(checkInitialization(builder, "canonicalform03") != null) return;
+ var doc;
+ var elemList;
+ var elemName;
+ var cdata;
+ var text;
+ var nodeName;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elemName = elemList.item(1);
+ cdata = elemName.lastChild;
+
+ nodeName = cdata.nodeName;
+
+ assertEquals("documentnormalizedocument02","#cdata-section",nodeName);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalization2Error", 2);
+ elemList = doc.getElementsByTagName("strong");
+ elemName = elemList.item(1);
+ text = elemName.lastChild;
+
+ nodeName = text.nodeName;
+
+ assertEquals("documentnormalizedocument02_false","#text",nodeName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform03.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform03.xhtml
new file mode 100644
index 0000000..2b2d74a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="canonicalform03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/canonicalform04-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform04-expected.txt
new file mode 100644
index 0000000..ecf7ac4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform04
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform04.js b/LayoutTests/dom/xhtml/level3/core/canonicalform04.js
new file mode 100644
index 0000000..a08f31e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform04.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with canonical-form set to true, check that
+namespace declaration attributes are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform04() {
+ var success;
+ if(checkInitialization(builder, "canonicalform04") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var xmlnsAttr;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ domConfig.setParameter("canonical-form", true);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ docElem = doc.documentElement;
+
+ xmlnsAttr = docElem.getAttributeNode("xmlns");
+ assertNotNull("xmlnsAttrNotNull",xmlnsAttr);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform04.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform04.xhtml
new file mode 100644
index 0000000..8f070cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform05-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform05-expected.txt
new file mode 100644
index 0000000..04e46ad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform05
+Status error
+Message Line 130: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform05.js b/LayoutTests/dom/xhtml/level3/core/canonicalform05.js
new file mode 100644
index 0000000..1f5aee3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform05.js
@@ -0,0 +1,201 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Add a L1 element to a L2 namespace aware document and perform namespace normalization. Should result
+in an error.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms#normalizeDocumentAlgo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform05() {
+ var success;
+ if(checkInitialization(builder, "canonicalform05") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var pList;
+ var newChild;
+ var retval;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var errorCount = 0;
+ var severity;
+ var problemNode;
+ var location;
+ var lineNumber;
+ var columnNumber;
+ var byteOffset;
+ var utf16Offset;
+ var uri;
+ var type;
+ var message;
+ var relatedException;
+ var relatedData;
+ var length;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newChild = doc.createElement("br");
+ retval = elem.appendChild(newChild);
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100C4 = 0;indexN100C4 < errors.length; indexN100C4++) {
+ error = errors[indexN100C4];
+ severity = error.severity;
+
+
+ if(
+ (2 == severity)
+ ) {
+ location = error.location;
+
+ problemNode = location.relatedNode;
+
+ assertSame("relatedNodeIsL1Node",newChild,problemNode);
+lineNumber = location.lineNumber;
+
+ assertEquals("lineNumber",-1,lineNumber);
+ columnNumber = location.columnNumber;
+
+ assertEquals("columnNumber",-1,columnNumber);
+ byteOffset = location.byteOffset;
+
+ assertEquals("byteOffset",-1,byteOffset);
+ utf16Offset = location.utf16Offset;
+
+ assertEquals("utf16Offset",-1,utf16Offset);
+ uri = location.uri;
+
+ assertNull("uri",uri);
+ message = error.message;
+
+ length = message.length;
+ assertTrue("messageNotEmpty",
+
+ (length > 0)
+);
+type = error.type;
+
+ relatedData = error.relatedData;
+
+ relatedException = error.relatedException;
+
+ errorCount += 1;
+
+ }
+
+ else {
+ assertEquals("anyOthersShouldBeWarnings",1,severity);
+
+ }
+
+ }
+ assertEquals("oneError",1,errorCount);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform05.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform05.xhtml
new file mode 100644
index 0000000..0f0c756
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform06-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform06-expected.txt
new file mode 100644
index 0000000..638218f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform06
+Status error
+Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform06.js b/LayoutTests/dom/xhtml/level3/core/canonicalform06.js
new file mode 100644
index 0000000..8ba9e2f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform06.js
@@ -0,0 +1,174 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Create a document with an XML 1.1 valid but XML 1.0 invalid element and
+normalize document with canonical-form set to true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform06() {
+ var success;
+ if(checkInitialization(builder, "canonicalform06") != null) return;
+ var domImpl;
+ var nullString = null;
+
+ var nullDoctype = null;
+
+ var doc;
+ var elem;
+ var retval;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var severity;
+ var type;
+ var locator;
+ var relatedNode;
+ var canSet;
+ domImpl = getImplementation();
+doc = domImpl.createDocument(nullString,nullString,nullDoctype);
+
+ {
+ success = false;
+ try {
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed01","LegalNameࢎ");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("xml10InvalidName",success);
+ }
+
+ try {
+ doc.xmlVersion = "1.1";
+
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed01","LegalNameࢎ");
+ retval = doc.appendChild(elem);
+ doc.xmlVersion = "1.0";
+
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100B7 = 0;indexN100B7 < errors.length; indexN100B7++) {
+ error = errors[indexN100B7];
+ severity = error.severity;
+
+ assertEquals("severity",2,severity);
+ type = error.type;
+
+ assertEquals("type","wf-invalid-character-in-node-name",type);
+ locator = error.location;
+
+ relatedNode = locator.relatedNode;
+
+ assertSame("relatedNode",elem,relatedNode);
+
+ }
+ assertSize("oneError",1,errors);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform06.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform06.xhtml
new file mode 100644
index 0000000..45e5fbc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform06.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='canonicalform06.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform07-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform07-expected.txt
new file mode 100644
index 0000000..e111c85
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform07
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform07.js b/LayoutTests/dom/xhtml/level3/core/canonicalform07.js
new file mode 100644
index 0000000..1a593af
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform07.js
@@ -0,0 +1,155 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with canonical-form set to true and validation set to true, check that
+whitespace in element content is preserved.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform07() {
+ var success;
+ if(checkInitialization(builder, "canonicalform07") != null) return;
+ var doc;
+ var bodyList;
+ var body;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var text;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+
+ if(
+ (getImplementationAttribute("ignoringElementContentWhitespace") == true)
+ ) {
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ text = doc.createTextNode(" ");
+ child = body.insertBefore(text,child);
+
+ }
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ assertNotNull("firstChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChild","#text",childName);
+ child = child.nextSibling;
+
+ assertNotNull("secondChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("secondChild","p",childName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform07.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform07.xhtml
new file mode 100644
index 0000000..7da1fc7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform07.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform07.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform08.js b/LayoutTests/dom/xhtml/level3/core/canonicalform08.js
new file mode 100644
index 0000000..0050d10
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform08.js
@@ -0,0 +1,203 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "canonicalform01");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document based on section 3.1 with canonical-form set to true and check normalized document.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform08() {
+ var success;
+ if(checkInitialization(builder, "canonicalform08") != null) return;
+ var doc;
+ var bodyList;
+ var body;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var node;
+ var nodeName;
+ var nodeValue;
+ var nodeType;
+ var length;
+ var text;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "canonicalform01");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ node = doc.firstChild;
+
+ nodeType = node.nodeType;
+
+ assertEquals("PIisFirstChild",7,nodeType);
+ nodeValue = node.data;
+
+ length = nodeValue.length;
+ assertEquals("piDataLength",36,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("TextisSecondChild",3,nodeType);
+ nodeValue = node.nodeValue;
+
+ length = nodeValue.length;
+ assertEquals("secondChildLength",1,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("ElementisThirdChild",1,nodeType);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("TextisFourthChild",3,nodeType);
+ nodeValue = node.nodeValue;
+
+ length = nodeValue.length;
+ assertEquals("fourthChildLength",1,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("PIisFifthChild",7,nodeType);
+ nodeValue = node.data;
+
+ assertEquals("trailingPIData","",nodeValue);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("TextisSixthChild",3,nodeType);
+ nodeValue = node.nodeValue;
+
+ length = nodeValue.length;
+ assertEquals("sixthChildLength",1,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("CommentisSeventhChild",8,nodeType);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("TextisEighthChild",3,nodeType);
+ nodeValue = node.nodeValue;
+
+ length = nodeValue.length;
+ assertEquals("eighthChildLength",1,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("CommentisNinthChild",8,nodeType);
+ node = node.nextSibling;
+
+ assertNull("TenthIsNull",node);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform08.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform08.xhtml
new file mode 100644
index 0000000..f25bc82
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform08.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+<p>Hello, world!<!-- Comment 1 --></p></body></html>
+
+<?pi-without-data ?>
+
+<!-- Comment 2 -->
+
+<!-- Comment 3 -->
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform09.js b/LayoutTests/dom/xhtml/level3/core/canonicalform09.js
new file mode 100644
index 0000000..3d4d97a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform09.js
@@ -0,0 +1,177 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "canonicalform01");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document based on section 3.1 with canonical-form set to true
+and comments to false and check normalized document.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform09() {
+ var success;
+ if(checkInitialization(builder, "canonicalform09") != null) return;
+ var doc;
+ var bodyList;
+ var body;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var node;
+ var nodeName;
+ var nodeValue;
+ var nodeType;
+ var length;
+ var text;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "canonicalform01");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("comments", false);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ node = doc.firstChild;
+
+ nodeType = node.nodeType;
+
+ assertEquals("PIisFirstChild",7,nodeType);
+ nodeValue = node.data;
+
+ length = nodeValue.length;
+ assertEquals("piDataLength",36,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("TextisSecondChild",3,nodeType);
+ nodeValue = node.nodeValue;
+
+ length = nodeValue.length;
+ assertEquals("secondChildLength",1,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("ElementisThirdChild",1,nodeType);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("TextisFourthChild",3,nodeType);
+ nodeValue = node.nodeValue;
+
+ length = nodeValue.length;
+ assertEquals("fourthChildLength",1,length);
+ node = node.nextSibling;
+
+ nodeType = node.nodeType;
+
+ assertEquals("PIisFifthChild",7,nodeType);
+ nodeValue = node.data;
+
+ assertEquals("trailingPIData","",nodeValue);
+ node = node.nextSibling;
+
+ assertNull("SixthIsNull",node);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform09.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform09.xhtml
new file mode 100644
index 0000000..e8d97a2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform09.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform09.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+<p>Hello, world!<!-- Comment 1 --></p></body></html>
+
+<?pi-without-data ?>
+
+<!-- Comment 2 -->
+
+<!-- Comment 3 -->
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform10-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform10-expected.txt
new file mode 100644
index 0000000..0d258e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform10
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform10.js b/LayoutTests/dom/xhtml/level3/core/canonicalform10.js
new file mode 100644
index 0000000..b0a63c9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform10.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "canonicalform03");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Check elimination of unnecessary namespace prefixes when
+normalized with canonical-form = true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform10() {
+ var success;
+ if(checkInitialization(builder, "canonicalform10") != null) return;
+ var doc;
+ var divList;
+ var div;
+ var domConfig;
+ var canSet;
+ errorMonitor = new DOMErrorMonitor();
+
+ var node;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "canonicalform03");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ domConfig.setParameter("canonical-form", true);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ divList = doc.getElementsByTagName("div");
+ div = divList.item(5);
+ node = div.getAttributeNode("xmlns");
+ assertNotNull("xmlnsPresent",node);
+node = div.getAttributeNode("xmlns:a");
+ assertNull("xmlnsANotPresent",node);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform10.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform10.xhtml
new file mode 100644
index 0000000..00a6753
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform10.xhtml
@@ -0,0 +1,18 @@
+<!DOCTYPE html [<!ATTLIST acronym title CDATA "default">]>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform03</title><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform10.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/canonicalform11-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform11-expected.txt
new file mode 100644
index 0000000..c693093
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform11
+Status error
+Message Line 109: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform11.js b/LayoutTests/dom/xhtml/level3/core/canonicalform11.js
new file mode 100644
index 0000000..2879a81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform11.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "canonicalform03");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Check that default attributes are made explicitly specified.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform11() {
+ var success;
+ if(checkInitialization(builder, "canonicalform11") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var domConfig;
+ var canSet;
+ errorMonitor = new DOMErrorMonitor();
+
+ var attr;
+ var attrValue;
+ var attrSpecified;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "canonicalform03");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ domConfig.setParameter("canonical-form", true);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ attr = elem.getAttributeNode("title");
+ assertNotNull("titlePresent",attr);
+attrSpecified = attr.specified;
+
+ assertTrue("titleSpecified",attrSpecified);
+attrValue = attr.nodeValue;
+
+ assertEquals("titleValue","default",attrValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform11.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform11.xhtml
new file mode 100644
index 0000000..92fe9e2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform11.xhtml
@@ -0,0 +1,18 @@
+<!DOCTYPE html [<!ATTLIST acronym title CDATA "default">]>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>canonicalform03</title><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform11.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/canonicalform12-expected.txt b/LayoutTests/dom/xhtml/level3/core/canonicalform12-expected.txt
new file mode 100644
index 0000000..17b0d5f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform12
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform12.js b/LayoutTests/dom/xhtml/level3/core/canonicalform12.js
new file mode 100644
index 0000000..5898817
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform12.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with 'canonical-form' set to true, check that
+DocumentType nodes are removed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+*/
+function canonicalform12() {
+ var success;
+ if(checkInitialization(builder, "canonicalform12") != null) return;
+ var doc;
+ var domConfig;
+ var canSet;
+ errorMonitor = new DOMErrorMonitor();
+
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("canonical-form",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("canonical-form", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ doctype = doc.doctype;
+
+ assertNull("docTypeNull",doctype);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ canonicalform12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/canonicalform12.xhtml b/LayoutTests/dom/xhtml/level3/core/canonicalform12.xhtml
new file mode 100644
index 0000000..58a652a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/canonicalform12.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='canonicalform12.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/cdatasections01-expected.txt b/LayoutTests/dom/xhtml/level3/core/cdatasections01-expected.txt
new file mode 100644
index 0000000..7db0911
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/cdatasections01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/cdatasections01
+Status error
+Message Line 115: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/cdatasections01.js b/LayoutTests/dom/xhtml/level3/core/cdatasections01.js
new file mode 100644
index 0000000..e771997
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/cdatasections01.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/cdatasections01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize a document using Node.normalize and check that
+the value of the 'cdata-sections' parameter is ignored.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections
+*/
+function cdatasections01() {
+ var success;
+ if(checkInitialization(builder, "cdatasections01") != null) return;
+ var doc;
+ var elem;
+ var newCdata;
+ var cdata;
+ var text;
+ var nodeName;
+ var nodeValue;
+ var appendedChild;
+ var domConfig;
+ var pList;
+ errorMonitor = new DOMErrorMonitor();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newCdata = doc.createCDATASection("CDATA");
+ appendedChild = elem.appendChild(newCdata);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("cdata-sections", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizationError", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ cdata = elem.lastChild;
+
+ nodeName = cdata.nodeName;
+
+ assertEquals("documentnormalizedocument03_true","#cdata-section",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ cdatasections01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/cdatasections01.xhtml b/LayoutTests/dom/xhtml/level3/core/cdatasections01.xhtml
new file mode 100644
index 0000000..5fe61c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/cdatasections01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='cdatasections01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt
new file mode 100644
index 0000000..aad4425
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization01
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.js b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.js
new file mode 100644
index 0000000..26c9207
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with check-character-normalization set to false, check that
+no errors are dispatched.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function checkcharacternormalization01() {
+ var success;
+ if(checkInitialization(builder, "checkcharacternormalization01") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ domConfig.setParameter("check-character-normalization", false);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+}
+
+
+
+
+function runTest() {
+ checkcharacternormalization01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.xhtml b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.xhtml
new file mode 100644
index 0000000..9c32dfc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='checkcharacternormalization01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt
new file mode 100644
index 0000000..596a84e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization02
+Status error
+Message Line 119: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.js b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.js
new file mode 100644
index 0000000..03bcd7c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.js
@@ -0,0 +1,164 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with check-character-normalization set to true, check that
+non-normalized characters are signaled.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function checkcharacternormalization02() {
+ var success;
+ if(checkInitialization(builder, "checkcharacternormalization02") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var canSet;
+ var errors = new Array();
+
+ var error;
+ var severity;
+ var locator;
+ var relatedNode;
+ var errorCount = 0;
+ var errorType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("check-character-normalization",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("check-character-normalization", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100AA = 0;indexN100AA < errors.length; indexN100AA++) {
+ error = errors[indexN100AA];
+ severity = error.severity;
+
+
+ if(
+ (2 == severity)
+ ) {
+ errorCount += 1;
+errorType = error.type;
+
+ assertEquals("errorType","check-character-normalization-failure",errorType);
+ locator = error.location;
+
+ relatedNode = locator.relatedNode;
+
+ assertSame("relatedNodeSame",text,relatedNode);
+
+ }
+
+ }
+ assertEquals("oneError",1,errorCount);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ checkcharacternormalization02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.xhtml b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.xhtml
new file mode 100644
index 0000000..1cafcb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='checkcharacternormalization02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt
new file mode 100644
index 0000000..c7434b6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization03
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.js b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.js
new file mode 100644
index 0000000..43405f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document using Node.normalize checking that "check-character-normalization"
+is ignored.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function checkcharacternormalization03() {
+ var success;
+ if(checkInitialization(builder, "checkcharacternormalization03") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("check-character-normalization",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("check-character-normalization", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ checkcharacternormalization03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.xhtml b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.xhtml
new file mode 100644
index 0000000..5372c83
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/checkcharacternormalization03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='checkcharacternormalization03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/comments01-expected.txt b/LayoutTests/dom/xhtml/level3/core/comments01-expected.txt
new file mode 100644
index 0000000..9dbc743
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/comments01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/comments01
+Status error
+Message Line 113: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/comments01.js b/LayoutTests/dom/xhtml/level3/core/comments01.js
new file mode 100644
index 0000000..af3415c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/comments01.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/comments01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Check that Node.normalize ignores the setting of configuration parameter 'comments'.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments
+*/
+function comments01() {
+ var success;
+ if(checkInitialization(builder, "comments01") != null) return;
+ var doc;
+ var elem;
+ var newComment;
+ var lastChild;
+ var text;
+ var nodeName;
+ var appendedChild;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newComment = doc.createComment("COMMENT_NODE");
+ appendedChild = elem.appendChild(newComment);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("comments", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizationError", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ lastChild = elem.lastChild;
+
+ nodeName = lastChild.nodeName;
+
+ assertEquals("documentnormalizedocument04_true","#comment",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ comments01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/comments01.xhtml b/LayoutTests/dom/xhtml/level3/core/comments01.xhtml
new file mode 100644
index 0000000..7360427
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/comments01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='comments01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/datatype_normalization.svg.xsd b/LayoutTests/dom/xhtml/level3/core/datatype_normalization.svg.xsd
new file mode 100644
index 0000000..c874955
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/datatype_normalization.xsd b/LayoutTests/dom/xhtml/level3/core/datatype_normalization.xsd
new file mode 100644
index 0000000..676fdac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/datatype_normalization2.svg.xsd b/LayoutTests/dom/xhtml/level3/core/datatype_normalization2.svg.xsd
new file mode 100644
index 0000000..8ebda4f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/datatype_normalization2.xsd b/LayoutTests/dom/xhtml/level3/core/datatype_normalization2.xsd
new file mode 100644
index 0000000..50a5c9a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/datatypenormalization13-expected.txt b/LayoutTests/dom/xhtml/level3/core/datatypenormalization13-expected.txt
new file mode 100644
index 0000000..a5f72d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization13
+Status error
+Message Line 113: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization13.js b/LayoutTests/dom/xhtml/level3/core/datatypenormalization13.js
new file mode 100644
index 0000000..1a07bb5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization13.js
@@ -0,0 +1,146 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "datatype_normalization2");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with datatype-normalization set to true.
+Check if string values were normalized per default whitespace
+facet of xsd:string.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+*/
+function datatypenormalization13() {
+ var success;
+ if(checkInitialization(builder, "datatypenormalization13") != null) return;
+ var doc;
+ var elemList;
+ var element;
+ var domConfig;
+ var str;
+ var canSetNormalization;
+ var canSetValidate;
+ var canSetXMLSchema;
+ var xsdNS = "http://www.w3.org/2001/XMLSchema";
+ errorMonitor = new DOMErrorMonitor();
+
+ var childNode;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "datatype_normalization2");
+ domConfig = doc.domConfig;
+
+ canSetNormalization = domConfig.canSetParameter("datatype-normalization",true);
+ canSetValidate = domConfig.canSetParameter("validate",true);
+ canSetXMLSchema = domConfig.canSetParameter("schema-type",xsdNS);
+
+ if(
+
+ (canSetNormalization && canSetValidate && canSetXMLSchema)
+
+ ) {
+ domConfig.setParameter("datatype-normalization", true);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("schema-type", xsdNS);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","em");
+ element = elemList.item(0);
+ childNode = element.firstChild;
+
+ assertNotNull("childNodeNotNull",childNode);
+childValue = childNode.nodeValue;
+
+ assertEquals("content"," EMP 0001 ",childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ datatypenormalization13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization13.xhtml b/LayoutTests/dom/xhtml/level3/core/datatypenormalization13.xhtml
new file mode 100644
index 0000000..9a1296f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization13.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='datatypenormalization13.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/datatypenormalization14-expected.txt b/LayoutTests/dom/xhtml/level3/core/datatypenormalization14-expected.txt
new file mode 100644
index 0000000..61a9bf1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization14
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization14.js b/LayoutTests/dom/xhtml/level3/core/datatypenormalization14.js
new file mode 100644
index 0000000..5f94d95
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization14.js
@@ -0,0 +1,145 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "datatype_normalization2");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with datatype-normalization set to true.
+Check if string values were normalized per explicit whitespace=preserve.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+*/
+function datatypenormalization14() {
+ var success;
+ if(checkInitialization(builder, "datatypenormalization14") != null) return;
+ var doc;
+ var elemList;
+ var element;
+ var domConfig;
+ var str;
+ var canSetNormalization;
+ var canSetValidate;
+ var canSetXMLSchema;
+ var xsdNS = "http://www.w3.org/2001/XMLSchema";
+ errorMonitor = new DOMErrorMonitor();
+
+ var childNode;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "datatype_normalization2");
+ domConfig = doc.domConfig;
+
+ canSetNormalization = domConfig.canSetParameter("datatype-normalization",true);
+ canSetValidate = domConfig.canSetParameter("validate",true);
+ canSetXMLSchema = domConfig.canSetParameter("schema-type",xsdNS);
+
+ if(
+
+ (canSetNormalization && canSetValidate && canSetXMLSchema)
+
+ ) {
+ domConfig.setParameter("datatype-normalization", true);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("schema-type", xsdNS);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","acronym");
+ element = elemList.item(0);
+ childNode = element.firstChild;
+
+ assertNotNull("childNodeNotNull",childNode);
+childValue = childNode.nodeValue;
+
+ assertEquals("content"," EMP 0001 ",childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ datatypenormalization14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization14.xhtml b/LayoutTests/dom/xhtml/level3/core/datatypenormalization14.xhtml
new file mode 100644
index 0000000..2fd65a5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization14.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='datatypenormalization14.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/datatypenormalization15-expected.txt b/LayoutTests/dom/xhtml/level3/core/datatypenormalization15-expected.txt
new file mode 100644
index 0000000..d60e981
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization15
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization15.js b/LayoutTests/dom/xhtml/level3/core/datatypenormalization15.js
new file mode 100644
index 0000000..94819cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization15.js
@@ -0,0 +1,156 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "datatype_normalization2");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with datatype-normalization set to true.
+Check if string values were normalized per an explicit whitespace=collapse.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+*/
+function datatypenormalization15() {
+ var success;
+ if(checkInitialization(builder, "datatypenormalization15") != null) return;
+ var doc;
+ var elemList;
+ var element;
+ var domConfig;
+ var str;
+ var canSetNormalization;
+ var canSetValidate;
+ var canSetXMLSchema;
+ var xsdNS = "http://www.w3.org/2001/XMLSchema";
+ errorMonitor = new DOMErrorMonitor();
+
+ var childNode;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "datatype_normalization2");
+ domConfig = doc.domConfig;
+
+ canSetNormalization = domConfig.canSetParameter("datatype-normalization",true);
+ canSetValidate = domConfig.canSetParameter("validate",true);
+ canSetXMLSchema = domConfig.canSetParameter("schema-type",xsdNS);
+
+ if(
+
+ (canSetNormalization && canSetValidate && canSetXMLSchema)
+
+ ) {
+ domConfig.setParameter("datatype-normalization", true);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("schema-type", xsdNS);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","code");
+ element = elemList.item(0);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content1","EMP 0001",childValue);
+ element = elemList.item(1);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content2","EMP 0001",childValue);
+ element = elemList.item(2);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content3","EMP 0001",childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ datatypenormalization15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization15.xhtml b/LayoutTests/dom/xhtml/level3/core/datatypenormalization15.xhtml
new file mode 100644
index 0000000..e4f1a31
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization15.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='datatypenormalization15.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/datatypenormalization16-expected.txt b/LayoutTests/dom/xhtml/level3/core/datatypenormalization16-expected.txt
new file mode 100644
index 0000000..957a104
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization16
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization16.js b/LayoutTests/dom/xhtml/level3/core/datatypenormalization16.js
new file mode 100644
index 0000000..6edef10
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization16.js
@@ -0,0 +1,162 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "datatype_normalization2");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with datatype-normalization set to true.
+Check if string values were normalized per explicit whitespace=replace.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+*/
+function datatypenormalization16() {
+ var success;
+ if(checkInitialization(builder, "datatypenormalization16") != null) return;
+ var doc;
+ var elemList;
+ var element;
+ var domConfig;
+ var str;
+ var canSetNormalization;
+ var canSetValidate;
+ var canSetXMLSchema;
+ var xsdNS = "http://www.w3.org/2001/XMLSchema";
+ errorMonitor = new DOMErrorMonitor();
+
+ var childNode;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "datatype_normalization2");
+ domConfig = doc.domConfig;
+
+ canSetNormalization = domConfig.canSetParameter("datatype-normalization",true);
+ canSetValidate = domConfig.canSetParameter("validate",true);
+ canSetXMLSchema = domConfig.canSetParameter("schema-type",xsdNS);
+
+ if(
+
+ (canSetNormalization && canSetValidate && canSetXMLSchema)
+
+ ) {
+ domConfig.setParameter("datatype-normalization", true);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("schema-type", xsdNS);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","sup");
+ element = elemList.item(0);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content1"," EMP 0001 ",childValue);
+ element = elemList.item(1);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content2","EMP 0001",childValue);
+ element = elemList.item(2);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content3","EMP 0001",childValue);
+ element = elemList.item(3);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content4","EMP 0001",childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ datatypenormalization16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization16.xhtml b/LayoutTests/dom/xhtml/level3/core/datatypenormalization16.xhtml
new file mode 100644
index 0000000..6559dd9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization16.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='datatypenormalization16.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/datatypenormalization17-expected.txt b/LayoutTests/dom/xhtml/level3/core/datatypenormalization17-expected.txt
new file mode 100644
index 0000000..2ad55f1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization17
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization17.js b/LayoutTests/dom/xhtml/level3/core/datatypenormalization17.js
new file mode 100644
index 0000000..fb84e44
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization17.js
@@ -0,0 +1,154 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "datatype_normalization2");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with datatype-normalization set to false, string values
+should not be normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+*/
+function datatypenormalization17() {
+ var success;
+ if(checkInitialization(builder, "datatypenormalization17") != null) return;
+ var doc;
+ var elemList;
+ var element;
+ var domConfig;
+ var str;
+ var canSetValidate;
+ var canSetXMLSchema;
+ var xsdNS = "http://www.w3.org/2001/XMLSchema";
+ errorMonitor = new DOMErrorMonitor();
+
+ var childNode;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "datatype_normalization2");
+ domConfig = doc.domConfig;
+
+ canSetValidate = domConfig.canSetParameter("validate",true);
+ canSetXMLSchema = domConfig.canSetParameter("schema-type",xsdNS);
+
+ if(
+
+ (canSetValidate && canSetXMLSchema)
+
+ ) {
+ domConfig.setParameter("datatype-normalization", false);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("schema-type", xsdNS);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","code");
+ element = elemList.item(1);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content2","EMP 0001",childValue);
+ element = elemList.item(2);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content3","EMP 0001",childValue);
+ element = elemList.item(0);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assert("content1","EMP 0001" != childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ datatypenormalization17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization17.xhtml b/LayoutTests/dom/xhtml/level3/core/datatypenormalization17.xhtml
new file mode 100644
index 0000000..1ff6c79
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization17.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='datatypenormalization17.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/datatypenormalization18-expected.txt b/LayoutTests/dom/xhtml/level3/core/datatypenormalization18-expected.txt
new file mode 100644
index 0000000..63f2ba7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization18
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization18.js b/LayoutTests/dom/xhtml/level3/core/datatypenormalization18.js
new file mode 100644
index 0000000..43f7cf6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization18.js
@@ -0,0 +1,156 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "datatype_normalization2");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document using Node.normalize which is not affected by DOMConfiguration unlike
+Document.normalizeDocument. Strings should not have been normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+*/
+function datatypenormalization18() {
+ var success;
+ if(checkInitialization(builder, "datatypenormalization18") != null) return;
+ var doc;
+ var elemList;
+ var element;
+ var domConfig;
+ var str;
+ var canSetValidate;
+ var canSetXMLSchema;
+ var canSetDataNorm;
+ var xsdNS = "http://www.w3.org/2001/XMLSchema";
+ errorMonitor = new DOMErrorMonitor();
+
+ var childNode;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "datatype_normalization2");
+ domConfig = doc.domConfig;
+
+ canSetValidate = domConfig.canSetParameter("validate",true);
+ canSetXMLSchema = domConfig.canSetParameter("schema-type",xsdNS);
+ canSetDataNorm = domConfig.canSetParameter("datatype-normalization",true);
+
+ if(
+
+ (canSetValidate && canSetXMLSchema && canSetDataNorm)
+
+ ) {
+ domConfig.setParameter("datatype-normalization", true);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("schema-type", xsdNS);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","code");
+ element = elemList.item(1);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content2","EMP 0001",childValue);
+ element = elemList.item(2);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content3","EMP 0001",childValue);
+ element = elemList.item(0);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assert("content1","EMP 0001" != childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ datatypenormalization18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/datatypenormalization18.xhtml b/LayoutTests/dom/xhtml/level3/core/datatypenormalization18.xhtml
new file mode 100644
index 0000000..0c60e79
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/datatypenormalization18.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='datatypenormalization18.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/documentadoptnode01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode01-expected.txt
new file mode 100644
index 0000000..94b400d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode01.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode01.js
new file mode 100644
index 0000000..61f1b76
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode01.js
@@ -0,0 +1,165 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode01() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode01") != null) return;
+ var doc;
+ var attrOwnerElem;
+ var element;
+ var attr;
+ var childList;
+ var adoptedclass;
+ var attrsParent;
+ var nodeName;
+ var nodeType;
+ var nodeValue;
+ var firstChild;
+ var firstChildValue;
+ var secondChild;
+ var secondChildType;
+ var secondChildName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(3);
+ attr = element.getAttributeNode("class");
+ adoptedclass = doc.adoptNode(attr);
+
+ if(
+
+ (adoptedclass != null)
+
+ ) {
+ nodeName = adoptedclass.nodeName;
+
+ nodeValue = adoptedclass.nodeValue;
+
+ nodeType = adoptedclass.nodeType;
+
+ attrOwnerElem = adoptedclass.ownerElement;
+
+ assertEquals("documentadoptode01_nodeName","class",nodeName);
+ assertEquals("documentadoptNode01_nodeType",2,nodeType);
+ assertNull("documentadoptnode01_ownerDoc",attrOwnerElem);
+ firstChild = adoptedclass.firstChild;
+
+ assertNotNull("firstChildNotNull",firstChild);
+firstChildValue = firstChild.nodeValue;
+
+
+ if(
+ ("Y" == firstChildValue)
+ ) {
+ secondChild = firstChild.nextSibling;
+
+ assertNotNull("secondChildNotNull",secondChild);
+secondChildType = secondChild.nodeType;
+
+ assertEquals("secondChildIsEntityReference",5,secondChildType);
+ secondChildName = secondChild.nodeName;
+
+ assertEquals("secondChildIsEnt1Reference","alpha",secondChildName);
+
+ }
+
+ else {
+ assertEquals("documentadoptnode01_nodeValue","Yα",nodeValue);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode01.xhtml
new file mode 100644
index 0000000..1e38bda
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode02-expected.txt
new file mode 100644
index 0000000..3ec65e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode02.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode02.js
new file mode 100644
index 0000000..231c68a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode02.js
@@ -0,0 +1,185 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode02() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var attrOwnerElem;
+ var element;
+ var attr;
+ var childList;
+ var adoptedclass;
+ var attrsParent;
+ var nodeName;
+ var nodeType;
+ var nodeValue;
+ var isSpecified;
+ var nullDocType = null;
+
+ var firstChild;
+ var firstChildValue;
+ var secondChild;
+ var secondChildType;
+ var secondChildName;
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(3);
+ attr = element.getAttributeNode("class");
+ adoptedclass = newDoc.adoptNode(attr);
+
+ if(
+
+ (adoptedclass != null)
+
+ ) {
+ nodeName = adoptedclass.nodeName;
+
+ nodeValue = adoptedclass.nodeValue;
+
+ nodeType = adoptedclass.nodeType;
+
+ attrOwnerElem = adoptedclass.ownerElement;
+
+ isSpecified = adoptedclass.specified;
+
+ assertEquals("documentadoptnode02_nodeName","class",nodeName);
+ assertEquals("documentadoptnode02_nodeType",2,nodeType);
+ assertNull("documentadoptnode02_ownerDoc",attrOwnerElem);
+ assertTrue("documentadoptnode02_specified",isSpecified);
+firstChild = adoptedclass.firstChild;
+
+ assertNotNull("firstChildNotNull",firstChild);
+firstChildValue = firstChild.nodeValue;
+
+
+ if(
+ ("Y" == firstChildValue)
+ ) {
+ secondChild = firstChild.nextSibling;
+
+ assertNotNull("secondChildNotNull",secondChild);
+secondChildType = secondChild.nodeType;
+
+ assertEquals("secondChildIsEntityReference",5,secondChildType);
+ secondChildName = secondChild.nodeName;
+
+ assertEquals("secondChildIsEnt1Reference","alpha",secondChildName);
+
+ }
+
+ else {
+ assertEquals("documentadoptnode02_nodeValue","Yα",nodeValue);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode02.xhtml
new file mode 100644
index 0000000..437aad3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode03-expected.txt
new file mode 100644
index 0000000..dc7b2e8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode03.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode03.js
new file mode 100644
index 0000000..f786ae7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode03.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode03() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode03") != null) return;
+ var doc;
+ var newAttr;
+ var adoptedAttr;
+ var nodeName;
+ var nodeNamespaceURI;
+ var nodePrefix;
+ var attrOwnerElem;
+ var isSpecified;
+ var xmlNS = "http://www.w3.org/XML/1998/namespace";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newAttr = doc.createAttributeNS(xmlNS,"xml:lang");
+ adoptedAttr = doc.adoptNode(newAttr);
+
+ if(
+
+ (adoptedAttr != null)
+
+ ) {
+ nodeName = adoptedAttr.nodeName;
+
+ nodeNamespaceURI = adoptedAttr.namespaceURI;
+
+ nodePrefix = adoptedAttr.prefix;
+
+ attrOwnerElem = adoptedAttr.ownerElement;
+
+ isSpecified = adoptedAttr.specified;
+
+ assertEquals("documentadoptode03_nodeName","xml:lang",nodeName);
+ assertEquals("documentadoptNode03_namespaceURI",xmlNS,nodeNamespaceURI);
+ assertEquals("documentadoptnode03_prefix","xml",nodePrefix);
+ assertNull("documentadoptnode03_ownerDoc",attrOwnerElem);
+ assertTrue("documentadoptnode03_specified",isSpecified);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode03.xhtml
new file mode 100644
index 0000000..7f0b42f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode04-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode04-expected.txt
new file mode 100644
index 0000000..869a716
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode04.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode04.js
new file mode 100644
index 0000000..f6ffb2b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode04.js
@@ -0,0 +1,152 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode04() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode04") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var newAttr;
+ var adoptedAttr;
+ var nodeName;
+ var nodeNamespaceURI;
+ var nodePrefix;
+ var attrOwnerElem;
+ var isSpecified;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+ var xmlNS = "http://www.w3.org/XML/1998/namespace";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newAttr = doc.createAttributeNS(xmlNS,"xml:lang");
+ adoptedAttr = newDoc.adoptNode(newAttr);
+
+ if(
+
+ (adoptedAttr != null)
+
+ ) {
+ nodeName = adoptedAttr.nodeName;
+
+ nodeNamespaceURI = adoptedAttr.namespaceURI;
+
+ nodePrefix = adoptedAttr.prefix;
+
+ attrOwnerElem = adoptedAttr.ownerElement;
+
+ isSpecified = adoptedAttr.specified;
+
+ assertEquals("documentadoptnode04_nodeName","xml:lang",nodeName);
+ assertEquals("documentadoptnode04_namespaceURI",xmlNS,nodeNamespaceURI);
+ assertEquals("documentadoptnode04_prefix","xml",nodePrefix);
+ assertNull("documentadoptnode04_ownerDoc",attrOwnerElem);
+ assertTrue("documentadoptnode04_specified",isSpecified);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode04.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode04.xhtml
new file mode 100644
index 0000000..b3df2a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode05-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode05-expected.txt
new file mode 100644
index 0000000..0d49651
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode05.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode05.js
new file mode 100644
index 0000000..0579fc9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode05.js
@@ -0,0 +1,155 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode05() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode05") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var elementEmp;
+ var childList;
+ var dir;
+ var adoptedAttr;
+ var nodeName;
+ var nodeNamespaceURI;
+ var nodePrefix;
+ var attrOwnerElem;
+ var isSpecified;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ childList = doc.getElementsByTagName("p");
+ elementEmp = childList.item(3);
+ dir = elementEmp.getAttributeNode("dir");
+ adoptedAttr = newDoc.adoptNode(dir);
+
+ if(
+
+ (adoptedAttr != null)
+
+ ) {
+ nodeName = adoptedAttr.nodeName;
+
+ nodeNamespaceURI = adoptedAttr.namespaceURI;
+
+ nodePrefix = adoptedAttr.prefix;
+
+ attrOwnerElem = adoptedAttr.ownerElement;
+
+ isSpecified = adoptedAttr.specified;
+
+ assertEquals("documentadoptnode05_nodeName","dir",nodeName);
+ assertNull("documentadoptnode05_namespaceURI",nodeNamespaceURI);
+ assertNull("documentadoptnode05_prefix",nodePrefix);
+ assertNull("documentadoptnode05_ownerDoc",attrOwnerElem);
+ assertTrue("documentadoptnode05_specified",isSpecified);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode05.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode05.xhtml
new file mode 100644
index 0000000..0065072
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode06-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode06-expected.txt
new file mode 100644
index 0000000..33793e0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode06.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode06.js
new file mode 100644
index 0000000..804b948
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode06.js
@@ -0,0 +1,175 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode06() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode06") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var newAttr;
+ var newText;
+ var newEntRef;
+ var adoptedAttr;
+ var adoptText;
+ var adoptEntRef;
+ var nodeList;
+ var nodeName;
+ var nodeNamespaceURI;
+ var nodePrefix;
+ var attrOwnerElem;
+ var isSpecified;
+ var adoptedTextNodeValue;
+ var adoptedEntRefNodeValue;
+ var nullDocType = null;
+
+ var appendedChild;
+ var docElem;
+ var rootNS;
+ var rootName;
+ var xmlNS = "http://www.w3.org/XML/1998/namespace";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newAttr = doc.createAttributeNS(xmlNS,"xml:lang");
+ newText = doc.createTextNode("Text Node");
+ newEntRef = doc.createEntityReference("alpha");
+ appendedChild = newAttr.appendChild(newText);
+ appendedChild = newAttr.appendChild(newEntRef);
+ adoptedAttr = newDoc.adoptNode(newAttr);
+
+ if(
+
+ (adoptedAttr != null)
+
+ ) {
+ nodeName = adoptedAttr.nodeName;
+
+ nodeNamespaceURI = adoptedAttr.namespaceURI;
+
+ nodePrefix = adoptedAttr.prefix;
+
+ attrOwnerElem = adoptedAttr.ownerElement;
+
+ isSpecified = adoptedAttr.specified;
+
+ assertEquals("documentadoptnode06_nodeName","xml:lang",nodeName);
+ assertEquals("documentadoptnode06_namespaceURI",xmlNS,nodeNamespaceURI);
+ assertEquals("documentadoptnode06_prefix","xml",nodePrefix);
+ assertNull("documentadoptnode06_ownerDoc",attrOwnerElem);
+ assertTrue("documentadoptnode06_specified",isSpecified);
+nodeList = adoptedAttr.childNodes;
+
+ adoptText = nodeList.item(0);
+ adoptEntRef = nodeList.item(1);
+ adoptedTextNodeValue = adoptText.nodeValue;
+
+ adoptedEntRefNodeValue = adoptEntRef.nodeName;
+
+ assertEquals("documentadoptnode06_TextNodeValue","Text Node",adoptedTextNodeValue);
+ assertEquals("documentadoptnode06_EntRefNodeValue","alpha",adoptedEntRefNodeValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode06.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode06.xhtml
new file mode 100644
index 0000000..292d890
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode07-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode07-expected.txt
new file mode 100644
index 0000000..75ab5d8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode07.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode07.js
new file mode 100644
index 0000000..a817165
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode07.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the adoptNode method on this document with the value of the source parameter as itself.
+ Verify if a NOT_SUPPORTED_ERR is thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode07() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode07") != null) return;
+ var doc;
+ var adoptedDoc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ adoptedDoc = doc.adoptNode(doc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode07.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode07.xhtml
new file mode 100644
index 0000000..8372f9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode08-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode08-expected.txt
new file mode 100644
index 0000000..bcff7f4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode08.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode08.js
new file mode 100644
index 0000000..3f0849d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode08.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode08() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode08") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var adoptedDoc;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+
+ {
+ success = false;
+ try {
+ adoptedDoc = doc.adoptNode(newDoc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode08.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode08.xhtml
new file mode 100644
index 0000000..fd1c9e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode09-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode09-expected.txt
new file mode 100644
index 0000000..2c2246a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode09-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode09.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode09.js
new file mode 100644
index 0000000..7a4aadd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode09.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode09() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode09") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var adoptedDoc;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+
+ {
+ success = false;
+ try {
+ adoptedDoc = newDoc.adoptNode(doc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode09.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode09.xhtml
new file mode 100644
index 0000000..23e1c98
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode10-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode10-expected.txt
new file mode 100644
index 0000000..13e406d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode10.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode10.js
new file mode 100644
index 0000000..e36daec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode10.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode10() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode10") != null) return;
+ var doc;
+ var docType;
+ var adoptedDocType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ {
+ success = false;
+ try {
+ adoptedDocType = doc.adoptNode(docType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode10.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode10.xhtml
new file mode 100644
index 0000000..cf82e53
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode11-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode11-expected.txt
new file mode 100644
index 0000000..309ad05
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode11.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode11.js
new file mode 100644
index 0000000..e977e38
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode11.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode11() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode11") != null) return;
+ var doc;
+ var domImpl;
+ var docType;
+ var adoptedDocType;
+ var nullPubID = null;
+
+ var nullSysID = null;
+
+ var docElem;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+docType = domImpl.createDocumentType(rootName,nullPubID,nullSysID);
+
+ {
+ success = false;
+ try {
+ adoptedDocType = doc.adoptNode(docType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode11.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode11.xhtml
new file mode 100644
index 0000000..b95aebe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode12-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode12-expected.txt
new file mode 100644
index 0000000..722892d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode12.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode12.js
new file mode 100644
index 0000000..ce09d75
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode12.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode12() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode12") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var docType;
+ var adoptedDocType;
+ var nullPubID = null;
+
+ var nullSysID = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+docType = domImpl.createDocumentType(rootName,nullPubID,nullSysID);
+ newDoc = domImpl.createDocument(rootNS,rootName,docType);
+
+ {
+ success = false;
+ try {
+ adoptedDocType = newDoc.adoptNode(docType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode12.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode12.xhtml
new file mode 100644
index 0000000..20a8c82
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode13-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode13-expected.txt
new file mode 100644
index 0000000..365ffb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode13-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode13
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode13.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode13.js
new file mode 100644
index 0000000..d2dd486
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode13.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode13() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode13") != null) return;
+ var doc;
+ var docFragment;
+ var childList;
+ var success;
+ var acronymNode;
+ var appendedChild;
+ var adoptedDocFrag;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFragment = doc.createDocumentFragment();
+ childList = doc.getElementsByTagName("acronym");
+ acronymNode = childList.item(0);
+ appendedChild = docFragment.appendChild(acronymNode);
+ adoptedDocFrag = doc.adoptNode(docFragment);
+
+ if(
+
+ (adoptedDocFrag != null)
+
+ ) {
+ success = adoptedDocFrag.hasChildNodes();
+ assertTrue("documentadoptnode13",success);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode13.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode13.xhtml
new file mode 100644
index 0000000..40aa8f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode14-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode14-expected.txt
new file mode 100644
index 0000000..77a329e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode14-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode14
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode14.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode14.js
new file mode 100644
index 0000000..bb6b633
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode14.js
@@ -0,0 +1,145 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode14() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode14") != null) return;
+ var doc;
+ var newDoc;
+ var docElem;
+ var domImpl;
+ var docFragment;
+ var childList;
+ var success;
+ var acronymNode;
+ var adoptedDocFrag;
+ var appendedChild;
+ var nullDocType = null;
+
+ var imported;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ docFragment = newDoc.createDocumentFragment();
+ imported = newDoc.importNode(docElem,true);
+ docElem = newDoc.documentElement;
+
+ appendedChild = docElem.appendChild(imported);
+ childList = newDoc.getElementsByTagName("acronym");
+ acronymNode = childList.item(0);
+ appendedChild = docFragment.appendChild(acronymNode);
+ adoptedDocFrag = newDoc.adoptNode(docFragment);
+
+ if(
+
+ (adoptedDocFrag != null)
+
+ ) {
+ success = adoptedDocFrag.hasChildNodes();
+ assertTrue("documentadoptnode14",success);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode14.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode14.xhtml
new file mode 100644
index 0000000..9a1f835
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode15-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode15-expected.txt
new file mode 100644
index 0000000..077ee07
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode15-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode15
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode15.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode15.js
new file mode 100644
index 0000000..070d177
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode15.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using the method adoptNode, adopt a newly created DocumentFragment node without any children.
+ Check if the adopted node has no children.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode15() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode15") != null) return;
+ var doc;
+ var docFragment;
+ var success;
+ var adoptedDocFrag;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFragment = doc.createDocumentFragment();
+ adoptedDocFrag = doc.adoptNode(docFragment);
+
+ if(
+
+ (adoptedDocFrag != null)
+
+ ) {
+ success = adoptedDocFrag.hasChildNodes();
+ assertFalse("documentadoptnode15",success);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode15.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode15.xhtml
new file mode 100644
index 0000000..eb236aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode16-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode16-expected.txt
new file mode 100644
index 0000000..28ab188
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode16-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode16
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode16.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode16.js
new file mode 100644
index 0000000..8fd6e2f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode16.js
@@ -0,0 +1,170 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Create a document fragment with an entity reference, adopt the node and check
+that the entity reference value comes from the adopting documents DTD.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode16() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode16") != null) return;
+ var doc;
+ var docFragment;
+ var childList;
+ var parent;
+ var child;
+ var childsAttr;
+ var entRef;
+ var textNode;
+ var adopted;
+ var parentImp;
+ var childImp;
+ var attributes;
+ var childAttrImp;
+ var nodeValue;
+ var appendedChild;
+ var attrNode;
+ var firstChild;
+ var firstChildType;
+ var firstChildName;
+ var firstChildValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFragment = doc.createDocumentFragment();
+ parent = doc.createElement("parent");
+ child = doc.createElement("child");
+ childsAttr = doc.createAttribute("state");
+ entRef = doc.createEntityReference("gamma");
+ textNode = doc.createTextNode("Test");
+ appendedChild = childsAttr.appendChild(entRef);
+ attrNode = child.setAttributeNode(childsAttr);
+ appendedChild = child.appendChild(textNode);
+ appendedChild = parent.appendChild(child);
+ appendedChild = docFragment.appendChild(parent);
+ adopted = doc.adoptNode(docFragment);
+
+ if(
+
+ (adopted != null)
+
+ ) {
+ parentImp = adopted.firstChild;
+
+ childImp = parentImp.firstChild;
+
+ attributes = childImp.attributes;
+
+ childAttrImp = attributes.getNamedItem("state");
+ firstChild = childAttrImp.firstChild;
+
+ assertNotNull("firstChildNotNull",firstChild);
+firstChildName = firstChild.nodeName;
+
+ firstChildValue = firstChild.nodeValue;
+
+ firstChildType = firstChild.nodeType;
+
+
+ if(
+ (5 == firstChildType)
+ ) {
+ assertEquals("firstChildEnt3Ref","gamma",firstChildName);
+
+ }
+
+ else {
+ assertEquals("documentadoptnode16","Texas",firstChildValue);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode16.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode16.xhtml
new file mode 100644
index 0000000..f6bb9de
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode17-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode17-expected.txt
new file mode 100644
index 0000000..332ab80
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode17
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode17.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode17.js
new file mode 100644
index 0000000..e19acb1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode17.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode17() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode17") != null) return;
+ var doc;
+ var docType;
+ var entityMap;
+ var ent;
+ var adoptedEnt;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entityMap = docType.entities;
+
+ ent = entityMap.getNamedItem("alpha");
+
+ {
+ success = false;
+ try {
+ adoptedEnt = doc.adoptNode(ent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode17.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode17.xhtml
new file mode 100644
index 0000000..a6da561
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode18-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode18-expected.txt
new file mode 100644
index 0000000..907dc61
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode18
+Status error
+Message Line 118: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode18.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode18.js
new file mode 100644
index 0000000..4bdd59f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode18.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode18() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode18") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var docType;
+ var entityMap;
+ var ent;
+ var adoptedEnt;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ docType = doc.doctype;
+
+ entityMap = docType.entities;
+
+ ent = entityMap.getNamedItem("delta");
+
+ {
+ success = false;
+ try {
+ adoptedEnt = newDoc.adoptNode(ent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode18.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode18.xhtml
new file mode 100644
index 0000000..f98866f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode19-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode19-expected.txt
new file mode 100644
index 0000000..30824ca
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode19
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode19.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode19.js
new file mode 100644
index 0000000..b7353a5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode19.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode19() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode19") != null) return;
+ var doc;
+ var docType;
+ var notationMap;
+ var notation;
+ var adoptedNotaion;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ notationMap = docType.notations;
+
+ notation = notationMap.getNamedItem("notation1");
+
+ {
+ success = false;
+ try {
+ adoptedNotaion = doc.adoptNode(notation);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode19.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode19.xhtml
new file mode 100644
index 0000000..ce9f815
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode20-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode20-expected.txt
new file mode 100644
index 0000000..afb1580
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode20-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode20
+Status error
+Message Line 118: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode20.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode20.js
new file mode 100644
index 0000000..904f782
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode20.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode20() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode20") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var docType;
+ var notationMap;
+ var notation;
+ var adoptedNotation;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ docType = doc.doctype;
+
+ notationMap = docType.notations;
+
+ notation = notationMap.getNamedItem("notation2");
+
+ {
+ success = false;
+ try {
+ adoptedNotation = newDoc.adoptNode(notation);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode20.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode20.xhtml
new file mode 100644
index 0000000..8ddc397
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode21-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode21-expected.txt
new file mode 100644
index 0000000..212ed3a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode21-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode21
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode21.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode21.js
new file mode 100644
index 0000000..e3582a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode21.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode21() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode21") != null) return;
+ var doc;
+ var attrOwnerElem;
+ var element;
+ var attr;
+ var childList;
+ var adoptedTitle;
+ var attrsParent;
+ var nodeName;
+ var nodeType;
+ var nodeValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(0);
+ attr = element.getAttributeNode("title");
+ adoptedTitle = doc.adoptNode(attr);
+ nodeName = adoptedTitle.nodeName;
+
+ nodeValue = adoptedTitle.nodeValue;
+
+ nodeType = adoptedTitle.nodeType;
+
+ attrOwnerElem = adoptedTitle.ownerElement;
+
+ assertEquals("documentadoptnode21_nodeName","title",nodeName);
+ assertEquals("documentadoptnode21_nodeType",2,nodeType);
+ assertEquals("documentadoptnode21_nodeValue","Yes",nodeValue);
+ assertNull("documentadoptnode21_ownerDoc",attrOwnerElem);
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode21.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode21.xhtml
new file mode 100644
index 0000000..036dbd4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode22.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode22.js
new file mode 100644
index 0000000..d309204
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode22.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the adoptNode method on this document with the documentElement as the source.
+ Verify if the node has been adopted correctly by its nodeName.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode22() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode22") != null) return;
+ var doc;
+ var docElement;
+ var adoptedNode;
+ var success;
+ var nodeNameOrig;
+ var nodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElement = doc.documentElement;
+
+ adoptedNode = doc.adoptNode(docElement);
+
+ if(
+
+ (adoptedNode != null)
+
+ ) {
+ success = adoptedNode.hasChildNodes();
+ assertTrue("documentadoptnode22_1",success);
+nodeName = adoptedNode.nodeName;
+
+ nodeNameOrig = docElement.nodeName;
+
+ assertEquals("documentadoptnode22_2",nodeName,nodeNameOrig);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode22.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/documentadoptnode22.xhtml-disabled
new file mode 100644
index 0000000..2a96bf8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode22.xhtml-disabled
@@ -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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode22.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode23-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode23-expected.txt
new file mode 100644
index 0000000..f89e03d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode23-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode23
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode23.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode23.js
new file mode 100644
index 0000000..28b834a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode23.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode23() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode23") != null) return;
+ var doc;
+ var childList;
+ var adoptedNode;
+ var acronymElem;
+ var acronymElemLen;
+ var adoptedLen;
+ var acronymElemChild;
+ var adoptedNodeChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ acronymElem = childList.item(0);
+ adoptedNode = doc.adoptNode(acronymElem);
+
+ if(
+
+ (adoptedNode != null)
+
+ ) {
+ acronymElemChild = acronymElem.childNodes;
+
+ acronymElemLen = acronymElemChild.length;
+
+ adoptedNodeChild = adoptedNode.childNodes;
+
+ adoptedLen = adoptedNodeChild.length;
+
+ assertEquals("documentadoptnode23",adoptedLen,acronymElemLen);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode23.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode23.xhtml
new file mode 100644
index 0000000..03d6e8b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode23.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode23.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode24-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode24-expected.txt
new file mode 100644
index 0000000..5faa33e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode24-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode24
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode24.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode24.js
new file mode 100644
index 0000000..6ac851b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode24.js
@@ -0,0 +1,136 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode24() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode24") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var childList;
+ var adoptedNode;
+ var codeElem;
+ var codeElemChildren;
+ var adoptedChildren;
+ var codeElemLen;
+ var adoptedLen;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test","dom:test",nullDocType);
+ childList = doc.getElementsByTagNameNS("*","code");
+ codeElem = childList.item(0);
+ adoptedNode = newDoc.adoptNode(codeElem);
+ codeElemChildren = codeElem.childNodes;
+
+ adoptedChildren = adoptedNode.childNodes;
+
+ codeElemLen = codeElemChildren.length;
+
+ adoptedLen = adoptedChildren.length;
+
+ assertEquals("documentadoptnode24",adoptedLen,codeElemLen);
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode24.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode24.xhtml
new file mode 100644
index 0000000..1042197
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode24.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode24.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode25-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode25-expected.txt
new file mode 100644
index 0000000..8433e6a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode25-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode25
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode25.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode25.js
new file mode 100644
index 0000000..f43a13c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode25.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode25() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode25") != null) return;
+ var doc;
+ var newElem;
+ var newDoc;
+ var domImpl;
+ var adoptedNode;
+ var adoptedName;
+ var adoptedNS;
+ var docElem;
+ var rootNS;
+ var rootName;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ newElem = doc.createElementNS("http://www.w3.org/1999/xhtml","th");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ adoptedNode = newDoc.adoptNode(newElem);
+
+ if(
+
+ (adoptedNode != null)
+
+ ) {
+ adoptedName = adoptedNode.nodeName;
+
+ adoptedNS = adoptedNode.namespaceURI;
+
+ assertEquals("documentadoptnode25_1","th",adoptedName);
+ assertEquals("documentadoptnode25_2","http://www.w3.org/1999/xhtml",adoptedNS);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode25.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode25.xhtml
new file mode 100644
index 0000000..0297a35
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode26-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode26-expected.txt
new file mode 100644
index 0000000..503468f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode26-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode26
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode26.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode26.js
new file mode 100644
index 0000000..acc883d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode26.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode26";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode26() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode26") != null) return;
+ var doc;
+ var docElem;
+ var newElem;
+ var newDoc;
+ var domImpl;
+ var adoptedNode;
+ var adoptedName;
+ var adoptedNS;
+ var nullDocType = null;
+
+ var appendedChild;
+ var rootNS;
+ var rootTagname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootTagname,nullDocType);
+ newElem = newDoc.createElementNS("http://www.w3.org/1999/xhtml","head");
+ newElem.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang","en-US");
+ docElem = newDoc.documentElement;
+
+ appendedChild = docElem.appendChild(newElem);
+ adoptedNode = doc.adoptNode(newElem);
+
+ if(
+
+ (adoptedNode != null)
+
+ ) {
+ adoptedName = adoptedNode.nodeName;
+
+ adoptedNS = adoptedNode.namespaceURI;
+
+ assertEquals("documentadoptnode26_1","head",adoptedName);
+ assertEquals("documentadoptnode26_2","http://www.w3.org/1999/xhtml",adoptedNS);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode26();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode26.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode26.xhtml
new file mode 100644
index 0000000..26be7bc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode26.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode26.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode27-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode27-expected.txt
new file mode 100644
index 0000000..468b923
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode27-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode27
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode27.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode27.js
new file mode 100644
index 0000000..f5735b5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode27.js
@@ -0,0 +1,146 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode27";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode27() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode27") != null) return;
+ var doc;
+ var docElem;
+ var newElem;
+ var newImpElem;
+ var newDoc;
+ var domImpl;
+ var adoptedNode;
+ var adoptedName;
+ var adoptedNS;
+ var appendedChild;
+ var nullDocType = null;
+
+ var rootNS;
+ var rootTagname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootTagname,nullDocType);
+ newElem = newDoc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:head");
+ newElem.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang","en-US");
+ docElem = newDoc.documentElement;
+
+ appendedChild = docElem.appendChild(newElem);
+ newImpElem = doc.importNode(newElem,true);
+ adoptedNode = doc.adoptNode(newImpElem);
+
+ if(
+
+ (adoptedNode != null)
+
+ ) {
+ adoptedName = adoptedNode.nodeName;
+
+ adoptedNS = adoptedNode.namespaceURI;
+
+ assertEquals("documentadoptnode27_1","xhtml:head",adoptedName);
+ assertEquals("documentadoptnode27_2","http://www.w3.org/1999/xhtml",adoptedNS);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode27();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode27.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode27.xhtml
new file mode 100644
index 0000000..3e094b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode27.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode27.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode28-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode28-expected.txt
new file mode 100644
index 0000000..c6a852e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode28-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode28
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode28.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode28.js
new file mode 100644
index 0000000..961c633
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode28.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode28";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode28() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode28") != null) return;
+ var doc;
+ var childList;
+ var adoptedNode;
+ var employeeElem;
+ var attrImp;
+ var nodeName;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("p");
+ employeeElem = childList.item(3);
+ adoptedNode = doc.adoptNode(employeeElem);
+
+ if(
+
+ (adoptedNode != null)
+
+ ) {
+ attrImp = adoptedNode.getAttributeNode("dir");
+ nodeName = attrImp.nodeName;
+
+ assertEquals("documentadoptnode28","dir",nodeName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode28();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode28.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode28.xhtml
new file mode 100644
index 0000000..b089558
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode28.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode28.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode30-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode30-expected.txt
new file mode 100644
index 0000000..7bbeb17
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode30-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode30
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode30.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode30.js
new file mode 100644
index 0000000..ff80ed7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode30.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode30";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode30() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode30") != null) return;
+ var doc;
+ var newText;
+ var adoptedText;
+ var nodeValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newText = doc.createTextNode("Document.adoptNode test for a TEXT_NODE");
+ adoptedText = doc.adoptNode(newText);
+
+ if(
+
+ (adoptedText != null)
+
+ ) {
+ nodeValue = adoptedText.nodeValue;
+
+ assertEquals("documentadoptnode30","Document.adoptNode test for a TEXT_NODE",nodeValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode30();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode30.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode30.xhtml
new file mode 100644
index 0000000..15a06cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode30.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode30.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode31-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode31-expected.txt
new file mode 100644
index 0000000..793c0de
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode31-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode31
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode31.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode31.js
new file mode 100644
index 0000000..a3f3aed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode31.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode31";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode31() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode31") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var newText;
+ var adoptedText;
+ var nodeValue;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newText = newDoc.createTextNode("new Document.adoptNode test for a TEXT_NODE");
+ adoptedText = doc.adoptNode(newText);
+
+ if(
+
+ (adoptedText != null)
+
+ ) {
+ nodeValue = adoptedText.nodeValue;
+
+ assertEquals("documentadoptnode31","new Document.adoptNode test for a TEXT_NODE",nodeValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode31();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode31.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode31.xhtml
new file mode 100644
index 0000000..e4dd4b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode31.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode31.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode32-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode32-expected.txt
new file mode 100644
index 0000000..cd789c4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode32-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode32
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode32.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode32.js
new file mode 100644
index 0000000..62c50fa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode32.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode32";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var docAdopterRef = null;
+ if (typeof(this.docAdopter) != 'undefined') {
+ docAdopterRef = this.docAdopter;
+ }
+ docsLoaded += preload(docAdopterRef, "docAdopter", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode32() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode32") != null) return;
+ var doc;
+ var docAdopter;
+ var newCDATA;
+ var adoptedCDATA;
+ var nodeValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var docAdopterRef = null;
+ if (typeof(this.docAdopter) != 'undefined') {
+ docAdopterRef = this.docAdopter;
+ }
+ docAdopter = load(docAdopterRef, "docAdopter", "hc_staff");
+ newCDATA = doc.createCDATASection("Document.adoptNode test for a CDATASECTION_NODE");
+ adoptedCDATA = docAdopter.adoptNode(newCDATA);
+
+ if(
+
+ (adoptedCDATA != null)
+
+ ) {
+ nodeValue = adoptedCDATA.nodeValue;
+
+ assertEquals("documentadoptnode32","Document.adoptNode test for a CDATASECTION_NODE",nodeValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode32();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode32.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode32.xhtml
new file mode 100644
index 0000000..a5d6f1b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode32.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode32.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode33-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode33-expected.txt
new file mode 100644
index 0000000..4786830
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode33-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode33
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode33.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode33.js
new file mode 100644
index 0000000..c92643b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode33.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode33";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode33() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode33") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var newCDATA;
+ var adoptedCDATA;
+ var nodeValue;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newCDATA = newDoc.createCDATASection("Document.adoptNode test for a CDATASECTION_NODE");
+ adoptedCDATA = doc.adoptNode(newCDATA);
+
+ if(
+
+ (adoptedCDATA != null)
+
+ ) {
+ nodeValue = adoptedCDATA.nodeValue;
+
+ assertEquals("documentadoptnode33","Document.adoptNode test for a CDATASECTION_NODE",nodeValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode33();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode33.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode33.xhtml
new file mode 100644
index 0000000..0ec814a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode33.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode33.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode34-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode34-expected.txt
new file mode 100644
index 0000000..09b3b90
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode34-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode34
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode34.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode34.js
new file mode 100644
index 0000000..dddd193
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode34.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode34";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode34() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode34") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var newComment;
+ var adoptedComment;
+ var nodeValue;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newComment = newDoc.createComment("Document.adoptNode test for a COMMENT_NODE");
+ adoptedComment = newDoc.adoptNode(newComment);
+
+ if(
+
+ (adoptedComment != null)
+
+ ) {
+ nodeValue = adoptedComment.nodeValue;
+
+ assertEquals("documentadoptnode34","Document.adoptNode test for a COMMENT_NODE",nodeValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode34();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode34.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode34.xhtml
new file mode 100644
index 0000000..c786989
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode34.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode34.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode35-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode35-expected.txt
new file mode 100644
index 0000000..a54564d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode35-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode35
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode35.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode35.js
new file mode 100644
index 0000000..7b7df66
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode35.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode35";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode35() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode35") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var newPI;
+ var adoptedPI;
+ var piTarget;
+ var piData;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newPI = newDoc.createProcessingInstruction("PITarget","PIData");
+ adoptedPI = doc.adoptNode(newPI);
+
+ if(
+
+ (adoptedPI != null)
+
+ ) {
+ piTarget = adoptedPI.target;
+
+ piData = adoptedPI.data;
+
+ assertEquals("documentadoptnode35_Target","PITarget",piTarget);
+ assertEquals("documentadoptnode35_Data","PIData",piData);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode35();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode35.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode35.xhtml
new file mode 100644
index 0000000..c2fef57
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode35.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode35.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentadoptnode36-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentadoptnode36-expected.txt
new file mode 100644
index 0000000..51923bf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode36-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode36
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode36.js b/LayoutTests/dom/xhtml/level3/core/documentadoptnode36.js
new file mode 100644
index 0000000..d6e5532
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode36.js
@@ -0,0 +1,157 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode36";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-adoptNode
+*/
+function documentadoptnode36() {
+ var success;
+ if(checkInitialization(builder, "documentadoptnode36") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var newPI1;
+ var newPI2;
+ var adoptedPI1;
+ var adoptedPI2;
+ var piTarget;
+ var piData;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newPI1 = newDoc.createProcessingInstruction("PITarget","PIData");
+ newPI2 = doc.createProcessingInstruction("PITarget","PIData");
+ adoptedPI1 = newDoc.adoptNode(newPI1);
+
+ if(
+
+ (adoptedPI1 != null)
+
+ ) {
+ adoptedPI2 = newDoc.adoptNode(newPI2);
+
+ if(
+
+ (adoptedPI2 != null)
+
+ ) {
+ piTarget = adoptedPI1.target;
+
+ piData = adoptedPI1.data;
+
+ assertEquals("documentadoptnode36_Target1","PITarget",piTarget);
+ assertEquals("documentadoptnode36_Data1","PIData",piData);
+ piTarget = adoptedPI2.target;
+
+ piData = adoptedPI2.data;
+
+ assertEquals("documentadoptnode36_Target2","PITarget",piTarget);
+ assertEquals("documentadoptnode36_Data2","PIData",piData);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentadoptnode36();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentadoptnode36.xhtml b/LayoutTests/dom/xhtml/level3/core/documentadoptnode36.xhtml
new file mode 100644
index 0000000..aa54e53
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentadoptnode36.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentadoptnode36.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01-expected.txt
new file mode 100644
index 0000000..bb7f1d9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdoctype01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.js b/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.js
new file mode 100644
index 0000000..c33bca7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdoctype01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-B63ED1A31
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function documentgetdoctype01() {
+ var success;
+ if(checkInitialization(builder, "documentgetdoctype01") != null) return;
+ var doc;
+ var docType;
+ var newDocType;
+ var replacedDocType;
+ var domImpl;
+ var newSysID;
+ var nullPubID = null;
+
+ var nullSysID = null;
+
+ var replaced;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ rootName = docType.name;
+
+ domImpl = doc.implementation;
+newDocType = domImpl.createDocumentType(rootName,nullPubID,nullSysID);
+
+ try {
+ replaced = doc.replaceChild(newDocType,docType);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ replacedDocType = doc.doctype;
+
+ newSysID = replacedDocType.systemId;
+
+ assertNull("newSysIdNull",newSysID);
+
+}
+
+
+
+
+function runTest() {
+ documentgetdoctype01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.xhtml
new file mode 100644
index 0000000..6b9a791
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdoctype01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetdoctype01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01-expected.txt
new file mode 100644
index 0000000..22b1987
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.js b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.js
new file mode 100644
index 0000000..391dc55
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.js
@@ -0,0 +1,106 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retreive the documentURI of this document, and verify if it is not null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
+*/
+function documentgetdocumenturi01() {
+ var success;
+ if(checkInitialization(builder, "documentgetdocumenturi01") != null) return;
+ var doc;
+ var docURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docURI = doc.documentURI;
+
+ assertNotNull("documentgetdocumenturi01",docURI);
+
+}
+
+
+
+
+function runTest() {
+ documentgetdocumenturi01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.xhtml
new file mode 100644
index 0000000..187ee44
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetdocumenturi01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02-expected.txt
new file mode 100644
index 0000000..a8c6186
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.js b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.js
new file mode 100644
index 0000000..8e84cbe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a new Document, retreive its documentURI, and verify if it is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
+*/
+function documentgetdocumenturi02() {
+ var success;
+ if(checkInitialization(builder, "documentgetdocumenturi02") != null) return;
+ var doc;
+ var newDoc;
+ var docURI;
+ var domImpl;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ docURI = newDoc.documentURI;
+
+ assertNull("documentgetdocumenturi02",docURI);
+
+}
+
+
+
+
+function runTest() {
+ documentgetdocumenturi02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.xhtml
new file mode 100644
index 0000000..8249bcd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetdocumenturi02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03-expected.txt
new file mode 100644
index 0000000..4b4a283
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.js b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.js
new file mode 100644
index 0000000..bb900ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
+*/
+function documentgetdocumenturi03() {
+ var success;
+ if(checkInitialization(builder, "documentgetdocumenturi03") != null) return;
+ var doc;
+ var newDoc;
+ var importedOwner;
+ var docElem;
+ var docElemImported;
+ var docURI;
+ var domImpl;
+ var nullDocType = null;
+
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ docElemImported = newDoc.importNode(docElem,false);
+ importedOwner = docElemImported.ownerDocument;
+
+ docURI = importedOwner.documentURI;
+
+ assertNull("documentgetdocumenturi03",docURI);
+
+}
+
+
+
+
+function runTest() {
+ documentgetdocumenturi03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.xhtml
new file mode 100644
index 0000000..b4af585
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetdocumenturi03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetdocumenturi03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01-expected.txt
new file mode 100644
index 0000000..21a63a2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.js b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.js
new file mode 100644
index 0000000..90aae5d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getInputEncoding method on a UTF-8 encoded document and check if the
+ value returned is UTF-8.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding
+*/
+function documentgetinputencoding01() {
+ var success;
+ if(checkInitialization(builder, "documentgetinputencoding01") != null) return;
+ var doc;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ encodingName = doc.inputEncoding;
+
+ assertEquals("documentgetinputencoding01","UTF-8".toLowerCase(),encodingName.toLowerCase());
+
+}
+
+
+
+
+function runTest() {
+ documentgetinputencoding01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.xhtml
new file mode 100644
index 0000000..54dc7a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetinputencoding01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02-expected.txt
new file mode 100644
index 0000000..c756287
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js
new file mode 100644
index 0000000..2f1a1c0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getInputEncoding method on a new document and check if the value returned
+ is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding
+*/
+function documentgetinputencoding02() {
+ var success;
+ if(checkInitialization(builder, "documentgetinputencoding02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var encodingName;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ encodingName = newDoc.inputEncoding;
+
+ assertNull("documentgetinputencoding02",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ documentgetinputencoding02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.xhtml
new file mode 100644
index 0000000..5e44f9e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetinputencoding02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.js b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.js
new file mode 100644
index 0000000..2fe37a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_utf16");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getInputEncoding method on a on a UTF-16 (BE) encoded document and check if the value returned
+ is UTF-16BE.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding
+*/
+function documentgetinputencoding03() {
+ var success;
+ if(checkInitialization(builder, "documentgetinputencoding03") != null) return;
+ var doc;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_utf16");
+ encodingName = doc.inputEncoding;
+
+ assertEquals("documentgetinputencoding03","UTF-16BE".toLowerCase(),encodingName.toLowerCase());
+
+}
+
+
+
+
+function runTest() {
+ documentgetinputencoding03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.xhtml
new file mode 100644
index 0000000..90fd7dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding03.xhtml
Binary files differ
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt
new file mode 100644
index 0000000..03f629d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding04
+Status error
+Message Line 98: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.js b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.js
new file mode 100644
index 0000000..93ed805
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_utf8");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getInputEncoding method on a cloned UTF-8 encoded document
+ and check if the value returned is UTF-8 or null (implementation dependent).
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-inputEncoding
+*/
+function documentgetinputencoding04() {
+ var success;
+ if(checkInitialization(builder, "documentgetinputencoding04") != null) return;
+ var doc;
+ var cloned;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_utf8");
+ cloned = doc.cloneNode(true);
+ encodingName = cloned.inputEncoding;
+
+ assertTrue("documentgetinputencoding04",
+
+ (("UTF-8".toUpperCase() == encodingName.toUpperCase()) ||
+ (encodingName == null)
+)
+);
+
+}
+
+
+
+
+function runTest() {
+ documentgetinputencoding04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.xhtml
new file mode 100644
index 0000000..7016d5a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetinputencoding04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetinputencoding04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01-expected.txt
new file mode 100644
index 0000000..ae5e10f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetstricterrorchecking01
+Status failure
+Message documentgetstricterrorchecking01: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.js b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.js
new file mode 100644
index 0000000..e4bcb15
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.js
@@ -0,0 +1,106 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetstricterrorchecking01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Verify if the (default) value of the strictErrorChecking attribute of this document object is true.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking
+*/
+function documentgetstricterrorchecking01() {
+ var success;
+ if(checkInitialization(builder, "documentgetstricterrorchecking01") != null) return;
+ var doc;
+ var strictErrorCheckingValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ strictErrorCheckingValue = doc.strictErrorChecking;
+
+ assertTrue("documentgetstricterrorchecking01",strictErrorCheckingValue);
+
+}
+
+
+
+
+function runTest() {
+ documentgetstricterrorchecking01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.xhtml
new file mode 100644
index 0000000..d7b9f31
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetstricterrorchecking01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02-expected.txt
new file mode 100644
index 0000000..9cb93b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetstricterrorchecking02
+Status failure
+Message documentgetstricterrorchecking02: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.js b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.js
new file mode 100644
index 0000000..b790c51
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetstricterrorchecking02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Verify if the (default)value of the strictErrorChecking attribute of a new Document object is true.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking
+*/
+function documentgetstricterrorchecking02() {
+ var success;
+ if(checkInitialization(builder, "documentgetstricterrorchecking02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var strictErrorCheckingValue;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ strictErrorCheckingValue = newDoc.strictErrorChecking;
+
+ assertTrue("documentgetstricterrorchecking02",strictErrorCheckingValue);
+
+}
+
+
+
+
+function runTest() {
+ documentgetstricterrorchecking02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.xhtml
new file mode 100644
index 0000000..c7dfd05
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetstricterrorchecking02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetstricterrorchecking02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01-expected.txt
new file mode 100644
index 0000000..2c216a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.js
new file mode 100644
index 0000000..d63a955
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_utf8");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding
+*/
+function documentgetxmlencoding01() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlencoding01") != null) return;
+ var doc;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_utf8");
+ encodingName = doc.xmlEncoding;
+
+ assertEquals("documentgetxmlencoding01","uTf-8",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlencoding01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.xhtml
new file mode 100644
index 0000000..12f4944
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetxmlencoding01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02-expected.txt
new file mode 100644
index 0000000..8038c6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.js
new file mode 100644
index 0000000..5ba68e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getXmlEncoding method on a new document and check if the value returned
+ is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding
+*/
+function documentgetxmlencoding02() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlencoding02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var encodingName;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ encodingName = newDoc.xmlEncoding;
+
+ assertNull("documentgetxmlencoding02",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlencoding02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.xhtml
new file mode 100644
index 0000000..7ddd294
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetxmlencoding02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03-expected.txt
new file mode 100644
index 0000000..50e2674
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.js
new file mode 100644
index 0000000..c3a0fec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_utf16");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getXmlEncoding method on a UTF-16 encoded document and check if the value returned
+ is UTF-16.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding
+*/
+function documentgetxmlencoding03() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlencoding03") != null) return;
+ var doc;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_utf16");
+ encodingName = doc.xmlEncoding;
+
+ assertEquals("documentgetxmlencoding03","uTf-16",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlencoding03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.xhtml
new file mode 100644
index 0000000..3156eb4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding03.xhtml
Binary files differ
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04-expected.txt
new file mode 100644
index 0000000..7b83625
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.js
new file mode 100644
index 0000000..a674d0c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding
+*/
+function documentgetxmlencoding04() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlencoding04") != null) return;
+ var doc;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ encodingName = doc.xmlEncoding;
+
+ assertNull("documentgetxmlencoding04",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlencoding04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.xhtml
new file mode 100644
index 0000000..28eddc3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetxmlencoding04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt
new file mode 100644
index 0000000..42210aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding05
+Status error
+Message Line 98: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.js
new file mode 100644
index 0000000..09a8e87
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_utf8");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getXmlEncoding method on a cloned UTF-8 encoded document
+ and check if the value returned is UTF-8 or null (implementation dependent).
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-encoding
+*/
+function documentgetxmlencoding05() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlencoding05") != null) return;
+ var doc;
+ var cloned;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_utf8");
+ cloned = doc.cloneNode(true);
+ encodingName = cloned.xmlEncoding;
+
+ assertTrue("documentgetxmlencoding05",
+
+ (("uTf-8" == encodingName) ||
+ (encodingName == null)
+)
+);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlencoding05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.xhtml
new file mode 100644
index 0000000..a5b4a1c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlencoding05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetxmlencoding05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01-expected.txt
new file mode 100644
index 0000000..1b798b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.js
new file mode 100644
index 0000000..f8911f4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone
+*/
+function documentgetxmlstandalone01() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlstandalone01") != null) return;
+ var doc;
+ var standalone;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ standalone = doc.xmlStandalone;
+
+ assertFalse("documentgetxmlstandalone01",standalone);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlstandalone01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.xhtml
new file mode 100644
index 0000000..7aab7e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetxmlstandalone01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02-expected.txt
new file mode 100644
index 0000000..73a90f9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.js
new file mode 100644
index 0000000..1d3e990
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The value of the standalone pesudo-attribute for a new Document should be false.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone
+*/
+function documentgetxmlstandalone02() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlstandalone02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var standalone;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ standalone = newDoc.xmlStandalone;
+
+ assertFalse("documentgetxmlstandalone02",standalone);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlstandalone02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.xhtml
new file mode 100644
index 0000000..0287725
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetxmlstandalone02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03-expected.txt
new file mode 100644
index 0000000..ec6dacb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.js
new file mode 100644
index 0000000..dd8a1de
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_standalone_no");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The value of the standalone attribute for an XML document with the standalone="no"
+ should be false.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone
+*/
+function documentgetxmlstandalone03() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlstandalone03") != null) return;
+ var doc;
+ var standalone;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_standalone_no");
+ standalone = doc.xmlStandalone;
+
+ assertFalse("documentgetxmlstandalone03",standalone);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlstandalone03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.xhtml
new file mode 100644
index 0000000..84dc931
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetxmlstandalone03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04-expected.txt
new file mode 100644
index 0000000..6d27ba6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.js
new file mode 100644
index 0000000..f034649
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_standalone_yes");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retreive the documentURI of a document for which standalone was specified as "yes", this
+ should return true.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone
+*/
+function documentgetxmlstandalone04() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlstandalone04") != null) return;
+ var doc;
+ var standalone;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_standalone_yes");
+ standalone = doc.xmlStandalone;
+
+ assertTrue("documentgetxmlstandalone04",standalone);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlstandalone04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.xhtml
new file mode 100644
index 0000000..60a5ba5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetxmlstandalone04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05-expected.txt
new file mode 100644
index 0000000..579737b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.js
new file mode 100644
index 0000000..257dd80
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlstandalone05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone
+*/
+function documentgetxmlstandalone05() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlstandalone05") != null) return;
+ var doc;
+ var newDoc;
+ var newDocType;
+ var domImpl;
+ var standalone;
+ var nullPubId = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+ var docType;
+ var sysId;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ docType = doc.doctype;
+
+ sysId = docType.systemId;
+
+ domImpl = doc.implementation;
+newDocType = domImpl.createDocumentType(rootName,nullPubId,sysId);
+ newDoc = domImpl.createDocument(rootNS,rootName,newDocType);
+ standalone = newDoc.xmlStandalone;
+
+ assertFalse("documentgetxmlstandalone05",standalone);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlstandalone05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.xhtml
new file mode 100644
index 0000000..3c8e78b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlstandalone05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetxmlstandalone05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01-expected.txt
new file mode 100644
index 0000000..e19e19b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlversion01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.js
new file mode 100644
index 0000000..1cfbe1c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlversion01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Check if the value of the version attribute in the XML declaration of this document
+ obtained by parsing staffNS.xml is "1.0".
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version
+*/
+function documentgetxmlversion01() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlversion01") != null) return;
+ var doc;
+ var versionValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ versionValue = doc.xmlVersion;
+
+ assertEquals("documentgetxmlversion01","1.0",versionValue);
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlversion01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.xhtml
new file mode 100644
index 0000000..a3ffd54
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetxmlversion01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02-expected.txt
new file mode 100644
index 0000000..2e4c07c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlversion02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.js
new file mode 100644
index 0000000..13ede16
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlversion02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Check if the value of the version attribute in the XML declaration of a new document
+ is "1.0".
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version
+*/
+function documentgetxmlversion02() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlversion02") != null) return;
+ var doc;
+ var newDoc;
+ var versionValue;
+ var domImpl;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ versionValue = newDoc.xmlVersion;
+
+ assertEquals("documentgetxmlversion02","1.0".toLowerCase(),versionValue.toLowerCase());
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlversion02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.xhtml
new file mode 100644
index 0000000..d5ee038
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetxmlversion02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03-expected.txt
new file mode 100644
index 0000000..5bbe076
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlversion03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.js b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.js
new file mode 100644
index 0000000..2e7f9d1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlversion03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Check if the value of the version attribute in a XML document without a XMLDecl is
+ is "1.0".
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version
+*/
+function documentgetxmlversion03() {
+ var success;
+ if(checkInitialization(builder, "documentgetxmlversion03") != null) return;
+ var doc;
+ var versionValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ versionValue = doc.xmlVersion;
+
+ assertEquals("documentgetxmlversion03","1.0".toLowerCase(),versionValue.toLowerCase());
+
+}
+
+
+
+
+function runTest() {
+ documentgetxmlversion03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.xhtml
new file mode 100644
index 0000000..ba42397
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentgetxmlversion03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetxmlversion03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt
new file mode 100644
index 0000000..c211d68
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument01
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.js
new file mode 100644
index 0000000..db90d42
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+*/
+function documentnormalizedocument01() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument01") != null) return;
+ var doc;
+ var docElem;
+ var docElemNodeName;
+ var origDocElemNodeName;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ origDocElemNodeName = docElem.nodeName;
+
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ docElem = doc.documentElement;
+
+ docElemNodeName = docElem.nodeName;
+
+ assertEquals("documentnormalizedocument01",origDocElemNodeName,docElemNodeName);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.xhtml
new file mode 100644
index 0000000..ea4cd30
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentnormalizedocument01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt
new file mode 100644
index 0000000..fa6440d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument02
+Status error
+Message Line 117: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.js
new file mode 100644
index 0000000..e00d4d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.js
@@ -0,0 +1,146 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("coalescing", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize a document with the 'cdata-sections' parameter set to false and
+check if the CDATASection has been preserved.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections
+*/
+function documentnormalizedocument02() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument02") != null) return;
+ var doc;
+ var elemList;
+ var elemName;
+ var cdata;
+ var text;
+ var nodeName;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elemName = elemList.item(1);
+ cdata = elemName.lastChild;
+
+ nodeName = cdata.nodeName;
+
+ assertEquals("documentnormalizedocument02","#cdata-section",nodeName);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("cdata-sections", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizationError", 2);
+ elemList = doc.getElementsByTagName("strong");
+ elemName = elemList.item(1);
+ cdata = elemName.lastChild;
+
+ nodeName = cdata.nodeName;
+
+ assertEquals("documentnormalizedocument02_true","#cdata-section",nodeName);
+ domConfig.setParameter("cdata-sections", false);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalization2Error", 2);
+ elemList = doc.getElementsByTagName("strong");
+ elemName = elemList.item(1);
+ text = elemName.lastChild;
+
+ nodeName = text.nodeName;
+
+ assertEquals("documentnormalizedocument02_false","#text",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.xhtml
new file mode 100644
index 0000000..dc3228b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentnormalizedocument02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt
new file mode 100644
index 0000000..6ceaaac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument03
+Status error
+Message Line 118: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.js
new file mode 100644
index 0000000..76a1261
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.js
@@ -0,0 +1,150 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=416
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections
+*/
+function documentnormalizedocument03() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument03") != null) return;
+ var doc;
+ var elem;
+ var newCdata;
+ var cdata;
+ var text;
+ var nodeName;
+ var nodeValue;
+ var appendedChild;
+ var domConfig;
+ var pList;
+ errorMonitor = new DOMErrorMonitor();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newCdata = doc.createCDATASection("CDATA");
+ appendedChild = elem.appendChild(newCdata);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("cdata-sections", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizationError", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ cdata = elem.lastChild;
+
+ nodeName = cdata.nodeName;
+
+ assertEquals("documentnormalizedocument03_true","#cdata-section",nodeName);
+ domConfig.setParameter("cdata-sections", false);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalization2Error", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ text = elem.lastChild;
+
+ nodeName = text.nodeName;
+
+ assertEquals("documentnormalizedocument03_false","#text",nodeName);
+ nodeValue = text.nodeValue;
+
+ assertEquals("normalizedValue","barCDATA",nodeValue);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.xhtml
new file mode 100644
index 0000000..c88d384
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentnormalizedocument03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt
new file mode 100644
index 0000000..83e3f62
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument04
+Status error
+Message Line 115: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.js
new file mode 100644
index 0000000..ef0c632
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+ Append a Comment node and normalize with "comments" set to false.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=416
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments
+*/
+function documentnormalizedocument04() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument04") != null) return;
+ var doc;
+ var elem;
+ var newComment;
+ var lastChild;
+ var text;
+ var nodeName;
+ var appendedChild;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newComment = doc.createComment("COMMENT_NODE");
+ appendedChild = elem.appendChild(newComment);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("comments", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizationError", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ lastChild = elem.lastChild;
+
+ nodeName = lastChild.nodeName;
+
+ assertEquals("documentnormalizedocument04_true","#comment",nodeName);
+ domConfig.setParameter("comments", false);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalization2Error", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ lastChild = elem.lastChild;
+
+ nodeName = lastChild.nodeName;
+
+ assertEquals("hasChildText","#text",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.xhtml
new file mode 100644
index 0000000..c113381
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentnormalizedocument04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt
new file mode 100644
index 0000000..a1b1f8f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument05
+Status error
+Message Line 129: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.js
new file mode 100644
index 0000000..0a0aae4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.js
@@ -0,0 +1,193 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Add a L1 element to a L2 namespace aware document and perform namespace normalization. Should result
+in an error.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms#normalizeDocumentAlgo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces
+*/
+function documentnormalizedocument05() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument05") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var pList;
+ var newChild;
+ var retval;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var errorCount = 0;
+ var severity;
+ var problemNode;
+ var location;
+ var lineNumber;
+ var columnNumber;
+ var byteOffset;
+ var utf16Offset;
+ var uri;
+ var type;
+ var message;
+ var relatedException;
+ var relatedData;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newChild = doc.createElement("br");
+ retval = elem.appendChild(newChild);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("namespaces", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100B6 = 0;indexN100B6 < errors.length; indexN100B6++) {
+ error = errors[indexN100B6];
+ severity = error.severity;
+
+
+ if(
+ (2 == severity)
+ ) {
+ location = error.location;
+
+ problemNode = location.relatedNode;
+
+ assertSame("relatedNodeIsL1Node",newChild,problemNode);
+lineNumber = location.lineNumber;
+
+ assertEquals("lineNumber",-1,lineNumber);
+ columnNumber = location.columnNumber;
+
+ assertEquals("columnNumber",-1,columnNumber);
+ byteOffset = location.byteOffset;
+
+ assertEquals("byteOffset",-1,byteOffset);
+ utf16Offset = location.utf16Offset;
+
+ assertEquals("utf16Offset",-1,utf16Offset);
+ uri = location.uri;
+
+ assertNull("uri",uri);
+ message = error.message;
+
+ length = message.length;
+ assertTrue("messageNotEmpty",
+
+ (length > 0)
+);
+type = error.type;
+
+ relatedData = error.relatedData;
+
+ relatedException = error.relatedException;
+
+ errorCount += 1;
+
+ }
+
+ else {
+ assertEquals("anyOthersShouldBeWarnings",1,severity);
+
+ }
+
+ }
+ assertEquals("oneError",1,errorCount);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.xhtml
new file mode 100644
index 0000000..7dd44bd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentnormalizedocument05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.js
new file mode 100644
index 0000000..921e1a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.js
@@ -0,0 +1,218 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Add a CDATASection containing "]]>" perform normalization with split-cdata-sections=true. Should result
+in an warning.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-severity
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-message
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-type
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedException
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedData
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-location
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-line-number
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-column-number
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-byteOffset
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-utf16Offset
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-node
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-uri
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=542
+*/
+function documentnormalizedocument06() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument06") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var elemList;
+ var newChild;
+ var oldChild;
+ var retval;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var splittedCount = 0;
+ var severity;
+ var problemNode;
+ var location;
+ var lineNumber;
+ var columnNumber;
+ var byteOffset;
+ var utf16Offset;
+ var uri;
+ var type;
+ var message;
+ var relatedException;
+ var relatedData;
+ var length;
+ var nodeType;
+ var nodeValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ newChild = doc.createCDATASection("this is not ]]> good");
+ oldChild = elem.firstChild;
+
+ retval = elem.replaceChild(newChild,oldChild);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("split-cdata-sections", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ newChild = elem.firstChild;
+
+ nodeValue = newChild.nodeValue;
+
+ nodeType = newChild.nodeType;
+
+
+ {
+ assertFalse("wasSplit",
+ ((4 == nodeType) && (nodeValue.indexOf("]]>") >= 0))
+);
+errors = errorMonitor.allErrors;
+for(var indexN1010C = 0;indexN1010C < errors.length; indexN1010C++) {
+ error = errors[indexN1010C];
+ type = error.type;
+
+ severity = error.severity;
+
+
+ if(
+ ("cdata-sections-splitted" == type)
+ ) {
+ relatedData = error.relatedData;
+
+ assertSame("relatedData",newChild,relatedData);
+assertEquals("severity",1,severity);
+ message = error.message;
+
+ length = message.length;
+ assertTrue("messageNotEmpty",
+
+ (length > 0)
+);
+relatedException = error.relatedException;
+
+ location = error.location;
+
+ problemNode = location.relatedNode;
+
+ assertSame("relatedNode",newChild,problemNode);
+lineNumber = location.lineNumber;
+
+ columnNumber = location.columnNumber;
+
+ byteOffset = location.byteOffset;
+
+ utf16Offset = location.utf16Offset;
+
+ uri = location.uri;
+
+ splittedCount += 1;
+
+ }
+
+ else {
+ assertEquals("anyOthersShouldBeWarnings",1,severity);
+
+ }
+
+ }
+ assertEquals("oneSplittedWarning",1,splittedCount);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.xhtml-disabled
new file mode 100644
index 0000000..a26db38
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument06.xhtml-disabled
@@ -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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentnormalizedocument06.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt
new file mode 100644
index 0000000..8cda272
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument07
+Status error
+Message Line 143: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.js
new file mode 100644
index 0000000..bb42856
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.js
@@ -0,0 +1,202 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Add a CDATASection containing "]]>" and perform normalization with split-cdata-sections=false. Should result
+in an error.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-severity
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-message
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-type
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedException
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-relatedData
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ERROR-DOMError-location
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-line-number
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-column-number
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-byteOffset
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-utf16Offset
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-node
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMLocator-uri
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=542
+*/
+function documentnormalizedocument07() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument07") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var elemList;
+ var newChild;
+ var oldChild;
+ var retval;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var errorCount = 0;
+ var severity;
+ var problemNode;
+ var location;
+ var lineNumber;
+ var columnNumber;
+ var byteOffset;
+ var utf16Offset;
+ var uri;
+ var type;
+ var message;
+ var relatedException;
+ var relatedData;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ oldChild = elem.firstChild;
+
+ newChild = doc.createCDATASection("this is not ]]> good");
+ retval = elem.replaceChild(newChild,oldChild);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("split-cdata-sections", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100E0 = 0;indexN100E0 < errors.length; indexN100E0++) {
+ error = errors[indexN100E0];
+ severity = error.severity;
+
+
+ if(
+ (2 == severity)
+ ) {
+ location = error.location;
+
+ problemNode = location.relatedNode;
+
+ assertSame("relatedNode",newChild,problemNode);
+lineNumber = location.lineNumber;
+
+ columnNumber = location.columnNumber;
+
+ byteOffset = location.byteOffset;
+
+ utf16Offset = location.utf16Offset;
+
+ uri = location.uri;
+
+ message = error.message;
+
+ length = message.length;
+ assertTrue("messageNotEmpty",
+
+ (length > 0)
+);
+type = error.type;
+
+ relatedData = error.relatedData;
+
+ relatedException = error.relatedException;
+
+ errorCount += 1;
+
+ }
+
+ else {
+ assertEquals("anyOthersShouldBeWarnings",1,severity);
+
+ }
+
+ }
+ assertEquals("oneError",1,errorCount);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.xhtml
new file mode 100644
index 0000000..590eccd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument07.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentnormalizedocument07.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt
new file mode 100644
index 0000000..228909a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument08
+Status error
+Message Line 124: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.js
new file mode 100644
index 0000000..4704916
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.js
@@ -0,0 +1,167 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Add two CDATASections containing "]]>" perform normalization with split-cdata-sections=true.
+Should result in two warnings and at least 4 nodes.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections
+*/
+function documentnormalizedocument08() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument08") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var elemList;
+ var newChild;
+ var oldChild;
+ var retval;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var length;
+ var childNodes;
+ var type;
+ var splittedCount = 0;
+ var severity;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ newChild = doc.createCDATASection("this is not ]]> good");
+ oldChild = elem.firstChild;
+
+ retval = elem.replaceChild(newChild,oldChild);
+ newChild = doc.createCDATASection("this is not ]]> good");
+ retval = elem.appendChild(newChild);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("split-cdata-sections", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100A3 = 0;indexN100A3 < errors.length; indexN100A3++) {
+ error = errors[indexN100A3];
+ type = error.type;
+
+ severity = error.severity;
+
+
+ if(
+ ("cdata-sections-splitted" == type)
+ ) {
+ splittedCount += 1;
+
+ }
+
+ else {
+ assertEquals("anyOthersShouldBeWarnings",1,severity);
+
+ }
+
+ }
+ assertEquals("twoSplittedWarning",2,splittedCount);
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ childNodes = elem.childNodes;
+
+ length = childNodes.length;
+
+ assertTrue("atLeast4ChildNodes",
+
+ (length > 3)
+);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.xhtml
new file mode 100644
index 0000000..b370619
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument08.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentnormalizedocument08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt
new file mode 100644
index 0000000..b4bb001
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument09
+Status error
+Message Line 142: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.js
new file mode 100644
index 0000000..8d6681a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.js
@@ -0,0 +1,172 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+ /**
+ * Inner class implementation for variable errHandler
+ */
+var errHandler;
+
+/**
+ * Constructor
+
+ */
+
+function DOMErrorHandlerN1003C() {
+ }
+
+ /**
+ *
+This method is called on the error handler when an error occurs.
+If an exception is thrown from this method, it is considered to be equivalent of returningtrue.
+
+ * @param error
+The error object that describes the error. This object may be reused by the DOM implementation across multiple calls to thehandleErrormethod.
+
+ */
+DOMErrorHandlerN1003C.prototype.handleError = function(error) {
+ //
+ // bring class variables into function scope
+ //
+ assertFalse("documentnormalizedocument09_Err",true);
+ return true;
+}
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema
+*/
+function documentnormalizedocument09() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument09") != null) return;
+ var doc;
+ var docElem;
+ var docElemNodeName;
+ var canSet;
+ var errorHandler;
+ errHandler = new DOMErrorHandlerN1003C();
+
+ var domConfig;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("error-handler", errHandler.handleError);
+ canSet = domConfig.canSetParameter("validate-if-schema",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("validate-if-schema", true);
+ doc.normalizeDocument();
+ docElem = doc.documentElement;
+
+ docElemNodeName = docElem.nodeName;
+
+ assertEquals("documentnormalizedocument09_True","html",docElemNodeName);
+
+ }
+ domConfig.setParameter("validate-if-schema", false);
+ doc.normalizeDocument();
+ docElem = doc.documentElement;
+
+ docElemNodeName = docElem.nodeName;
+
+ assertEquals("documentnormalizedocument09_False","html",docElemNodeName);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.xhtml
new file mode 100644
index 0000000..e268c9d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentnormalizedocument09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10-expected.txt
new file mode 100644
index 0000000..5a07633
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument10
+Status error
+Message Error: HIERARCHY_REQUEST_ERR: DOM Exception 3
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.js
new file mode 100644
index 0000000..d8818ae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.js
@@ -0,0 +1,151 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace
+*/
+function documentnormalizedocument10() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument10") != null) return;
+ var doc;
+ var elem;
+ var newText;
+ var text;
+ var nodeValue;
+ var canSet;
+ var appendedChild;
+ var domConfig;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElement("newElem");
+ newText = doc.createTextNode("Text Node");
+ appendedChild = elem.appendChild(newText);
+ appendedChild = doc.appendChild(elem);
+ text = elem.firstChild;
+
+ nodeValue = text.nodeValue;
+
+ assertEquals("documentnormalizedocument10","Text Node",nodeValue);
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("element-content-whitespace",true);
+ assertTrue("canSetElementContentWhitespaceTrue",canSet);
+domConfig.setParameter("element-content-whitespace", true);
+ doc.normalizeDocument();
+ text = elem.firstChild;
+
+ nodeValue = text.nodeValue;
+
+ assertEquals("documentnormalizedocument10_true1","Text Node",nodeValue);
+ canSet = domConfig.canSetParameter("element-content-whitespace",false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("element-content-whitespace", false);
+ doc.normalizeDocument();
+ text = elem.firstChild;
+
+ nodeValue = text.nodeValue;
+
+ assertEquals("documentnormalizedocument10_true2","Text Node",nodeValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.xhtml
new file mode 100644
index 0000000..f80cc5d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentnormalizedocument10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11-expected.txt
new file mode 100644
index 0000000..14ff287
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument11
+Status skip
+Message HTML loader does not support ignoringElementContentWhitespace=true
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.js
new file mode 100644
index 0000000..dcc6a66
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("ignoringElementContentWhitespace", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations
+*/
+function documentnormalizedocument11() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument11") != null) return;
+ var doc;
+ var elemList;
+ var elemName;
+ var nodeName;
+ var canSet;
+ var domConfig;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("namespace-declarations", true);
+ doc.normalizeDocument();
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ elemName = elemList.item(1);
+ assertNotNull("documentnormalizedocument11_NotNullElem",elemName);
+canSet = domConfig.canSetParameter("namespace-declarations",false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("namespace-declarations", false);
+ doc.normalizeDocument();
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ elemName = elemList.item(1);
+ nodeName = elemName.nodeName;
+
+ assertEquals("documentnormalizedocument11_namespaceDeclarations","address",nodeName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.xhtml
new file mode 100644
index 0000000..7b4273e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentnormalizedocument11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12-expected.txt
new file mode 100644
index 0000000..6680c97
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument12
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.js
new file mode 100644
index 0000000..37751ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.js
@@ -0,0 +1,174 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+ /**
+ * Inner class implementation for variable errHandler
+ */
+var errHandler;
+
+/**
+ * Constructor
+
+ */
+
+function DOMErrorHandlerN10048() {
+ }
+
+ /**
+ *
+This method is called on the error handler when an error occurs.
+If an exception is thrown from this method, it is considered to be equivalent of returningtrue.
+
+ * @param error
+The error object that describes the error. This object may be reused by the DOM implementation across multiple calls to thehandleErrormethod.
+
+ */
+DOMErrorHandlerN10048.prototype.handleError = function(error) {
+ //
+ // bring class variables into function scope
+ //
+ assertFalse("documentnormalizedocument08_Err",true);
+ return true;
+}
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate
+*/
+function documentnormalizedocument12() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument12") != null) return;
+ var doc;
+ var docElem;
+ var docElemNodeName;
+ var canSet;
+ var domConfig;
+ var errorHandler;
+ errHandler = new DOMErrorHandlerN10048();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("error-handler", errHandler.handleError);
+ canSet = domConfig.canSetParameter("validate",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("validate", true);
+ doc.normalizeDocument();
+ docElem = doc.documentElement;
+
+ docElemNodeName = docElem.nodeName;
+
+ assertEquals("documentnormalizedocument08_True","html",docElemNodeName);
+
+ }
+ domConfig.setParameter("validate", false);
+ doc.normalizeDocument();
+ docElem = doc.documentElement;
+
+ docElemNodeName = docElem.nodeName;
+
+ assertEquals("documentnormalizedocument08_False","html",docElemNodeName);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.xhtml
new file mode 100644
index 0000000..bccd5e2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentnormalizedocument12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt
new file mode 100644
index 0000000..2b810de
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument13
+Status error
+Message Line 129: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.js b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.js
new file mode 100644
index 0000000..91178ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.js
@@ -0,0 +1,193 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Add a L1 attribute to a L2 namespace aware document and perform namespace normalization. Should result
+in an error.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms#normalizeDocumentAlgo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces
+*/
+function documentnormalizedocument13() {
+ var success;
+ if(checkInitialization(builder, "documentnormalizedocument13") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var pList;
+ var newAttr;
+ var retval;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var errorCount = 0;
+ var severity;
+ var problemNode;
+ var location;
+ var lineNumber;
+ var columnNumber;
+ var byteOffset;
+ var utf16Offset;
+ var uri;
+ var type;
+ var message;
+ var relatedException;
+ var relatedData;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ elem.setAttribute("title","DOM L1 Attribute");
+ newAttr = elem.getAttributeNode("title");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("namespaces", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100B6 = 0;indexN100B6 < errors.length; indexN100B6++) {
+ error = errors[indexN100B6];
+ severity = error.severity;
+
+
+ if(
+ (2 == severity)
+ ) {
+ location = error.location;
+
+ problemNode = location.relatedNode;
+
+ assertSame("relatedNodeIsL1Node",newAttr,problemNode);
+lineNumber = location.lineNumber;
+
+ assertEquals("lineNumber",-1,lineNumber);
+ columnNumber = location.columnNumber;
+
+ assertEquals("columnNumber",-1,columnNumber);
+ byteOffset = location.byteOffset;
+
+ assertEquals("byteOffset",-1,byteOffset);
+ utf16Offset = location.utf16Offset;
+
+ assertEquals("utf16Offset",-1,utf16Offset);
+ uri = location.uri;
+
+ assertNull("uri",uri);
+ message = error.message;
+
+ length = message.length;
+ assertTrue("messageNotEmpty",
+
+ (length > 0)
+);
+type = error.type;
+
+ relatedData = error.relatedData;
+
+ relatedException = error.relatedException;
+
+ errorCount += 1;
+
+ }
+
+ else {
+ assertEquals("anyOthersShouldBeWarnings",1,severity);
+
+ }
+
+ }
+ assertEquals("oneError",1,errorCount);
+
+}
+
+
+
+
+function runTest() {
+ documentnormalizedocument13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.xhtml b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.xhtml
new file mode 100644
index 0000000..7cccbb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentnormalizedocument13.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentnormalizedocument13.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode01-expected.txt
new file mode 100644
index 0000000..e919b37
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode01
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode01.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode01.js
new file mode 100644
index 0000000..e69a322
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode01.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode01() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode01") != null) return;
+ var doc;
+ var element;
+ var attr;
+ var childList;
+ var renamedclass;
+ var nodeName;
+ var nodeType;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(1);
+ attr = element.getAttributeNode("class");
+ renamedclass = doc.renameNode(attr,"http://www.w3.org/DOM/Test","renamedNode");
+ nodeName = renamedclass.nodeName;
+
+ namespaceURI = renamedclass.namespaceURI;
+
+ nodeType = renamedclass.nodeType;
+
+ assertEquals("documentrenameode01_nodeName","renamedNode",nodeName);
+ assertEquals("documentrenameNode01_nodeType",2,nodeType);
+ assertEquals("documentrenamenode01_nodeValue","http://www.w3.org/DOM/Test",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode01.xhtml
new file mode 100644
index 0000000..8aa5fcd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode02-expected.txt
new file mode 100644
index 0000000..d53fafc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode02
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode02.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode02.js
new file mode 100644
index 0000000..076045f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode02.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode02() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode02") != null) return;
+ var doc;
+ var element;
+ var attr;
+ var childList;
+ var renamedclass;
+ var nodeName;
+ var nodeType;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(1);
+ attr = element.getAttributeNode("class");
+ renamedclass = doc.renameNode(attr,"http://www.w3.org/DOM/Test","prefi0x:renamedNode");
+ nodeName = renamedclass.nodeName;
+
+ namespaceURI = renamedclass.namespaceURI;
+
+ nodeType = renamedclass.nodeType;
+
+ assertEquals("documentrenamenode02_nodeName","prefi0x:renamedNode",nodeName);
+ assertEquals("documentrenamenode02_namespaceURI","http://www.w3.org/DOM/Test",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode02.xhtml
new file mode 100644
index 0000000..173374d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode03-expected.txt
new file mode 100644
index 0000000..00558d4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode03
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode03.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode03.js
new file mode 100644
index 0000000..7f3377c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode03.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode03() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode03") != null) return;
+ var doc;
+ var attr;
+ var renamedNode;
+ var nodeName;
+ var namespaceURI;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attr = doc.createAttributeNS(nullNSURI,"test");
+ renamedNode = doc.renameNode(attr,"http://www.w3.org/DOM/Test","pre0:fix1");
+ nodeName = renamedNode.nodeName;
+
+ namespaceURI = renamedNode.namespaceURI;
+
+ assertEquals("documentrenamenode03_nodeName","pre0:fix1",nodeName);
+ assertEquals("documentrenamenode02_namespaceURI","http://www.w3.org/DOM/Test",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode03.xhtml
new file mode 100644
index 0000000..cd490f4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode04-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode04-expected.txt
new file mode 100644
index 0000000..664e5bf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode04
+Status error
+Message Line 102: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode04.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode04.js
new file mode 100644
index 0000000..3ab6fbf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode04.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode04() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode04") != null) return;
+ var doc;
+ var attr;
+ var renamedNode;
+ var nodeName;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ renamedNode = doc.renameNode(attr,"","title");
+ nodeName = renamedNode.nodeName;
+
+ namespaceURI = renamedNode.namespaceURI;
+
+ assertEquals("documentrenamenode04_nodeName","title",nodeName);
+ assertNull("documentrenamenode04_namespaceURI",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode04.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode04.xhtml
new file mode 100644
index 0000000..7589464
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode05-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode05-expected.txt
new file mode 100644
index 0000000..e8084d8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode05
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode05.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode05.js
new file mode 100644
index 0000000..04844e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode05.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode05() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode05") != null) return;
+ var doc;
+ var attr;
+ var renamedNode;
+ var nodeName;
+ var namespaceURI;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ renamedNode = doc.renameNode(attr,nullNSURI,"title");
+ nodeName = renamedNode.nodeName;
+
+ namespaceURI = renamedNode.namespaceURI;
+
+ assertNull("documentrenamenode05_namespaceURI",namespaceURI);
+ assertEquals("documentrenamenode05_nodeName","title",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode05.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode05.xhtml
new file mode 100644
index 0000000..f531d0f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode06-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode06-expected.txt
new file mode 100644
index 0000000..a044caa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode06
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode06.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode06.js
new file mode 100644
index 0000000..620d030
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode06.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode06() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode06") != null) return;
+ var doc;
+ var element;
+ var attr;
+ var childList;
+ var renamedclass;
+ var nodeName;
+ var nodeType;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("p");
+ element = childList.item(3);
+ attr = element.getAttributeNode("dir");
+ renamedclass = doc.renameNode(attr,"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation");
+ nodeName = renamedclass.nodeName;
+
+ namespaceURI = renamedclass.namespaceURI;
+
+ nodeType = renamedclass.nodeType;
+
+ assertEquals("documentrenameode01_nodeName","xsi:schemaLocation",nodeName);
+ assertEquals("documentrenameNode01_nodeType",2,nodeType);
+ assertEquals("documentrenamenode01_nodeValue","http://www.w3.org/2001/XMLSchema-instance",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode06.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode06.xhtml
new file mode 100644
index 0000000..54e0155
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode07-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode07-expected.txt
new file mode 100644
index 0000000..50313f5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode07
+Status error
+Message Line 117: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode07.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode07.js
new file mode 100644
index 0000000..17a16d4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode07.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode07() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode07") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var attr;
+ var renamedNode;
+ var nodeName;
+ var namespaceURI;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ attr = newDoc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ renamedNode = newDoc.renameNode(attr,"http://www.w3.org/XML/1998/namespace","xml:dom");
+ nodeName = renamedNode.nodeName;
+
+ namespaceURI = renamedNode.namespaceURI;
+
+ assertEquals("documentrenamenode07_nodeName","xml:dom",nodeName);
+ assertEquals("documentrenamenode07_namespaceURI","http://www.w3.org/XML/1998/namespace",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode07.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode07.xhtml
new file mode 100644
index 0000000..476587d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode08-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode08-expected.txt
new file mode 100644
index 0000000..48b83be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode08
+Status failure
+Message documentrenamenode08_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode08.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode08.js
new file mode 100644
index 0000000..e8ca800
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode08.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode08() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode08") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var element;
+ var attr;
+ var childList;
+ var renamedNode;
+ var nullDocType = null;
+
+ var docElem;
+ var docElemNS;
+ var docElemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("p");
+ element = childList.item(3);
+ attr = element.getAttributeNode("dir");
+ domImpl = doc.implementation;
+docElem = doc.documentElement;
+
+ docElemNS = docElem.namespaceURI;
+
+ docElemName = docElem.tagName;
+
+ newDoc = domImpl.createDocument(docElemNS,docElemName,nullDocType);
+
+ {
+ success = false;
+ try {
+ renamedNode = newDoc.renameNode(attr,"http://www.w3.org/XML/1998/namespace","xml:lang");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("documentrenamenode08_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode08.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode08.xhtml
new file mode 100644
index 0000000..4674ba7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode09-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode09-expected.txt
new file mode 100644
index 0000000..4786f60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode09
+Status error
+Message Line 114: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode09.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode09.js
new file mode 100644
index 0000000..1561eca
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode09.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode09() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode09") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var attr;
+ var renamedNode;
+ var adopted;
+ var nullDocType = null;
+
+ var attrNodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test","dom:newD",nullDocType);
+ attr = doc.createAttributeNS("http://www.w3.org/DOM/Test","test");
+ adopted = newDoc.adoptNode(attr);
+ renamedNode = newDoc.renameNode(attr,"http://www.w3.org/2000/xmlns/","xmlns:xmlns");
+ attrNodeName = renamedNode.nodeName;
+
+ assertEquals("documentrenamenode09_1","xmlns:xmlns",attrNodeName);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode09.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode09.xhtml
new file mode 100644
index 0000000..2cd980b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode10-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode10-expected.txt
new file mode 100644
index 0000000..39e9cb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode10
+Status failure
+Message documentrenamenode10_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode10.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode10.js
new file mode 100644
index 0000000..5a43645
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode10.js
@@ -0,0 +1,140 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode10() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode10") != null) return;
+ var doc;
+ var textEntry = "hello";
+ var textNode;
+ var renamedNode;
+ var qualifiedName;
+ var nullDocType = null;
+
+ qualifiedNames = new Array();
+ qualifiedNames[0] = "_:";
+ qualifiedNames[1] = ":0";
+ qualifiedNames[2] = ":";
+ qualifiedNames[3] = "a0:0";
+ qualifiedNames[4] = "_:0;";
+ qualifiedNames[5] = "a:::::c";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textNode = doc.createTextNode(textEntry);
+ for(var indexN10060 = 0;indexN10060 < qualifiedNames.length; indexN10060++) {
+ qualifiedName = qualifiedNames[indexN10060];
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(textNode,"http://www.w3.org/XML/1998/namespace",qualifiedName);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode10_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode10.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode10.xhtml
new file mode 100644
index 0000000..52a67b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode11-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode11-expected.txt
new file mode 100644
index 0000000..46ebc43
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode11
+Status failure
+Message documentrenamenode11_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode11.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode11.js
new file mode 100644
index 0000000..af59b88
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode11.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode11() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode11") != null) return;
+ var doc;
+ var textEntry = "hello";
+ var textNode;
+ var renamedNode;
+ var nullDocType = null;
+
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textNode = doc.createTextNode(textEntry);
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(textNode,nullNSURI,"pre:fix");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode11_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode11.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode11.xhtml
new file mode 100644
index 0000000..de0e8a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode12-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode12-expected.txt
new file mode 100644
index 0000000..f428349
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode12
+Status failure
+Message documentrenamenode12_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode12.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode12.js
new file mode 100644
index 0000000..aca14a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode12.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode12() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode12") != null) return;
+ var doc;
+ var renamedNode;
+ var textEntry = "hello";
+ var textNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textNode = doc.createTextNode(textEntry);
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(textNode,"http://www.w3.org/XML/1999/namespace","xml:prefix");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode12_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode12.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode12.xhtml
new file mode 100644
index 0000000..4b35060
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode13-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode13-expected.txt
new file mode 100644
index 0000000..365dd11
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode13
+Status failure
+Message documentrenamenode13_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode13.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode13.js
new file mode 100644
index 0000000..81e13fb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode13.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode13() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode13") != null) return;
+ var doc;
+ var textEntry = "hello";
+ var textNode;
+ var renamedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textNode = doc.createTextNode(textEntry);
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(textNode,"http://www.w3.org/XML/1998/namespace","xmlns:prefix");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode13_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode13.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode13.xhtml
new file mode 100644
index 0000000..7f8c950
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode14-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode14-expected.txt
new file mode 100644
index 0000000..c091821
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode14
+Status failure
+Message documentrenamenode14_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode14.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode14.js
new file mode 100644
index 0000000..3307bd0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode14.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode14() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode14") != null) return;
+ var doc;
+ var renamedNode;
+ var nullDocType = null;
+
+ var textEntry = "hello";
+ var textNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textNode = doc.createTextNode(textEntry);
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(textNode,"http://www.w3.org/2000/xmlns","xmlns");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode14_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode14.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode14.xhtml
new file mode 100644
index 0000000..9387574
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode15-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode15-expected.txt
new file mode 100644
index 0000000..b6ad6c0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode15
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode15.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode15.js
new file mode 100644
index 0000000..261c136
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode15.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Rename the fourth acronym element to svg:rect and verify the
+ nodeName, namespaceURI, nodeType attributes of the renamed node.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode15() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode15") != null) return;
+ var doc;
+ var element;
+ var childList;
+ var renamedclass;
+ var nodeName;
+ var nodeType;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(3);
+ renamedclass = doc.renameNode(element,"http://www.w3.org/DOM/Test","qnam:renamedNode");
+ nodeName = renamedclass.nodeName;
+
+ namespaceURI = renamedclass.namespaceURI;
+
+ nodeType = renamedclass.nodeType;
+
+ assertEquals("documentrenamenode15_nodeName","qnam:renamedNode",nodeName);
+ assertEquals("documentrenamenode15_nodeType",1,nodeType);
+ assertEquals("documentrenamenode15_nodeValue","http://www.w3.org/DOM/Test",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode15.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode15.xhtml
new file mode 100644
index 0000000..7bcfbe6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode16-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode16-expected.txt
new file mode 100644
index 0000000..b5189dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode16
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode16.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode16.js
new file mode 100644
index 0000000..20a5176
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode16.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode16() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode16") != null) return;
+ var doc;
+ var element;
+ var childList;
+ var renamedclass;
+ var nodeName;
+ var nodeType;
+ var namespaceURI;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(3);
+ renamedclass = doc.renameNode(element,nullNSURI,"renamedNode");
+ nodeName = renamedclass.nodeName;
+
+ namespaceURI = renamedclass.namespaceURI;
+
+ nodeType = renamedclass.nodeType;
+
+ assertEquals("documentrenamenode16_nodeName","renamedNode",nodeName);
+ assertEquals("documentrenamenode16_nodeType",1,nodeType);
+ assertNull("documentrenamenode16_nodeValue",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode16.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode16.xhtml
new file mode 100644
index 0000000..b94a72f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode17-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode17-expected.txt
new file mode 100644
index 0000000..9532e5d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode17
+Status error
+Message Line 118: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode17.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode17.js
new file mode 100644
index 0000000..1d0c3b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode17.js
@@ -0,0 +1,136 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode17() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode17") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var element;
+ var renamedNode;
+ var nodeName;
+ var nodeType;
+ var namespaceURI;
+ var docElem;
+ var rootNS;
+ var rootTagname;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootTagname,nullDocType);
+ element = newDoc.createElementNS("http://www.w3.org/1999/xhtml","body");
+ renamedNode = newDoc.renameNode(element,"http://www.w3.org/1999/xhtml","xhtml:head");
+ nodeName = renamedNode.nodeName;
+
+ namespaceURI = renamedNode.namespaceURI;
+
+ nodeType = renamedNode.nodeType;
+
+ assertEquals("documentrenamenode16_nodeName","xhtml:head",nodeName);
+ assertEquals("documentrenamenode16_nodeType",1,nodeType);
+ assertEquals("documentrenamenode16_nodeValue","http://www.w3.org/1999/xhtml",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode17.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode17.xhtml
new file mode 100644
index 0000000..e0a5eb1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode17.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentrenamenode17.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode18-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode18-expected.txt
new file mode 100644
index 0000000..2e373ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode18
+Status failure
+Message documentrenamenode18_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode18.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode18.js
new file mode 100644
index 0000000..5889ea9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode18.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode18() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode18") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var element;
+ var renamedNode;
+ var docElem;
+ var rootNS;
+ var rootTagname;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootTagname,nullDocType);
+ element = newDoc.createElementNS("http://www.w3.org/1999/xhtml","body");
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(element,"http://www.w3.org/1999/xhtml","head");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("documentrenamenode18_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode18.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode18.xhtml
new file mode 100644
index 0000000..d70665f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode18.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentrenamenode18.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode19-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode19-expected.txt
new file mode 100644
index 0000000..ab8707f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode19
+Status failure
+Message documentrenamenode19_NAMESPACE_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode19.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode19.js
new file mode 100644
index 0000000..0776684
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode19.js
@@ -0,0 +1,140 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode19() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode19") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var element;
+ var renamedNode;
+ var qualifiedName;
+ var nullDocType = null;
+
+ qualifiedNames = new Array();
+ qualifiedNames[0] = "a_:";
+ qualifiedNames[1] = "_:";
+ qualifiedNames[2] = ":";
+ qualifiedNames[3] = "::0;";
+ qualifiedNames[4] = "a:-:c";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test","newD",nullDocType);
+ element = doc.createElementNS("http://www.w3.org/DOM/Test","test");
+ for(var indexN1006C = 0;indexN1006C < qualifiedNames.length; indexN1006C++) {
+ qualifiedName = qualifiedNames[indexN1006C];
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(element,"http://www.w3.org/2000/XMLNS",qualifiedName);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+ }
+ assertTrue("documentrenamenode19_NAMESPACE_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode19.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode19.xhtml
new file mode 100644
index 0000000..caf72de
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode20-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode20-expected.txt
new file mode 100644
index 0000000..8e7157b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode20-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode20
+Status failure
+Message throw_NAMESPACE_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode20.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode20.js
new file mode 100644
index 0000000..376a117
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode20.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode20() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode20") != null) return;
+ var doc;
+ var element;
+ var renamedNode;
+ var docElem;
+ var rootNS;
+ var rootTagname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ element = doc.createElementNS(rootNS,rootTagname);
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(element,"http://www.example.com/xml","xml:html");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+ }
+ assertTrue("throw_NAMESPACE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode20.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode20.xhtml
new file mode 100644
index 0000000..e33faaa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode20.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentrenamenode20.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode21-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode21-expected.txt
new file mode 100644
index 0000000..d12976e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode21
+Status failure
+Message throw_NAMESPACE_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode21.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode21.js
new file mode 100644
index 0000000..31050e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode21.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode21() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode21") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var attr;
+ var renamedNode;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ attr = newDoc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+
+ {
+ success = false;
+ try {
+ renamedNode = newDoc.renameNode(attr,"http://www.w3.org/2000/XMLNS/","xmlns:xml");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+ }
+ assertTrue("throw_NAMESPACE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode21.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode21.xhtml
new file mode 100644
index 0000000..53df72d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode22-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode22-expected.txt
new file mode 100644
index 0000000..17b889a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode22-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode22
+Status failure
+Message throw_NAMESPACE_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode22.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode22.js
new file mode 100644
index 0000000..aef0474
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode22.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode22() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode22") != null) return;
+ var doc;
+ var attr;
+ var renamedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(attr,"http://www.w3.org/1999/xmlns/","xmlns");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+ }
+ assertTrue("throw_NAMESPACE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode22.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode22.xhtml
new file mode 100644
index 0000000..00b1584
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode22.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode22.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode23-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode23-expected.txt
new file mode 100644
index 0000000..176a6e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode23-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode23
+Status failure
+Message documentrenamenode23_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode23.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode23.js
new file mode 100644
index 0000000..b9640a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode23.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode23() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode23") != null) return;
+ var doc;
+ var renamedNode;
+ var docowner;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(doc,"http://www.w3.org/DOM/Test","root");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode23_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode23.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode23.xhtml
new file mode 100644
index 0000000..b746a77
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode23.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode23.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode24-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode24-expected.txt
new file mode 100644
index 0000000..5ef5b79
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode24
+Status failure
+Message documentrenamenode24_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode24.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode24.js
new file mode 100644
index 0000000..6c16ac5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode24.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode24() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode24") != null) return;
+ var doc;
+ var renamedNode;
+ var nullNSURI = null;
+
+ var docowner;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(doc,nullNSURI,"doc:root");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode24_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode24.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode24.xhtml
new file mode 100644
index 0000000..1e333d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode24.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode24.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode25-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode25-expected.txt
new file mode 100644
index 0000000..c2238fd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode25
+Status failure
+Message documentrenamenode25_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode25.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode25.js
new file mode 100644
index 0000000..f2d5016
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode25.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the renameNode method to attempt to rename a DOcumentType node of this Document.
+ Check if a NOT_SUPPORTED_ERR gets thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode25() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode25") != null) return;
+ var doc;
+ var docType;
+ var renamedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(docType,"http://www.w3.org/DOM/Test","root");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode25_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode25.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode25.xhtml
new file mode 100644
index 0000000..1bdd9ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode26-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode26-expected.txt
new file mode 100644
index 0000000..7db3629
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode26-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode26
+Status failure
+Message documentrenamenode26_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode26.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode26.js
new file mode 100644
index 0000000..4caf9e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode26.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode26";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the renameNode method oto attempt to rename a new DocumentFragment node
+ of this Document.
+ Check if a NOT_SUPPORTED_ERR gets thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode26() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode26") != null) return;
+ var doc;
+ var docFrag;
+ var renamedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+
+ {
+ success = false;
+ try {
+ renamedNode = doc.renameNode(docFrag,"http://www.w3.org/DOM/Test","root");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode26_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode26();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode26.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode26.xhtml
new file mode 100644
index 0000000..db89685
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode26.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode26.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode27-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode27-expected.txt
new file mode 100644
index 0000000..d373441
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode27
+Status failure
+Message throw_NOT_SUPPORTED_ERR_1: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode27.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode27.js
new file mode 100644
index 0000000..9673cac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode27.js
@@ -0,0 +1,189 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode27";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode27() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode27") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var text;
+ var comment;
+ var cdata;
+ var pi;
+ var entref;
+ var renamedTxt;
+ var renamedComment;
+ var renamedCdata;
+ var renamedPi;
+ var renamedEntRef;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ text = newDoc.createTextNode("text");
+ comment = newDoc.createComment("comment");
+ cdata = newDoc.createCDATASection("cdata");
+ pi = newDoc.createProcessingInstruction("pit","pid");
+ entref = newDoc.createEntityReference("alpha");
+
+ {
+ success = false;
+ try {
+ renamedTxt = newDoc.renameNode(text,"http://www.w3.org/DOM/Test","text");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR_1",success);
+ }
+
+ {
+ success = false;
+ try {
+ renamedComment = newDoc.renameNode(comment,"http://www.w3.org/DOM/Test","comment");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR_2",success);
+ }
+
+ {
+ success = false;
+ try {
+ renamedCdata = newDoc.renameNode(cdata,"http://www.w3.org/DOM/Test","cdata");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR_3",success);
+ }
+
+ {
+ success = false;
+ try {
+ renamedPi = newDoc.renameNode(pi,"http://www.w3.org/DOM/Test","pi");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR_4",success);
+ }
+
+ {
+ success = false;
+ try {
+ renamedEntRef = newDoc.renameNode(entref,"http://www.w3.org/DOM/Test","entref");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR_5",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode27();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode27.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode27.xhtml
new file mode 100644
index 0000000..de7811b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode27.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode27.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode28-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode28-expected.txt
new file mode 100644
index 0000000..3169d47
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode28-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode28
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode28.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode28.js
new file mode 100644
index 0000000..ede68c4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode28.js
@@ -0,0 +1,140 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode28";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the renameNode method to attempt to rename a Entity and Notation nodes of this Document.
+ Check if a NOT_SUPPORTED_ERR gets thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode28() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode28") != null) return;
+ var doc;
+ var docType;
+ var entityNodeMap;
+ var notationNodeMap;
+ var entity;
+ var notation;
+ var renamedEntityNode;
+ var renamedNotationNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entityNodeMap = docType.entities;
+
+ notationNodeMap = docType.notations;
+
+ entity = entityNodeMap.getNamedItem("alpha");
+ notation = notationNodeMap.getNamedItem("notation1");
+
+ {
+ success = false;
+ try {
+ renamedEntityNode = doc.renameNode(entity,"http://www.w3.org/DOM/Test","beta");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode28_ENTITY_NOT_SUPPORTED_ERR",success);
+ }
+
+ {
+ success = false;
+ try {
+ renamedNotationNode = doc.renameNode(notation,"http://www.w3.org/DOM/Test","notation2");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("documentrenamenode28_NOTATION_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode28();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode28.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode28.xhtml
new file mode 100644
index 0000000..9ec4ad8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode28.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode28.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentrenamenode29-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentrenamenode29-expected.txt
new file mode 100644
index 0000000..1208195
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode29-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode29
+Status failure
+Message documentrenamenode29_ENTITY_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode29.js b/LayoutTests/dom/xhtml/level3/core/documentrenamenode29.js
new file mode 100644
index 0000000..ec708d9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode29.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode29";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-renameNode
+*/
+function documentrenamenode29() {
+ var success;
+ if(checkInitialization(builder, "documentrenamenode29") != null) return;
+ var doc;
+ var docElem;
+ var renamed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+
+ {
+ success = false;
+ try {
+ renamed = doc.renameNode(docElem,"http://www.w3.org/DOM/Test","@");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("documentrenamenode29_ENTITY_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentrenamenode29();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentrenamenode29.xhtml b/LayoutTests/dom/xhtml/level3/core/documentrenamenode29.xhtml
new file mode 100644
index 0000000..18b041f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentrenamenode29.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentrenamenode29.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01-expected.txt
new file mode 100644
index 0000000..5052bd5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.js b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.js
new file mode 100644
index 0000000..0c0e36b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
+*/
+function documentsetdocumenturi01() {
+ var success;
+ if(checkInitialization(builder, "documentsetdocumenturi01") != null) return;
+ var doc;
+ var docURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.documentURI = "file:///test";
+
+ docURI = doc.documentURI;
+
+ assertEquals("documentsetdocumenturi01","file:///test",docURI);
+
+}
+
+
+
+
+function runTest() {
+ documentsetdocumenturi01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.xhtml
new file mode 100644
index 0000000..7799856
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentsetdocumenturi01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02-expected.txt
new file mode 100644
index 0000000..bce6ca0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.js b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.js
new file mode 100644
index 0000000..54f034f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
+*/
+function documentsetdocumenturi02() {
+ var success;
+ if(checkInitialization(builder, "documentsetdocumenturi02") != null) return;
+ var doc;
+ var docURI;
+ var nullValue = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.documentURI = nullValue;
+
+ docURI = doc.documentURI;
+
+ assertNull("documentsetdocumenturi02",docURI);
+
+}
+
+
+
+
+function runTest() {
+ documentsetdocumenturi02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.xhtml
new file mode 100644
index 0000000..4e53491
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentsetdocumenturi02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03-expected.txt
new file mode 100644
index 0000000..885259f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.js b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.js
new file mode 100644
index 0000000..b731dbe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
+*/
+function documentsetdocumenturi03() {
+ var success;
+ if(checkInitialization(builder, "documentsetdocumenturi03") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var docURI;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newDoc.documentURI = "somestring";
+
+ docURI = newDoc.documentURI;
+
+ assertEquals("documentsetdocumenturi03","somestring",docURI);
+
+}
+
+
+
+
+function runTest() {
+ documentsetdocumenturi03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.xhtml
new file mode 100644
index 0000000..1bb2f2c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetdocumenturi03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentsetdocumenturi03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01-expected.txt
new file mode 100644
index 0000000..24f4518
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.js b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.js
new file mode 100644
index 0000000..03cb79e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking
+*/
+function documentsetstricterrorchecking01() {
+ var success;
+ if(checkInitialization(builder, "documentsetstricterrorchecking01") != null) return;
+ var doc;
+ var newAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.strictErrorChecking = false;
+
+ doc.strictErrorChecking = true;
+
+
+ {
+ success = false;
+ try {
+ newAttr = doc.createAttributeNS("http://www.w3.org/DOM/Test","@");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("INVALID_CHARACTER_ERR_documentsetstricterrorchecking01",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentsetstricterrorchecking01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.xhtml
new file mode 100644
index 0000000..631da0c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentsetstricterrorchecking01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02-expected.txt
new file mode 100644
index 0000000..8b5a75d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js
new file mode 100644
index 0000000..841a771
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking
+*/
+function documentsetstricterrorchecking02() {
+ var success;
+ if(checkInitialization(builder, "documentsetstricterrorchecking02") != null) return;
+ var doc;
+ var newAttr;
+ var nullValue = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.strictErrorChecking = true;
+
+
+ {
+ success = false;
+ try {
+ newAttr = doc.createAttributeNS(nullValue,"dom:test");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+ }
+ assertTrue("NAMESPACE_ERR_documentsetstricterrorchecking02",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentsetstricterrorchecking02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.xhtml
new file mode 100644
index 0000000..65e9a7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentsetstricterrorchecking02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03-expected.txt
new file mode 100644
index 0000000..7ce91f4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.js b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.js
new file mode 100644
index 0000000..7a9eb45
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.js
@@ -0,0 +1,109 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Set the strictErrorChecking attribute value on a new Document to false and check if it was
+ correctly set using getStrictErrorChecking.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking
+*/
+function documentsetstricterrorchecking03() {
+ var success;
+ if(checkInitialization(builder, "documentsetstricterrorchecking03") != null) return;
+ var doc;
+ var strictErrorCheckingValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.strictErrorChecking = false;
+
+ strictErrorCheckingValue = doc.strictErrorChecking;
+
+ assertFalse("documentsetstricterrorchecking03",strictErrorCheckingValue);
+
+}
+
+
+
+
+function runTest() {
+ documentsetstricterrorchecking03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.xhtml
new file mode 100644
index 0000000..df292b7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentsetstricterrorchecking03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01-expected.txt
new file mode 100644
index 0000000..1bbdf81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlstandalone01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.js b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.js
new file mode 100644
index 0000000..2ed0821
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.js
@@ -0,0 +1,109 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlstandalone01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Set the standalone attribute of this document to true and verify if the attribute was correctly
+ set.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone
+*/
+function documentsetxmlstandalone01() {
+ var success;
+ if(checkInitialization(builder, "documentsetxmlstandalone01") != null) return;
+ var doc;
+ var standalone;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.xmlStandalone = true;
+
+ standalone = doc.xmlStandalone;
+
+ assertTrue("documentsetxmlstandalone01",standalone);
+
+}
+
+
+
+
+function runTest() {
+ documentsetxmlstandalone01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.xhtml
new file mode 100644
index 0000000..1ae2c8a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentsetxmlstandalone01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02-expected.txt
new file mode 100644
index 0000000..8bf66e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlstandalone02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.js b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.js
new file mode 100644
index 0000000..12580b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlstandalone02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-standalone
+*/
+function documentsetxmlstandalone02() {
+ var success;
+ if(checkInitialization(builder, "documentsetxmlstandalone02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var standalone;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newDoc.xmlStandalone = false;
+
+ standalone = newDoc.xmlStandalone;
+
+ assertFalse("documentsetxmlstandalone02_false",standalone);
+newDoc.xmlStandalone = true;
+
+ standalone = newDoc.xmlStandalone;
+
+ assertTrue("documentsetxmlstandalone02_true",standalone);
+
+}
+
+
+
+
+function runTest() {
+ documentsetxmlstandalone02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.xhtml
new file mode 100644
index 0000000..da0a2f9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlstandalone02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentsetxmlstandalone02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01-expected.txt
new file mode 100644
index 0000000..433fffe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion01
+Status failure
+Message NOT_SUPPORTED_ERR_documentsetversion01: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.js b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.js
new file mode 100644
index 0000000..d19c48d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.js
@@ -0,0 +1,150 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version
+*/
+function documentsetxmlversion01() {
+ var success;
+ if(checkInitialization(builder, "documentsetxmlversion01") != null) return;
+ var doc;
+ var versionValue;
+ illegalVersion = new Array();
+ illegalVersion[0] = "{";
+ illegalVersion[1] = "}";
+ illegalVersion[2] = "~";
+ illegalVersion[3] = "'";
+ illegalVersion[4] = "!";
+ illegalVersion[5] = "@";
+ illegalVersion[6] = "#";
+ illegalVersion[7] = "$";
+ illegalVersion[8] = "%";
+ illegalVersion[9] = "^";
+ illegalVersion[10] = "&";
+ illegalVersion[11] = "*";
+ illegalVersion[12] = "(";
+ illegalVersion[13] = ")";
+ illegalVersion[14] = "+";
+ illegalVersion[15] = "=";
+ illegalVersion[16] = "[";
+ illegalVersion[17] = "]";
+ illegalVersion[18] = "\\";
+ illegalVersion[19] = "/";
+ illegalVersion[20] = ";";
+ illegalVersion[21] = "`";
+ illegalVersion[22] = "<";
+ illegalVersion[23] = ">";
+ illegalVersion[24] = ",";
+ illegalVersion[25] = "a ";
+ illegalVersion[26] = "\"";
+ illegalVersion[27] = "---";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ for(var indexN10087 = 0;indexN10087 < illegalVersion.length; indexN10087++) {
+ versionValue = illegalVersion[indexN10087];
+
+ {
+ success = false;
+ try {
+ doc.xmlVersion = versionValue;
+
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("NOT_SUPPORTED_ERR_documentsetversion01",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentsetxmlversion01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.xhtml
new file mode 100644
index 0000000..cc80334
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentsetxmlversion01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02-expected.txt
new file mode 100644
index 0000000..8239a1a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.js b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.js
new file mode 100644
index 0000000..2c34ff3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version
+*/
+function documentsetxmlversion02() {
+ var success;
+ if(checkInitialization(builder, "documentsetxmlversion02") != null) return;
+ var doc;
+ var versionValue;
+ var newDoc;
+ var domImpl;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newDoc.xmlVersion = "1.0";
+
+ versionValue = newDoc.xmlVersion;
+
+ assertEquals("documentsetxmlversion02","1.0",versionValue);
+
+}
+
+
+
+
+function runTest() {
+ documentsetxmlversion02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.xhtml
new file mode 100644
index 0000000..b48600b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentsetxmlversion02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03-expected.txt
new file mode 100644
index 0000000..43b8785
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.js b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.js
new file mode 100644
index 0000000..3f38ff6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version
+*/
+function documentsetxmlversion03() {
+ var success;
+ if(checkInitialization(builder, "documentsetxmlversion03") != null) return;
+ var doc;
+ var versionValue;
+ var newDoc;
+ var domImpl;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ newDoc.xmlVersion = "1.1";
+
+ versionValue = newDoc.xmlVersion;
+
+ assertEquals("documentsetxmlversion03","1.1",versionValue);
+
+}
+
+
+
+
+function runTest() {
+ documentsetxmlversion03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.xhtml
new file mode 100644
index 0000000..cf8c0b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentsetxmlversion03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05-expected.txt b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05-expected.txt
new file mode 100644
index 0000000..895671f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion05
+Status failure
+Message throw_NOT_SUPPORTED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.js b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.js
new file mode 100644
index 0000000..c24faaf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetxmlversion05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-version
+*/
+function documentsetxmlversion05() {
+ var success;
+ if(checkInitialization(builder, "documentsetxmlversion05") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+
+ {
+ success = false;
+ try {
+ newDoc.xmlVersion = "-";
+
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentsetxmlversion05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.xhtml b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.xhtml
new file mode 100644
index 0000000..131e708
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetxmlversion05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentsetxmlversion05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt
new file mode 100644
index 0000000..333ceb1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcanonicalform1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.js b/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.js
new file mode 100644
index 0000000..c02b0eb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcanonicalform1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "canonical-form" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-property
+*/
+function domconfigcanonicalform1() {
+ var success;
+ if(checkInitialization(builder, "domconfigcanonicalform1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "cAnOnical-form";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertFalse("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertFalse("setTrueNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, false);
+
+}
+
+
+
+
+function runTest() {
+ domconfigcanonicalform1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.xhtml
new file mode 100644
index 0000000..ee2e1be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcanonicalform1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigcanonicalform1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt
new file mode 100644
index 0000000..bc53d60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcdatasections1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.js b/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.js
new file mode 100644
index 0000000..e542cb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcdatasections1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "cdata-sections" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigcdatasections1() {
+ var success;
+ if(checkInitialization(builder, "domconfigcdatasections1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "cDaTa-sections";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfigcdatasections1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.xhtml
new file mode 100644
index 0000000..89868ab
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcdatasections1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigcdatasections1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt
new file mode 100644
index 0000000..f6181fd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcheckcharacternormalization1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.js b/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.js
new file mode 100644
index 0000000..70b66aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcheckcharacternormalization1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "check-character-normalization" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigcheckcharacternormalization1() {
+ var success;
+ if(checkInitialization(builder, "domconfigcheckcharacternormalization1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "cHeCk-character-normalization";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertFalse("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertFalse("setTrueNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, false);
+
+}
+
+
+
+
+function runTest() {
+ domconfigcheckcharacternormalization1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.xhtml
new file mode 100644
index 0000000..e2e1ccb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcheckcharacternormalization1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigcheckcharacternormalization1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcomments1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigcomments1-expected.txt
new file mode 100644
index 0000000..463732f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcomments1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcomments1
+Status error
+Message Line 91: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcomments1.js b/LayoutTests/dom/xhtml/level3/core/domconfigcomments1.js
new file mode 100644
index 0000000..6913137
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcomments1.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcomments1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "comments" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration
+*/
+function domconfigcomments1() {
+ var success;
+ if(checkInitialization(builder, "domconfigcomments1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "cOmments";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfigcomments1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigcomments1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigcomments1.xhtml
new file mode 100644
index 0000000..6e1d8a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigcomments1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigcomments1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt
new file mode 100644
index 0000000..b3e6388
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigdatatypenormalization1
+Status error
+Message Line 91: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.js b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.js
new file mode 100644
index 0000000..0c752fb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigdatatypenormalization1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "datatype-normalization" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration
+*/
+function domconfigdatatypenormalization1() {
+ var success;
+ if(checkInitialization(builder, "domconfigdatatypenormalization1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "dAtAtype-normalization";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertFalse("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertFalse("setTrueNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, false);
+
+}
+
+
+
+
+function runTest() {
+ domconfigdatatypenormalization1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.xhtml
new file mode 100644
index 0000000..681d8e8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigdatatypenormalization1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt
new file mode 100644
index 0000000..fe7a335
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigdatatypenormalization2
+Status error
+Message Line 91: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.js b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.js
new file mode 100644
index 0000000..168b9ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigdatatypenormalization2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Setting "datatype-normalization" to true also forces "validate" to true.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration
+*/
+function domconfigdatatypenormalization2() {
+ var success;
+ if(checkInitialization(builder, "domconfigdatatypenormalization2") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "datatype-normalization";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("validate", false);
+ canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter("validate");
+ assertTrue("validateSet",state);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domconfigdatatypenormalization2();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.xhtml
new file mode 100644
index 0000000..96d50e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigdatatypenormalization2.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigdatatypenormalization2.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt
new file mode 100644
index 0000000..e60da16
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigelementcontentwhitespace1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.js b/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.js
new file mode 100644
index 0000000..cb4c1f3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigelementcontentwhitespace1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "element-content-whitespace" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigelementcontentwhitespace1() {
+ var success;
+ if(checkInitialization(builder, "domconfigelementcontentwhitespace1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "eLeMent-content-whitespace";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+canSet = domConfig.canSetParameter(parameter,false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, false);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertTrue("setFalseNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, true);
+
+}
+
+
+
+
+function runTest() {
+ domconfigelementcontentwhitespace1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.xhtml
new file mode 100644
index 0000000..f1fd46f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigelementcontentwhitespace1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigelementcontentwhitespace1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigentities1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigentities1-expected.txt
new file mode 100644
index 0000000..d5981c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigentities1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigentities1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigentities1.js b/LayoutTests/dom/xhtml/level3/core/domconfigentities1.js
new file mode 100644
index 0000000..fc2719f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigentities1.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigentities1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "entities" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigentities1() {
+ var success;
+ if(checkInitialization(builder, "domconfigentities1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "eNtIties";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfigentities1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigentities1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigentities1.xhtml
new file mode 100644
index 0000000..8f6ae64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigentities1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigentities1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt
new file mode 100644
index 0000000..49358c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigerrorhandler1
+Status error
+Message Line 125: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.js b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.js
new file mode 100644
index 0000000..f48a609
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.js
@@ -0,0 +1,152 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigerrorhandler1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+ /**
+ * Inner class implementation for variable errorHandler
+ */
+var errorHandler;
+
+/**
+ * Constructor
+
+ */
+
+function DOMErrorHandlerN10049() {
+ }
+
+ /**
+ *
+This method is called on the error handler when an error occurs.
+If an exception is thrown from this method, it is considered to be equivalent of returningtrue.
+
+ * @param error
+The error object that describes the error. This object may be reused by the DOM implementation across multiple calls to thehandleErrormethod.
+
+ */
+DOMErrorHandlerN10049.prototype.handleError = function(error) {
+ //
+ // bring class variables into function scope
+ //
+ return true;
+}
+
+/**
+* Checks behavior of "error-handler" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-error-handler
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=544
+*/
+function domconfigerrorhandler1() {
+ var success;
+ if(checkInitialization(builder, "domconfigerrorhandler1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var origHandler;
+ var state;
+ var parameter = "eRrOr-handler";
+ errorHandler = new DOMErrorHandlerN10049();
+
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ origHandler = domConfig.getParameter(parameter);
+ canSet = domConfig.canSetParameter(parameter,errorHandler);
+ assertTrue("canSetNewHandler",canSet);
+canSet = domConfig.canSetParameter(parameter,origHandler);
+ assertTrue("canSetOrigHandler",canSet);
+domConfig.setParameter(parameter, errorHandler.handleError);
+ state = domConfig.getParameter(parameter);
+ assertSame("setToNewHandlerEffective",errorHandler,state);
+domConfig.setParameter(parameter, origHandler.handleError);
+ state = domConfig.getParameter(parameter);
+ assertSame("setToOrigHandlerEffective",origHandler,state);
+canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domconfigerrorhandler1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.xhtml
new file mode 100644
index 0000000..464e9b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigerrorhandler1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt
new file mode 100644
index 0000000..20f6cb6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigerrorhandler2
+Status error
+Message Line 95: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.js b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.js
new file mode 100644
index 0000000..c9bf210
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigerrorhandler2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Calls DOMConfiguration.setParameter("error-handler", null). Spec
+ does not explicitly address the case.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-error-handler
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigerrorhandler2() {
+ var success;
+ if(checkInitialization(builder, "domconfigerrorhandler2") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var errorHandler = null;
+
+ var parameter = "error-handler";
+ var state;
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter(parameter,errorHandler);
+ assertTrue("canSetNull",canSet);
+domConfig.setParameter(parameter, errorHandler.handleError);
+ state = domConfig.getParameter(parameter);
+ assertNull("errorHandlerIsNull",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfigerrorhandler2();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.xhtml
new file mode 100644
index 0000000..ac0f86e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigerrorhandler2.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigerrorhandler2.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1-expected.txt
new file mode 100644
index 0000000..201b3e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfiginfoset1
+Status error
+Message Line 94: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.js b/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.js
new file mode 100644
index 0000000..68ae57c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfiginfoset1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "infoset" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities
+*/
+function domconfiginfoset1() {
+ var success;
+ if(checkInitialization(builder, "domconfiginfoset1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "iNfOset";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertFalse("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueIsEffective",state);
+state = domConfig.getParameter("entities");
+ assertFalse("entitiesSetFalse",state);
+state = domConfig.getParameter("cdata-sections");
+ assertFalse("cdataSectionsSetFalse",state);
+domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setFalseIsNoOp",state);
+domConfig.setParameter("entities", true);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setEntitiesTrueInvalidatesInfoset",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfiginfoset1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.xhtml
new file mode 100644
index 0000000..bf8a3ad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfiginfoset1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfiginfoset1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt
new file mode 100644
index 0000000..184b756
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespacedeclarations1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.js b/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.js
new file mode 100644
index 0000000..a69d180
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespacedeclarations1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "namespace-declarations" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfignamespacedeclarations1() {
+ var success;
+ if(checkInitialization(builder, "domconfignamespacedeclarations1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "nAmEspace-declarations";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfignamespacedeclarations1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.xhtml
new file mode 100644
index 0000000..5344a75
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespacedeclarations1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfignamespacedeclarations1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1-expected.txt
new file mode 100644
index 0000000..6989d01
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespaces1
+Status error
+Message Line 91: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.js b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.js
new file mode 100644
index 0000000..4f20c81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespaces1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "namespaces" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration
+*/
+function domconfignamespaces1() {
+ var success;
+ if(checkInitialization(builder, "domconfignamespaces1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "nAmEspaces";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+canSet = domConfig.canSetParameter(parameter,false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, false);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertTrue("setFalseNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, true);
+
+}
+
+
+
+
+function runTest() {
+ domconfignamespaces1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.xhtml
new file mode 100644
index 0000000..1ced6e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfignamespaces1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2-expected.txt
new file mode 100644
index 0000000..e2e6846
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespaces2
+Status error
+Message Line 97: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.js b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.js
new file mode 100644
index 0000000..72e2556
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.js
@@ -0,0 +1,107 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespaces2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Document.getParameter("namespaces") should be true regardles if the
+ parse that created the document was namespace aware.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration
+*/
+function domconfignamespaces2() {
+ var success;
+ if(checkInitialization(builder, "domconfignamespaces2") != null) return;
+ var doc;
+ var domConfig;
+ var state;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter("namespaces");
+ assertTrue("namespacesTrue",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfignamespaces2();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.xhtml
new file mode 100644
index 0000000..484aeff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignamespaces2.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='domconfignamespaces2.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt
new file mode 100644
index 0000000..59e527b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignormalizecharacters1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.js b/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.js
new file mode 100644
index 0000000..47d37f5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignormalizecharacters1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "normalize-characters" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfignormalizecharacters1() {
+ var success;
+ if(checkInitialization(builder, "domconfignormalizecharacters1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "nOrMalize-characters";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertFalse("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertFalse("setTrueNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, false);
+
+}
+
+
+
+
+function runTest() {
+ domconfignormalizecharacters1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.xhtml
new file mode 100644
index 0000000..4331540
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfignormalizecharacters1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfignormalizecharacters1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01-expected.txt
new file mode 100644
index 0000000..dcc75b6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigparameternames01
+Status failure
+Message configNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.js b/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.js
new file mode 100644
index 0000000..fb97a64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.js
@@ -0,0 +1,148 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigparameternames01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks getParameterNames and canSetParameter for Document.domConfig.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-domConfig
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-canonical-form
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-check-character-normalization
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-comments
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-error-handler
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace
+*/
+function domconfigparameternames01() {
+ var success;
+ if(checkInitialization(builder, "domconfigparameternames01") != null) return;
+ var domImpl;
+ var doc;
+ var config;
+ var state;
+ var parameterNames;
+ var parameterName;
+ var matchCount = 0;
+ var paramValue;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ config = doc.domConfig;
+
+ assertNotNull("configNotNull",config);
+parameterNames = config.parameterNames;
+
+ assertNotNull("parameterNamesNotNull",parameterNames);
+for(var indexN1008C = 0;indexN1008C < parameterNames.length; indexN1008C++) {
+ parameterName = parameterNames.item(indexN1008C);
+ paramValue = config.getParameter(parameterName);
+ canSet = config.canSetParameter(parameterName,paramValue);
+ assertTrue("canSetToDefaultValue",canSet);
+config.setParameter(parameterName, paramValue);
+
+ if(
+
+ (("canonical-form".toUpperCase() == parameterName.toUpperCase()) || ("cdata-sections".toUpperCase() == parameterName.toUpperCase()) || ("check-character-normalization".toUpperCase() == parameterName.toUpperCase()) || ("comments".toUpperCase() == parameterName.toUpperCase()) || ("datatype-normalization".toUpperCase() == parameterName.toUpperCase()) || ("entities".toUpperCase() == parameterName.toUpperCase()) || ("error-handler".toUpperCase() == parameterName.toUpperCase()) || ("infoset".toUpperCase() == parameterName.toUpperCase()) || ("namespaces".toUpperCase() == parameterName.toUpperCase()) || ("namespace-declarations".toUpperCase() == parameterName.toUpperCase()) || ("normalize-characters".toUpperCase() == parameterName.toUpperCase()) || ("split-cdata-sections".toUpperCase() == parameterName.toUpperCase()) || ("validate".toUpperCase() == parameterName.toUpperCase()) || ("validate-if-schema".toUpperCase() == parameterName.toUpperCase()) || ("well-formed".toUpperCase() == parameterName.toUpperCase()) || ("element-content-whitespace".toUpperCase() == parameterName.toUpperCase()))
+
+ ) {
+ matchCount += 1;
+
+ }
+
+ }
+ assertEquals("definedParameterCount",16,matchCount);
+
+}
+
+
+
+
+function runTest() {
+ domconfigparameternames01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.xhtml
new file mode 100644
index 0000000..9cce053
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigparameternames01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='domconfigparameternames01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt
new file mode 100644
index 0000000..b87d897
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigschemalocation1
+Status error
+Message Line 95: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.js b/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.js
new file mode 100644
index 0000000..8ad29b5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigschemalocation1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "schema-location" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-location
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigschemalocation1() {
+ var success;
+ if(checkInitialization(builder, "domconfigschemalocation1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "sChEma-location";
+ var nullSchemaLocation = null;
+
+ var sampleSchemaLocation = "http://www.example.com/schemas/sampleschema.xsd";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter(parameter,true);
+ assertFalse("canSetTrue",canSet);
+
+ try {
+ state = domConfig.getParameter(parameter);
+ assertNull("defaultSchemaLocation",state);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ canSet = domConfig.canSetParameter(parameter,sampleSchemaLocation);
+ assertTrue("canSetURI",canSet);
+canSet = domConfig.canSetParameter(parameter,nullSchemaLocation);
+ assertTrue("canSetNull",canSet);
+domConfig.setParameter(parameter, sampleSchemaLocation);
+ state = domConfig.getParameter(parameter);
+ assertEquals("setURIEffective",sampleSchemaLocation,state);
+ domConfig.setParameter(parameter, nullSchemaLocation);
+ state = domConfig.getParameter(parameter);
+ assertNull("setNullEffective",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfigschemalocation1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.xhtml
new file mode 100644
index 0000000..c61cbad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigschemalocation1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigschemalocation1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigschematype1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigschematype1-expected.txt
new file mode 100644
index 0000000..8cb94b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigschematype1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigschematype1
+Status error
+Message Line 94: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigschematype1.js b/LayoutTests/dom/xhtml/level3/core/domconfigschematype1.js
new file mode 100644
index 0000000..3abb115
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigschematype1.js
@@ -0,0 +1,170 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigschematype1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "schema-type" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-type
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigschematype1() {
+ var success;
+ if(checkInitialization(builder, "domconfigschematype1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "sChEma-type";
+ var xmlSchemaType = "http://www.w3.org/2001/XMLSchema";
+ var dtdType = "http://www.w3.org/TR/REC-xml";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter(parameter,true);
+ assertFalse("canSetTrue",canSet);
+
+ try {
+ state = domConfig.getParameter(parameter);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ canSet = domConfig.canSetParameter(parameter,dtdType);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, dtdType);
+ state = domConfig.getParameter(parameter);
+ assertEquals("setDTDEffective",dtdType,state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, dtdType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR_dtd",success);
+ }
+
+ }
+ canSet = domConfig.canSetParameter(parameter,xmlSchemaType);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, xmlSchemaType);
+ state = domConfig.getParameter(parameter);
+ assertEquals("setSchemaEffective",xmlSchemaType,state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, xmlSchemaType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR_schema",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domconfigschematype1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigschematype1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigschematype1.xhtml
new file mode 100644
index 0000000..3b5e152
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigschematype1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigschematype1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt
new file mode 100644
index 0000000..9c8e8f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigsplitcdatasections1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.js b/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.js
new file mode 100644
index 0000000..42a64ab
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigsplitcdatasections1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "split-cdata-sections" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigsplitcdatasections1() {
+ var success;
+ if(checkInitialization(builder, "domconfigsplitcdatasections1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "sPlIt-cdata-sections";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+}
+
+
+
+
+function runTest() {
+ domconfigsplitcdatasections1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.xhtml
new file mode 100644
index 0000000..848680c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigsplitcdatasections1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigsplitcdatasections1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt
new file mode 100644
index 0000000..813f823
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter01
+Status error
+Message Line 109: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.js b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.js
new file mode 100644
index 0000000..0af3742
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter
+*/
+function domconfigurationcansetparameter01() {
+ var success;
+ if(checkInitialization(builder, "domconfigurationcansetparameter01") != null) return;
+ var doc;
+ var domConfig;
+ var canSet;
+ var newCommentNode;
+ var docElem;
+ var appendedChild;
+ var lastChild;
+ var commentValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newCommentNode = doc.createComment("This is a new Comment node");
+ docElem = doc.documentElement;
+
+ appendedChild = docElem.appendChild(newCommentNode);
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("comments",false);
+ assertTrue("domconfigurationcansetparameter01",canSet);
+doc.normalizeDocument();
+ lastChild = docElem.lastChild;
+
+ commentValue = lastChild.nodeValue;
+
+ assertEquals("domconfigurationsetparameter02_2","This is a new Comment node",commentValue);
+
+}
+
+
+
+
+function runTest() {
+ domconfigurationcansetparameter01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.xhtml
new file mode 100644
index 0000000..d5d5899
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domconfigurationcansetparameter01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt
new file mode 100644
index 0000000..cbc4827
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter02
+Status error
+Message Line 100: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.js b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.js
new file mode 100644
index 0000000..c047218
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter
+*/
+function domconfigurationcansetparameter02() {
+ var success;
+ if(checkInitialization(builder, "domconfigurationcansetparameter02") != null) return;
+ var doc;
+ var domConfig;
+ var canSet;
+ var paramVal;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("cdata-sections",false);
+ assertTrue("canSetFalse",canSet);
+paramVal = domConfig.getParameter("cdata-sections");
+ assertTrue("valueStillTrue",paramVal);
+canSet = domConfig.canSetParameter("cdata-sections",true);
+ assertTrue("canSetTrue",canSet);
+domConfig.setParameter("cdata-sections", false);
+ canSet = domConfig.canSetParameter("cdata-sections",true);
+ assertTrue("canSetTrueFromFalse",canSet);
+paramVal = domConfig.getParameter("cdata-sections");
+ assertFalse("valueStillFalse",paramVal);
+canSet = domConfig.canSetParameter("cdata-sections",false);
+ assertTrue("canSetFalseFromFalse",canSet);
+
+}
+
+
+
+
+function runTest() {
+ domconfigurationcansetparameter02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.xhtml
new file mode 100644
index 0000000..a9cd0ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domconfigurationcansetparameter02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt
new file mode 100644
index 0000000..ca31e58
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter03
+Status error
+Message Line 109: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.js b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.js
new file mode 100644
index 0000000..9294a7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter
+*/
+function domconfigurationcansetparameter03() {
+ var success;
+ if(checkInitialization(builder, "domconfigurationcansetparameter03") != null) return;
+ var doc;
+ var domConfig;
+ var docType;
+ var entitiesMap;
+ var nullNS = null;
+
+ var entity;
+ var entityName;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("entities",false);
+ assertTrue("canSetFalse",canSet);
+doc.normalizeDocument();
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("epsilon");
+ assertNotNull("entityNotNull",entity);
+entityName = entity.nodeName;
+
+ assertEquals("entityName","epsilon",entityName);
+
+}
+
+
+
+
+function runTest() {
+ domconfigurationcansetparameter03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.xhtml
new file mode 100644
index 0000000..b85f7cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domconfigurationcansetparameter03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04-expected.txt
new file mode 100644
index 0000000..78593a5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter04
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.js b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.js
new file mode 100644
index 0000000..04d1849
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter
+*/
+function domconfigurationcansetparameter04() {
+ var success;
+ if(checkInitialization(builder, "domconfigurationcansetparameter04") != null) return;
+ var doc;
+ var domConfig;
+ var acronymList;
+ var acronymElem;
+ var nodeType;
+ var first;
+ var canSet;
+ var paramVal;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("entities",false);
+ assertTrue("canSetFalse",canSet);
+paramVal = domConfig.getParameter("entities");
+ assertTrue("stillTrue",paramVal);
+doc.normalizeDocument();
+ acronymList = doc.getElementsByTagName("acronym");
+ acronymElem = acronymList.item(1);
+ first = acronymElem.firstChild;
+
+ nodeType = first.nodeType;
+
+ assertEquals("entityRefPreserved",5,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ domconfigurationcansetparameter04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.xhtml
new file mode 100644
index 0000000..a7a73d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domconfigurationcansetparameter04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt
new file mode 100644
index 0000000..151ae73
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter06
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.js b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.js
new file mode 100644
index 0000000..6b77054
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check that canSetParameter('element-content-whitespace', true) returns true
+and that canSetParameter('element-content-whitespace) does not change value of
+parameter.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter
+*/
+function domconfigurationcansetparameter06() {
+ var success;
+ if(checkInitialization(builder, "domconfigurationcansetparameter06") != null) return;
+ var doc;
+ var domConfig;
+ var itemList;
+ var elementBody;
+ var textNode;
+ var canSet;
+ var canSetFalse;
+ var paramVal;
+ var hasWhitespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSetFalse = domConfig.canSetParameter("element-content-whitespace",false);
+ paramVal = domConfig.getParameter("element-content-whitespace");
+ assertTrue("stillTrue",paramVal);
+
+ if(
+ canSetFalse
+ ) {
+ domConfig.setParameter("element-content-whitespace", false);
+
+ }
+ canSet = domConfig.canSetParameter("element-content-whitespace",true);
+ assertTrue("canSetTrue",canSet);
+
+ if(
+ canSetFalse
+ ) {
+ paramVal = domConfig.getParameter("element-content-whitespace");
+ assertFalse("stillFalse",paramVal);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domconfigurationcansetparameter06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.xhtml
new file mode 100644
index 0000000..dad408b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationcansetparameter06.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='domconfigurationcansetparameter06.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt
new file mode 100644
index 0000000..226c853
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationgetparameter01
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.js b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.js
new file mode 100644
index 0000000..6a2ab1a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationgetparameter01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+*/
+function domconfigurationgetparameter01() {
+ var success;
+ if(checkInitialization(builder, "domconfigurationgetparameter01") != null) return;
+ var doc;
+ var domConfig;
+ var param;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ param = domConfig.getParameter("comments");
+ assertTrue("domconfigurationgetparameter01_1",param);
+param = domConfig.getParameter("cdata-sections");
+ assertTrue("domconfigurationgetparameter01_2",param);
+param = domConfig.getParameter("entities");
+ assertTrue("domconfigurationgetparameter01_3",param);
+param = domConfig.getParameter("namespace-declarations");
+ assertTrue("domconfigurationgetparameter01_4",param);
+param = domConfig.getParameter("infoset");
+ assertFalse("domconfigurationgetparameter01_5",param);
+
+}
+
+
+
+
+function runTest() {
+ domconfigurationgetparameter01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.xhtml
new file mode 100644
index 0000000..f5f850a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domconfigurationgetparameter01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02-expected.txt
new file mode 100644
index 0000000..5e2a9fa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationgetparameter02
+Status failure
+Message domconfigurationgetparameter02_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.js b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.js
new file mode 100644
index 0000000..a0b9748
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationgetparameter02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+*/
+function domconfigurationgetparameter02() {
+ var success;
+ if(checkInitialization(builder, "domconfigurationgetparameter02") != null) return;
+ var doc;
+ var domConfig;
+ var param;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+
+ {
+ success = false;
+ try {
+ param = domConfig.getParameter("not-found-param");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("domconfigurationgetparameter02_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ domconfigurationgetparameter02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.xhtml
new file mode 100644
index 0000000..a4c3247
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigurationgetparameter02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domconfigurationgetparameter02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1-expected.txt
new file mode 100644
index 0000000..c8b7cfd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigvalidate1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.js b/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.js
new file mode 100644
index 0000000..3369d88
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigvalidate1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "validate" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigvalidate1() {
+ var success;
+ if(checkInitialization(builder, "domconfigvalidate1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "vAlIdate";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertFalse("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertFalse("setTrueNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, false);
+
+}
+
+
+
+
+function runTest() {
+ domconfigvalidate1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.xhtml
new file mode 100644
index 0000000..ee43962
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigvalidate1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigvalidate1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt
new file mode 100644
index 0000000..3a5be20
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigvalidateifschema1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.js b/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.js
new file mode 100644
index 0000000..d2a3c85
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigvalidateifschema1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "validate-if-schema" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-validate-if-schema
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigvalidateifschema1() {
+ var success;
+ if(checkInitialization(builder, "domconfigvalidateifschema1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "vAlIdate-if-schema";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertFalse("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,false);
+ assertTrue("canSetFalse",canSet);
+canSet = domConfig.canSetParameter(parameter,true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, true);
+ state = domConfig.getParameter(parameter);
+ assertTrue("setTrueEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertFalse("setTrueNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, false);
+
+}
+
+
+
+
+function runTest() {
+ domconfigvalidateifschema1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.xhtml
new file mode 100644
index 0000000..729121b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigvalidateifschema1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigvalidateifschema1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1-expected.txt b/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1-expected.txt
new file mode 100644
index 0000000..2dc4bcb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigwellformed1
+Status error
+Message Line 92: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.js b/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.js
new file mode 100644
index 0000000..620f7f1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigwellformed1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+* Checks behavior of "well-formed" configuration parameter.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter
+*/
+function domconfigwellformed1() {
+ var success;
+ if(checkInitialization(builder, "domconfigwellformed1") != null) return;
+ var domImpl;
+ var doc;
+ var domConfig;
+ var nullDocType = null;
+
+ var canSet;
+ var state;
+ var parameter = "wElL-formed";
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ domConfig = doc.domConfig;
+
+ state = domConfig.getParameter(parameter);
+ assertTrue("defaultFalse",state);
+canSet = domConfig.canSetParameter(parameter,true);
+ assertTrue("canSetTrue",canSet);
+canSet = domConfig.canSetParameter(parameter,false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter(parameter, false);
+ state = domConfig.getParameter(parameter);
+ assertFalse("setFalseEffective",state);
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ domConfig.setParameter(parameter, false);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+state = domConfig.getParameter(parameter);
+ assertTrue("setFalseNotEffective",state);
+
+ }
+ domConfig.setParameter(parameter, true);
+
+}
+
+
+
+
+function runTest() {
+ domconfigwellformed1();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.xhtml b/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.xhtml
new file mode 100644
index 0000000..266bc7a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domconfigwellformed1.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domconfigwellformed1.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt
new file mode 100644
index 0000000..02c3486
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature01
+Status error
+Message Line 98: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.js b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.js
new file mode 100644
index 0000000..4859baa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature
+*/
+function domimplementationgetfeature01() {
+ var success;
+ if(checkInitialization(builder, "domimplementationgetfeature01") != null) return;
+ var doc;
+ var domImpl;
+ var domImplReturned;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+domImplReturned = domImpl.getFeature("Core","2.0");
+ assertNotNull("domimplementationgetfeature01",domImplReturned);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationgetfeature01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.xhtml
new file mode 100644
index 0000000..1d39c67
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domimplementationgetfeature01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt
new file mode 100644
index 0000000..2c2571e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature02
+Status error
+Message Line 99: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.js b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.js
new file mode 100644
index 0000000..68c391b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.js
@@ -0,0 +1,109 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature
+*/
+function domimplementationgetfeature02() {
+ var success;
+ if(checkInitialization(builder, "domimplementationgetfeature02") != null) return;
+ var doc;
+ var domImpl;
+ var domImplReturned;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+domImplReturned = domImpl.getFeature("Core","");
+ assertNotNull("domimplementationgetfeature02",domImplReturned);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationgetfeature02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.xhtml
new file mode 100644
index 0000000..2c29886
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domimplementationgetfeature02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt
new file mode 100644
index 0000000..71356df
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature03
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.js b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.js
new file mode 100644
index 0000000..1484f24
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature
+*/
+function domimplementationgetfeature03() {
+ var success;
+ if(checkInitialization(builder, "domimplementationgetfeature03") != null) return;
+ var doc;
+ var domImpl;
+ var domImplReturned;
+ var nodeName;
+ var nullVersion = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+domImplReturned = domImpl.getFeature("Core",nullVersion);
+ assertNotNull("domimplementationgetfeature03",domImplReturned);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationgetfeature03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.xhtml
new file mode 100644
index 0000000..d707a04
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domimplementationgetfeature03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt
new file mode 100644
index 0000000..e52fca2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature05
+Status error
+Message Line 100: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.js b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.js
new file mode 100644
index 0000000..4bc52e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature
+*/
+function domimplementationgetfeature05() {
+ var success;
+ if(checkInitialization(builder, "domimplementationgetfeature05") != null) return;
+ var doc;
+ var domImpl;
+ var domImplReturned;
+ var nullVersion = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+domImplReturned = domImpl.getFeature("",nullVersion);
+ assertNull("domimplementationgetFeature05",domImplReturned);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationgetfeature05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.xhtml
new file mode 100644
index 0000000..c718319
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domimplementationgetfeature05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt
new file mode 100644
index 0000000..a6fd96e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature06
+Status error
+Message Line 98: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.js b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.js
new file mode 100644
index 0000000..c7a5be8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementation3-getFeature
+*/
+function domimplementationgetfeature06() {
+ var success;
+ if(checkInitialization(builder, "domimplementationgetfeature06") != null) return;
+ var doc;
+ var domImpl;
+ var domImplReturned;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+domImplReturned = domImpl.getFeature("1-1","*");
+ assertNull("domimplementationgetfeature06",domImplReturned);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationgetfeature06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.xhtml
new file mode 100644
index 0000000..8df191f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationgetfeature06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domimplementationgetfeature06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01-expected.txt
new file mode 100644
index 0000000..4722774
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry01
+Status error
+Message Line 83: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.js
new file mode 100644
index 0000000..dc74d6f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.js
@@ -0,0 +1,93 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.newInstance() (Java) or DOMImplementationRegistry global variable
+(ECMAScript) should not be null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+*/
+function domimplementationregistry01() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry01") != null) return;
+ var domImplRegistry;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.xhtml
new file mode 100644
index 0000000..a1d2d2f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry01.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry01.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02-expected.txt
new file mode 100644
index 0000000..571e227
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry02
+Status error
+Message Line 88: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.js
new file mode 100644
index 0000000..6e932d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.js
@@ -0,0 +1,102 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("cOrE") should return a DOMImplementation
+where hasFeature("Core", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry02() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry02") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("cOrE");
+ assertNotNull("domImplNotNull",domImpl);
+hasFeature = domImpl.hasFeature("Core",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.xhtml
new file mode 100644
index 0000000..dc6ae70
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry02.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry02.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03-expected.txt
new file mode 100644
index 0000000..739291c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry03
+Status error
+Message Line 86: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.js
new file mode 100644
index 0000000..326e309
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.js
@@ -0,0 +1,100 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("cOrE 3.0") should return a DOMImplementation
+where hasFeature("Core", "3.0") returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry03() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry03") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("cOrE 3.0");
+ assertNotNull("domImplNotNull",domImpl);
+hasFeature = domImpl.hasFeature("Core","3.0");
+assertTrue("hasCore",hasFeature);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.xhtml
new file mode 100644
index 0000000..995519c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry03.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry03.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04-expected.txt
new file mode 100644
index 0000000..52ba6dd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry04
+Status error
+Message Line 88: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.js
new file mode 100644
index 0000000..360bef2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.js
@@ -0,0 +1,102 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("+cOrE") should return a DOMImplementation
+where hasFeature("+Core", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry04() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry04") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("+cOrE");
+ assertNotNull("domImplNotNull",domImpl);
+hasFeature = domImpl.hasFeature("+Core",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.xhtml
new file mode 100644
index 0000000..153dec2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry04.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry04.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05-expected.txt
new file mode 100644
index 0000000..aee8fb2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry05
+Status error
+Message Line 86: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.js
new file mode 100644
index 0000000..23afe80
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.js
@@ -0,0 +1,100 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("+cOrE 3.0") should return a DOMImplementation
+where hasFeature("+Core", "3.0") returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry05() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry05") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("+cOrE 3.0");
+ assertNotNull("domImplNotNull",domImpl);
+hasFeature = domImpl.hasFeature("+Core","3.0");
+assertTrue("hasCore",hasFeature);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.xhtml
new file mode 100644
index 0000000..55163ba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry05.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry05.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06-expected.txt
new file mode 100644
index 0000000..cb32848
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry06
+Status error
+Message Line 89: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.js
new file mode 100644
index 0000000..7341b06
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.js
@@ -0,0 +1,105 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry06() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry06") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("xMl 3.0 cOrE");
+ assertNotNull("domImplNotNull",domImpl);
+hasFeature = domImpl.hasFeature("XML","3.0");
+assertTrue("hasXML3",hasFeature);
+hasFeature = domImpl.hasFeature("Core",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.xhtml
new file mode 100644
index 0000000..0ef78b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry06.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry06.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07-expected.txt
new file mode 100644
index 0000000..de6f056
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry07
+Status error
+Message Line 88: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.js
new file mode 100644
index 0000000..9ba5234
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.js
@@ -0,0 +1,100 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("http://www.example.com/bogus-feature 99.0") should return
+null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry07() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry07") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("http://www.example.com/bogus-feature 99.0");
+ assertNull("domImplNull",domImpl);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.xhtml
new file mode 100644
index 0000000..3fb4921
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry07.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry07.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08-expected.txt
new file mode 100644
index 0000000..8cf0f20
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry08
+Status error
+Message Line 89: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.js
new file mode 100644
index 0000000..6c69c0e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("SVG") should return null or a DOMImplementation
+where hasFeature("SVG", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry08() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry08") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var baseImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("SVG");
+
+ if(
+
+ (domImpl == null)
+
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("SVG",null);
+assertFalse("baseImplSupportsSVG",hasFeature);
+
+ }
+
+ else {
+ hasFeature = domImpl.hasFeature("SVG",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.xhtml
new file mode 100644
index 0000000..8ac8016
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry08.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry08.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09-expected.txt
new file mode 100644
index 0000000..d7c5f76
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry09
+Status error
+Message Line 89: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.js
new file mode 100644
index 0000000..53a9069
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("HTML") should return null or a DOMImplementation
+where hasFeature("HTML", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry09() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry09") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var baseImpl;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("HTML");
+
+ if(
+
+ (domImpl == null)
+
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("HTML",nullVersion);
+assertFalse("baseImplSupportsHTML",hasFeature);
+
+ }
+
+ else {
+ hasFeature = domImpl.hasFeature("HTML",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.xhtml
new file mode 100644
index 0000000..596cedb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry09.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry09.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10-expected.txt
new file mode 100644
index 0000000..0d16be2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry10
+Status error
+Message Line 89: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.js
new file mode 100644
index 0000000..1246c1b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("LS") should return null or a DOMImplementation
+where hasFeature("LS", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry10() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry10") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var baseImpl;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("LS");
+
+ if(
+
+ (domImpl == null)
+
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("LS",nullVersion);
+assertFalse("baseImplSupportsLS",hasFeature);
+
+ }
+
+ else {
+ hasFeature = domImpl.hasFeature("LS",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.xhtml
new file mode 100644
index 0000000..ab5b349
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry10.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry10.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11-expected.txt
new file mode 100644
index 0000000..3b36241
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry11
+Status error
+Message Line 89: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.js
new file mode 100644
index 0000000..120520b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("XPath") should return null or a DOMImplementation
+where hasFeature("XPath", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry11() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry11") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var baseImpl;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("XPath");
+
+ if(
+
+ (domImpl == null)
+
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("XPath",nullVersion);
+assertFalse("baseImplSupportsLS",hasFeature);
+
+ }
+
+ else {
+ hasFeature = domImpl.hasFeature("XPath",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.xhtml
new file mode 100644
index 0000000..68e8392
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry11.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry11.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.js
new file mode 100644
index 0000000..1651127
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("cOrE 3.0 xMl 3.0 eVeNts 2.0 lS") should return null
+or a DOMImplementation that implements the specified features.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpl
+*/
+function domimplementationregistry12() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry12") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasCore;
+ var hasXML;
+ var hasEvents;
+ var hasLS;
+ var baseImpl;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("cOrE 3.0 xMl 3.0 eVeNts 2.0 lS");
+
+ if(
+
+ (domImpl == null)
+
+ ) {
+ baseImpl = getImplementation();
+hasCore = baseImpl.hasFeature("Core","3.0");
+hasXML = baseImpl.hasFeature("XML","3.0");
+hasEvents = baseImpl.hasFeature("Events","2.0");
+hasLS = baseImpl.hasFeature("LS",nullVersion);
+
+ {
+ assertFalse("baseImplFeatures",
+ (hasCore && hasXML && hasEvents && hasLS)
+);
+
+ }
+
+ else {
+ hasCore = domImpl.hasFeature("Core","3.0");
+assertTrue("hasCore",hasCore);
+hasXML = domImpl.hasFeature("XML","3.0");
+assertTrue("hasXML",hasXML);
+hasEvents = domImpl.hasFeature("Events","2.0");
+assertTrue("hasEvents",hasEvents);
+hasLS = domImpl.hasFeature("LS",nullVersion);
+assertTrue("hasLS",hasLS);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.xhtml-disabled
new file mode 100644
index 0000000..296a0f6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry12.xhtml-disabled
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry12.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13-expected.txt
new file mode 100644
index 0000000..f3b908e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry13
+Status error
+Message Line 93: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.js
new file mode 100644
index 0000000..dab8b7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("cOrE") should return a
+list of at least one DOMImplementation
+where hasFeature("Core", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementationList-item
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMImplementationList-length
+*/
+function domimplementationregistry13() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry13") != null) return;
+ var domImplRegistry;
+ var hasFeature;
+ var domImpl;
+ var domImplList;
+ var length;
+ var nullVersion = null;
+
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("cOrE");
+ length = domImplList.length;
+
+ domImpl = domImplList.item(length);
+ assertNull("item_Length_shouldBeNull",domImpl);
+ assertTrue("atLeastOne",
+
+ (length > 0)
+);
+for(var indexN10067 = 0;indexN10067 < domImplList.length; indexN10067++) {
+ domImpl = domImplList.item(indexN10067);
+ hasFeature = domImpl.hasFeature("Core",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.xhtml
new file mode 100644
index 0000000..209389d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry13.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry13.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14-expected.txt
new file mode 100644
index 0000000..4b9f278
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry14
+Status error
+Message Line 89: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.js
new file mode 100644
index 0000000..d2d7049
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("cOrE 3.0") should return
+a list of DOMImplementation
+where hasFeature("Core", "3.0") returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry14() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry14") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("cOrE 3.0");
+ length = domImplList.length;
+
+ assertTrue("atLeastOne",
+
+ (length > 0)
+);
+for(var indexN10052 = 0;indexN10052 < domImplList.length; indexN10052++) {
+ domImpl = domImplList.item(indexN10052);
+ hasFeature = domImpl.hasFeature("Core","3.0");
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.xhtml
new file mode 100644
index 0000000..5f9b9c9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry14.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry14.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15-expected.txt
new file mode 100644
index 0000000..41e19a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry15
+Status error
+Message Line 91: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.js
new file mode 100644
index 0000000..c11109d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("+cOrE") should return
+list of DOMImplementation
+where hasFeature("+Core", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry15() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry15") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("+cOrE");
+ length = domImplList.length;
+
+ assertTrue("atLeastOne",
+
+ (length > 0)
+);
+for(var indexN10057 = 0;indexN10057 < domImplList.length; indexN10057++) {
+ domImpl = domImplList.item(indexN10057);
+ hasFeature = domImpl.hasFeature("+Core",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.xhtml
new file mode 100644
index 0000000..6aa5f7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry15.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry15.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16-expected.txt
new file mode 100644
index 0000000..fa4d136
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry16
+Status error
+Message Line 89: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.js
new file mode 100644
index 0000000..cf152cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("+cOrE 3.0") should return
+a list of DOMImplementation
+where hasFeature("+Core", "3.0") returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry16() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry16") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("+cOrE 3.0");
+ length = domImplList.length;
+
+ assertTrue("atLeastOne",
+
+ (length > 0)
+);
+for(var indexN10052 = 0;indexN10052 < domImplList.length; indexN10052++) {
+ domImpl = domImplList.item(indexN10052);
+ hasFeature = domImpl.hasFeature("+Core","3.0");
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.xhtml
new file mode 100644
index 0000000..109a480
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry16.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry16.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17-expected.txt
new file mode 100644
index 0000000..e64966c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry17
+Status error
+Message Line 91: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.js
new file mode 100644
index 0000000..2bc866b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry17() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry17") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("xMl 3.0 cOrE");
+ length = domImplList.length;
+
+ assertTrue("atLeastOne",
+
+ (length > 0)
+);
+for(var indexN1005A = 0;indexN1005A < domImplList.length; indexN1005A++) {
+ domImpl = domImplList.item(indexN1005A);
+ hasFeature = domImpl.hasFeature("XML","3.0");
+assertTrue("hasXML3",hasFeature);
+hasFeature = domImpl.hasFeature("Core",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.xhtml
new file mode 100644
index 0000000..6143302
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry17.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry17.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18-expected.txt
new file mode 100644
index 0000000..56ab44f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry18
+Status error
+Message Line 87: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.js
new file mode 100644
index 0000000..bed5447
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.js
@@ -0,0 +1,101 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("http://www.example.com/bogus-feature 99.0")
+should return a zero-length list.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry18() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry18") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("http://www.example.com/bogus-feature 99.0");
+ length = domImplList.length;
+
+ assertEquals("emptyList",0,length);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.xhtml
new file mode 100644
index 0000000..8c8187b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry18.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry18.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19-expected.txt
new file mode 100644
index 0000000..c72dac4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry19
+Status error
+Message Line 92: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.js
new file mode 100644
index 0000000..a90edd9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("SVG") should return
+zero-length list or a list of DOMImplementation
+where hasFeature("SVG", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry19() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry19") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var baseImpl;
+ var hasFeature;
+ var nullVersion = null;
+
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("SVG");
+ length = domImplList.length;
+
+
+ if(
+ (0 == length)
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("SVG",null);
+assertFalse("baseImplSupportsSVG",hasFeature);
+
+ }
+
+ else {
+ for(var indexN10067 = 0;indexN10067 < domImplList.length; indexN10067++) {
+ domImpl = domImplList.item(indexN10067);
+ hasFeature = domImpl.hasFeature("SVG",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.xhtml
new file mode 100644
index 0000000..c15bfa8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry19.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry19.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20-expected.txt
new file mode 100644
index 0000000..79428ba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry20
+Status error
+Message Line 92: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.js
new file mode 100644
index 0000000..e9f7056
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("HTML") should return
+an empty list or a list of DOMImplementation
+where hasFeature("HTML", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry20() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry20") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var baseImpl;
+ var nullVersion = null;
+
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("HTML");
+ length = domImplList.length;
+
+
+ if(
+ (0 == length)
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("HTML",nullVersion);
+assertFalse("baseImplSupportsHTML",hasFeature);
+
+ }
+
+ else {
+ for(var indexN10068 = 0;indexN10068 < domImplList.length; indexN10068++) {
+ domImpl = domImplList.item(indexN10068);
+ hasFeature = domImpl.hasFeature("HTML",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.xhtml
new file mode 100644
index 0000000..d6627c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry20.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry20.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21-expected.txt
new file mode 100644
index 0000000..b6690d1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry21
+Status error
+Message Line 92: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.js
new file mode 100644
index 0000000..d70b670
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("LS") should return
+a empty list or a list of DOMImplementation
+where hasFeature("LS", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry21() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry21") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var baseImpl;
+ var nullVersion = null;
+
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("LS");
+ length = domImplList.length;
+
+
+ if(
+ (0 == length)
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("LS",nullVersion);
+assertFalse("baseImplSupportsLS",hasFeature);
+
+ }
+
+ else {
+ for(var indexN10068 = 0;indexN10068 < domImplList.length; indexN10068++) {
+ domImpl = domImplList.item(indexN10068);
+ hasFeature = domImpl.hasFeature("LS",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.xhtml
new file mode 100644
index 0000000..3484e60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry21.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry21.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22-expected.txt
new file mode 100644
index 0000000..d7f0f16
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry22
+Status error
+Message Line 92: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.js
new file mode 100644
index 0000000..53abc9e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementationList("XPath") should return
+an empty list or a list of DOMImplementation
+where hasFeature("XPath", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry22() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry22") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasFeature;
+ var baseImpl;
+ var nullVersion = null;
+
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("XPath");
+ length = domImplList.length;
+
+
+ if(
+ (0 == length)
+ ) {
+ baseImpl = getImplementation();
+hasFeature = hasFeature("XPath",nullVersion);
+assertFalse("baseImplSupportsLS",hasFeature);
+
+ }
+
+ else {
+ for(var indexN10068 = 0;indexN10068 < domImplList.length; indexN10068++) {
+ domImpl = domImplList.item(indexN10068);
+ hasFeature = domImpl.hasFeature("XPath",nullVersion);
+assertTrue("hasCore",hasFeature);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.xhtml
new file mode 100644
index 0000000..33d8e92
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry22.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry22.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.js
new file mode 100644
index 0000000..a9e78ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+*/
+function domimplementationregistry23() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry23") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ var hasCore;
+ var hasXML;
+ var hasEvents;
+ var hasLS;
+ var baseImpl;
+ var nullVersion = null;
+
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("cOrE 3.0 xMl 3.0 eVeNts 2.0 lS");
+ length = domImplList.length;
+
+
+ if(
+ (0 == length)
+ ) {
+ baseImpl = getImplementation();
+hasCore = baseImpl.hasFeature("Core","3.0");
+hasXML = baseImpl.hasFeature("XML","3.0");
+hasEvents = baseImpl.hasFeature("Events","2.0");
+hasLS = baseImpl.hasFeature("LS",nullVersion);
+
+ {
+ assertFalse("baseImplFeatures",
+ (hasCore && hasXML && hasEvents && hasLS)
+);
+
+ }
+
+ else {
+ for(var indexN10096 = 0;indexN10096 < domImplList.length; indexN10096++) {
+ domImpl = domImplList.item(indexN10096);
+ hasCore = domImpl.hasFeature("Core","3.0");
+assertTrue("hasCore",hasCore);
+hasXML = domImpl.hasFeature("XML","3.0");
+assertTrue("hasXML",hasXML);
+hasEvents = domImpl.hasFeature("Events","2.0");
+assertTrue("hasEvents",hasEvents);
+hasLS = domImpl.hasFeature("LS",nullVersion);
+assertTrue("hasLS",hasLS);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.xhtml-disabled
new file mode 100644
index 0000000..2a9b6fb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry23.xhtml-disabled
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry23.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24-expected.txt
new file mode 100644
index 0000000..c1e09c9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry24
+Status error
+Message Line 85: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.js
new file mode 100644
index 0000000..fb706a7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.js
@@ -0,0 +1,97 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementationRegistry.getDOMImplementation("") should return an implementation.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+* @see http://lists.w3.org/Archives/Public/www-dom/2004JanMar/0111.html
+*/
+function domimplementationregistry24() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry24") != null) return;
+ var domImplRegistry;
+ var domImpl;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImpl = domImplRegistry.getDOMImplementation("");
+ assertNotNull("domImplNotNull",domImpl);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.xhtml
new file mode 100644
index 0000000..35e18f8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry24.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry24.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25-expected.txt b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25-expected.txt
new file mode 100644
index 0000000..a19caaa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry25
+Status error
+Message Line 87: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.js b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.js
new file mode 100644
index 0000000..e9913dd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.js
@@ -0,0 +1,104 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls
+* @see http://lists.w3.org/Archives/Public/www-dom/2004JanMar/0111.html
+*/
+function domimplementationregistry25() {
+ var success;
+ if(checkInitialization(builder, "domimplementationregistry25") != null) return;
+ var domImplRegistry;
+ var domImplList;
+ var length;
+ domImplRegistry = DOMImplementationRegistry;
+ assertNotNull("domImplRegistryNotNull",domImplRegistry);
+domImplList = domImplRegistry.getDOMImplementationList("");
+ length = domImplList.length;
+
+ assertTrue("atLeastOne",
+
+ (length > 0)
+);
+
+}
+
+
+
+
+function runTest() {
+ domimplementationregistry25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.xhtml b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.xhtml
new file mode 100644
index 0000000..a663e25
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domimplementationregistry25.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='domimplementationregistry25.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01-expected.txt
new file mode 100644
index 0000000..5548273
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistcontains01
+Status error
+Message Line 100: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.js b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.js
new file mode 100644
index 0000000..49c9726
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistcontains01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of DOMStringList.contains by searching DOMConfig parameter
+names for "comments" and "".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-contains
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames
+*/
+function domstringlistcontains01() {
+ var success;
+ if(checkInitialization(builder, "domstringlistcontains01") != null) return;
+ var doc;
+ var paramList;
+ var domConfig;
+ var contains;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ paramList = domConfig.parameterNames;
+
+ contains = paramList.contains("comments");
+ assertTrue("paramsContainComments",contains);
+contains = paramList.contains("");
+ assertFalse("paramsDoesntContainEmpty",contains);
+
+}
+
+
+
+
+function runTest() {
+ domstringlistcontains01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.xhtml b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.xhtml
new file mode 100644
index 0000000..14517ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domstringlistcontains01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02-expected.txt b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02-expected.txt
new file mode 100644
index 0000000..c5b2011
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistcontains02
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.js b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.js
new file mode 100644
index 0000000..b5edcbe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistcontains02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-contains
+*/
+function domstringlistcontains02() {
+ var success;
+ if(checkInitialization(builder, "domstringlistcontains02") != null) return;
+ var doc;
+ var paramList;
+ var domConfig;
+ var contain;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ paramList = domConfig.parameterNames;
+
+ contain = paramList.contains("comments");
+ assertTrue("domstringlistcontains02_1",contain);
+contain = paramList.contains("cdata-sections");
+ assertTrue("domstringlistcontains02_2",contain);
+contain = paramList.contains("entities");
+ assertTrue("domstringlistcontains02_3",contain);
+contain = paramList.contains("error-handler");
+ assertTrue("domstringlistcontains02_4",contain);
+contain = paramList.contains("infoset");
+ assertTrue("domstringlistcontains02_5",contain);
+contain = paramList.contains("namespace-declarations");
+ assertTrue("domstringlistcontains02_6",contain);
+contain = paramList.contains("element-content-whitespace");
+ assertTrue("domstringlistcontains02_7",contain);
+contain = paramList.contains("test");
+ assertFalse("domstringlistcontains02_8",contain);
+
+}
+
+
+
+
+function runTest() {
+ domstringlistcontains02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.xhtml b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.xhtml
new file mode 100644
index 0000000..13eace3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistcontains02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domstringlistcontains02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt
new file mode 100644
index 0000000..27bdbf5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistgetlength01
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.js b/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.js
new file mode 100644
index 0000000..4f92ffc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistgetlength01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-length
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames
+*/
+function domstringlistgetlength01() {
+ var success;
+ if(checkInitialization(builder, "domstringlistgetlength01") != null) return;
+ var doc;
+ var paramList;
+ var domConfig;
+ var listSize;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ paramList = domConfig.parameterNames;
+
+ assertNotNull("domstringlistgetlength01_notNull",paramList);
+listSize = paramList.length;
+
+ assert("domstringlistgetlength01_notZero",0 != listSize);
+
+}
+
+
+
+
+function runTest() {
+ domstringlistgetlength01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.xhtml b/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.xhtml
new file mode 100644
index 0000000..44d3e7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistgetlength01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domstringlistgetlength01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domstringlistitem01-expected.txt b/LayoutTests/dom/xhtml/level3/core/domstringlistitem01-expected.txt
new file mode 100644
index 0000000..725ccfe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistitem01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistitem01
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistitem01.js b/LayoutTests/dom/xhtml/level3/core/domstringlistitem01.js
new file mode 100644
index 0000000..32fc2a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistitem01.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistitem01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-item
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-parameterNames
+*/
+function domstringlistitem01() {
+ var success;
+ if(checkInitialization(builder, "domstringlistitem01") != null) return;
+ var doc;
+ var paramList;
+ var domConfig;
+ var contains;
+ var length;
+ var index;
+ var parameter;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ paramList = domConfig.parameterNames;
+
+ length = paramList.length;
+
+ parameter = paramList.item(0);
+ assertNotNull("item0NotNull",parameter);
+parameter = paramList.item(length);
+ assertNull("itemLengthNull",parameter);
+ length -= 1;
+parameter = paramList.item(length);
+ assertNotNull("itemLengthMinus1NotNull",parameter);
+
+}
+
+
+
+
+function runTest() {
+ domstringlistitem01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistitem01.xhtml b/LayoutTests/dom/xhtml/level3/core/domstringlistitem01.xhtml
new file mode 100644
index 0000000..5f15b00
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistitem01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domstringlistitem01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/domstringlistitem02-expected.txt b/LayoutTests/dom/xhtml/level3/core/domstringlistitem02-expected.txt
new file mode 100644
index 0000000..fcc97e1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistitem02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistitem02
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistitem02.js b/LayoutTests/dom/xhtml/level3/core/domstringlistitem02.js
new file mode 100644
index 0000000..732914f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistitem02.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistitem02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMStringList-item
+*/
+function domstringlistitem02() {
+ var success;
+ if(checkInitialization(builder, "domstringlistitem02") != null) return;
+ var doc;
+ var paramList;
+ var domConfig;
+ var listSize;
+ var retStr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ paramList = domConfig.parameterNames;
+
+ retStr = paramList.item(0);
+ assertNotNull("domstringlistitem02_notNull",retStr);
+retStr = paramList.item(100);
+ assertNull("domstringlistitem02_null",retStr);
+
+}
+
+
+
+
+function runTest() {
+ domstringlistitem02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/domstringlistitem02.xhtml b/LayoutTests/dom/xhtml/level3/core/domstringlistitem02.xhtml
new file mode 100644
index 0000000..5b5850f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/domstringlistitem02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="domstringlistitem02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt
new file mode 100644
index 0000000..4506a7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace01
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.js b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.js
new file mode 100644
index 0000000..73df7c8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.js
@@ -0,0 +1,150 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with element-content-whitespace set to true, check that
+whitespace in element content is preserved.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace
+*/
+function elementcontentwhitespace01() {
+ var success;
+ if(checkInitialization(builder, "elementcontentwhitespace01") != null) return;
+ var doc;
+ var domConfig;
+ var canSet;
+ errorMonitor = new DOMErrorMonitor();
+
+ var bodyList;
+ var body;
+ var child;
+ var childName;
+ var childType;
+ var text;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("element-content-whitespace", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ childType = child.nodeType;
+
+
+ if(
+ (1 == childType)
+ ) {
+ text = doc.createTextNode(" ");
+ child = body.insertBefore(text,child);
+
+ }
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ assertNotNull("firstChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChild","#text",childName);
+ child = child.nextSibling;
+
+ assertNotNull("secondChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("secondChild","p",childName);
+
+}
+
+
+
+
+function runTest() {
+ elementcontentwhitespace01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.xhtml b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.xhtml
new file mode 100644
index 0000000..8c7152e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='elementcontentwhitespace01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt
new file mode 100644
index 0000000..ffa2f8f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace02
+Status error
+Message Line 109: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.js b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.js
new file mode 100644
index 0000000..277f871
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with element-content-whitespace set to false and validation set to true, check that
+whitespace in element content is eliminated.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace
+*/
+function elementcontentwhitespace02() {
+ var success;
+ if(checkInitialization(builder, "elementcontentwhitespace02") != null) return;
+ var doc;
+ var bodyList;
+ var body;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("element-content-whitespace",false);
+ canSetValidate = domConfig.canSetParameter("validate",true);
+
+ if(
+
+ (canSetValidate && canSet)
+
+ ) {
+ domConfig.setParameter("element-content-whitespace", false);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ assertNotNull("firstChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChild","p",childName);
+ child = child.nextSibling;
+
+ assertNull("secondChild",child);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementcontentwhitespace02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.xhtml b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.xhtml
new file mode 100644
index 0000000..c43ba08
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='elementcontentwhitespace02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt
new file mode 100644
index 0000000..a561d76
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace03
+Status error
+Message Line 122: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.js b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.js
new file mode 100644
index 0000000..7238005
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.js
@@ -0,0 +1,155 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-element-content-whitespace
+*/
+function elementcontentwhitespace03() {
+ var success;
+ if(checkInitialization(builder, "elementcontentwhitespace03") != null) return;
+ var doc;
+ var bodyList;
+ var body;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var text;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+
+ if(
+ (getImplementationAttribute("ignoringElementContentWhitespace") == true)
+ ) {
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ text = doc.createTextNode(" ");
+ child = body.insertBefore(text,child);
+
+ }
+ canSet = domConfig.canSetParameter("element-content-whitespace",false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("element-content-whitespace", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ assertNotNull("firstChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChild","#text",childName);
+ child = child.nextSibling;
+
+ assertNotNull("secondChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("secondChild","p",childName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementcontentwhitespace03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.xhtml b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.xhtml
new file mode 100644
index 0000000..fbe9c47
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementcontentwhitespace03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='elementcontentwhitespace03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01-expected.txt
new file mode 100644
index 0000000..51e9d40
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo01
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.js b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.js
new file mode 100644
index 0000000..ef1a9a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call getSchemaTypeInfo on title attribute for the first "em" element from DTD validated document.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function elementgetschematypeinfo01() {
+ var success;
+ if(checkInitialization(builder, "elementgetschematypeinfo01") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var typeNS;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertNull("nameIsNull",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertNull("nsIsNull",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ elementgetschematypeinfo01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.xhtml b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.xhtml
new file mode 100644
index 0000000..4b941d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementgetschematypeinfo01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02-expected.txt
new file mode 100644
index 0000000..4ce6fa4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo02
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.js b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.js
new file mode 100644
index 0000000..fdcf498
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call getSchemaTypeInfo on title attribute for the first "em" element from schema-validated document.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function elementgetschematypeinfo02() {
+ var success;
+ if(checkInitialization(builder, "elementgetschematypeinfo02") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var typeNS;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsEmType","emType",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertEquals("nsIsXML","http://www.w3.org/1999/xhtml",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ elementgetschematypeinfo02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.xhtml b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.xhtml
new file mode 100644
index 0000000..e6984dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementgetschematypeinfo02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03-expected.txt
new file mode 100644
index 0000000..36932ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo03
+Status failure
+Message typeInfoNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.js b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.js
new file mode 100644
index 0000000..d028a10
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_nodtdstaff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Element.schemaTypeInfo should return null if not validating or schema validating.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function elementgetschematypeinfo03() {
+ var success;
+ if(checkInitialization(builder, "elementgetschematypeinfo03") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var typeName;
+ var typeNS;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_nodtdstaff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertNull("typeName",typeName);
+ typeNS = typeInfo.typeNamespace;
+
+ assertNull("typeNS",typeNS);
+
+}
+
+
+
+
+function runTest() {
+ elementgetschematypeinfo03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.xhtml b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.xhtml
new file mode 100644
index 0000000..ece5dd6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo03.xhtml
@@ -0,0 +1,10 @@
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>hc_nodtdstaff</title><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='elementgetschematypeinfo03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04-expected.txt
new file mode 100644
index 0000000..8bb2945
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo04
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.js b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.js
new file mode 100644
index 0000000..2e4dfeb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo
+*/
+function elementgetschematypeinfo04() {
+ var success;
+ if(checkInitialization(builder, "elementgetschematypeinfo04") != null) return;
+ var doc;
+ var codeElem;
+ var elemTypeInfo;
+ var typeName;
+ var typeNamespace;
+ var elemList;
+ var docElemNodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("code");
+ codeElem = elemList.item(1);
+ elemTypeInfo = codeElem.schemaTypeInfo;
+
+ typeName = elemTypeInfo.typeName;
+
+ typeNamespace = elemTypeInfo.typeNamespace;
+
+ assertEquals("elementgetschematypeinfo04_typeName","code",typeName);
+ assertEquals("elementgetschematypeinfo04_typeNamespace","http://www.w3.org/1999/xhtml",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ elementgetschematypeinfo04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.xhtml b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.xhtml
new file mode 100644
index 0000000..758ad97
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementgetschematypeinfo04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05-expected.txt
new file mode 100644
index 0000000..48a664a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo05
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.js b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.js
new file mode 100644
index 0000000..ebb5189
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo
+*/
+function elementgetschematypeinfo05() {
+ var success;
+ if(checkInitialization(builder, "elementgetschematypeinfo05") != null) return;
+ var doc;
+ var acElem;
+ var elemTypeInfo;
+ var typeName;
+ var typeNamespace;
+ var elemList;
+ var docElemNodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("span");
+ acElem = elemList.item(0);
+ elemTypeInfo = acElem.schemaTypeInfo;
+
+ typeName = elemTypeInfo.typeName;
+
+ typeNamespace = elemTypeInfo.typeNamespace;
+
+ assertEquals("typeNameString","string",typeName);
+ assertEquals("typeNsXSD","http://www.w3.org/2001/XMLSchema",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ elementgetschematypeinfo05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.xhtml b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.xhtml
new file mode 100644
index 0000000..518b8d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementgetschematypeinfo05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06-expected.txt
new file mode 100644
index 0000000..49f22eb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo06
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.js b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.js
new file mode 100644
index 0000000..229a68d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo
+*/
+function elementgetschematypeinfo06() {
+ var success;
+ if(checkInitialization(builder, "elementgetschematypeinfo06") != null) return;
+ var doc;
+ var strongElem;
+ var elemTypeInfo;
+ var typeName;
+ var typeNamespace;
+ var elemList;
+ var docElemNodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ strongElem = elemList.item(1);
+ elemTypeInfo = strongElem.schemaTypeInfo;
+
+ typeName = elemTypeInfo.typeName;
+
+ typeNamespace = elemTypeInfo.typeNamespace;
+
+ assertEquals("elementgetschematypeinfo06_typeName","strongType",typeName);
+ assertEquals("elementgetschematypeinfo06_typeNamespace","http://www.w3.org/1999/xhtml",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ elementgetschematypeinfo06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.xhtml b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.xhtml
new file mode 100644
index 0000000..59b0363
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementgetschematypeinfo06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07-expected.txt
new file mode 100644
index 0000000..14590c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo07
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.js b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.js
new file mode 100644
index 0000000..68c0923
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Element-schemaTypeInfo
+*/
+function elementgetschematypeinfo07() {
+ var success;
+ if(checkInitialization(builder, "elementgetschematypeinfo07") != null) return;
+ var doc;
+ var supElem;
+ var elemTypeInfo;
+ var typeName;
+ var typeNamespace;
+ var docElemNodeName;
+ var elemList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("sup");
+ supElem = elemList.item(0);
+ elemTypeInfo = supElem.schemaTypeInfo;
+
+ typeName = elemTypeInfo.typeName;
+
+ typeNamespace = elemTypeInfo.typeNamespace;
+
+ assertEquals("elementgetschematypeinfo07_typeName","sup",typeName);
+ assertEquals("elementgetschematypeinfo07_typeNamespace","http://www.w3.org/1999/xhtml",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ elementgetschematypeinfo07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.xhtml b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.xhtml
new file mode 100644
index 0000000..feeb699
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementgetschematypeinfo07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementgetschematypeinfo07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01-expected.txt
new file mode 100644
index 0000000..30f5e46
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute01
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.js
new file mode 100644
index 0000000..d520b4f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute01() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute01") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ acronymElem.setIdAttribute("class",true);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsIdTrue01",id);
+elem = doc.getElementById("No");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributeGetElementById01","acronym",elemName);
+ acronymElem.setIdAttribute("class",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributeIsIdFalse01",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.xhtml
new file mode 100644
index 0000000..8592e64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03-expected.txt
new file mode 100644
index 0000000..38444fb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute03
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.js
new file mode 100644
index 0000000..88d742b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute03() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute03") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ acronymElem.setAttribute("class","Maybe");
+ acronymElem.setIdAttribute("class",true);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsIdTrue03",id);
+elem = doc.getElementById("Maybe");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributeGetElementById03","acronym",elemName);
+ acronymElem.setIdAttribute("class",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributeIsIdFalse03",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.xhtml
new file mode 100644
index 0000000..c417e26
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04-expected.txt
new file mode 100644
index 0000000..66bffb9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute04
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.js
new file mode 100644
index 0000000..eb10fda
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute04() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute04") != null) return;
+ var doc;
+ var elemList;
+ var nameElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem = elemList.item(2);
+ nameElem.setAttribute("hasMiddleName","Antoine");
+ nameElem.setIdAttribute("hasMiddleName",true);
+ attributesMap = nameElem.attributes;
+
+ attr = attributesMap.getNamedItem("hasMiddleName");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsIdTrue03",id);
+elem = doc.getElementById("Antoine");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributeGetElementById03","strong",elemName);
+ nameElem.setIdAttribute("hasMiddleName",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributeIsIdFalse03",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.xhtml
new file mode 100644
index 0000000..e25e7ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05-expected.txt
new file mode 100644
index 0000000..9c9102d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute05
+Status failure
+Message throw_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.js
new file mode 100644
index 0000000..72ae20c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke setIdAttribute on the third strong element with a non-existing attribute name. Verify that
+ NOT_FOUND_ERR is raised.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute05() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute05") != null) return;
+ var doc;
+ var elemList;
+ var nameElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem = elemList.item(2);
+
+ {
+ success = false;
+ try {
+ nameElem.setIdAttribute("hasMiddleName",true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.xhtml
new file mode 100644
index 0000000..16af7dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06-expected.txt
new file mode 100644
index 0000000..09f3978
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute06
+Status failure
+Message throw_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.js
new file mode 100644
index 0000000..d017af0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke setIdAttribute on the third strong element with an attribute name of the acronym element.
+ Verify that NOT_FOUND_ERR is raised.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute06() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute06") != null) return;
+ var doc;
+ var elemList;
+ var nameElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem = elemList.item(2);
+
+ {
+ success = false;
+ try {
+ nameElem.setIdAttribute("class",true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.xhtml
new file mode 100644
index 0000000..8cd4e6e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07-expected.txt
new file mode 100644
index 0000000..70d5b65
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute07
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.js
new file mode 100644
index 0000000..5f8570e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute07() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute07") != null) return;
+ var doc;
+ var elemList;
+ var nameElem1;
+ var nameElem2;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem1 = elemList.item(2);
+ nameElem2 = elemList.item(3);
+ nameElem1.setAttribute("hasMiddleName","Antoine");
+ nameElem1.setIdAttribute("hasMiddleName",true);
+ nameElem2.setAttribute("hasMiddleName","Neeya");
+ nameElem2.setIdAttribute("hasMiddleName",true);
+ attributesMap = nameElem1.attributes;
+
+ attr = attributesMap.getNamedItem("hasMiddleName");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId1True07",id);
+attributesMap = nameElem2.attributes;
+
+ attr = attributesMap.getNamedItem("hasMiddleName");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId2True07",id);
+elem = doc.getElementById("Antoine");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattribute1GetElementById07","strong",elemName);
+ elem = doc.getElementById("Neeya");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattribute2GetElementById07","strong",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.xhtml
new file mode 100644
index 0000000..1f893b6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08-expected.txt
new file mode 100644
index 0000000..c95b568
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute08
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.js
new file mode 100644
index 0000000..eb921dd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute08() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute08") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem1;
+ var acronymElem2;
+ var acronymElem3;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem1 = elemList.item(1);
+ acronymElem2 = elemList.item(2);
+ acronymElem3 = elemList.item(4);
+ acronymElem1.setIdAttribute("class",true);
+ acronymElem2.setIdAttribute("class",true);
+ acronymElem3.setIdAttribute("class",true);
+ attributesMap = acronymElem1.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId1True08",id);
+attributesMap = acronymElem2.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId2True08",id);
+attributesMap = acronymElem3.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId3True08",id);
+elem = doc.getElementById("No");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributeGetElementById08","acronym",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.xhtml
new file mode 100644
index 0000000..74bf9b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09-expected.txt
new file mode 100644
index 0000000..a753f17
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute09
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.js
new file mode 100644
index 0000000..8ceba1f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute09() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute09") != null) return;
+ var doc;
+ var elemList1;
+ var elemList2;
+ var nameElem;
+ var salaryElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList1 = doc.getElementsByTagName("strong");
+ elemList2 = doc.getElementsByTagName("sup");
+ nameElem = elemList1.item(2);
+ salaryElem = elemList2.item(2);
+ nameElem.setAttribute("hasMiddleName","Antoine");
+ salaryElem.setAttribute("annual","2002");
+ nameElem.setIdAttribute("hasMiddleName",true);
+ salaryElem.setIdAttribute("annual",true);
+ attributesMap = nameElem.attributes;
+
+ attr = attributesMap.getNamedItem("hasMiddleName");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId1True09",id);
+attributesMap = salaryElem.attributes;
+
+ attr = attributesMap.getNamedItem("annual");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId2True09",id);
+elem = doc.getElementById("Antoine");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattribute1GetElementById09","strong",elemName);
+ elem = doc.getElementById("2002");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattribute2GetElementById09","sup",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.xhtml
new file mode 100644
index 0000000..56464d2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10-expected.txt
new file mode 100644
index 0000000..0c39197
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute10
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.js
new file mode 100644
index 0000000..114d9bb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke setIdAttribute on the third acronym element's class attribute consecutively with different
+ isId values. Verify by calling isId on the attribute.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute10() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute10") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ acronymElem.setIdAttribute("class",true);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId1True10",id);
+acronymElem.setIdAttribute("class",true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsId2True10",id);
+acronymElem.setIdAttribute("class",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributeIsIdFalse10",id);
+elem = doc.getElementById("No");
+ assertNull("elementsetidattributeGetElementByIdNull10",elem);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.xhtml
new file mode 100644
index 0000000..3e32b96
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11-expected.txt
new file mode 100644
index 0000000..e861847
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute11
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.js
new file mode 100644
index 0000000..2012b35
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttr
+*/
+function elementsetidattribute11() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattribute11") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(3);
+ acronymElem.setIdAttribute("class",true);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributeIsIdTrue01",id);
+elem = doc.getElementById("Yα");
+ assertNotNull("elemByIDNotNull",elem);
+elemName = elem.tagName;
+
+ assertEquals("elementsetidattributeGetElementById11","acronym",elemName);
+ acronymElem.setIdAttribute("class",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributeIsIdFalse11",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattribute11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.xhtml
new file mode 100644
index 0000000..3883730
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattribute11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattribute11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt
new file mode 100644
index 0000000..779d464
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode01
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.js
new file mode 100644
index 0000000..a2882d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode01() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode01") != null) return;
+ var doc;
+ var elemList;
+ var employeeElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ employeeElem = elemList.item(2);
+ attributesMap = employeeElem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:dmstc");
+ employeeElem.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsIdTrue01",id);
+elem = doc.getElementById("http://www.netzero.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenodeGetElementById01","p",elemName);
+ elem.setIdAttributeNode(attr,false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributenodeIsIdFalse01",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.xhtml
new file mode 100644
index 0000000..9b148d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt
new file mode 100644
index 0000000..c7849c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode02
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.js
new file mode 100644
index 0000000..8ab72cb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode02() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode02") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ acronymElem.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsIdTrue02",id);
+elem = doc.getElementById("No");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenodeGetElementById02","acronym",elemName);
+ elem.setIdAttributeNode(attr,false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributenodeIsIdFalse02",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.xhtml
new file mode 100644
index 0000000..f89a623
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt
new file mode 100644
index 0000000..410eaed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode03
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.js
new file mode 100644
index 0000000..e4fac18
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode03() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode03") != null) return;
+ var doc;
+ var elemList;
+ var nameElem;
+ var attributesMap;
+ var attr;
+ var newAttr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem = elemList.item(1);
+ nameElem.setAttribute("title","Karen");
+ attributesMap = nameElem.attributes;
+
+ attr = attributesMap.getNamedItem("title");
+ nameElem.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsIdTrue03",id);
+elem = doc.getElementById("Karen");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenodeGetElementById03","strong",elemName);
+ elem.setIdAttributeNode(attr,false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributenodeIsIdFalse03",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.xhtml
new file mode 100644
index 0000000..d016991
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt
new file mode 100644
index 0000000..c4408e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode04
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.js
new file mode 100644
index 0000000..15c7114
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode04() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode04") != null) return;
+ var doc;
+ var elemList;
+ var nameElem;
+ var attributesMap;
+ var attr;
+ var newAttr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem = elemList.item(1);
+ nameElem.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:middle","http://www.example.com/middle");
+ attributesMap = nameElem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:middle");
+ nameElem.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsIdTrue04",id);
+elem = doc.getElementById("http://www.example.com/middle");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenodeGetElementById04","strong",elemName);
+ elem.setIdAttributeNode(attr,false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributenodeIsIdFalse04",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.xhtml
new file mode 100644
index 0000000..af394b6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05-expected.txt
new file mode 100644
index 0000000..e2f32fa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode05
+Status failure
+Message throw_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.js
new file mode 100644
index 0000000..f5b65ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode05() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode05") != null) return;
+ var doc;
+ var elemList1;
+ var elemList2;
+ var nameElem;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList1 = doc.getElementsByTagName("strong");
+ elemList2 = doc.getElementsByTagName("acronym");
+ nameElem = elemList1.item(1);
+ acronymElem = elemList2.item(1);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+
+ {
+ success = false;
+ try {
+ nameElem.setIdAttributeNode(attr,true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.xhtml
new file mode 100644
index 0000000..d9b8e1a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06-expected.txt
new file mode 100644
index 0000000..2c4cd0b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode06
+Status failure
+Message throw_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.js
new file mode 100644
index 0000000..b41fd2c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode06() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode06") != null) return;
+ var doc;
+ var elemList1;
+ var elemList2;
+ var nameElem;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var nameElement;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList1 = doc.getElementsByTagName("strong");
+ elemList2 = doc.getElementsByTagName("acronym");
+ nameElem = elemList1.item(1);
+ acronymElem = elemList2.item(1);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+
+ {
+ success = false;
+ try {
+ nameElem.setIdAttributeNode(attr,true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.xhtml
new file mode 100644
index 0000000..e076720
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt
new file mode 100644
index 0000000..c3e14f9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode07
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.js
new file mode 100644
index 0000000..13f4d88
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode07() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode07") != null) return;
+ var doc;
+ var elemList1;
+ var elemList2;
+ var acronymElem1;
+ var acronymElem2;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList1 = doc.getElementsByTagName("acronym");
+ elemList2 = doc.getElementsByTagName("acronym");
+ acronymElem1 = elemList1.item(1);
+ acronymElem2 = elemList2.item(2);
+ attributesMap = acronymElem1.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ acronymElem1.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsId1True07",id);
+attributesMap = acronymElem2.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ acronymElem2.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsId2True07",id);
+elem = doc.getElementById("No");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenode1GetElementById07","acronym",elemName);
+ elem = doc.getElementById("Yes");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenode2GetElementById07","acronym",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.xhtml
new file mode 100644
index 0000000..047d1ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt
new file mode 100644
index 0000000..c7e98a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode08
+Status error
+Message Line 116: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.js
new file mode 100644
index 0000000..1a7d327
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode08() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode08") != null) return;
+ var doc;
+ var elemList1;
+ var elemList2;
+ var acronymElem;
+ var pElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList1 = doc.getElementsByTagNameNS("*","acronym");
+ elemList2 = doc.getElementsByTagNameNS("*","p");
+ acronymElem = elemList1.item(1);
+ pElem = elemList2.item(2);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("title");
+ acronymElem.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsId1True08",id);
+attributesMap = pElem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:dmstc");
+ pElem.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsId2True08",id);
+elem = doc.getElementById("Yes");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenode1GetElementById08","acronym",elemName);
+ elem = doc.getElementById("http://www.netzero.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenode2GetElementById08","p",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.xhtml
new file mode 100644
index 0000000..c8837cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09-expected.txt
new file mode 100644
index 0000000..2f657ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode09
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.js
new file mode 100644
index 0000000..f2be793
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode09() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode09") != null) return;
+ var doc;
+ var elemList;
+ var varElem;
+ var entRef;
+ var entElement;
+ var attributesMap;
+ var attr;
+ var domConfig;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("entities", true);
+ doc.normalizeDocument();
+ elemList = doc.getElementsByTagNameNS("*","var");
+ varElem = elemList.item(2);
+ entRef = varElem.firstChild;
+
+ entElement = entRef.firstChild;
+
+ attributesMap = entElement.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns");
+
+ {
+ success = false;
+ try {
+ entElement.setIdAttributeNode(attr,true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.xhtml
new file mode 100644
index 0000000..67c7d9f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt
new file mode 100644
index 0000000..e90700d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode10
+Status error
+Message Line 113: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.js
new file mode 100644
index 0000000..e8a1c48
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributenode10() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributenode10") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ acronymElem = elemList.item(3);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ acronymElem.setIdAttributeNode(attr,true);
+ id = attr.isId;
+
+ assertTrue("elementsetidattributenodeIsIdTrue10",id);
+elem = doc.getElementById("Yα");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributenodeGetElementById10","acronym",elemName);
+ acronymElem.setIdAttributeNode(attr,false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributenodeIsIdFalse10",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributenode10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.xhtml
new file mode 100644
index 0000000..e80b894
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributenode10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributenode10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01-expected.txt
new file mode 100644
index 0000000..f8e31a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens01
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.js
new file mode 100644
index 0000000..532bf50
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens01() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens01") != null) return;
+ var doc;
+ var elemList;
+ var employeeElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ employeeElem = elemList.item(2);
+ employeeElem.setIdAttributeNS("http://www.w3.org/2000/xmlns/","dmstc",true);
+ attributesMap = employeeElem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:dmstc");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsIdTrue01",id);
+elem = doc.getElementById("http://www.netzero.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributensGetElementById01","p",elemName);
+ employeeElem.setIdAttributeNS("http://www.w3.org/2000/xmlns/","dmstc",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributensIsIdFalse01",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.xhtml
new file mode 100644
index 0000000..47ab91b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02-expected.txt
new file mode 100644
index 0000000..8eff05c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens02
+Status error
+Message Line 107: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.js
new file mode 100644
index 0000000..b52b6ae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens02() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens02") != null) return;
+ var doc;
+ var elemList;
+ var addressElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+ var xsiNS = "http://www.w3.org/2001/XMLSchema-instance";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ addressElem = elemList.item(2);
+ addressElem.setIdAttributeNS(xsiNS,"noNamespaceSchemaLocation",true);
+ attributesMap = addressElem.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsIdTrue02",id);
+elem = doc.getElementById("Yes");
+ assertNotNull("getElementByIDNotNull",elem);
+elemName = elem.tagName;
+
+ assertEquals("elementsetidattributensGetElementById01","acronym",elemName);
+ addressElem.setIdAttributeNS(xsiNS,"noNamespaceSchemaLocation",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributensIsIdFalse02",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.xhtml
new file mode 100644
index 0000000..18cbe02
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03-expected.txt
new file mode 100644
index 0000000..c2a48d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens03
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.js
new file mode 100644
index 0000000..d815892
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens03() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens03") != null) return;
+ var doc;
+ var elemList;
+ var employeeIdElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ employeeIdElem = elemList.item(0);
+ employeeIdElem.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:newAttr","newValue");
+ employeeIdElem.setIdAttributeNS("http://www.w3.org/2000/xmlns/","newAttr",true);
+ attributesMap = employeeIdElem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:newAttr");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsIdTrue03",id);
+elem = doc.getElementById("newValue");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributensGetElementById03","em",elemName);
+ employeeIdElem.setIdAttributeNS("http://www.w3.org/2000/xmlns/","newAttr",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributensIsIdFalse03",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.xhtml
new file mode 100644
index 0000000..5ded706
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04-expected.txt
new file mode 100644
index 0000000..05ca175
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens04
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.js
new file mode 100644
index 0000000..2a8a5c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens04() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens04") != null) return;
+ var doc;
+ var elemList;
+ var strongElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","strong");
+ strongElem = elemList.item(2);
+ strongElem.setAttributeNS("http://www.netzero.com","dmstc:newAttr","newValue");
+ strongElem.setIdAttributeNS("http://www.netzero.com","newAttr",true);
+ attributesMap = strongElem.attributes;
+
+ attr = attributesMap.getNamedItem("dmstc:newAttr");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsIdTrue04",id);
+elem = doc.getElementById("newValue");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributensGetElementById04","strong",elemName);
+ strongElem.setIdAttributeNS("http://www.netzero.com","newAttr",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributensIsIdFalse04",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.xhtml
new file mode 100644
index 0000000..2b45a74
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05-expected.txt
new file mode 100644
index 0000000..274ee1a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens05
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.js
new file mode 100644
index 0000000..ad3641e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens05() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens05") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ acronymElem = elemList.item(2);
+ acronymElem.setAttributeNS("*","title","newValue");
+ acronymElem.setIdAttributeNS("*","title",true);
+ attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("title");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsIdTrue05",id);
+elem = doc.getElementById("newValue");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributensGetElementById05","acronym",elemName);
+ acronymElem.setIdAttributeNS("*","title",false);
+ id = attr.isId;
+
+ assertFalse("elementsetidattributensIsIdFalse05",id);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.xhtml
new file mode 100644
index 0000000..38b7a50
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06-expected.txt
new file mode 100644
index 0000000..6825c60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens06
+Status failure
+Message throw_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.js
new file mode 100644
index 0000000..2b3456c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke setIdAttributeNS on the third strong element with a non-existing attribute name. Verify that
+ NOT_FOUND_ERR is raised.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens06() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens06") != null) return;
+ var doc;
+ var elemList;
+ var nameElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem = elemList.item(2);
+
+ {
+ success = false;
+ try {
+ nameElem.setIdAttributeNS("http://www.netzero.com","hasMiddleName",true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.xhtml
new file mode 100644
index 0000000..becd7fc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07-expected.txt
new file mode 100644
index 0000000..24d6a91
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens07
+Status failure
+Message throw_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.js
new file mode 100644
index 0000000..e7de7fd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke setIdAttributeNS on the second p element with a non-existing attribute. Verify that
+ NOT_FOUND_ERR is raised.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens07() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens07") != null) return;
+ var doc;
+ var elemList;
+ var employeeElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ employeeElem = elemList.item(1);
+
+ {
+ success = false;
+ try {
+ employeeElem.setIdAttributeNS("http://www.netzero.com","xsi",true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.xhtml
new file mode 100644
index 0000000..fa727d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08-expected.txt
new file mode 100644
index 0000000..060c817
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens08
+Status failure
+Message throw_NOT_FOUND_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.js
new file mode 100644
index 0000000..04db9e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke setIdAttributeNS on the second p element with a non-existing attribute. Verify that
+ NOT_FOUND_ERR is raised.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNode
+*/
+function elementsetidattributens08() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens08") != null) return;
+ var doc;
+ var elemList;
+ var employeeElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ employeeElem = elemList.item(1);
+
+ {
+ success = false;
+ try {
+ employeeElem.setIdAttributeNS("http://www.usa.com","usa",true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.xhtml
new file mode 100644
index 0000000..416d9e3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09-expected.txt
new file mode 100644
index 0000000..2de2d81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens09
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.js
new file mode 100644
index 0000000..02943ca
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens09() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens09") != null) return;
+ var doc;
+ var elemList;
+ var varElem;
+ var entRef;
+ var entElement;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","var");
+ varElem = elemList.item(2);
+ entRef = varElem.firstChild;
+
+ entElement = entRef.firstChild;
+
+
+ {
+ success = false;
+ try {
+ entElement.setIdAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",true);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.xhtml
new file mode 100644
index 0000000..f202394
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10-expected.txt
new file mode 100644
index 0000000..7c61553
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens10
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.js
new file mode 100644
index 0000000..920d60e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens10() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens10") != null) return;
+ var doc;
+ var elemList;
+ var pElem1;
+ var pElem2;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","p");
+ pElem1 = elemList.item(2);
+ pElem2 = elemList.item(3);
+ pElem1.setIdAttributeNS("http://www.w3.org/2000/xmlns/","dmstc",true);
+ pElem2.setIdAttributeNS("http://www.w3.org/2000/xmlns/","nm",true);
+ attributesMap = pElem1.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:dmstc");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId1True10",id);
+attributesMap = pElem2.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:nm");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId2True10",id);
+elem = doc.getElementById("http://www.netzero.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributens1GetElementById10","p",elemName);
+ elem = doc.getElementById("http://www.altavista.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributens2GetElementById10","p",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.xhtml
new file mode 100644
index 0000000..4863b2c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11-expected.txt
new file mode 100644
index 0000000..a441282
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens11
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.js
new file mode 100644
index 0000000..43a0aba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens11() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens11") != null) return;
+ var doc;
+ var elemList;
+ var pElem1;
+ var pElem2;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","p");
+ pElem1 = elemList.item(1);
+ pElem2 = elemList.item(2);
+ pElem1.setIdAttributeNS("http://www.w3.org/2000/xmlns/","dmstc",true);
+ pElem2.setIdAttributeNS("http://www.w3.org/2000/xmlns/","dmstc",true);
+ attributesMap = pElem1.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:dmstc");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId1True11",id);
+attributesMap = pElem2.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:dmstc");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId2True11",id);
+elem = doc.getElementById("http://www.netzero.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributens1GetElementById11","p",elemName);
+ elem = doc.getElementById("http://www.usa.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributens2GetElementById11","p",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.xhtml
new file mode 100644
index 0000000..5117b7a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12-expected.txt
new file mode 100644
index 0000000..dc84bd9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens12
+Status error
+Message Line 115: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.js
new file mode 100644
index 0000000..cdd3a8e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.js
@@ -0,0 +1,148 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens12() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens12") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem1;
+ var acronymElem2;
+ var acronymElem3;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ acronymElem1 = elemList.item(0);
+ acronymElem2 = elemList.item(1);
+ acronymElem3 = elemList.item(2);
+ acronymElem1.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:noNamespaceSchemaLocation","No");
+ acronymElem1.setIdAttributeNS("http://www.w3.org/2001/XMLSchema-instance","noNamespaceSchemaLocation",true);
+ acronymElem2.setIdAttributeNS("http://www.w3.org/2001/XMLSchema-instance","noNamespaceSchemaLocation",true);
+ acronymElem3.setIdAttributeNS("http://www.w3.org/2001/XMLSchema-instance","noNamespaceSchemaLocation",true);
+ attributesMap = acronymElem1.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId1True12",id);
+attributesMap = acronymElem2.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId2True12",id);
+attributesMap = acronymElem3.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId3True12",id);
+elem = doc.getElementById("No");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributensGetElementById10","acronym",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.xhtml
new file mode 100644
index 0000000..b6599df
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13-expected.txt
new file mode 100644
index 0000000..ba8a62e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens13
+Status error
+Message Line 107: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.js
new file mode 100644
index 0000000..729824c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens13() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens13") != null) return;
+ var doc;
+ var elemList;
+ var nameElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ nameElem = elemList.item(2);
+ nameElem.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:newAttr","newValue");
+ nameElem.setIdAttributeNS("http://www.w3.org/2000/xmlns/","newAttr",true);
+ attributesMap = nameElem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:newAttr");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsIdTrue13",id);
+elem = doc.getElementById("newValue");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributensGetElementById13","strong",elemName);
+
+ {
+ success = false;
+ try {
+ nameElem.setIdAttributeNS("http://www.w3.org/XML/1998/namespace","lang",false);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.xhtml
new file mode 100644
index 0000000..7ccb37a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14-expected.txt b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14-expected.txt
new file mode 100644
index 0000000..9232c60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens14
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.js b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.js
new file mode 100644
index 0000000..2a2bf05
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.js
@@ -0,0 +1,142 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ElSetIdAttrNS
+*/
+function elementsetidattributens14() {
+ var success;
+ if(checkInitialization(builder, "elementsetidattributens14") != null) return;
+ var doc;
+ var elemList;
+ var pElem;
+ var acronymElem;
+ var attributesMap;
+ var attr;
+ var id = false;
+ var elem;
+ var elemName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","p");
+ pElem = elemList.item(1);
+ elemList = doc.getElementsByTagNameNS("*","acronym");
+ acronymElem = elemList.item(2);
+ pElem.setIdAttributeNS("http://www.w3.org/2000/xmlns/","dmstc",true);
+ acronymElem.setIdAttributeNS("http://www.w3.org/2001/XMLSchema-instance","noNamespaceSchemaLocation",true);
+ attributesMap = pElem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:dmstc");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId1True14",id);
+attributesMap = acronymElem.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ id = attr.isId;
+
+ assertTrue("elementsetidattributensIsId2True14",id);
+elem = doc.getElementById("Yes");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributens1GetElementById14","acronym",elemName);
+ elem = doc.getElementById("http://www.usa.com");
+ elemName = elem.tagName;
+
+ assertEquals("elementsetidattributens2GetElementById14","p",elemName);
+
+}
+
+
+
+
+function runTest() {
+ elementsetidattributens14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.xhtml b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.xhtml
new file mode 100644
index 0000000..baf6e22
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/elementsetidattributens14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="elementsetidattributens14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/entities01-expected.txt b/LayoutTests/dom/xhtml/level3/core/entities01-expected.txt
new file mode 100644
index 0000000..e7a5fe1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities01
+Status error
+Message Line 113: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entities01.js b/LayoutTests/dom/xhtml/level3/core/entities01.js
new file mode 100644
index 0000000..5fe321b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities01.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with entities set to true, check that
+entity references and unused entity declaration are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities
+*/
+function entities01() {
+ var success;
+ if(checkInitialization(builder, "entities01") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var entRef;
+ var entities;
+ var ent2;
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("entities", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = doc.createEntityReference("ent1");
+ child = pElem.appendChild(entRef);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ child = pElem.lastChild;
+
+ assertNotNull("lastChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChild","ent1",childName);
+ doctype = doc.doctype;
+
+ entities = doctype.entities;
+
+ ent2 = entities.getNamedItem("ent2");
+ assertNotNull("ent2NotNull",ent2);
+
+}
+
+
+
+
+function runTest() {
+ entities01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entities01.xhtml b/LayoutTests/dom/xhtml/level3/core/entities01.xhtml
new file mode 100644
index 0000000..199af7f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entities01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/entities02-expected.txt b/LayoutTests/dom/xhtml/level3/core/entities02-expected.txt
new file mode 100644
index 0000000..7129dad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities02
+Status error
+Message Line 114: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entities02.js b/LayoutTests/dom/xhtml/level3/core/entities02.js
new file mode 100644
index 0000000..2cfec9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities02.js
@@ -0,0 +1,147 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with entities set to false, check that
+entity references are expanded and unused entity declaration are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities
+*/
+function entities02() {
+ var success;
+ if(checkInitialization(builder, "entities02") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var entRef;
+ var childValue;
+ var entities;
+ var ent2;
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("entities", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = doc.createEntityReference("ent1");
+ child = pElem.appendChild(entRef);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ child = pElem.lastChild;
+
+ assertNotNull("lastChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChildName","#text",childName);
+ childValue = child.nodeValue;
+
+ assertEquals("firstChildValue","barfoo",childValue);
+ doctype = doc.doctype;
+
+ entities = doctype.entities;
+
+ ent2 = entities.getNamedItem("ent2");
+ assertNotNull("ent2NotNull",ent2);
+
+}
+
+
+
+
+function runTest() {
+ entities02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entities02.xhtml b/LayoutTests/dom/xhtml/level3/core/entities02.xhtml
new file mode 100644
index 0000000..51a7d08
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entities02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/entities03-expected.txt b/LayoutTests/dom/xhtml/level3/core/entities03-expected.txt
new file mode 100644
index 0000000..6125f1e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities03
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entities03.js b/LayoutTests/dom/xhtml/level3/core/entities03.js
new file mode 100644
index 0000000..6862c4b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities03.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with entities set to false, check that
+unbound entity references are preserved.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities
+*/
+function entities03() {
+ var success;
+ if(checkInitialization(builder, "entities03") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var entRef;
+ var childType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("entities", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = doc.createEntityReference("ent3");
+ child = pElem.appendChild(entRef);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ child = pElem.lastChild;
+
+ assertNotNull("lastChildNotNull",child);
+childType = child.nodeType;
+
+ assertEquals("lastChildEntRef",5,childType);
+ childName = child.nodeName;
+
+ assertEquals("lastChildName","ent3",childName);
+
+}
+
+
+
+
+function runTest() {
+ entities03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entities03.xhtml b/LayoutTests/dom/xhtml/level3/core/entities03.xhtml
new file mode 100644
index 0000000..7ea635b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entities03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/entities04-expected.txt b/LayoutTests/dom/xhtml/level3/core/entities04-expected.txt
new file mode 100644
index 0000000..1d241a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities04
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entities04.js b/LayoutTests/dom/xhtml/level3/core/entities04.js
new file mode 100644
index 0000000..5993e66
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities04.js
@@ -0,0 +1,142 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document using Node.normalize checking that "entities" parameter is ignored.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-entities
+*/
+function entities04() {
+ var success;
+ if(checkInitialization(builder, "entities04") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var entRef;
+ var entities;
+ var ent2;
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("entities", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = doc.createEntityReference("ent1");
+ child = pElem.appendChild(entRef);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ child = pElem.lastChild;
+
+ assertNotNull("lastChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChild","ent1",childName);
+ doctype = doc.doctype;
+
+ entities = doctype.entities;
+
+ ent2 = entities.getNamedItem("ent2");
+ assertNotNull("ent2NotNull",ent2);
+
+}
+
+
+
+
+function runTest() {
+ entities04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entities04.xhtml b/LayoutTests/dom/xhtml/level3/core/entities04.xhtml
new file mode 100644
index 0000000..6b3888e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entities04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entities04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt
new file mode 100644
index 0000000..715324a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding01
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.js b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.js
new file mode 100644
index 0000000..01f0f8e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getInputEncoding method on a UTF-8 encoded document and check if the
+ value returned is null for a internal general entity.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding
+*/
+function entitygetinputencoding01() {
+ var success;
+ if(checkInitialization(builder, "entitygetinputencoding01") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ encodingName = entity.inputEncoding;
+
+ assertNull("entitygetinputencoding01",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ entitygetinputencoding01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.xhtml
new file mode 100644
index 0000000..2b5450f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="entitygetinputencoding01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.js b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.js
new file mode 100644
index 0000000..d7f1944
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_utf16");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getInputEncoding method on a UTF-16 encoded document that contains an external
+ unparsed entity and check if the value returned is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding
+*/
+function entitygetinputencoding02() {
+ var success;
+ if(checkInitialization(builder, "entitygetinputencoding02") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_utf16");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent5");
+ encodingName = entity.inputEncoding;
+
+ assertNull("entitygetinputencoding02",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ entitygetinputencoding02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.xhtml
new file mode 100644
index 0000000..90fd7dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding02.xhtml
Binary files differ
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03-expected.txt
new file mode 100644
index 0000000..93c941d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding03
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.js b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.js
new file mode 100644
index 0000000..95acd2a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check the value of Entity.inputEncoding on an UTF-16 external entity
+is either UTF-16 or UTF-16LE
+
+* @author IBM
+* @author Neil Delima
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html
+*/
+function entitygetinputencoding03() {
+ var success;
+ if(checkInitialization(builder, "entitygetinputencoding03") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent1");
+ encodingName = entity.inputEncoding;
+
+
+ if(
+ !("UTF-16LE".toUpperCase() == encodingName.toUpperCase())
+ ) {
+ assertEquals("entityIsUTF16orUTF16LE","UTF-16".toLowerCase(),encodingName.toLowerCase());
+
+ }
+ encodingName = doc.inputEncoding;
+
+ assertEquals("documentIsUTF8","UTF-8".toLowerCase(),encodingName.toLowerCase());
+
+}
+
+
+
+
+function runTest() {
+ entitygetinputencoding03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.xhtml
new file mode 100644
index 0000000..8e64779
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entitygetinputencoding03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04-expected.txt
new file mode 100644
index 0000000..9e81d8d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding04
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.js b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.js
new file mode 100644
index 0000000..fc574b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check the value of Entity.inputEncoding on an UTF-8 external entity
+is UTF-8.
+
+* @author IBM
+* @author Neil Delima
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-inputEncoding
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html
+*/
+function entitygetinputencoding04() {
+ var success;
+ if(checkInitialization(builder, "entitygetinputencoding04") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent2");
+ encodingName = entity.inputEncoding;
+
+ assertEquals("entityIsUTF8","UTF-8".toLowerCase(),encodingName.toLowerCase());
+ encodingName = doc.inputEncoding;
+
+ assertEquals("documentIsUTF8","UTF-8".toLowerCase(),encodingName.toLowerCase());
+
+}
+
+
+
+
+function runTest() {
+ entitygetinputencoding04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.xhtml
new file mode 100644
index 0000000..0034092
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetinputencoding04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entitygetinputencoding04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt
new file mode 100644
index 0000000..53f598e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding01
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.js
new file mode 100644
index 0000000..5b904ab
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding
+*/
+function entitygetxmlencoding01() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlencoding01") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ encodingName = entity.xmlEncoding;
+
+ assertNull("entitygetxmlencoding01",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlencoding01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.xhtml
new file mode 100644
index 0000000..863a1db
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="entitygetxmlencoding01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt
new file mode 100644
index 0000000..89c8048
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding02
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.js
new file mode 100644
index 0000000..9d90f63
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getencoding method on a document that contains an external
+ unparsed entity and check if the value returned is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding
+*/
+function entitygetxmlencoding02() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlencoding02") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent5");
+ encodingName = entity.xmlEncoding;
+
+ assertNull("entitygetxmlencoding02",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlencoding02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.xhtml
new file mode 100644
index 0000000..2c2b2f0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entitygetxmlencoding02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03-expected.txt
new file mode 100644
index 0000000..6cea640
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding03
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.js
new file mode 100644
index 0000000..146752e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check the value of Entity.xmlEncoding on an external entity with an encoding
+declaration precisely matches the specified value.
+
+* @author IBM
+* @author Neil Delima
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html
+*/
+function entitygetxmlencoding03() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlencoding03") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent1");
+ encodingName = entity.xmlEncoding;
+
+ assertEquals("xmlEncoding","uTf-16",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlencoding03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.xhtml
new file mode 100644
index 0000000..86baa0c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entitygetxmlencoding03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04-expected.txt
new file mode 100644
index 0000000..cfde0ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding04
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.js
new file mode 100644
index 0000000..b0f8169
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check the value of Entity.xmlEncoding on an external entity without an encoding
+declaration is null.
+
+* @author IBM
+* @author Neil Delima
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-encoding
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html
+*/
+function entitygetxmlencoding04() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlencoding04") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var encodingName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent2");
+ encodingName = entity.xmlEncoding;
+
+ assertNull("xmlEncoding",encodingName);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlencoding04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.xhtml
new file mode 100644
index 0000000..9b0345f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlencoding04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entitygetxmlencoding04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt
new file mode 100644
index 0000000..0502675
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion01
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.js
new file mode 100644
index 0000000..76a6675
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Call the getXmlVersion method on entity that is not an external entity and check if
+ the value returned is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version
+*/
+function entitygetxmlversion01() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlversion01") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var entityVersion;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("epsilon");
+ entityVersion = entity.xmlVersion;
+
+ assertNull("entitygetxmlversion01",entityVersion);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlversion01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.xhtml
new file mode 100644
index 0000000..2d4f77e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="entitygetxmlversion01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.js
new file mode 100644
index 0000000..3637baa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_utf16");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version
+*/
+function entitygetxmlversion02() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlversion02") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var entityVersion;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_utf16");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent5");
+ entityVersion = entity.xmlVersion;
+
+ assertNull("entitygetxmlversion02",entityVersion);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlversion02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.xhtml
new file mode 100644
index 0000000..90fd7dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion02.xhtml
Binary files differ
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03-expected.txt
new file mode 100644
index 0000000..9debe89
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion03
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.js
new file mode 100644
index 0000000..3cf8c6a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Check that the value of Entity.xmlVersion on an external entity without
+ a version declaration is null.
+
+* @author IBM
+* @author Neil Delima
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html
+*/
+function entitygetxmlversion03() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlversion03") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var entityVersion;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent2");
+ entityVersion = entity.xmlVersion;
+
+ assertNull("xmlVersionNull",entityVersion);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlversion03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.xhtml
new file mode 100644
index 0000000..054ceb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entitygetxmlversion03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04-expected.txt b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04-expected.txt
new file mode 100644
index 0000000..c9aac5e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion04
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.js b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.js
new file mode 100644
index 0000000..565d4a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Check that the value of Entity.xmlVersion on an external entity with
+ a version declaration is "1.0".
+
+* @author IBM
+* @author Neil Delima
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Entity3-version
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Dec/0045.html
+*/
+function entitygetxmlversion04() {
+ var success;
+ if(checkInitialization(builder, "entitygetxmlversion04") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var entityVersion;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("ent1");
+ entityVersion = entity.xmlVersion;
+
+ assertEquals("xmlVersion10","1.0",entityVersion);
+
+}
+
+
+
+
+function runTest() {
+ entitygetxmlversion04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.xhtml b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.xhtml
new file mode 100644
index 0000000..a69ab72
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/entitygetxmlversion04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='entitygetxmlversion04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/external_foo.ent b/LayoutTests/dom/xhtml/level3/core/external_foo.ent
new file mode 100644
index 0000000..fe8efcd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/external_foo.ent
Binary files differ
diff --git a/LayoutTests/dom/xhtml/level3/core/external_foobr.ent b/LayoutTests/dom/xhtml/level3/core/external_foobr.ent
new file mode 100644
index 0000000..2cd59e8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/external_foobr.ent
@@ -0,0 +1 @@
+<br/>foo \ No newline at end of file
diff --git a/LayoutTests/dom/xhtml/level3/core/external_widget.ent b/LayoutTests/dom/xhtml/level3/core/external_widget.ent
new file mode 100644
index 0000000..1e278c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/external_widget.ent
@@ -0,0 +1 @@
+<p xmlns='http://www.w3.org/1999/xhtml'>widget</p>
diff --git a/LayoutTests/dom/xhtml/level3/core/handleerror01-expected.txt b/LayoutTests/dom/xhtml/level3/core/handleerror01-expected.txt
new file mode 100644
index 0000000..2b41cac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/handleerror01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/handleerror01
+Status error
+Message Line 150: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/handleerror01.js b/LayoutTests/dom/xhtml/level3/core/handleerror01.js
new file mode 100644
index 0000000..7fd5578
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/handleerror01.js
@@ -0,0 +1,190 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/handleerror01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+ /**
+ * Inner class implementation for variable errorHandler
+ */
+var errorHandler;
+
+/**
+ * Constructor
+
+ */
+
+function DOMErrorHandlerN10054() {
+ }
+
+ /**
+ *
+This method is called on the error handler when an error occurs.
+If an exception is thrown from this method, it is considered to be equivalent of returningtrue.
+
+ * @param error
+The error object that describes the error. This object may be reused by the DOM implementation across multiple calls to thehandleErrormethod.
+
+ */
+DOMErrorHandlerN10054.prototype.handleError = function(error) {
+ //
+ // bring class variables into function scope
+ //
+ return false;
+}
+
+/**
+*
+Add two CDATASection containing "]]>" and call Node.normalize
+with an error handler that stops processing. Only one of the
+CDATASections should be split.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ERRORS-DOMErrorHandler-handleError
+*/
+function handleerror01() {
+ var success;
+ if(checkInitialization(builder, "handleerror01") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var elemList;
+ var newChild;
+ var oldChild;
+ var child;
+ var childValue;
+ var childType;
+ var retval;
+ var errors = new Array();
+
+ errorHandler = new DOMErrorHandlerN10054();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ oldChild = elem.firstChild;
+
+ newChild = doc.createCDATASection("this is not ]]> good");
+ retval = elem.replaceChild(newChild,oldChild);
+ newChild = doc.createCDATASection("this is not ]]> bad");
+ retval = elem.appendChild(newChild);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("split-cdata-sections", true);
+ domConfig.setParameter("error-handler", errorHandler.handleError);
+ doc.normalizeDocument();
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ child = elem.lastChild;
+
+ childValue = child.nodeValue;
+
+
+ if(
+ ("this is not ]]> bad" == childValue)
+ ) {
+ childType = child.nodeType;
+
+ assertEquals("lastChildCDATA",4,childType);
+ child = elem.firstChild;
+
+ childValue = child.nodeValue;
+
+ assert("firstChildNotIntact","this is not ]]> good" != childValue);
+
+ }
+
+ else {
+ child = elem.firstChild;
+
+ childValue = child.nodeValue;
+
+ assertEquals("firstChildIntact","this is not ]]> good",childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ handleerror01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/handleerror01.xhtml b/LayoutTests/dom/xhtml/level3/core/handleerror01.xhtml
new file mode 100644
index 0000000..98023bb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/handleerror01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='handleerror01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/handleerror02-expected.txt b/LayoutTests/dom/xhtml/level3/core/handleerror02-expected.txt
new file mode 100644
index 0000000..9fa2431
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/handleerror02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/handleerror02
+Status error
+Message Line 155: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/handleerror02.js b/LayoutTests/dom/xhtml/level3/core/handleerror02.js
new file mode 100644
index 0000000..fc149ba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/handleerror02.js
@@ -0,0 +1,172 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/handleerror02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+ /**
+ * Inner class implementation for variable errorHandler
+ */
+var errorHandler;
+
+/**
+ * Constructor
+
+ * @param errors Value from value attribute of nested var element
+ */
+
+function DOMErrorHandlerN10053(errors) {
+ this.errors = errors;
+ }
+
+ /**
+ *
+This method is called on the error handler when an error occurs.
+If an exception is thrown from this method, it is considered to be equivalent of returningtrue.
+
+ * @param error
+The error object that describes the error. This object may be reused by the DOM implementation across multiple calls to thehandleErrormethod.
+
+ */
+DOMErrorHandlerN10053.prototype.handleError = function(error) {
+ //
+ // bring class variables into function scope
+ //
+ var errors = errorHandler.errors;
+ var severity;
+ severity = error.severity;
+
+
+ if(
+ (2 == severity)
+ ) {
+ errors[errors.length] = error;
+
+ }
+ return true;
+}
+
+/**
+*
+Normalize document with two DOM L1 nodes.
+Use an error handler to continue from errors and check that more than one
+error was reported.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespaces
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-ERRORS-DOMErrorHandler-handleError
+*/
+function handleerror02() {
+ var success;
+ if(checkInitialization(builder, "handleerror02") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var brElem;
+ var errors = new Array();
+
+ errorHandler = new DOMErrorHandlerN10053(errors);
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("error-handler", errorHandler.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ brElem = doc.createElement("br");
+ retval = pElem.appendChild(brElem);
+ brElem = doc.createElement("br");
+ retval = pElem.appendChild(brElem);
+ doc.normalizeDocument();
+ assertSize("twoErrors",2,errors);
+
+}
+
+
+
+
+function runTest() {
+ handleerror02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/handleerror02.xhtml b/LayoutTests/dom/xhtml/level3/core/handleerror02.xhtml
new file mode 100644
index 0000000..6e27ffd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/handleerror02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='handleerror02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature01-expected.txt b/LayoutTests/dom/xhtml/level3/core/hasFeature01-expected.txt
new file mode 100644
index 0000000..3372d82
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature01
+Status failure
+Message hasXML30: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature01.js b/LayoutTests/dom/xhtml/level3/core/hasFeature01.js
new file mode 100644
index 0000000..371b80d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature01.js
@@ -0,0 +1,94 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementation.hasFeature("XML", "3.0") should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7
+*/
+function hasFeature01() {
+ var success;
+ if(checkInitialization(builder, "hasFeature01") != null) return;
+ var impl;
+ var state;
+ impl = getImplementation();
+state = impl.hasFeature("xMl","3.0");
+assertTrue("hasXML30",state);
+
+}
+
+
+
+
+function runTest() {
+ hasFeature01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature01.xhtml b/LayoutTests/dom/xhtml/level3/core/hasFeature01.xhtml
new file mode 100644
index 0000000..f2b6fcf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature01.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='hasFeature01.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature02-expected.txt b/LayoutTests/dom/xhtml/level3/core/hasFeature02-expected.txt
new file mode 100644
index 0000000..6ff5620
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature02
+Status failure
+Message hasCore30: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature02.js b/LayoutTests/dom/xhtml/level3/core/hasFeature02.js
new file mode 100644
index 0000000..6aa3941
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature02.js
@@ -0,0 +1,93 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementation.hasFeature("XML", "3.0") should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7
+*/
+function hasFeature02() {
+ var success;
+ if(checkInitialization(builder, "hasFeature02") != null) return;
+ var impl;
+ var state;
+ impl = getImplementation();
+state = impl.hasFeature("cOrE","3.0");
+assertTrue("hasCore30",state);
+
+}
+
+
+
+
+function runTest() {
+ hasFeature02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature02.xhtml b/LayoutTests/dom/xhtml/level3/core/hasFeature02.xhtml
new file mode 100644
index 0000000..36922ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature02.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='hasFeature02.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature03-expected.txt b/LayoutTests/dom/xhtml/level3/core/hasFeature03-expected.txt
new file mode 100644
index 0000000..cba1500
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature03
+Status failure
+Message hasPlusCore30: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature03.js b/LayoutTests/dom/xhtml/level3/core/hasFeature03.js
new file mode 100644
index 0000000..80f610e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature03.js
@@ -0,0 +1,93 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementation.hasFeature("XML", "3.0") should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7
+*/
+function hasFeature03() {
+ var success;
+ if(checkInitialization(builder, "hasFeature03") != null) return;
+ var impl;
+ var state;
+ impl = getImplementation();
+state = impl.hasFeature("+cOrE","3.0");
+assertTrue("hasPlusCore30",state);
+
+}
+
+
+
+
+function runTest() {
+ hasFeature03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature03.xhtml b/LayoutTests/dom/xhtml/level3/core/hasFeature03.xhtml
new file mode 100644
index 0000000..1f3af01
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature03.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='hasFeature03.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature04-expected.txt b/LayoutTests/dom/xhtml/level3/core/hasFeature04-expected.txt
new file mode 100644
index 0000000..d1a2858
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature04
+Status failure
+Message hasXML30: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature04.js b/LayoutTests/dom/xhtml/level3/core/hasFeature04.js
new file mode 100644
index 0000000..6b1dfb7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature04.js
@@ -0,0 +1,94 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/hasFeature04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DOMImplementation.hasFeature("XML", "3.0") should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-5CED94D7
+*/
+function hasFeature04() {
+ var success;
+ if(checkInitialization(builder, "hasFeature04") != null) return;
+ var impl;
+ var state;
+ impl = getImplementation();
+state = impl.hasFeature("+xMl","3.0");
+assertTrue("hasXML30",state);
+
+}
+
+
+
+
+function runTest() {
+ hasFeature04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/hasFeature04.xhtml b/LayoutTests/dom/xhtml/level3/core/hasFeature04.xhtml
new file mode 100644
index 0000000..6cdc1e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/hasFeature04.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='hasFeature04.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/hc_staff.svg.xsd b/LayoutTests/dom/xhtml/level3/core/hc_staff.svg.xsd
new file mode 100644
index 0000000..61e1919
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/hc_staff.xsd b/LayoutTests/dom/xhtml/level3/core/hc_staff.xsd
new file mode 100644
index 0000000..e93df32
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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&#945;"/>
+ <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/LayoutTests/dom/xhtml/level3/core/infoset01-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset01-expected.txt
new file mode 100644
index 0000000..95cc7b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset01
+Status error
+Message Line 114: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset01.js b/LayoutTests/dom/xhtml/level3/core/infoset01.js
new file mode 100644
index 0000000..a92fc12
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset01.js
@@ -0,0 +1,147 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with infoset set to true, check that
+entity references are expanded and unused entity declaration are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset01() {
+ var success;
+ if(checkInitialization(builder, "infoset01") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var entRef;
+ var childValue;
+ var entities;
+ var ent2;
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = doc.createEntityReference("ent1");
+ child = pElem.appendChild(entRef);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ child = pElem.lastChild;
+
+ assertNotNull("lastChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChildName","#text",childName);
+ childValue = child.nodeValue;
+
+ assertEquals("firstChildValue","barfoo",childValue);
+ doctype = doc.doctype;
+
+ entities = doctype.entities;
+
+ ent2 = entities.getNamedItem("ent2");
+ assertNotNull("ent2NotNull",ent2);
+
+}
+
+
+
+
+function runTest() {
+ infoset01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset01.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset01.xhtml
new file mode 100644
index 0000000..e7cde63
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='infoset01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset02-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset02-expected.txt
new file mode 100644
index 0000000..6dd505f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset02
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset02.js b/LayoutTests/dom/xhtml/level3/core/infoset02.js
new file mode 100644
index 0000000..40ba005
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset02.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with infoset set to true, check that
+unbound entity references are preserved.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset02() {
+ var success;
+ if(checkInitialization(builder, "infoset02") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var entRef;
+ var childType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = doc.createEntityReference("ent3");
+ child = pElem.appendChild(entRef);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ child = pElem.lastChild;
+
+ assertNotNull("lastChildNotNull",child);
+childType = child.nodeType;
+
+ assertEquals("lastChildEntRef",5,childType);
+ childName = child.nodeName;
+
+ assertEquals("lastChildName","ent3",childName);
+
+}
+
+
+
+
+function runTest() {
+ infoset02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset02.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset02.xhtml
new file mode 100644
index 0000000..084025c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='infoset02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset03-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset03-expected.txt
new file mode 100644
index 0000000..10fddd8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset03
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset03.js b/LayoutTests/dom/xhtml/level3/core/infoset03.js
new file mode 100644
index 0000000..c8b8c7c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset03.js
@@ -0,0 +1,156 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "datatype_normalization2");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with infoset set to true,
+check if string values were not normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset03() {
+ var success;
+ if(checkInitialization(builder, "infoset03") != null) return;
+ var doc;
+ var elemList;
+ var element;
+ var domConfig;
+ var str;
+ var canSetValidate;
+ var canSetXMLSchema;
+ var xsdNS = "http://www.w3.org/2001/XMLSchema";
+ errorMonitor = new DOMErrorMonitor();
+
+ var childNode;
+ var childValue;
+ var childLength;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "datatype_normalization2");
+ domConfig = doc.domConfig;
+
+ canSetValidate = domConfig.canSetParameter("validate",true);
+ canSetXMLSchema = domConfig.canSetParameter("schema-type",xsdNS);
+
+ if(
+
+ (canSetValidate && canSetXMLSchema)
+
+ ) {
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("schema-type", xsdNS);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ elemList = doc.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","code");
+ element = elemList.item(0);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ childLength = childValue.length;
+ assertEquals("content1",18,childLength);
+ element = elemList.item(1);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content2","EMP 0001",childValue);
+ element = elemList.item(2);
+ childNode = element.firstChild;
+
+ childValue = childNode.nodeValue;
+
+ assertEquals("content3","EMP 0001",childValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ infoset03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset03.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset03.xhtml
new file mode 100644
index 0000000..1029e0c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset03.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='infoset03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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/LayoutTests/dom/xhtml/level3/core/infoset04-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset04-expected.txt
new file mode 100644
index 0000000..9fce095
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset04
+Status error
+Message Line 117: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset04.js b/LayoutTests/dom/xhtml/level3/core/infoset04.js
new file mode 100644
index 0000000..e5438cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset04.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize a document with a created CDATA section with the
+'infoset' to true and check if
+the CDATASection has been coalesced.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=416
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset04() {
+ var success;
+ if(checkInitialization(builder, "infoset04") != null) return;
+ var doc;
+ var elem;
+ var newCdata;
+ var cdata;
+ var text;
+ var nodeName;
+ var nodeValue;
+ var appendedChild;
+ var domConfig;
+ var pList;
+ errorMonitor = new DOMErrorMonitor();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newCdata = doc.createCDATASection("CDATA");
+ appendedChild = elem.appendChild(newCdata);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalization2Error", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ text = elem.lastChild;
+
+ nodeName = text.nodeName;
+
+ assertEquals("documentnormalizedocument03_false","#text",nodeName);
+ nodeValue = text.nodeValue;
+
+ assertEquals("normalizedValue","barCDATA",nodeValue);
+
+}
+
+
+
+
+function runTest() {
+ infoset04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset04.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset04.xhtml
new file mode 100644
index 0000000..471efdf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='infoset04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset05-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset05-expected.txt
new file mode 100644
index 0000000..ad03412
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset05
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset05.js b/LayoutTests/dom/xhtml/level3/core/infoset05.js
new file mode 100644
index 0000000..ce05e52
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset05.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with infoset set to true, check that
+namespace declaration attributes are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset05() {
+ var success;
+ if(checkInitialization(builder, "infoset05") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var xmlnsAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ docElem = doc.documentElement;
+
+ xmlnsAttr = docElem.getAttributeNode("xmlns");
+ assertNotNull("xmlnsAttrNotNull",xmlnsAttr);
+
+}
+
+
+
+
+function runTest() {
+ infoset05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset05.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset05.xhtml
new file mode 100644
index 0000000..5d0d989
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='infoset05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset06-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset06-expected.txt
new file mode 100644
index 0000000..ff8224e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset06
+Status error
+Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset06.js b/LayoutTests/dom/xhtml/level3/core/infoset06.js
new file mode 100644
index 0000000..6f3fb67
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset06.js
@@ -0,0 +1,166 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Create a document with an XML 1.1 valid but XML 1.0 invalid element and
+normalize document with infoset set to true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset06() {
+ var success;
+ if(checkInitialization(builder, "infoset06") != null) return;
+ var domImpl;
+ var nullString = null;
+
+ var nullDoctype = null;
+
+ var doc;
+ var elem;
+ var retval;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var severity;
+ var type;
+ var locator;
+ var relatedNode;
+ domImpl = getImplementation();
+doc = domImpl.createDocument(nullString,nullString,nullDoctype);
+
+ {
+ success = false;
+ try {
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed01","LegalNameࢎ");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("xml10InvalidName",success);
+ }
+
+ try {
+ doc.xmlVersion = "1.1";
+
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed01","LegalNameࢎ");
+ retval = doc.appendChild(elem);
+ doc.xmlVersion = "1.0";
+
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100A9 = 0;indexN100A9 < errors.length; indexN100A9++) {
+ error = errors[indexN100A9];
+ severity = error.severity;
+
+ assertEquals("severity",2,severity);
+ type = error.type;
+
+ assertEquals("type","wf-invalid-character-in-node-name",type);
+ locator = error.location;
+
+ relatedNode = locator.relatedNode;
+
+ assertSame("relatedNode",elem,relatedNode);
+
+ }
+ assertSize("oneError",1,errors);
+
+}
+
+
+
+
+function runTest() {
+ infoset06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset06.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset06.xhtml
new file mode 100644
index 0000000..719af08
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset06.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='infoset06.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset07-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset07-expected.txt
new file mode 100644
index 0000000..d13c99f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset07
+Status error
+Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset07.js b/LayoutTests/dom/xhtml/level3/core/infoset07.js
new file mode 100644
index 0000000..c1e9cce
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset07.js
@@ -0,0 +1,167 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Create a document with an XML 1.1 valid but XML 1.0 invalid attribute and
+normalize document with infoset set to true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset07() {
+ var success;
+ if(checkInitialization(builder, "infoset07") != null) return;
+ var domImpl;
+ var nullDoctype = null;
+
+ var doc;
+ var docElem;
+ var attr;
+ var retval;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var severity;
+ var type;
+ var locator;
+ var relatedNode;
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDoctype);
+ docElem = doc.documentElement;
+
+
+ {
+ success = false;
+ try {
+ attr = doc.createAttribute("LegalNameࢎ");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("xml10InvalidName",success);
+ }
+
+ try {
+ doc.xmlVersion = "1.1";
+
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ docElem.setAttribute("LegalNameࢎ","foo");
+ attr = docElem.getAttributeNode("LegalNameࢎ");
+ doc.xmlVersion = "1.0";
+
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100AA = 0;indexN100AA < errors.length; indexN100AA++) {
+ error = errors[indexN100AA];
+ severity = error.severity;
+
+ assertEquals("severity",2,severity);
+ type = error.type;
+
+ assertEquals("type","wf-invalid-character-in-node-name",type);
+ locator = error.location;
+
+ relatedNode = locator.relatedNode;
+
+ assertSame("relatedNode",attr,relatedNode);
+
+ }
+ assertSize("oneError",1,errors);
+
+}
+
+
+
+
+function runTest() {
+ infoset07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset07.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset07.xhtml
new file mode 100644
index 0000000..eb00ac4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset07.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='infoset07.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset08-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset08-expected.txt
new file mode 100644
index 0000000..b873d59
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset08
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset08.js b/LayoutTests/dom/xhtml/level3/core/infoset08.js
new file mode 100644
index 0000000..85b8193
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset08.js
@@ -0,0 +1,148 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with infoset and validation set to true, check that
+whitespace in element content is preserved.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset08() {
+ var success;
+ if(checkInitialization(builder, "infoset08") != null) return;
+ var doc;
+ var bodyList;
+ var body;
+ var domConfig;
+ var canSet;
+ var canSetValidate;
+ errorMonitor = new DOMErrorMonitor();
+
+ var child;
+ var childName;
+ var text;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+
+ if(
+ (getImplementationAttribute("ignoringElementContentWhitespace") == true)
+ ) {
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ text = doc.createTextNode(" ");
+ child = body.insertBefore(text,child);
+
+ }
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ bodyList = doc.getElementsByTagName("body");
+ body = bodyList.item(0);
+ child = body.firstChild;
+
+ assertNotNull("firstChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("firstChild","#text",childName);
+ child = child.nextSibling;
+
+ assertNotNull("secondChildNotNull",child);
+childName = child.nodeName;
+
+ assertEquals("secondChild","p",childName);
+
+}
+
+
+
+
+function runTest() {
+ infoset08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset08.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset08.xhtml
new file mode 100644
index 0000000..7247214
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset08.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='infoset08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset09-expected.txt b/LayoutTests/dom/xhtml/level3/core/infoset09-expected.txt
new file mode 100644
index 0000000..ba952bf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset09
+Status error
+Message Line 114: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset09.js b/LayoutTests/dom/xhtml/level3/core/infoset09.js
new file mode 100644
index 0000000..06e43ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset09.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+ Append a Comment node and normalize with "infoset" set to true.
+
+* @author Curt Arnold
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-infoset
+*/
+function infoset09() {
+ var success;
+ if(checkInitialization(builder, "infoset09") != null) return;
+ var doc;
+ var elem;
+ var newComment;
+ var lastChild;
+ var text;
+ var nodeName;
+ var appendedChild;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ newComment = doc.createComment("COMMENT_NODE");
+ appendedChild = elem.appendChild(newComment);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("comments", false);
+ domConfig.setParameter("infoset", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizationError", 2);
+ pList = doc.getElementsByTagName("p");
+ elem = pList.item(0);
+ lastChild = elem.lastChild;
+
+ nodeName = lastChild.nodeName;
+
+ assertEquals("commentPreserved","#comment",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ infoset09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/infoset09.xhtml b/LayoutTests/dom/xhtml/level3/core/infoset09.xhtml
new file mode 100644
index 0000000..a1e5111
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/infoset09.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='infoset09.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01-expected.txt b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01-expected.txt
new file mode 100644
index 0000000..9f9b8cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/namespacedeclarations01
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.js b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.js
new file mode 100644
index 0000000..69ecb06
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/namespacedeclarations01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with namespace-declarations set to true, check that
+namespace declaration attributes are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations
+*/
+function namespacedeclarations01() {
+ var success;
+ if(checkInitialization(builder, "namespacedeclarations01") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var xmlnsAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("namespace-declarations", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ docElem = doc.documentElement;
+
+ xmlnsAttr = docElem.getAttributeNode("xmlns");
+ assertNotNull("xmlnsAttrNotNull",xmlnsAttr);
+
+}
+
+
+
+
+function runTest() {
+ namespacedeclarations01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.xhtml b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.xhtml
new file mode 100644
index 0000000..45c227b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='namespacedeclarations01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02-expected.txt b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02-expected.txt
new file mode 100644
index 0000000..8ca7f41
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/namespacedeclarations02
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.js b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.js
new file mode 100644
index 0000000..6dd8332
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/namespacedeclarations02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with namespace-declarations set to true, check that
+namespace declaration attributes are maintained.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-namespace-declarations
+*/
+function namespacedeclarations02() {
+ var success;
+ if(checkInitialization(builder, "namespacedeclarations02") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var xmlnsAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("namespace-declarations", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ docElem = doc.documentElement;
+
+ xmlnsAttr = docElem.getAttributeNode("xmlns");
+ assertNull("xmlnsAttrNull",xmlnsAttr);
+
+}
+
+
+
+
+function runTest() {
+ namespacedeclarations02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.xhtml b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.xhtml
new file mode 100644
index 0000000..efeffdb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/namespacedeclarations02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='namespacedeclarations02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeappendchild01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeappendchild01-expected.txt
new file mode 100644
index 0000000..95ac66c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeappendchild01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeappendchild01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeappendchild01.js b/LayoutTests/dom/xhtml/level3/core/nodeappendchild01.js
new file mode 100644
index 0000000..82d6df0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeappendchild01.js
@@ -0,0 +1,136 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeappendchild01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An attempt to add a second doctype node should result in a HIERARCHY_REQUEST_ERR
+or a NOT_SUPPORTED_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-184E7107
+*/
+function nodeappendchild01() {
+ var success;
+ if(checkInitialization(builder, "nodeappendchild01") != null) return;
+ var doc;
+ var domImpl;
+ var docType;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var appendedChild;
+ var tagName;
+ var docElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ tagName = docElem.tagName;
+
+ domImpl = doc.implementation;
+docType = domImpl.createDocumentType(tagName,nullPubId,nullSysId);
+
+ try {
+ appendedChild = doc.appendChild(docType);
+ fail("throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeappendchild01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeappendchild01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeappendchild01.xhtml
new file mode 100644
index 0000000..fa314c9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeappendchild01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodeappendchild01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeappendchild02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeappendchild02-expected.txt
new file mode 100644
index 0000000..791e038
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeappendchild02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeappendchild02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeappendchild02.js b/LayoutTests/dom/xhtml/level3/core/nodeappendchild02.js
new file mode 100644
index 0000000..f276d35
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeappendchild02.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeappendchild02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An attempt to add a second document element should result in a HIERARCHY_REQUEST_ERR
+or a NOT_SUPPORTED_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-184E7107
+*/
+function nodeappendchild02() {
+ var success;
+ if(checkInitialization(builder, "nodeappendchild02") != null) return;
+ var doc;
+ var newElem;
+ var appendedChild;
+ var tagName;
+ var rootNS;
+ var docElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ tagName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ newElem = doc.createElementNS(rootNS,tagName);
+
+ try {
+ appendedChild = doc.appendChild(newElem);
+ fail("throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeappendchild02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeappendchild02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeappendchild02.xhtml
new file mode 100644
index 0000000..d6a8e86
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeappendchild02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodeappendchild02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01-expected.txt
new file mode 100644
index 0000000..4b3546b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.js
new file mode 100644
index 0000000..ea47a08
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition01() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition01") != null) return;
+ var doc;
+ var docType;
+ var documentPositionDoc;
+ var documentPositionDocType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ documentPositionDoc = doc.compareDocumentPosition(docType);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing01",20,documentPositionDoc);
+ documentPositionDocType = docType.compareDocumentPosition(doc);
+ assertEquals("nodecomparetreepositionContainsPRECEDING01",10,documentPositionDocType);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.xhtml
new file mode 100644
index 0000000..9db9ae7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02-expected.txt
new file mode 100644
index 0000000..1933cc5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.js
new file mode 100644
index 0000000..013cebb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition02() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition02") != null) return;
+ var doc;
+ var domImpl;
+ var newDocType;
+ var docType;
+ var documentPositionDoc;
+ var documentPositionDocType;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var replaced;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ rootName = docType.name;
+
+ domImpl = doc.implementation;
+newDocType = domImpl.createDocumentType(rootName,nullPubId,nullSysId);
+ replaced = doc.replaceChild(newDocType,docType);
+ documentPositionDoc = doc.compareDocumentPosition(newDocType);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing02",20,documentPositionDoc);
+ documentPositionDocType = newDocType.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING02",10,documentPositionDocType);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.xhtml
new file mode 100644
index 0000000..fde9245
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt
new file mode 100644
index 0000000..4891d10
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition03
+Status error
+Message Line 115: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.js
new file mode 100644
index 0000000..b7b0604
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var docCompRef = null;
+ if (typeof(this.docComp) != 'undefined') {
+ docCompRef = this.docComp;
+ }
+ docsLoaded += preload(docCompRef, "docComp", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition03() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition03") != null) return;
+ var doc;
+ var docComp;
+ var documentPosition1;
+ var documentPosition2;
+ var documentPosition3;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var docCompRef = null;
+ if (typeof(this.docComp) != 'undefined') {
+ docCompRef = this.docComp;
+ }
+ docComp = load(docCompRef, "docComp", "hc_staff");
+ documentPosition1 = doc.compareDocumentPosition(docComp);
+ assertEquals("isImplSpecificDisconnected1",33,documentPosition1);
+ documentPosition2 = docComp.compareDocumentPosition(doc);
+ assert("notBothPreceding",documentPosition1 != documentPosition2);
+ assert("notBothFollowing",documentPosition1 != documentPosition2);
+ assertEquals("isImplSpecificDisconnected2",33,documentPosition2);
+ documentPosition3 = doc.compareDocumentPosition(docComp);
+ assertEquals("isConsistent",documentPosition1,documentPosition3);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.xhtml
new file mode 100644
index 0000000..fa9c817
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04-expected.txt
new file mode 100644
index 0000000..07b7c3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.js
new file mode 100644
index 0000000..eb32a2a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.js
@@ -0,0 +1,106 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition to check that no flags are set in return when the document position of a
+ Document node is compared with itself
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition04() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition04") != null) return;
+ var doc;
+ var documentPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ documentPosition = doc.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionNoFlags04",0,documentPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.xhtml
new file mode 100644
index 0000000..642b0cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt
new file mode 100644
index 0000000..7ec7d2d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition05
+Status error
+Message Line 117: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.js
new file mode 100644
index 0000000..cfc2244
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the document position of a Document and a new Document node
+ are disconnected, implementation-specific and preceding/following.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition05() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition05") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var documentPosition1;
+ var documentPosition2;
+ var documentPosition3;
+ var nullDocType = null;
+
+ var rootName;
+ var rootNS;
+ var docElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ documentPosition1 = doc.compareDocumentPosition(newDoc);
+ assertEquals("isImplSpecificDisconnected1",33,documentPosition1);
+ documentPosition2 = newDoc.compareDocumentPosition(doc);
+ assertEquals("isImplSpecificDisconnected2",33,documentPosition2);
+ assert("notBothPreceding",documentPosition1 != documentPosition2);
+ assert("notBothFollowing",documentPosition1 != documentPosition2);
+ documentPosition3 = doc.compareDocumentPosition(newDoc);
+ assertEquals("isConsistent",documentPosition1,documentPosition3);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.xhtml
new file mode 100644
index 0000000..89a7632
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodecomparedocumentposition05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06-expected.txt
new file mode 100644
index 0000000..bcee3cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.js
new file mode 100644
index 0000000..9ae62b1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition06() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition06") != null) return;
+ var doc;
+ var docElem;
+ var documentPositionDoc;
+ var documentPositionDocElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ documentPositionDoc = doc.compareDocumentPosition(docElem);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing06",20,documentPositionDoc);
+ documentPositionDocElem = docElem.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpotionContainsPRECEDING06",10,documentPositionDocElem);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.xhtml
new file mode 100644
index 0000000..057859e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07-expected.txt
new file mode 100644
index 0000000..e659a57
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07-expected.txt
@@ -0,0 +1,4 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition07
+Status Success
+
+
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.js
new file mode 100644
index 0000000..3bafa0f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the document compared contains and precedes the new
+ newElement, and the newElement is contained and follows the document.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition07() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition07") != null) return;
+ var doc;
+ var docElem;
+ var newElem;
+ var documentPosition;
+ var documentElementPosition;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ newElem = doc.createElementNS("http://www.w3.org/1999/xhtml","br");
+ appendedChild = docElem.appendChild(newElem);
+ documentPosition = doc.compareDocumentPosition(newElem);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing07",20,documentPosition);
+ documentElementPosition = newElem.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionContainedPRECEDING07",10,documentElementPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.xhtml
new file mode 100644
index 0000000..8070515
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08-expected.txt
new file mode 100644
index 0000000..deb52e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.js
new file mode 100644
index 0000000..68f39c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the Document node contains and precedes an Element,
+ and the Element is contained and follows the Document node.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition08() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition08") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var documentPosition;
+ var elementPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ documentPosition = doc.compareDocumentPosition(elem);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing08",20,documentPosition);
+ elementPosition = elem.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING08",10,elementPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.xhtml
new file mode 100644
index 0000000..4bb9441
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09-expected.txt
new file mode 100644
index 0000000..7634cac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.js
new file mode 100644
index 0000000..18c47f4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition09() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition09") != null) return;
+ var doc;
+ var elem;
+ var newElem;
+ var elemList;
+ var documentPosition;
+ var documentElementPosition;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ newElem = doc.createElementNS("http://www.w3.org/1999/xhtml","br");
+ appendedChild = elem.appendChild(newElem);
+ documentPosition = doc.compareDocumentPosition(newElem);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing09",20,documentPosition);
+ documentElementPosition = newElem.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING09",10,documentElementPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.xhtml
new file mode 100644
index 0000000..b81ae89
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10-expected.txt
new file mode 100644
index 0000000..812ab4c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.js
new file mode 100644
index 0000000..e8bbe27
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the document node precedes and contains its default Attr node.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition10() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition10") != null) return;
+ var doc;
+ var elem;
+ var dir;
+ var elemList;
+ var attrPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ dir = elem.getAttributeNode("dir");
+ attrPosition = dir.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionPRECEDINGContains10",10,attrPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.xhtml
new file mode 100644
index 0000000..2af5839
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11-expected.txt
new file mode 100644
index 0000000..eb1e97e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.js
new file mode 100644
index 0000000..e1089c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the Document node precedes and contains the Attr node.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition11() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition11") != null) return;
+ var doc;
+ var elem;
+ var newAttr;
+ var elemList;
+ var documentPosition;
+ var attrPosition;
+ var replacedAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ newAttr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ replacedAttr = elem.setAttributeNodeNS(newAttr);
+ attrPosition = newAttr.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionPRECEDINGContains11",10,attrPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.xhtml
new file mode 100644
index 0000000..02505d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12-expected.txt
new file mode 100644
index 0000000..65697e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.js
new file mode 100644
index 0000000..6a62f57
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition12() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition12") != null) return;
+ var doc;
+ var pi;
+ var documentPosition;
+ var piPosition;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ pi = doc.createProcessingInstruction("PITarget","PIDATA");
+ appendedChild = doc.appendChild(pi);
+ documentPosition = doc.compareDocumentPosition(pi);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing12",20,documentPosition);
+ piPosition = pi.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING12",10,piPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.xhtml
new file mode 100644
index 0000000..2104d6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13-expected.txt
new file mode 100644
index 0000000..dbdb890
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition13
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.js
new file mode 100644
index 0000000..b3d74d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition13() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition13") != null) return;
+ var doc;
+ var comment;
+ var elem;
+ var elemList;
+ var documentPosition;
+ var commentPosition;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ comment = doc.createComment("Another Comment");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ appendedChild = elem.appendChild(comment);
+ documentPosition = doc.compareDocumentPosition(comment);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing13",20,documentPosition);
+ commentPosition = comment.compareDocumentPosition(doc);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING13",10,commentPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.xhtml
new file mode 100644
index 0000000..bb713e0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.js
new file mode 100644
index 0000000..b605588
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition14() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition14") != null) return;
+ var doc;
+ var docFrag;
+ var docElem;
+ var docFragChild;
+ var docFragPosition;
+ var docFragChildPosition;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ docFrag = doc.createDocumentFragment();
+ appendedChild = docFrag.appendChild(docElem);
+ docFragChild = docFrag.firstChild;
+
+ docFragPosition = docFrag.compareDocumentPosition(docFragChild);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING14",20,docFragPosition);
+ docFragChildPosition = docFragChild.compareDocumentPosition(docFrag);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing14",10,docFragChildPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.xhtml-disabled
new file mode 100644
index 0000000..ce047b5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition14.xhtml-disabled
@@ -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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.js
new file mode 100644
index 0000000..ad88be1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition15() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition15") != null) return;
+ var doc;
+ var docFrag;
+ var docElem;
+ var attr;
+ var docFragChild;
+ var attrPosition;
+ var docFragChildPosition;
+ var appendedChild;
+ var attrNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ docFrag = doc.createDocumentFragment();
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ attrNode = docElem.setAttributeNodeNS(attr);
+ appendedChild = docFrag.appendChild(docElem);
+ docFragChild = docFrag.firstChild;
+
+ docFragChildPosition = docFragChild.compareDocumentPosition(attr);
+ assertEquals("nodecomparedocumentpositionIsContainedFollows15",20,docFragChildPosition);
+ attrPosition = attr.compareDocumentPosition(docFragChild);
+ assertEquals("nodecomparedocumentpositionPRECEEDINGContains15",10,attrPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.xhtml-disabled
new file mode 100644
index 0000000..8452f44
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition15.xhtml-disabled
@@ -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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt
new file mode 100644
index 0000000..d23e58b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition16
+Status error
+Message Line 109: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.js
new file mode 100644
index 0000000..debe4a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition16() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition16") != null) return;
+ var doc;
+ var docFrag;
+ var attr;
+ var attrCloned;
+ var docFragPosition;
+ var position1;
+ var position2;
+ var position3;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ attrCloned = attr.cloneNode(true);
+ position1 = docFrag.compareDocumentPosition(attrCloned);
+ assertEquals("isImplSpecificDisconnected1",33,position1);
+ position2 = attrCloned.compareDocumentPosition(docFrag);
+ assert("notBothPreceding",position1 != position2);
+ assert("notBothFollowing",position1 != position2);
+ assertEquals("isImplSpecificDisconnected2",33,position2);
+ position3 = docFrag.compareDocumentPosition(attrCloned);
+ assertEquals("isConsistent",position1,position3);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.xhtml
new file mode 100644
index 0000000..2a783bb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17-expected.txt
new file mode 100644
index 0000000..e4dc35b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition17
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.js
new file mode 100644
index 0000000..46c5ac4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition17() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition17") != null) return;
+ var doc;
+ var pi1;
+ var pi2;
+ var pi1Position;
+ var pi2Position;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ pi1 = doc.createProcessingInstruction("PI1","");
+ pi2 = doc.createProcessingInstruction("PI2","");
+ appendedChild = doc.appendChild(pi1);
+ appendedChild = doc.appendChild(pi2);
+ pi1Position = pi1.compareDocumentPosition(pi2);
+ assertEquals("nodecomparedocumentpositionFollowing17",4,pi1Position);
+ pi2Position = pi2.compareDocumentPosition(pi1);
+ assertEquals("nodecomparedocumentpositionPRECEDING17",2,pi2Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.xhtml
new file mode 100644
index 0000000..8b2ce98
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18-expected.txt
new file mode 100644
index 0000000..69875e0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition18
+Status Success
+T1T2
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.js
new file mode 100644
index 0000000..53b5272
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition18() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition18") != null) return;
+ var doc;
+ var docElem;
+ var txt1;
+ var txt2;
+ var txt1Position;
+ var txt2Position;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ txt1 = doc.createTextNode("T1");
+ txt2 = doc.createTextNode("T2");
+ appendedChild = docElem.appendChild(txt1);
+ appendedChild = docElem.appendChild(txt2);
+ txt1Position = txt1.compareDocumentPosition(txt2);
+ assertEquals("nodecomparedocumentpositionFollowing18",4,txt1Position);
+ txt2Position = txt2.compareDocumentPosition(txt1);
+ assertEquals("nodecomparedocumentpositionPRECEDING18",2,txt2Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.xhtml
new file mode 100644
index 0000000..e68723f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19-expected.txt
new file mode 100644
index 0000000..8563d13
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition19
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.js
new file mode 100644
index 0000000..c00fbb7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("coalescing", false);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition19() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition19") != null) return;
+ var doc;
+ var elemList;
+ var elemStrong;
+ var cdata1;
+ var cdata2;
+ var aNode;
+ var cdata1Position;
+ var cdata2Position;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagNameNS("*","strong");
+ elemStrong = elemList.item(1);
+ cdata2 = elemStrong.lastChild;
+
+ aNode = cdata2.previousSibling;
+
+ cdata1 = aNode.previousSibling;
+
+ cdata1Position = cdata1.compareDocumentPosition(cdata2);
+ assertEquals("nodecomparedocumentposition19_cdata2Follows",4,cdata1Position);
+ cdata2Position = cdata2.compareDocumentPosition(cdata1);
+ assertEquals("nodecomparedocumentposition_cdata1Precedes",2,cdata2Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.xhtml
new file mode 100644
index 0000000..cefb356
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20-expected.txt
new file mode 100644
index 0000000..1e15f95
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition20
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.js
new file mode 100644
index 0000000..de17bb5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("coalescing", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition20() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition20") != null) return;
+ var doc;
+ var elemList;
+ var elemName;
+ var cdata;
+ var txt;
+ var txtPosition;
+ var cdataPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elemName = elemList.item(1);
+ txt = elemName.firstChild;
+
+ cdata = elemName.lastChild;
+
+ txtPosition = txt.compareDocumentPosition(cdata);
+ assertEquals("nodecomparedocumentpositionFollowingg20",4,txtPosition);
+ cdataPosition = cdata.compareDocumentPosition(txt);
+ assertEquals("nodecomparedocumentpositionPRECEDING20",2,cdataPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.xhtml
new file mode 100644
index 0000000..278e4e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21-expected.txt
new file mode 100644
index 0000000..02d6cfe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition21
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.js
new file mode 100644
index 0000000..cecb339
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("coalescing", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition21() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition21") != null) return;
+ var doc;
+ var elemList;
+ var elemName1;
+ var elemName2;
+ var txt1;
+ var txt2;
+ var txt1Position;
+ var txt2Position;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elemName1 = elemList.item(0);
+ elemName2 = elemList.item(1);
+ txt1 = elemName1.firstChild;
+
+ txt2 = elemName2.firstChild;
+
+ txt1Position = txt1.compareDocumentPosition(txt2);
+ assertEquals("nodecomparedocumentpositionFollowing21",4,txt1Position);
+ txt2Position = txt2.compareDocumentPosition(txt1);
+ assertEquals("nodecomparedocumentpositionPRECEDING21",2,txt2Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.xhtml
new file mode 100644
index 0000000..b715222
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt
new file mode 100644
index 0000000..85c0626
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition22
+Status error
+Message Line 109: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.js
new file mode 100644
index 0000000..2a5fd19
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("coalescing", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the Entity node precedes the Notation node and the Notation
+ node follows the Entity node.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition22() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition22") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var notationsMap;
+ var entity;
+ var notation;
+ var entityPosition;
+ var notationPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ notationsMap = docType.notations;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ notation = notationsMap.getNamedItem("notation1");
+ entityPosition = entity.compareDocumentPosition(notation);
+ assertEquals("nodecomparedocumentpositionFollowing22",4,entityPosition);
+ notationPosition = notation.compareDocumentPosition(entity);
+ assertEquals("nodecomparedocumentpositionPRECEDING22",2,notationPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.xhtml
new file mode 100644
index 0000000..9468553
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition22.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition22.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt
new file mode 100644
index 0000000..d4ec6d7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition23
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.js
new file mode 100644
index 0000000..5ef5de7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the document position of an Entity node compared to another
+ Entity node following it in DocumentType is implementation specific.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition23() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition23") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var entity2;
+ var position1;
+ var position2;
+ var position3;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ entity2 = entitiesMap.getNamedItem("delta");
+ position1 = entity.compareDocumentPosition(entity2);
+ assertEquals("isImplSpecificDisconnected1",32,position1);
+ position2 = entity2.compareDocumentPosition(entity);
+ assert("notBothPreceding",position1 != position2);
+ assert("notBothFollowing",position1 != position2);
+ assertEquals("isImplSpecificDisconnected2",32,position2);
+ position3 = entity.compareDocumentPosition(entity2);
+ assertEquals("isConsistent",position1,position3);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.xhtml
new file mode 100644
index 0000000..d9b3ad4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition23.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition23.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt
new file mode 100644
index 0000000..8e931ee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition24
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.js
new file mode 100644
index 0000000..d3857b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition check if the return value of document position of a Notation node compared to another
+ that is the same is not flagged.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition24() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition24") != null) return;
+ var doc;
+ var docType;
+ var notaionsMap;
+ var notation;
+ var notation2;
+ var notationPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ notaionsMap = docType.notations;
+
+ notation = notaionsMap.getNamedItem("notation1");
+ notation2 = notaionsMap.getNamedItem("notation1");
+ notationPosition = notation.compareDocumentPosition(notation2);
+ assertEquals("nodecomparedocumentposition24",0,notationPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.xhtml
new file mode 100644
index 0000000..4659ae6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition24.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition24.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25-expected.txt
new file mode 100644
index 0000000..81ab691
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition25
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.js
new file mode 100644
index 0000000..6ad1af1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition25() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition25") != null) return;
+ var doc;
+ var elemList;
+ var elemName;
+ var entRef;
+ var elementPosition;
+ var entRefPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("var");
+ elemName = elemList.item(2);
+ entRef = elemName.firstChild;
+
+ elementPosition = elemName.compareDocumentPosition(entRef);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing25",20,elementPosition);
+ entRefPosition = entRef.compareDocumentPosition(elemName);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING25",10,entRefPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.xhtml
new file mode 100644
index 0000000..3bb9152
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26-expected.txt
new file mode 100644
index 0000000..9024373
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition26
+Status failure
+Message entRefChild1NotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.js
new file mode 100644
index 0000000..3e8b3fa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition26";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition26() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition26") != null) return;
+ var doc;
+ var varList;
+ var varElem;
+ var entRef;
+ var entRefChild1;
+ var entRefPosition;
+ var entRefChild1Position;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+ (getImplementationAttribute("expandEntityReferences") == false)
+ ) {
+ varList = doc.getElementsByTagName("var");
+ varElem = varList.item(2);
+ assertNotNull("varElemNotNull",varElem);
+entRef = varElem.firstChild;
+
+ assertNotNull("entRefNotNull",entRef);
+
+ }
+
+ else {
+ entRef = doc.createEntityReference("ent4");
+
+ }
+ entRefChild1 = entRef.firstChild;
+
+ assertNotNull("entRefChild1NotNull",entRefChild1);
+entRefPosition = entRef.compareDocumentPosition(entRefChild1);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing26",20,entRefPosition);
+ entRefChild1Position = entRefChild1.compareDocumentPosition(entRef);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING26",10,entRefChild1Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition26();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.xhtml
new file mode 100644
index 0000000..c733e0d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition26.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition26.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27-expected.txt
new file mode 100644
index 0000000..4729b4c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition27
+Status failure
+Message entRefChild1NotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.js
new file mode 100644
index 0000000..01e19b7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition27";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition27() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition27") != null) return;
+ var doc;
+ var varList;
+ var varElem;
+ var entRef;
+ var entRefChild1;
+ var entRefPosition;
+ var entRefChild1Position;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+ (getImplementationAttribute("expandEntityReferences") == false)
+ ) {
+ varList = doc.getElementsByTagName("var");
+ varElem = varList.item(2);
+ assertNotNull("varElemNotNull",varElem);
+entRef = varElem.firstChild;
+
+ assertNotNull("entRefNotNull",entRef);
+
+ }
+
+ else {
+ entRef = doc.createEntityReference("ent4");
+
+ }
+ entRefChild1 = entRef.lastChild;
+
+ assertNotNull("entRefChild1NotNull",entRefChild1);
+entRefPosition = entRef.compareDocumentPosition(entRefChild1);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing27",20,entRefPosition);
+ entRefChild1Position = entRefChild1.compareDocumentPosition(entRef);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING",10,entRefChild1Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition27();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.xhtml
new file mode 100644
index 0000000..31abe01
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition27.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition27.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28-expected.txt
new file mode 100644
index 0000000..73d3249
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition28
+Status failure
+Message entRefChild1NotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.js
new file mode 100644
index 0000000..9f2b28e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition28";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition28() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition28") != null) return;
+ var doc;
+ var varList;
+ var varElem;
+ var entRef;
+ var entRefChild1;
+ var entRefChild2;
+ var entRefChild1Position;
+ var entRefChild2Position;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+ (getImplementationAttribute("expandEntityReferences") == false)
+ ) {
+ varList = doc.getElementsByTagName("var");
+ varElem = varList.item(2);
+ assertNotNull("varElemNotNull",varElem);
+entRef = varElem.firstChild;
+
+ assertNotNull("entRefNotNull",entRef);
+
+ }
+
+ else {
+ entRef = doc.createEntityReference("ent4");
+
+ }
+ entRefChild1 = entRef.firstChild;
+
+ assertNotNull("entRefChild1NotNull",entRefChild1);
+entRefChild2 = entRef.lastChild;
+
+ assertNotNull("entRefChild2NotNull",entRefChild2);
+entRefChild1Position = entRefChild1.compareDocumentPosition(entRefChild2);
+ assertEquals("nodecomparedocumentpositionFollowing28",4,entRefChild1Position);
+ entRefChild2Position = entRefChild2.compareDocumentPosition(entRefChild1);
+ assertEquals("nodecomparedocumentpositionPRECEDING28",2,entRefChild2Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition28();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.xhtml
new file mode 100644
index 0000000..e250829
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition28.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition28.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29-expected.txt
new file mode 100644
index 0000000..92ca781
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition29
+Status failure
+Message entRefChild1NotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.js
new file mode 100644
index 0000000..fd9fd45
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition29";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition29() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition29") != null) return;
+ var doc;
+ var docElem;
+ var entRef1;
+ var entRef2;
+ var entRefChild1;
+ var entRefChild2;
+ var entRefChild1Position;
+ var entRefChild2Position;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ entRef1 = doc.createEntityReference("ent4");
+ entRef2 = doc.createEntityReference("ent4");
+ docElem = doc.documentElement;
+
+ appendedChild = docElem.appendChild(entRef1);
+ appendedChild = docElem.appendChild(entRef2);
+ entRefChild1 = entRef1.firstChild;
+
+ assertNotNull("entRefChild1NotNull",entRefChild1);
+entRefChild2 = entRef2.lastChild;
+
+ assertNotNull("entRefChild2NotNull",entRefChild2);
+entRefChild1Position = entRefChild1.compareDocumentPosition(entRefChild2);
+ assertEquals("nodecomparedocumentpositionFollowing29",4,entRefChild1Position);
+ entRefChild2Position = entRefChild2.compareDocumentPosition(entRefChild1);
+ assertEquals("nodecomparedocumentpositionPRECEDING29",2,entRefChild2Position);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition29();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.xhtml
new file mode 100644
index 0000000..ea3d2a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition29.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition29.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30-expected.txt
new file mode 100644
index 0000000..3798757
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition30
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.js
new file mode 100644
index 0000000..71cd310
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition30";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareTreePosition check if comparedocumentposition invoked on the first name with
+ the first position node as a parameter returns FOLLOWING.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition30() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition30") != null) return;
+ var doc;
+ var nameList;
+ var positionList;
+ var strong;
+ var code;
+ var namePosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ nameList = doc.getElementsByTagName("strong");
+ strong = nameList.item(0);
+ positionList = doc.getElementsByTagName("code");
+ code = positionList.item(0);
+ namePosition = code.compareDocumentPosition(strong);
+ assertEquals("nodecomparedocumentpositionFollowing30",2,namePosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition30();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.xhtml
new file mode 100644
index 0000000..532a514
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition30.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition30.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31-expected.txt
new file mode 100644
index 0000000..6513e0e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition31
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.js
new file mode 100644
index 0000000..5e7da2a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition31";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition31() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition31") != null) return;
+ var doc;
+ var nameList;
+ var positionList;
+ var strong;
+ var code;
+ var newElem;
+ var namePosition;
+ var elemPosition;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ nameList = doc.getElementsByTagName("strong");
+ strong = nameList.item(0);
+ positionList = doc.getElementsByTagName("code");
+ code = positionList.item(1);
+ newElem = doc.createElementNS("http://www.w3.org/1999/xhtml","br");
+ appendedChild = code.appendChild(newElem);
+ namePosition = strong.compareDocumentPosition(newElem);
+ assertEquals("nodecomparedocumentpositionFollowing31",4,namePosition);
+ elemPosition = newElem.compareDocumentPosition(strong);
+ assertEquals("nodecomparedocumentpositionPRECEDING31",2,elemPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition31();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.xhtml
new file mode 100644
index 0000000..ec7b5e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition31.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition31.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32-expected.txt
new file mode 100644
index 0000000..5239170
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition32
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.js
new file mode 100644
index 0000000..b238f5b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition32";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition32() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition32") != null) return;
+ var doc;
+ var doc2;
+ var nameList;
+ var positionList;
+ var strong;
+ var code;
+ var documentPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc2 = doc;
+nameList = doc.getElementsByTagName("strong");
+ strong = nameList.item(0);
+ positionList = doc2.getElementsByTagName("code");
+ code = positionList.item(0);
+ documentPosition = strong.compareDocumentPosition(code);
+ assertEquals("nodecomparedocumentpositionFollowing32",4,documentPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition32();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.xhtml
new file mode 100644
index 0000000..dbe5a64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition32.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition32.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt
new file mode 100644
index 0000000..e567c92
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition33
+Status error
+Message Line 116: ReferenceError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.js
new file mode 100644
index 0000000..ef971d4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition33";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition33() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition33") != null) return;
+ var doc;
+ var elem;
+ var attr;
+ var position1;
+ var position2;
+ var position3;
+ var position4;
+ var position5;
+ var replacedAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","br");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ replacedAttr = elem.setAttributeNodeNS(attr);
+ position4 = elem.compareDocumentPosition(attr);
+ assertEquals("nodecomparedocumentposition3FollowingisContained33",20,position4);
+ position5 = attr.compareDocumentPosition(elem);
+ assertEquals("nodecomparedocumentposition4ContainsPRECEDING33",10,position5);
+ position1 = doc.compareDocumentPosition(elem);
+ assertEquals("isImplSpecificDisconnected1",33,position1);
+ position2 = elem.compareDocumentPosition(doc);
+ assert("notBothPreceding",position1 != position2);
+ assert("notBothFollowing",position1 != position2);
+ assertEquals("isImplSpecificDisconnected2",33,position2);
+ position3 = doc.compareDocumentPosition(elem);
+ assertEquals("isConsistent",position1,position3);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition33();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.xhtml
new file mode 100644
index 0000000..4307f81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition33.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition33.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34-expected.txt
new file mode 100644
index 0000000..86b83da
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition34
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.js
new file mode 100644
index 0000000..6f17af9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition34";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition34() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition34") != null) return;
+ var doc;
+ var elemMain;
+ var elem;
+ var txt;
+ var pi;
+ var elementToTxtPosition;
+ var txtToPiPosition;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemMain = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","br");
+ txt = doc.createTextNode("TEXT");
+ pi = doc.createProcessingInstruction("PIT","PID");
+ appendedChild = elemMain.appendChild(txt);
+ appendedChild = elemMain.appendChild(elem);
+ appendedChild = elemMain.appendChild(pi);
+ elementToTxtPosition = txt.compareDocumentPosition(elem);
+ assertEquals("nodecomparedocumentpositionFollowing34",4,elementToTxtPosition);
+ txtToPiPosition = pi.compareDocumentPosition(txt);
+ assertEquals("nodecomparedocumentpositionPRECEDING34",2,txtToPiPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition34();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.xhtml
new file mode 100644
index 0000000..916855f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition34.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition34.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35-expected.txt
new file mode 100644
index 0000000..245b5f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition35
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.js
new file mode 100644
index 0000000..925e2c7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition35";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition to check if the Element contains and precedes its default attribute
+ and that the attribute follows and iscontained by the Element
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition35() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition35") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr;
+ var elementPosition;
+ var attrPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attr = elem.getAttributeNode("dir");
+ elementPosition = elem.compareDocumentPosition(attr);
+ assertEquals("nodecomparedocumentpositionIsContainedFollowing35",20,elementPosition);
+ attrPosition = attr.compareDocumentPosition(elem);
+ assertEquals("nodecomparedocumentpositionPRECEDINGContains35",10,attrPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition35();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.xhtml
new file mode 100644
index 0000000..16a67f9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition35.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition35.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36-expected.txt
new file mode 100644
index 0000000..124fd5b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition36
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.js
new file mode 100644
index 0000000..fa614d9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition36";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition36() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition36") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var elemListFollows;
+ var elemFollows;
+ var attr;
+ var attrPosition;
+ var elemFollowsPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attr = elem.getAttributeNode("dir");
+ elemListFollows = doc.getElementsByTagName("strong");
+ elemFollows = elemListFollows.item(3);
+ attrPosition = attr.compareDocumentPosition(elemFollows);
+ assertEquals("nodecomparedocumentpositionFollowing36",4,attrPosition);
+ elemFollowsPosition = elemFollows.compareDocumentPosition(attr);
+ assertEquals("nodecomparedocumentpositionPRECEEDING36",2,elemFollowsPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition36();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.xhtml
new file mode 100644
index 0000000..39e6954
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition36.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition36.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37-expected.txt
new file mode 100644
index 0000000..de718ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition37
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.js
new file mode 100644
index 0000000..f10ae09
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition37";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition37() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition37") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var txt;
+ var attr;
+ var attrPosition;
+ var txtPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(3);
+ attr = elem.getAttributeNode("class");
+ txt = elem.firstChild;
+
+ attrPosition = attr.compareDocumentPosition(txt);
+ assertEquals("nodecomparetreepositionFollowing37",4,attrPosition);
+ txtPosition = txt.compareDocumentPosition(attr);
+ assertEquals("nodecomparetreepositionPRECEDING37",2,txtPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition37();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.xhtml
new file mode 100644
index 0000000..89b098b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition37.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition37.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38-expected.txt
new file mode 100644
index 0000000..1a2c6f5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition38
+Status failure
+Message nodecomparedocumentpositionIsContainsFollowing38: assertEquals failed, actual 33, expected 20.
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.js
new file mode 100644
index 0000000..4031b47
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition38";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition38() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition38") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var txt;
+ var attr;
+ var attrPosition;
+ var attrChildPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(3);
+ attr = elem.getAttributeNode("class");
+ txt = attr.firstChild;
+
+ attrPosition = attr.compareDocumentPosition(txt);
+ assertEquals("nodecomparedocumentpositionIsContainsFollowing38",20,attrPosition);
+ attrChildPosition = txt.compareDocumentPosition(attr);
+ assertEquals("nodecomparedocumentpositionContainsPRECEDING38",10,attrChildPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition38();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.xhtml
new file mode 100644
index 0000000..35dc6d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition38.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition38.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39-expected.txt
new file mode 100644
index 0000000..9fc277b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition39
+Status failure
+Message isImplementationSpecific: assertEquals failed, actual 36, expected 32.
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.js
new file mode 100644
index 0000000..83cce23
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition39";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition to check if the document position of the class's attribute
+ when compared with the local1 attribute node is implementation_specific.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition39() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition39") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr1;
+ var attr2;
+ var attrPosition;
+ var swappedPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(3);
+ attr1 = elem.getAttributeNode("class");
+ attr2 = elem.getAttributeNode("xsi:noNamespaceSchemaLocation");
+ attrPosition = attr1.compareDocumentPosition(attr2);
+ assertEquals("isImplementationSpecific",32,attrPosition);
+ assertEquals("otherBitsZero",0,attrPosition);
+ assert("eitherFollowingOrPreceding",0 != attrPosition);
+ swappedPosition = attr2.compareDocumentPosition(attr1);
+ assert("onlyOnePreceding",swappedPosition != attrPosition);
+ assert("onlyOneFollowing",swappedPosition != attrPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition39();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.xhtml
new file mode 100644
index 0000000..449dd88
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition39.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition39.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40-expected.txt
new file mode 100644
index 0000000..3dc1ade
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition40
+Status failure
+Message isImplementationSpecific: assertEquals failed, actual 36, expected 32.
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.js b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.js
new file mode 100644
index 0000000..40e70fa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition40";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using compareDocumentPosition to check if the document position of the class's attribute
+ when compared with a new attribute node is implementation_specific
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
+*/
+function nodecomparedocumentposition40() {
+ var success;
+ if(checkInitialization(builder, "nodecomparedocumentposition40") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr1;
+ var attr2;
+ var attrPosition;
+ var swappedPosition;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(3);
+ attr1 = elem.getAttributeNode("class");
+ elem.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang","FR-fr");
+ attr2 = elem.getAttributeNode("xml:lang");
+ attrPosition = attr1.compareDocumentPosition(attr2);
+ assertEquals("isImplementationSpecific",32,attrPosition);
+ assertEquals("otherBitsZero",0,attrPosition);
+ assert("eitherFollowingOrPreceding",0 != attrPosition);
+ swappedPosition = attr2.compareDocumentPosition(attr1);
+ assert("onlyOnePreceding",swappedPosition != attrPosition);
+ assert("onlyOneFollowing",swappedPosition != attrPosition);
+
+}
+
+
+
+
+function runTest() {
+ nodecomparedocumentposition40();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.xhtml b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.xhtml
new file mode 100644
index 0000000..82462ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition40.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodecomparedocumentposition40.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01-expected.txt
new file mode 100644
index 0000000..2100e42
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri01
+Status failure
+Message notNull: assertEquals failed, actual nodegetbaseuri01, expected barfoo.
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.js
new file mode 100644
index 0000000..c6e4cd7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Call Node.getBaseURI() on a test document. Should be not-null and same as Document.getDocumentURI().
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Document
+*/
+function nodegetbaseuri01() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri01") != null) return;
+ var doc;
+ var baseURI;
+ var documentURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ baseURI = doc.baseURI;
+
+ assertURIEquals("notNull",null,null,null,null,"barfoo",null,null,true,baseURI);
+documentURI = doc.documentURI;
+
+ assertEquals("sameAsDocumentURI",documentURI,baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.xhtml
new file mode 100644
index 0000000..fae509b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02-expected.txt
new file mode 100644
index 0000000..a1b59b7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.js
new file mode 100644
index 0000000..1a97ede
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using getBaseURI check if the baseURI attribute of a new Document node is null
+ and if affected by changes in Document.documentURI.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Document
+*/
+function nodegetbaseuri02() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var baseURI;
+ var rootNS;
+ var rootName;
+ var docElem;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ baseURI = newDoc.baseURI;
+
+ assertNull("baseURIIsNull",baseURI);
+ newDoc.documentURI = "http://www.example.com/sample.xml";
+
+ baseURI = newDoc.baseURI;
+
+ assertEquals("baseURISameAsDocURI","http://www.example.com/sample.xml".toLowerCase(),baseURI.toLowerCase());
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.xhtml
new file mode 100644
index 0000000..8cd4f20
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03-expected.txt
new file mode 100644
index 0000000..d44fa0f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.js
new file mode 100644
index 0000000..cd83cae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check that Node.baseURI is null for a DocumentType as defined in the Infoset Mapping (Appendix C).
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2DocumentType
+*/
+function nodegetbaseuri03() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri03") != null) return;
+ var doc;
+ var docType;
+ var baseURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docType = doc.doctype;
+
+ baseURI = docType.baseURI;
+
+ assertNull("nodegetbaseuri03",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.xhtml
new file mode 100644
index 0000000..4400c14
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04-expected.txt
new file mode 100644
index 0000000..f037add
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri04
+Status failure
+Message baseURI: assertEquals failed, actual nodegetbaseuri04, expected barfoo.
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.js
new file mode 100644
index 0000000..276eade
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Node.baseURI for a document element without an xml:base attribute should be same as Document.documentURI.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Document
+*/
+function nodegetbaseuri04() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri04") != null) return;
+ var doc;
+ var docElem;
+ var baseURI;
+ var documentURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ baseURI = docElem.baseURI;
+
+ assertURIEquals("baseURI",null,null,null,null,"barfoo",null,null,true,baseURI);
+documentURI = doc.documentURI;
+
+ assertEquals("baseURIEqualsDocURI",documentURI,baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.xhtml
new file mode 100644
index 0000000..012ba15
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.js
new file mode 100644
index 0000000..dca8214
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using getBaseURI check if the baseURI attribute of this DocumentElement is http://www.w3.org/DOM/L3Test.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element
+*/
+function nodegetbaseuri05() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri05") != null) return;
+ var doc;
+ var docElem;
+ var baseURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ docElem = doc.documentElement;
+
+ baseURI = docElem.baseURI;
+
+ assertEquals("nodegetbaseuri05","http://www.w3.org/DOM/L3Test",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.xhtml
new file mode 100644
index 0000000..36c6382
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06-expected.txt
new file mode 100644
index 0000000..5d1f11b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.js
new file mode 100644
index 0000000..8ab5be4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.???
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element
+*/
+function nodegetbaseuri06() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri06") != null) return;
+ var doc;
+ var newElement;
+ var baseURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ newElement = doc.createElementNS("http://www.w3.org/1999/xhtml","br");
+ baseURI = doc.baseURI;
+
+ assertNotNull("nodegetbaseuri06",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.xhtml
new file mode 100644
index 0000000..cafcedd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri06.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri06.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.js
new file mode 100644
index 0000000..990e357
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Append a created element to a document and check that its baseURI
+ is inherited from its parent.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element
+*/
+function nodegetbaseuri07() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri07") != null) return;
+ var doc;
+ var newElement;
+ var baseURI;
+ var appended;
+ var bodyList;
+ var bodyElem;
+ var htmlNS = "http://www.w3.org/1999/xhtml";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ newElement = doc.createElementNS(htmlNS,"meta");
+ newElement.setAttribute("content","text/xml");
+ appended = bodyElem.appendChild(newElement);
+ baseURI = newElement.baseURI;
+
+ assertEquals("nodegetbaseuri07","http://www.w3.org/DOM/EmployeeID",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.xhtml
new file mode 100644
index 0000000..8bf3818
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri07.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri07.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.js
new file mode 100644
index 0000000..7f869f1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Get the baseURI value on an element with an explicit xml:base attribute.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Element
+*/
+function nodegetbaseuri09() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri09") != null) return;
+ var doc;
+ var bodyElem;
+ var bodyList;
+ var baseURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ baseURI = bodyElem.baseURI;
+
+ assertEquals("nodegetbaseuri09","http://www.w3.org/DOM/EmployeeID",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.xhtml
new file mode 100644
index 0000000..a97f9c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri09.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri09.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.js
new file mode 100644
index 0000000..e353920
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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".
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2ProcessingInstruction
+*/
+function nodegetbaseuri10() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri10") != null) return;
+ var doc;
+ var docElem;
+ var newPI;
+ var baseURI;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ docElem = doc.documentElement;
+
+ newPI = doc.createProcessingInstruction("TARGET","DATA");
+ appendedChild = docElem.appendChild(newPI);
+ baseURI = newPI.baseURI;
+
+ assertEquals("nodegetbaseuri10","http://www.w3.org/DOM/L3Test",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.xhtml
new file mode 100644
index 0000000..dfbf580
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri10.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri10.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.js
new file mode 100644
index 0000000..c1049ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2ProcessingInstruction
+*/
+function nodegetbaseuri11() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri11") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var newPI;
+ var imported;
+ var baseURI;
+ var docURI;
+ var appendedChild;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDocType);
+ newPI = newDoc.createProcessingInstruction("TARGET","DATA");
+ imported = doc.importNode(newPI,true);
+ appendedChild = doc.appendChild(imported);
+ baseURI = imported.baseURI;
+
+ assertURIEquals("equalsBarfooBase",null,null,null,null,"barfoo_base",null,null,true,baseURI);
+docURI = doc.documentURI;
+
+ assertEquals("equalsDocURI",docURI,baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.xhtml
new file mode 100644
index 0000000..9118126
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri11.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri11.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt
new file mode 100644
index 0000000..04fdfcf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri12
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.js
new file mode 100644
index 0000000..aa8a0cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using getBaseURI verify if the entity epsilon is absolute
+ and matches the URL of the document entity.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Entity
+*/
+function nodegetbaseuri12() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri12") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var baseURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("epsilon");
+ baseURI = entity.baseURI;
+
+ assertURIEquals("entityBase",null,null,null,null,"hc_staff",null,null,true,baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.xhtml
new file mode 100644
index 0000000..3d7bd47
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetbaseuri12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt
new file mode 100644
index 0000000..b3f63d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri13
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.js
new file mode 100644
index 0000000..3d8eb59
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using getBaseURI verify if the notation defined in an internal subset
+ is the base URI of the document.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Notation
+*/
+function nodegetbaseuri13() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri13") != null) return;
+ var doc;
+ var docType;
+ var notationsMap;
+ var notation;
+ var baseURI;
+ var docURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ notationsMap = docType.notations;
+
+ notation = notationsMap.getNamedItem("notation1");
+ baseURI = notation.baseURI;
+
+ docURI = doc.documentURI;
+
+ assertEquals("sameAsDocURI",docURI,baseURI);
+ assertURIEquals("entityBase",null,null,null,null,"hc_staff",null,null,true,baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.xhtml
new file mode 100644
index 0000000..dd49555
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetbaseuri13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt
new file mode 100644
index 0000000..4a3cab7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri14
+Status error
+Message Line 120: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.js
new file mode 100644
index 0000000..b983e37
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using getBaseURI verify if the imported notation notation2 is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Notation
+*/
+function nodegetbaseuri14() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri14") != null) return;
+ var doc;
+ var newDoc;
+ var docElem;
+ var docElemNS;
+ var docElemName;
+ var domImpl;
+ var docType;
+ var notationsMap;
+ var notation;
+ var notationImported;
+ var baseURI;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ docElemNS = docElem.namespaceURI;
+
+ docElemName = docElem.localName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(docElemNS,docElemName,nullDocType);
+ docType = doc.doctype;
+
+ notationsMap = docType.notations;
+
+ notation = notationsMap.getNamedItem("notation2");
+ notationImported = newDoc.importNode(notation,true);
+ baseURI = notationImported.baseURI;
+
+ assertNull("nodegetbaseuri14",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.xhtml
new file mode 100644
index 0000000..c5f3c13
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetbaseuri14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.js
new file mode 100644
index 0000000..5d0db8f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Node.getBaseURI for an Attr is null.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Attr
+*/
+function nodegetbaseuri15() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri15") != null) return;
+ var doc;
+ var baseURI;
+ var attrNode;
+ var bodyList;
+ var bodyElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ attrNode = bodyElem.getAttributeNode("id");
+ baseURI = attrNode.baseURI;
+
+ assertNull("baseURI",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.xhtml
new file mode 100644
index 0000000..b367949
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri15.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri15.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16-expected.txt
new file mode 100644
index 0000000..a9f562f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri16
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.js
new file mode 100644
index 0000000..f0b019b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Node.getBaseURI for an EntityReference to should be the baseURI where the entity declaration occurs.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2EntityReference
+*/
+function nodegetbaseuri16() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri16") != null) return;
+ var doc;
+ var baseURI;
+ var entRef;
+ var pList;
+ var pElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ entRef = pElem.lastChild;
+
+ baseURI = entRef.baseURI;
+
+ assertURIEquals("baseURI",null,null,null,null,"external_barfoo",null,null,true,baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.xhtml
new file mode 100644
index 0000000..1422d1e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri16.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri16.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.js
new file mode 100644
index 0000000..935830a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Node.getBaseURI for an text node is null.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Text
+*/
+function nodegetbaseuri17() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri17") != null) return;
+ var doc;
+ var baseURI;
+ var textNode;
+ var pList;
+ var pElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ textNode = pElem.firstChild;
+
+ baseURI = textNode.baseURI;
+
+ assertNull("baseURI",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.xhtml
new file mode 100644
index 0000000..b85ea19
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri17.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri17.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.js
new file mode 100644
index 0000000..67e7595
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_base");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Node.getBaseURI for an comment node is null.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Comment
+*/
+function nodegetbaseuri18() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri18") != null) return;
+ var doc;
+ var baseURI;
+ var comment;
+ var pList;
+ var pElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_base");
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ comment = pElem.nextSibling;
+
+ baseURI = comment.baseURI;
+
+ assertNull("baseURI",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.xhtml
new file mode 100644
index 0000000..b4046e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri18.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri18.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19-expected.txt
new file mode 100644
index 0000000..91c5aa9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri19
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.js
new file mode 100644
index 0000000..d9a8173
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks baseURI for a text node is null.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2DocumentType
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2EntityReference
+*/
+function nodegetbaseuri19() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri19") != null) return;
+ var doc;
+ var baseURI;
+ var entBaseURI;
+ var entRef;
+ var pList;
+ var pElem;
+ var textNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ assertNotNull("pElemNotNull",pElem);
+
+ if(
+ (getImplementationAttribute("expandEntityReferences") == true)
+ ) {
+ textNode = pElem.firstChild;
+
+ assertNotNull("expansionNotNull",textNode);
+
+ }
+
+ else {
+ entRef = pElem.lastChild;
+
+ assertNotNull("entRefNotNull",entRef);
+textNode = entRef.firstChild;
+
+ assertNotNull("entRefTextNotNull",textNode);
+
+ }
+ baseURI = textNode.baseURI;
+
+ assertNull("baseURI",baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.xhtml
new file mode 100644
index 0000000..673ab3c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri19.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri19.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20-expected.txt
new file mode 100644
index 0000000..361fb08
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri20
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.js b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.js
new file mode 100644
index 0000000..50f891a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "external_barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+baseURI for an element from an entity reference should be the URI of the
+external entity if there is now xml:base attribute.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2EntityReference
+*/
+function nodegetbaseuri20() {
+ var success;
+ if(checkInitialization(builder, "nodegetbaseuri20") != null) return;
+ var doc;
+ var baseURI;
+ var pList;
+ var pElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "external_barfoo");
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(2);
+ assertNotNull("pElemNotNull",pElem);
+baseURI = pElem.baseURI;
+
+ assertURIEquals("equalsExternalBarFoo",null,null,null,null,"external_widget",null,null,true,baseURI);
+
+}
+
+
+
+
+function runTest() {
+ nodegetbaseuri20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.xhtml
new file mode 100644
index 0000000..f942281
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetbaseuri20.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri20.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="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/LayoutTests/dom/xhtml/level3/core/nodegetfeature01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature01-expected.txt
new file mode 100644
index 0000000..5b44630
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature01
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature01.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature01.js
new file mode 100644
index 0000000..87c2baf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature01.js
@@ -0,0 +1,202 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on Document.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature01() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature01") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc;
+featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = doc.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = doc.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = doc.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = doc.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = doc.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = doc.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = doc.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = doc.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = doc.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature01.xhtml
new file mode 100644
index 0000000..3188662
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature02-expected.txt
new file mode 100644
index 0000000..78d6cb2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature02
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature02.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature02.js
new file mode 100644
index 0000000..f38fa9f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature02.js
@@ -0,0 +1,202 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on DocumentFragment.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature02() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature02") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.createDocumentFragment();
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature02.xhtml
new file mode 100644
index 0000000..10c36c2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature03-expected.txt
new file mode 100644
index 0000000..1555a06
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature03
+Status error
+Message Line 102: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature03.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature03.js
new file mode 100644
index 0000000..f17a7f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature03.js
@@ -0,0 +1,203 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on DocumentType.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature03() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature03") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.doctype;
+
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature03.xhtml
new file mode 100644
index 0000000..0eeda18
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature04-expected.txt
new file mode 100644
index 0000000..27a95a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature04
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature04.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature04.js
new file mode 100644
index 0000000..f9f5d20
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature04.js
@@ -0,0 +1,202 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on EntityReference.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature04() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature04") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.createEntityReference("ent1");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature04.xhtml
new file mode 100644
index 0000000..87d85c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature05-expected.txt
new file mode 100644
index 0000000..0227eb4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature05
+Status error
+Message Line 102: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature05.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature05.js
new file mode 100644
index 0000000..74b40ee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature05.js
@@ -0,0 +1,203 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on Element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature05() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature05") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.documentElement;
+
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature05.xhtml
new file mode 100644
index 0000000..9a50f20
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature06-expected.txt
new file mode 100644
index 0000000..29e2553
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature06
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature06.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature06.js
new file mode 100644
index 0000000..84077a4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature06.js
@@ -0,0 +1,202 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on non-namespace attribute.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature06() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature06") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.createAttribute("title");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature06.xhtml
new file mode 100644
index 0000000..81442b1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature06.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature06.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature07-expected.txt
new file mode 100644
index 0000000..77bc663
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature07
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature07.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature07.js
new file mode 100644
index 0000000..7881c02
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature07.js
@@ -0,0 +1,202 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on namespaced attribute.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature07() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature07") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature07.xhtml
new file mode 100644
index 0000000..63affb8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature07.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature07.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature08-expected.txt
new file mode 100644
index 0000000..46396e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature08
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature08.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature08.js
new file mode 100644
index 0000000..72ba9eb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature08.js
@@ -0,0 +1,204 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on ProcessingInstruction.
+
+* @author Curt Arnold
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature08() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature08") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.createProcessingInstruction("test-pi","foo");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature08.xhtml
new file mode 100644
index 0000000..20004ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature08.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature09-expected.txt
new file mode 100644
index 0000000..b701910
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature09
+Status error
+Message Line 102: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature09.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature09.js
new file mode 100644
index 0000000..74cac14
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature09.js
@@ -0,0 +1,203 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on Comment.
+
+* @author Curt Arnold
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature09() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature09") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.createComment("test comment");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature09.xhtml
new file mode 100644
index 0000000..4f2c52e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature09.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature09.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature10-expected.txt
new file mode 100644
index 0000000..35f3c41
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature10
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature10.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature10.js
new file mode 100644
index 0000000..4062536
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature10.js
@@ -0,0 +1,207 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on Text.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature10() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature10") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+ var nodeList;
+ var elem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+nodeList = doc.getElementsByTagName("p");
+ elem = nodeList.item(0);
+ node = elem.firstChild;
+
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature10.xhtml
new file mode 100644
index 0000000..4ff7fc5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature10.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature10.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature11-expected.txt
new file mode 100644
index 0000000..916ddb4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature11
+Status error
+Message Line 101: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature11.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature11.js
new file mode 100644
index 0000000..0be7328
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature11.js
@@ -0,0 +1,202 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on CDATASection.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature11() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature11") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+node = doc.createCDATASection("some text");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature11.xhtml
new file mode 100644
index 0000000..799140f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature11.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature11.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature12-expected.txt
new file mode 100644
index 0000000..74e1fb9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature12
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature12.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature12.js
new file mode 100644
index 0000000..e10b7c9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature12.js
@@ -0,0 +1,208 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on Entity.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature12() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature12") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+ var entities;
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+doctype = doc.doctype;
+
+ entities = doctype.entities;
+
+ node = entities.getNamedItem("ent1");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature12.xhtml
new file mode 100644
index 0000000..4969f51
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature12.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetfeature12.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetfeature13-expected.txt
new file mode 100644
index 0000000..67cfadb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature13
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature13.js b/LayoutTests/dom/xhtml/level3/core/nodegetfeature13.js
new file mode 100644
index 0000000..dc944be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature13.js
@@ -0,0 +1,208 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check implementation of Node.getFeature on Notation.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature
+*/
+function nodegetfeature13() {
+ var success;
+ if(checkInitialization(builder, "nodegetfeature13") != null) return;
+ var doc;
+ var node;
+ var nullVersion = null;
+
+ var featureImpl;
+ var isSupported;
+ var domImpl;
+ var notations;
+ var doctype;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+doctype = doc.doctype;
+
+ notations = doctype.notations;
+
+ node = notations.getNamedItem("notation1");
+ featureImpl = node.getFeature("Core",nullVersion);
+ assertSame("coreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("cOrE",nullVersion);
+ assertSame("cOrEUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("+cOrE",nullVersion);
+ assertSame("PlusCoreUnspecifiedVersion",node,featureImpl);
+featureImpl = node.getFeature("org.w3c.domts.bogus.feature",nullVersion);
+ assertNull("unrecognizedFeature",featureImpl);
+ featureImpl = node.getFeature("cOrE","2.0");
+ assertSame("Core20",node,featureImpl);
+featureImpl = node.getFeature("cOrE","3.0");
+ assertSame("Core30",node,featureImpl);
+isSupported = node.isSupported("XML",nullVersion);
+ featureImpl = node.getFeature("XML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("SVGUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("HTMLUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("Events",nullVersion);
+ featureImpl = node.getFeature("Events",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("EventsUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS",nullVersion);
+ featureImpl = node.getFeature("LS",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("LS-Async",nullVersion);
+ featureImpl = node.getFeature("LS-Async",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("LSAsyncUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("XPath",nullVersion);
+ featureImpl = node.getFeature("XPath",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertSame("XPathUnspecified",node,featureImpl);
+
+ }
+ isSupported = node.isSupported("+HTML",nullVersion);
+ featureImpl = node.getFeature("HTML",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusHTMLUnspecified",featureImpl);
+
+ }
+ isSupported = node.isSupported("+SVG",nullVersion);
+ featureImpl = node.getFeature("SVG",nullVersion);
+
+ if(
+ isSupported
+ ) {
+ assertNotNull("PlusSVGUnspecified",featureImpl);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodegetfeature13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetfeature13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetfeature13.xhtml
new file mode 100644
index 0000000..a51241c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetfeature13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetfeature13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01-expected.txt
new file mode 100644
index 0000000..ab3fda1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.js
new file mode 100644
index 0000000..303aa3f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using getTextContent on this Document node check if the value returned is Null .
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent01() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent01") != null) return;
+ var doc;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textContent = doc.textContent;
+
+ assertNull("nodegettextcontent01",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.xhtml
new file mode 100644
index 0000000..41a2153
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02-expected.txt
new file mode 100644
index 0000000..83e2d05
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.js
new file mode 100644
index 0000000..e4b2aea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using getTextContent on a new Document node check if the value returned is Null .
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent02() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent02") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var textContent;
+ var nullDocType = null;
+
+ var docElem;
+ var rootName;
+ var rootNS;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ textContent = newDoc.textContent;
+
+ assertNull("nodegettextcontent02",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.xhtml
new file mode 100644
index 0000000..8a6ac3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03-expected.txt
new file mode 100644
index 0000000..bab51c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.js
new file mode 100644
index 0000000..17d7c94
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using getTextContent on this DocumentType node check if the value returned is Null .
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent03() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent03") != null) return;
+ var doc;
+ var docType;
+ var newDoc;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ textContent = docType.textContent;
+
+ assertNull("nodegettextcontent03",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.xhtml
new file mode 100644
index 0000000..bad51a2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04-expected.txt
new file mode 100644
index 0000000..2d1b16b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.js
new file mode 100644
index 0000000..c5476d7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using getTextContent on a new DocumentType node check if the value returned is Null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent04() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent04") != null) return;
+ var doc;
+ var domImpl;
+ var docType;
+ var textContent;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var oldDocType;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ oldDocType = doc.doctype;
+
+ rootName = oldDocType.name;
+
+ domImpl = doc.implementation;
+docType = domImpl.createDocumentType(rootName,nullPubId,nullSysId);
+ textContent = docType.textContent;
+
+ assertNull("nodegettextcontent04",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.xhtml
new file mode 100644
index 0000000..2a2b526
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05-expected.txt
new file mode 100644
index 0000000..d20a785
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent05
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.js
new file mode 100644
index 0000000..e8d3025
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using getTextContent on this DocumentType node check if the value returned is Null .
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent05() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent05") != null) return;
+ var doc;
+ var docType;
+ var notationsMap;
+ var notation1;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ notationsMap = docType.notations;
+
+ notation1 = notationsMap.getNamedItem("notation1");
+ textContent = docType.textContent;
+
+ assertNull("nodegettextcontent05",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.xhtml
new file mode 100644
index 0000000..e9a3b5a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06-expected.txt
new file mode 100644
index 0000000..5e77690
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.js
new file mode 100644
index 0000000..6741143
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Invoke the method getTextContent on a default Attr node and check if the value returned
+ is the attributes Value.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent06() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent06") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attr = elem.getAttributeNode("dir");
+ textContent = attr.textContent;
+
+ assertEquals("nodegettextcontent06","rtl",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.xhtml
new file mode 100644
index 0000000..7799b99
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07-expected.txt
new file mode 100644
index 0000000..e47c211
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.js
new file mode 100644
index 0000000..bd17b4d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the method getTextContent on a new Attr node and check if the value returned
+ is the attributes Value.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent07() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent07") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ elem.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang","en-US");
+ attr = elem.getAttributeNodeNS("http://www.w3.org/XML/1998/namespace","lang");
+ textContent = attr.textContent;
+
+ assertEquals("nodegettextcontent07","en-US",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.xhtml
new file mode 100644
index 0000000..763c752
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08-expected.txt
new file mode 100644
index 0000000..0f82bc0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.js
new file mode 100644
index 0000000..d34f5aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the method getTextContent on a new Attr node and check if the value returned
+ is the attributes Value.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent08() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent08") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var att;
+ var attr;
+ var replacedAttr;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ att = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ replacedAttr = elem.setAttributeNodeNS(att);
+ attr = elem.getAttributeNodeNS("http://www.w3.org/XML/1998/namespace","lang");
+ textContent = attr.textContent;
+
+ assertEquals("nodegettextcontent08","",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.xhtml
new file mode 100644
index 0000000..8aac241
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent08.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegettextcontent08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09-expected.txt
new file mode 100644
index 0000000..9c174ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.js
new file mode 100644
index 0000000..cd78d49
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the method getTextContent on a new Text node and check if the value returned
+ is the text content.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent09() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent09") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var txt;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ txt = doc.createTextNode("Replacement Text");
+ appendedChild = elem.appendChild(txt);
+ textContent = txt.textContent;
+
+ assertEquals("nodegettextcontent09","Replacement Text",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.xhtml
new file mode 100644
index 0000000..88c5357
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent09.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegettextcontent09.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10-expected.txt
new file mode 100644
index 0000000..40262e1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.js
new file mode 100644
index 0000000..bec1c5c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Invoke the method getTextContent on an existing Text node and check if the value returned
+ is the elements Text content.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent10() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent10") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var txt;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ txt = elem.firstChild;
+
+ textContent = txt.textContent;
+
+ assertEquals("nodegettextcontent10","EMP0001",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.xhtml
new file mode 100644
index 0000000..1819797
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11-expected.txt
new file mode 100644
index 0000000..0eefbf8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.js
new file mode 100644
index 0000000..5587a4c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Invoke the method getTextContent on an existing CDATASection node and check if the value returned
+ is the CDATASections content.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent11() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent11") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var cdata;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(1);
+ cdata = elem.lastChild;
+
+ textContent = cdata.textContent;
+
+ assertEquals("nodegettextcontent11","This is an adjacent CDATASection with a reference to a tab &tab;",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.xhtml
new file mode 100644
index 0000000..98b2b47
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12-expected.txt
new file mode 100644
index 0000000..f83045b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.js
new file mode 100644
index 0000000..2c6b8ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the method getTextContent on a new Comment node and check if the value returned
+ is the Comments data.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent12() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent12") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var comment;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","body");
+ comment = doc.createComment("Comment");
+ appendedChild = elem.appendChild(comment);
+ textContent = comment.textContent;
+
+ assertEquals("nodegettextcontent12","Comment",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.xhtml
new file mode 100644
index 0000000..934b90c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegettextcontent12.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13-expected.txt
new file mode 100644
index 0000000..6aff926
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent13
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.js
new file mode 100644
index 0000000..cef1c03
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent13() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent13") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(1);
+ textContent = elem.textContent;
+
+ assertEquals("nodegettextcontent13","Martha Raynolds\nThis is a CDATASection with EntityReference number 2 &ent2;\nThis is an adjacent CDATASection with a reference to a tab &tab;",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.xhtml
new file mode 100644
index 0000000..7dd768f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14-expected.txt
new file mode 100644
index 0000000..350eb11
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent14
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.js
new file mode 100644
index 0000000..5fd2136
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent14() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent14") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(2);
+ textContent = elem.textContent;
+
+ assertEquals("nodegettextcontent13","\n EMP0003\n Roger\n Jones\n Department Manager\n 100,000\n Element data\n PO Box 27 Irving, texas 98553\n ",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.xhtml
new file mode 100644
index 0000000..4833d04
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15-expected.txt
new file mode 100644
index 0000000..9c5c29c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent15
+Status error
+Message Line 121: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.js
new file mode 100644
index 0000000..b1467a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent15() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent15") != null) return;
+ var doc;
+ var elem;
+ var txt;
+ var comment;
+ var entRef;
+ var cdata;
+ var pi;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/DOM/Test","dom3:elem");
+ txt = doc.createTextNode("Text ");
+ comment = doc.createComment("Comment ");
+ entRef = doc.createEntityReference("beta");
+ pi = doc.createProcessingInstruction("PIT","PIData ");
+ cdata = doc.createCDATASection("CData");
+ appendedChild = elem.appendChild(txt);
+ appendedChild = elem.appendChild(comment);
+ appendedChild = elem.appendChild(entRef);
+ appendedChild = elem.appendChild(pi);
+ appendedChild = elem.appendChild(cdata);
+ textContent = elem.textContent;
+
+ doc.normalizeDocument();
+ assertEquals("nodegettextcontent15","Text βCData",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.xhtml
new file mode 100644
index 0000000..4bd36cb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16-expected.txt
new file mode 100644
index 0000000..cb4144d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent16
+Status error
+Message Line 123: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.js
new file mode 100644
index 0000000..541f7c8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent16() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent16") != null) return;
+ var doc;
+ var docFrag;
+ var elem;
+ var elemChild;
+ var txt;
+ var comment;
+ var entRef;
+ var cdata;
+ var pi;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ elem = doc.createElementNS("http://www.w3.org/DOM/Test","dom3:elem");
+ txt = doc.createTextNode("Text ");
+ comment = doc.createComment("Comment ");
+ entRef = doc.createEntityReference("beta");
+ pi = doc.createProcessingInstruction("PIT","PIData ");
+ cdata = doc.createCDATASection("CData");
+ appendedChild = elem.appendChild(txt);
+ appendedChild = elem.appendChild(comment);
+ appendedChild = elem.appendChild(entRef);
+ appendedChild = elem.appendChild(pi);
+ appendedChild = elem.appendChild(cdata);
+ appendedChild = docFrag.appendChild(elem);
+ doc.normalizeDocument();
+ textContent = docFrag.textContent;
+
+ assertEquals("nodegettextcontent16","Text βCData",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.xhtml
new file mode 100644
index 0000000..dfefc15
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17-expected.txt
new file mode 100644
index 0000000..36beb32
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent17
+Status failure
+Message nodegettextcontent17: assertEquals failed, actual , expected β.
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.js
new file mode 100644
index 0000000..024ba60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the method getTextContent on a new EntityReference node and check if the
+ value returned is the EntityReference's content.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent17() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent17") != null) return;
+ var doc;
+ var elem;
+ var entRef;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.documentElement;
+
+ entRef = doc.createEntityReference("beta");
+ appendedChild = elem.appendChild(entRef);
+ textContent = entRef.textContent;
+
+ assertEquals("nodegettextcontent17","β",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.xhtml
new file mode 100644
index 0000000..279c22c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18-expected.txt
new file mode 100644
index 0000000..b38680b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent18
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.js
new file mode 100644
index 0000000..7e10789
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the method getTextContent on an Entity node and check if the value returned
+ is its replacement text.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodegettextcontent18() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent18") != null) return;
+ var doc;
+ var docType;
+ var entity;
+ var entitymap;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitymap = docType.entities;
+
+ entity = entitymap.getNamedItem("delta");
+ textContent = entity.textContent;
+
+ assertEquals("nodegettextcontent18","δ",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.xhtml
new file mode 100644
index 0000000..2944735
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegettextcontent18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19-expected.txt
new file mode 100644
index 0000000..f4ce6e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent19
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.js b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.js
new file mode 100644
index 0000000..a65ada6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("ignoringElementContentWhitespace", false);
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that element content whitespace is not added to textContent. Determination
+of element content whitespace is only assured if validating.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=538
+*/
+function nodegettextcontent19() {
+ var success;
+ if(checkInitialization(builder, "nodegettextcontent19") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elemList = doc.getElementsByTagName("body");
+ elem = elemList.item(0);
+ textContent = elem.textContent;
+
+ assertEquals("textContent","bar",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodegettextcontent19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.xhtml
new file mode 100644
index 0000000..1d0d841
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegettextcontent19.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegettextcontent19.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01-expected.txt
new file mode 100644
index 0000000..211f717
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata01
+Status error
+Message Line 98: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.js b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.js
new file mode 100644
index 0000000..019d3d8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData
+*/
+function nodegetuserdata01() {
+ var success;
+ if(checkInitialization(builder, "nodegetuserdata01") != null) return;
+ var doc;
+ var userData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ userData = doc.getUserData("key1");
+ assertNull("nodegetuserdata01",userData);
+
+}
+
+
+
+
+function runTest() {
+ nodegetuserdata01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.xhtml
new file mode 100644
index 0000000..7b25f13
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetuserdata01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02-expected.txt
new file mode 100644
index 0000000..66117c7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata02
+Status error
+Message Line 98: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.js b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.js
new file mode 100644
index 0000000..50b9898
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData
+*/
+function nodegetuserdata02() {
+ var success;
+ if(checkInitialization(builder, "nodegetuserdata02") != null) return;
+ var doc;
+ var userData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ userData = doc.getUserData("key1");
+ assertNull("nodegetuserdata02",userData);
+
+}
+
+
+
+
+function runTest() {
+ nodegetuserdata02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.xhtml
new file mode 100644
index 0000000..713adde
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetuserdata02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03-expected.txt
new file mode 100644
index 0000000..0569977
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata03
+Status error
+Message Line 107: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.js b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.js
new file mode 100644
index 0000000..94166ee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData
+*/
+function nodegetuserdata03() {
+ var success;
+ if(checkInitialization(builder, "nodegetuserdata03") != null) return;
+ var doc;
+ var userData;
+ var retUserData;
+ var success;
+ var elem;
+ var returnedUserData;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","body");
+ if (null == nullHandler) {
+ doc.setUserData("something", elem, null);
+ } else {
+ doc.setUserData("something", elem, nullHandler.handle);
+ }
+ retUserData = doc.getUserData("something");
+ success = retUserData.isEqualNode(elem);
+ assertTrue("nodegetuserdata03",success);
+
+}
+
+
+
+
+function runTest() {
+ nodegetuserdata03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.xhtml
new file mode 100644
index 0000000..5ad0fbb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetuserdata03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04-expected.txt
new file mode 100644
index 0000000..d34f638
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata04
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.js b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.js
new file mode 100644
index 0000000..f044047
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData
+*/
+function nodegetuserdata04() {
+ var success;
+ if(checkInitialization(builder, "nodegetuserdata04") != null) return;
+ var doc;
+ var docType;
+ var userData;
+ var retUserData;
+ var success;
+ var nullHandler = null;
+
+ var prevUserData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ if (null == nullHandler) {
+ docType.setUserData("KeyDoc", doc, null);
+ } else {
+ docType.setUserData("KeyDoc", doc, nullHandler.handle);
+ }
+ retUserData = docType.getUserData("KeyDoc");
+ success = retUserData.isEqualNode(doc);
+ assertTrue("nodegetuserdata04",success);
+
+}
+
+
+
+
+function runTest() {
+ nodegetuserdata04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.xhtml
new file mode 100644
index 0000000..06b4724
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetuserdata04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05-expected.txt
new file mode 100644
index 0000000..8300d87
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata05
+Status error
+Message Line 109: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.js b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.js
new file mode 100644
index 0000000..697c8bd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData
+*/
+function nodegetuserdata05() {
+ var success;
+ if(checkInitialization(builder, "nodegetuserdata05") != null) return;
+ var doc;
+ var docType;
+ var entities;
+ var entity;
+ var attr;
+ var userData;
+ var retUserData;
+ var nullHandler = null;
+
+ var prevUserData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entities = docType.entities;
+
+ entity = entities.getNamedItem("delta");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","lang");
+ if (null == nullHandler) {
+ entity.setUserData("key", attr, null);
+ } else {
+ entity.setUserData("key", attr, nullHandler.handle);
+ }
+ retUserData = entity.getUserData("Key");
+ assertNull("nodegetuserdata05",retUserData);
+
+}
+
+
+
+
+function runTest() {
+ nodegetuserdata05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.xhtml
new file mode 100644
index 0000000..b9fbd23
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetuserdata05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06-expected.txt
new file mode 100644
index 0000000..b98098b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata06
+Status error
+Message Line 100: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.js b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.js
new file mode 100644
index 0000000..b01be70
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Invoke getUserData on a new Text node with an ampty Key check if the returned
+ UserData object is Null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData
+*/
+function nodegetuserdata06() {
+ var success;
+ if(checkInitialization(builder, "nodegetuserdata06") != null) return;
+ var doc;
+ var txt;
+ var retUserData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ txt = doc.createTextNode("TEXT");
+ retUserData = txt.getUserData("");
+ assertNull("nodegetuserdata06",retUserData);
+
+}
+
+
+
+
+function runTest() {
+ nodegetuserdata06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.xhtml
new file mode 100644
index 0000000..b9d8723
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetuserdata06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07-expected.txt
new file mode 100644
index 0000000..481cb33
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata07
+Status error
+Message Line 107: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.js b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.js
new file mode 100644
index 0000000..5b9f4a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getUserData
+*/
+function nodegetuserdata07() {
+ var success;
+ if(checkInitialization(builder, "nodegetuserdata07") != null) return;
+ var doc;
+ var pi;
+ var userData;
+ var retUserData;
+ var success;
+ var nullHandler = null;
+
+ var prevUserData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ pi = doc.createProcessingInstruction("PITARGET","PIDATA");
+ if (null == nullHandler) {
+ pi.setUserData("key", pi, null);
+ } else {
+ pi.setUserData("key", pi, nullHandler.handle);
+ }
+ retUserData = pi.getUserData("key");
+ success = retUserData.isEqualNode(pi);
+ assertTrue("nodegetuserdata07",success);
+
+}
+
+
+
+
+function runTest() {
+ nodegetuserdata07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.xhtml
new file mode 100644
index 0000000..dc85c10
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodegetuserdata07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodegetuserdata07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01-expected.txt
new file mode 100644
index 0000000..328dbdf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.js
new file mode 100644
index 0000000..6d73e1f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore01() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore01") != null) return;
+ var doc;
+ var docElem;
+ var newComment;
+ var insertedComment;
+ var data;
+ var newPI;
+ var insertedPI;
+ var target;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ newComment = doc.createComment("Comment");
+ newPI = doc.createProcessingInstruction("PITarget","PIData");
+ insertedComment = doc.insertBefore(newComment,docElem);
+ data = insertedComment.data;
+
+ assertEquals("nodeinsertbefore01_1","Comment",data);
+ insertedPI = doc.insertBefore(newPI,newComment);
+ target = insertedPI.target;
+
+ assertEquals("nodeinsertbefore01_2","PITarget",target);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.xhtml
new file mode 100644
index 0000000..79f99da
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02-expected.txt
new file mode 100644
index 0000000..80c7663
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.js
new file mode 100644
index 0000000..20e2de5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.js
@@ -0,0 +1,140 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore02() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore02") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var newDocType;
+ var newComment;
+ var insertedComment;
+ var data;
+ var newPI;
+ var insertedPI;
+ var target;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var rootNS;
+ var rootName;
+ var docElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDocType = domImpl.createDocumentType(rootName,nullPubId,nullSysId);
+ newDoc = domImpl.createDocument(rootNS,rootName,newDocType);
+ newComment = newDoc.createComment("Comment");
+ newPI = newDoc.createProcessingInstruction("PITarget","PIData");
+ insertedComment = newDoc.insertBefore(newComment,newDocType);
+ data = insertedComment.data;
+
+ assertEquals("nodeinsertbefore02_1","Comment",data);
+ insertedPI = newDoc.insertBefore(newPI,newComment);
+ target = insertedPI.target;
+
+ assertEquals("nodeinsertbefore02_2","PITarget",target);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.xhtml
new file mode 100644
index 0000000..d287e20
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03-expected.txt
new file mode 100644
index 0000000..ab7f74a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.js
new file mode 100644
index 0000000..7a68a71
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore03() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore03") != null) return;
+ var doc;
+ var docType;
+ var newAttr;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ newAttr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+
+ {
+ success = false;
+ try {
+ inserted = doc.insertBefore(newAttr,docType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.xhtml
new file mode 100644
index 0000000..1190063
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04-expected.txt
new file mode 100644
index 0000000..27af779
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.js
new file mode 100644
index 0000000..c35fd07
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore04() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore04") != null) return;
+ var doc;
+ var docType;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ {
+ success = false;
+ try {
+ inserted = doc.insertBefore(doc,docType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.xhtml
new file mode 100644
index 0000000..628d666
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05-expected.txt
new file mode 100644
index 0000000..9a3e23c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.js
new file mode 100644
index 0000000..adcd1cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore05() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore05") != null) return;
+ var doc;
+ var docType;
+ var domImpl;
+ var newDocType;
+ var inserted;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ rootName = docType.name;
+
+ domImpl = doc.implementation;
+newDocType = domImpl.createDocumentType(rootName,nullPubId,nullSysId);
+
+ try {
+ inserted = doc.insertBefore(newDocType,docType);
+ fail("throw_DOMException");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.xhtml
new file mode 100644
index 0000000..0b68cb6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06-expected.txt
new file mode 100644
index 0000000..4b5cc9c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.js
new file mode 100644
index 0000000..83343b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=415
+*/
+function nodeinsertbefore06() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore06") != null) return;
+ var doc;
+ var docElem;
+ var newElem;
+ var inserted;
+ var rootNS;
+ var rootTagname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ newElem = doc.createElementNS(rootNS,rootTagname);
+
+ try {
+ inserted = doc.insertBefore(newElem,docElem);
+ fail("throw_DOMException");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.xhtml
new file mode 100644
index 0000000..2cae166
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07-expected.txt
new file mode 100644
index 0000000..a127ba1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore07
+Status failure
+Message WRONG_DOCUMENT_ERR_nodeinsertbefore07: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.js
new file mode 100644
index 0000000..a68a1c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var docAltRef = null;
+ if (typeof(this.docAlt) != 'undefined') {
+ docAltRef = this.docAlt;
+ }
+ docsLoaded += preload(docAltRef, "docAlt", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore07() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore07") != null) return;
+ var doc;
+ var docAlt;
+ var docElem;
+ var newComment;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var docAltRef = null;
+ if (typeof(this.docAlt) != 'undefined') {
+ docAltRef = this.docAlt;
+ }
+ docAlt = load(docAltRef, "docAlt", "hc_staff");
+ docElem = doc.documentElement;
+
+ newComment = docAlt.createComment("Comment");
+
+ {
+ success = false;
+ try {
+ inserted = doc.insertBefore(newComment,docElem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("WRONG_DOCUMENT_ERR_nodeinsertbefore07",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.xhtml
new file mode 100644
index 0000000..29a733b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08-expected.txt
new file mode 100644
index 0000000..6cc3cc4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.js
new file mode 100644
index 0000000..995c5f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var docAltRef = null;
+ if (typeof(this.docAlt) != 'undefined') {
+ docAltRef = this.docAlt;
+ }
+ docsLoaded += preload(docAltRef, "docAlt", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore08() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore08") != null) return;
+ var doc;
+ var docAlt;
+ var docElem;
+ var newComment;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var docAltRef = null;
+ if (typeof(this.docAlt) != 'undefined') {
+ docAltRef = this.docAlt;
+ }
+ docAlt = load(docAltRef, "docAlt", "hc_staff");
+ docElem = docAlt.documentElement;
+
+ newComment = doc.createComment("Comment");
+
+ {
+ success = false;
+ try {
+ inserted = doc.insertBefore(newComment,docElem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("NOT_FOUND_ERR_nodeinsertbefore08",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.xhtml
new file mode 100644
index 0000000..cace2b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09-expected.txt
new file mode 100644
index 0000000..4c9362c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.js
new file mode 100644
index 0000000..ae01c57
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore09() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore09") != null) return;
+ var doc;
+ var docFrag;
+ var newComment;
+ var insertComment;
+ var comment;
+ var inserted;
+ var data;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newComment = doc.createComment("Comment");
+ appendedChild = doc.appendChild(newComment);
+ docFrag = doc.createDocumentFragment();
+ insertComment = doc.createComment("insertComment");
+ appendedChild = docFrag.appendChild(insertComment);
+ inserted = doc.insertBefore(docFrag,newComment);
+ comment = newComment.previousSibling;
+
+ data = comment.data;
+
+ assertEquals("nodeinsertbefore09","insertComment",data);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.xhtml
new file mode 100644
index 0000000..75dec25
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10-expected.txt
new file mode 100644
index 0000000..55ee16c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.js
new file mode 100644
index 0000000..d3f2c66
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.js
@@ -0,0 +1,142 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=415
+*/
+function nodeinsertbefore10() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore10") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var newElem;
+ var inserted;
+ var docElem;
+ var rootNS;
+ var rootTagname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(1);
+ newElem = doc.createElementNS(rootNS,rootTagname);
+
+ try {
+ inserted = doc.insertBefore(newElem,elem);
+ fail("throw_DOMException");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.xhtml
new file mode 100644
index 0000000..e62222f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11-expected.txt
new file mode 100644
index 0000000..397fa83
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.js
new file mode 100644
index 0000000..e8a8b9e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.js
@@ -0,0 +1,145 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore11() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore11") != null) return;
+ var doc;
+ var docFrag;
+ var elem;
+ var pi;
+ var comment;
+ var txt;
+ var cdata;
+ var eRef;
+ var inserted;
+ var insertedVal;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","body");
+ pi = doc.createProcessingInstruction("PITarget","PIData");
+ comment = doc.createComment("Comment");
+ txt = doc.createTextNode("Text");
+ cdata = doc.createCDATASection("CDATA");
+ eRef = doc.createEntityReference("alpha");
+ appendedChild = docFrag.appendChild(elem);
+ appendedChild = docFrag.appendChild(pi);
+ appendedChild = docFrag.appendChild(comment);
+ appendedChild = docFrag.appendChild(txt);
+ appendedChild = docFrag.appendChild(cdata);
+ appendedChild = docFrag.appendChild(eRef);
+ inserted = docFrag.insertBefore(comment,pi);
+ insertedVal = inserted.data;
+
+ assertEquals("nodeinsertbefore11_Comment","Comment",insertedVal);
+ inserted = docFrag.insertBefore(txt,comment);
+ insertedVal = inserted.data;
+
+ assertEquals("nodeinsertbefore11_Text","Text",insertedVal);
+ inserted = docFrag.insertBefore(cdata,txt);
+ insertedVal = inserted.data;
+
+ assertEquals("nodeinsertbefore11_CDATA","CDATA",insertedVal);
+ inserted = docFrag.insertBefore(eRef,cdata);
+ insertedVal = inserted.nodeName;
+
+ assertEquals("nodeinsertbefore11_Ent1","alpha",insertedVal);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.xhtml
new file mode 100644
index 0000000..1a4aa68
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12-expected.txt
new file mode 100644
index 0000000..7ce4640
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.js
new file mode 100644
index 0000000..44e28b1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore12() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore12") != null) return;
+ var doc;
+ var docFrag;
+ var docFragNew;
+ var elem;
+ var inserted;
+ var appendedChild;
+ var last;
+ var name;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ docFragNew = doc.createDocumentFragment();
+ elem = doc.createElementNS("http://www.w3.org/DOM/Test","dom3:elem");
+ appendedChild = docFrag.appendChild(elem);
+ inserted = docFrag.insertBefore(docFragNew,elem);
+ last = docFrag.lastChild;
+
+ name = last.nodeName;
+
+ assertEquals("nodeinsertbefore12","dom3:elem",name);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.xhtml
new file mode 100644
index 0000000..617e130
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13-expected.txt
new file mode 100644
index 0000000..6782642
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore13
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.js
new file mode 100644
index 0000000..3365cd4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.js
@@ -0,0 +1,149 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var docAltRef = null;
+ if (typeof(this.docAlt) != 'undefined') {
+ docAltRef = this.docAlt;
+ }
+ docsLoaded += preload(docAltRef, "docAlt", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore13() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore13") != null) return;
+ var doc;
+ var docAlt;
+ var docFrag;
+ var elemAlt;
+ var elem;
+ var appendedChild;
+ var inserted;
+ var docElem;
+ var rootNS;
+ var rootTagname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootTagname = docElem.tagName;
+
+
+ var docAltRef = null;
+ if (typeof(this.docAlt) != 'undefined') {
+ docAltRef = this.docAlt;
+ }
+ docAlt = load(docAltRef, "docAlt", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ elem = doc.createElementNS(rootNS,rootTagname);
+ elemAlt = docAlt.createElementNS(rootNS,rootTagname);
+ appendedChild = docFrag.appendChild(elem);
+
+ {
+ success = false;
+ try {
+ inserted = docFrag.insertBefore(elemAlt,elem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.xhtml
new file mode 100644
index 0000000..6f8b443
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14-expected.txt
new file mode 100644
index 0000000..5d96a92
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore14
+Status failure
+Message NO_MODIFICATION_ALLOWED_ERR_nodeinsertbefore14: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js
new file mode 100644
index 0000000..834daf9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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)
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore14() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore14") != null) return;
+ var doc;
+ var docType;
+ var newAttr;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ newAttr = doc.createAttributeNS("http://www.w3.org/DOM/Test","dom3:attr");
+
+ {
+ success = false;
+ try {
+ inserted = docType.insertBefore(newAttr,docType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("NO_MODIFICATION_ALLOWED_ERR_nodeinsertbefore14",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.xhtml
new file mode 100644
index 0000000..9240741
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15-expected.txt
new file mode 100644
index 0000000..7142f3e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore15
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.js
new file mode 100644
index 0000000..7f3716e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.js
@@ -0,0 +1,177 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore15() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore15") != null) return;
+ var doc;
+ var entRef;
+ var elemChild;
+ var txt;
+ var elem;
+ var comment;
+ var pi;
+ var cdata;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ entRef = doc.createEntityReference("delta");
+ elemChild = entRef.firstChild;
+
+ cdata = doc.createCDATASection("CDATASection");
+
+ {
+ success = false;
+ try {
+ inserted = entRef.insertBefore(cdata,elemChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_1",success);
+ }
+pi = doc.createProcessingInstruction("target","data");
+
+ {
+ success = false;
+ try {
+ inserted = entRef.insertBefore(pi,elemChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_2",success);
+ }
+comment = doc.createComment("Comment");
+
+ {
+ success = false;
+ try {
+ inserted = entRef.insertBefore(comment,elemChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_3",success);
+ }
+txt = doc.createTextNode("Text");
+
+ {
+ success = false;
+ try {
+ inserted = entRef.insertBefore(txt,elemChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_4",success);
+ }
+elem = doc.createElementNS("http://www.w3.org/1999/xhtml","body");
+
+ {
+ success = false;
+ try {
+ inserted = entRef.insertBefore(elem,elemChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_5",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.xhtml
new file mode 100644
index 0000000..6f0d00b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16-expected.txt
new file mode 100644
index 0000000..b1c2baa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore16
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.js
new file mode 100644
index 0000000..1489aa4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore16() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore16") != null) return;
+ var doc;
+ var element;
+ var newElem;
+ var refElem;
+ var firstChild;
+ var insertedElem;
+ var childList;
+ var nodeName;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("p");
+ element = childList.item(0);
+ firstChild = element.firstChild;
+
+ refElem = firstChild.nextSibling;
+
+ newElem = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:br");
+ inserted = element.insertBefore(newElem,refElem);
+ childList = doc.getElementsByTagName("p");
+ element = childList.item(0);
+ firstChild = element.firstChild;
+
+ insertedElem = firstChild.nextSibling;
+
+ nodeName = insertedElem.nodeName;
+
+ assertEquals("nodeinsertbefore16","xhtml:br",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.xhtml
new file mode 100644
index 0000000..b09c340
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17-expected.txt
new file mode 100644
index 0000000..680e436
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore17
+Status skip
+Message HTML loader does not support ignoringElementContentWhitespace=true
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.js
new file mode 100644
index 0000000..09d343b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", false);
+ setImplementationAttribute("coalescing", true);
+ setImplementationAttribute("ignoringElementContentWhitespace", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore17() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore17") != null) return;
+ var doc;
+ var element;
+ var newText;
+ var refNode;
+ var firstChild;
+ var insertedText;
+ var childList;
+ var nodeName;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagNameNS("*","p");
+ element = childList.item(1);
+ refNode = element.firstChild;
+
+ newText = doc.createTextNode("newText");
+ inserted = element.insertBefore(newText,refNode);
+ insertedText = element.firstChild;
+
+ nodeName = insertedText.nodeName;
+
+ assertEquals("nodeinsertbefore17","#text",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.xhtml
new file mode 100644
index 0000000..a20db78
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18-expected.txt
new file mode 100644
index 0000000..697f095
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore18
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.js
new file mode 100644
index 0000000..ac90e4e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore18() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore18") != null) return;
+ var doc;
+ var element;
+ var newElem;
+ var newComment;
+ var newPI;
+ var newCDATA;
+ var insertedNode;
+ var data;
+ var target;
+ var appendedChild;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ element = doc.createElement("element");
+ newElem = doc.createElementNS("http://www.w3.org/DOM","dom3:elem");
+ newComment = doc.createComment("Comment");
+ newCDATA = doc.createCDATASection("CDATASection");
+ newPI = doc.createProcessingInstruction("target","data");
+ appendedChild = element.appendChild(newElem);
+ appendedChild = element.appendChild(newComment);
+ appendedChild = element.appendChild(newPI);
+ appendedChild = element.appendChild(newCDATA);
+ inserted = element.insertBefore(newComment,newElem);
+ insertedNode = element.firstChild;
+
+ data = insertedNode.data;
+
+ assertEquals("nodeinsertbefore18","Comment",data);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.xhtml
new file mode 100644
index 0000000..0cfadae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19-expected.txt
new file mode 100644
index 0000000..244c4b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore19
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.js
new file mode 100644
index 0000000..2b8e675
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore19() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore19") != null) return;
+ var doc;
+ var refNode;
+ var newNode;
+ var inserted;
+ var childList;
+ var nodeName;
+ var element;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("var");
+ element = childList.item(2);
+ refNode = element.firstChild;
+
+ newNode = doc.createEntityReference("alpha");
+ inserted = element.insertBefore(newNode,refNode);
+ nodeName = inserted.nodeName;
+
+ assertEquals("nodeinsertbefore19","alpha",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.xhtml
new file mode 100644
index 0000000..5a44d81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20-expected.txt
new file mode 100644
index 0000000..98c3f84
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore20
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.js
new file mode 100644
index 0000000..8dabffb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore20() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore20") != null) return;
+ var doc;
+ var element;
+ var refNode;
+ var newNode;
+ var childList;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("var");
+ element = childList.item(2);
+ refNode = element.firstChild;
+
+ newNode = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+
+ {
+ success = false;
+ try {
+ inserted = element.insertBefore(newNode,refNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.xhtml
new file mode 100644
index 0000000..648c67b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21-expected.txt
new file mode 100644
index 0000000..53f764f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore21
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.js
new file mode 100644
index 0000000..9e87652
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore21() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore21") != null) return;
+ var doc;
+ var element;
+ var refNode;
+ var newNode;
+ var childList;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("var");
+ element = childList.item(2);
+ refNode = element.firstChild;
+
+ newNode = element.parentNode;
+
+
+ {
+ success = false;
+ try {
+ inserted = element.insertBefore(newNode,refNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.xhtml
new file mode 100644
index 0000000..af9f647
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22-expected.txt
new file mode 100644
index 0000000..b328879
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore22
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.js
new file mode 100644
index 0000000..2833821
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore22() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore22") != null) return;
+ var doc;
+ var element;
+ var refNode;
+ var ancestor;
+ var childList;
+ var appendedChild;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ element = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:body");
+ refNode = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:a");
+ ancestor = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+ appendedChild = element.appendChild(refNode);
+ appendedChild = ancestor.appendChild(element);
+
+ {
+ success = false;
+ try {
+ inserted = element.insertBefore(ancestor,refNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.xhtml
new file mode 100644
index 0000000..1a6e240
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore22.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodeinsertbefore22.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23-expected.txt
new file mode 100644
index 0000000..b3dea81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore23
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.js
new file mode 100644
index 0000000..62650d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore23() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore23") != null) return;
+ var doc;
+ var doc2;
+ var element;
+ var refNode;
+ var newNode;
+ var childList;
+ var appendedChild;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ element = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:body");
+ refNode = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+ newNode = doc2.createTextNode("TextNode");
+ appendedChild = element.appendChild(refNode);
+
+ {
+ success = false;
+ try {
+ inserted = element.insertBefore(newNode,refNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.xhtml
new file mode 100644
index 0000000..1f1e960
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore23.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore23.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24-expected.txt
new file mode 100644
index 0000000..b904daa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore24
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.js
new file mode 100644
index 0000000..313202c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore24() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore24") != null) return;
+ var doc;
+ var element;
+ var refNode;
+ var newNode;
+ var childList;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ element = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+ refNode = doc.createCDATASection("CDATASection");
+ newNode = doc.createComment("Comment");
+
+ {
+ success = false;
+ try {
+ inserted = element.insertBefore(newNode,refNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.xhtml
new file mode 100644
index 0000000..7d6e6ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore24.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore24.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25-expected.txt
new file mode 100644
index 0000000..7509099
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore25
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.js
new file mode 100644
index 0000000..c7414b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeinsertbefore25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727
+*/
+function nodeinsertbefore25() {
+ var success;
+ if(checkInitialization(builder, "nodeinsertbefore25") != null) return;
+ var doc;
+ var element;
+ var eRef;
+ var span;
+ var spanText;
+ var newNode;
+ var childList;
+ var inserted;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("var");
+ element = childList.item(2);
+ eRef = element.firstChild;
+
+ span = eRef.firstChild;
+
+ assertNotNull("spanNotNull",span);
+spanText = span.firstChild;
+
+ assertNotNull("spanTextNotNull",spanText);
+newNode = doc.createElementNS("http://www.w3.org/1999/xhtml","span");
+
+ {
+ success = false;
+ try {
+ inserted = span.insertBefore(newNode,spanText);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeinsertbefore25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.xhtml
new file mode 100644
index 0000000..106a52b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeinsertbefore25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01-expected.txt
new file mode 100644
index 0000000..df6a9be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.js
new file mode 100644
index 0000000..7e48753
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isDefaultNamespace on this Document node with the
+ namespace of the document element check if the value returned is true.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace01() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace01") != null) return;
+ var doc;
+ var isDefault;
+ var docElem;
+ var docElemNS;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ docElemNS = docElem.namespaceURI;
+
+ isDefault = doc.isDefaultNamespace(docElemNS);
+ assertTrue("nodeisdefaultnamespace01",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.xhtml
new file mode 100644
index 0000000..19922f5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02-expected.txt
new file mode 100644
index 0000000..bb7c414
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.js
new file mode 100644
index 0000000..1a2c4d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace02() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace02") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var isDefault;
+ var nullDocType = null;
+
+ var nullNSURI = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.localName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ isDefault = newDoc.isDefaultNamespace(rootNS);
+ assertTrue("nodeisdefaultnamespace02_true",isDefault);
+isDefault = newDoc.isDefaultNamespace(nullNSURI);
+ assertFalse("nodeisdefaultnamespace02_false",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.xhtml
new file mode 100644
index 0000000..81ccd4a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03-expected.txt
new file mode 100644
index 0000000..27c7c57
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.js
new file mode 100644
index 0000000..08d05f0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using isDefaultNamespace on this DocumentType node with the value of the namespaceURI parameter
+ as null check if the value returned is false.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace03() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace03") != null) return;
+ var doc;
+ var docType;
+ var isDefault;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ isDefault = docType.isDefaultNamespace(nullNSURI);
+ assertFalse("nodeisdefaultnamespace03",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.xhtml
new file mode 100644
index 0000000..ac0ce7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt
new file mode 100644
index 0000000..4d022cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace04
+Status error
+Message Line 113: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.js
new file mode 100644
index 0000000..0d13b96
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using isDefaultNamespace on a Notation and Entity node with the value of the namespaceURI parameter
+ as null check if the value returned is false.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace04() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace04") != null) return;
+ var doc;
+ var docType;
+ var entity;
+ var notation;
+ var entitiesMap;
+ var notationsMap;
+ var isDefault;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ notationsMap = docType.notations;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ notation = notationsMap.getNamedItem("notation1");
+ isDefault = entity.isDefaultNamespace(nullNSURI);
+ assertFalse("nodeisdefaultnamespace04_1",isDefault);
+isDefault = notation.isDefaultNamespace(nullNSURI);
+ assertFalse("nodeisdefaultnamespace04_2",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.xhtml
new file mode 100644
index 0000000..7073a63
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05-expected.txt
new file mode 100644
index 0000000..740a753
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.js
new file mode 100644
index 0000000..fededad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace05() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace05") != null) return;
+ var doc;
+ var elem;
+ var domImpl;
+ var newDoc;
+ var isDefault;
+ var nullDocType = null;
+
+ var nullNSURI = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.localName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ elem = newDoc.documentElement;
+
+ isDefault = elem.isDefaultNamespace(rootNS);
+ assertTrue("nodeisdefaultnamespace05_1",isDefault);
+isDefault = elem.isDefaultNamespace(nullNSURI);
+ assertFalse("nodeisdefaultnamespace05_2",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.xhtml
new file mode 100644
index 0000000..93a7664
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06-expected.txt
new file mode 100644
index 0000000..b10db9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.js
new file mode 100644
index 0000000..4bb2843
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace06() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace06") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var isDefault;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ isDefault = elem.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertTrue("nodeisdefaultnamespace06_1",isDefault);
+isDefault = elem.isDefaultNamespace("http://www.usa.com");
+ assertFalse("nodeisdefaultnamespace06_2",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.xhtml
new file mode 100644
index 0000000..4b24599
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07-expected.txt
new file mode 100644
index 0000000..e774f85
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.js
new file mode 100644
index 0000000..b7e2cef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace07() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace07") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var isDefault;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ isDefault = elem.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertTrue("nodeisdefaultnamespace07_1",isDefault);
+isDefault = elem.isDefaultNamespace("http://www.usa.com");
+ assertFalse("nodeisdefaultnamespace07_2",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.xhtml
new file mode 100644
index 0000000..a24245d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08-expected.txt
new file mode 100644
index 0000000..ebbbf31
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.js
new file mode 100644
index 0000000..5037e9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace08() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace08") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var isDefault;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(3);
+ isDefault = elem.isDefaultNamespace("http://www.altavista.com");
+ assertFalse("nodeisdefaultnamespace08",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.xhtml
new file mode 100644
index 0000000..a51c17c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09-expected.txt
new file mode 100644
index 0000000..e9d3390
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace09
+Status failure
+Message nodeisdefaultnamespace09_2: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.js
new file mode 100644
index 0000000..b17705e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace09() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace09") != null) return;
+ var doc;
+ var parent;
+ var child;
+ var isDefault;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:body");
+ child = doc.createElement("xhtml:p");
+ appendedChild = parent.appendChild(child);
+ isDefault = parent.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertFalse("nodeisdefaultnamespace09_1",isDefault);
+isDefault = child.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertFalse("nodeisdefaultnamespace09_2",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.xhtml
new file mode 100644
index 0000000..930911f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10-expected.txt
new file mode 100644
index 0000000..33e3206
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.js
new file mode 100644
index 0000000..cdf1e07
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace10() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace10") != null) return;
+ var doc;
+ var parent;
+ var child;
+ var isDefault;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:body");
+ child = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ appendedChild = parent.appendChild(child);
+ isDefault = child.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertTrue("nodeisdefaultnamespace10_1",isDefault);
+isDefault = parent.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertFalse("nodeisdefaultnamespace10_2",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.xhtml
new file mode 100644
index 0000000..8de7213
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11-expected.txt
new file mode 100644
index 0000000..bcc42bd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.js
new file mode 100644
index 0000000..85ecaa1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace11() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace11") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var elem;
+ var importedNode;
+ var isDefault;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ importedNode = newDoc.importNode(elem,true);
+ isDefault = importedNode.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertTrue("nodeisdefaultnamespace11",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.xhtml
new file mode 100644
index 0000000..48f05ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13-expected.txt
new file mode 100644
index 0000000..c2ab283
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace13
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.js
new file mode 100644
index 0000000..f0b1ef4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace13() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace13") != null) return;
+ var doc;
+ var bodyElem;
+ var elem;
+ var txt;
+ var isDefault;
+ var appendedChild;
+ var bodyList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ txt = doc.createTextNode("Text");
+ appendedChild = elem.appendChild(txt);
+ appendedChild = bodyElem.appendChild(elem);
+ isDefault = txt.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertTrue("nodeisdefaultnamespace13",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.xhtml
new file mode 100644
index 0000000..539fd04
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14-expected.txt
new file mode 100644
index 0000000..8fef57b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace14
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.js
new file mode 100644
index 0000000..4603bf9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace14() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace14") != null) return;
+ var doc;
+ var elem;
+ var cdata;
+ var isDefault;
+ var appendedChild;
+ var bodyList;
+ var bodyElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ cdata = doc.createCDATASection("CDATASection");
+ appendedChild = elem.appendChild(cdata);
+ appendedChild = bodyElem.appendChild(elem);
+ isDefault = cdata.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertTrue("nodeisdefaultnamespace14",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.xhtml
new file mode 100644
index 0000000..3b8ef21
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15-expected.txt
new file mode 100644
index 0000000..247af7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace15
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.js
new file mode 100644
index 0000000..1ee5c7c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace15() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace15") != null) return;
+ var doc;
+ var bodyElem;
+ var elem;
+ var comment;
+ var clonedComment;
+ var isDefault;
+ var appendedChild;
+ var bodyList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ comment = doc.createComment("Text");
+ clonedComment = comment.cloneNode(true);
+ appendedChild = elem.appendChild(clonedComment);
+ appendedChild = bodyElem.appendChild(elem);
+ isDefault = clonedComment.isDefaultNamespace("http://www.w3.org/1999/xhtml");
+ assertTrue("nodeisdefaultnamespace15",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.xhtml
new file mode 100644
index 0000000..507bad9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisdefaultnamespace15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16-expected.txt
new file mode 100644
index 0000000..3f7a18a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace16
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.js b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.js
new file mode 100644
index 0000000..fe1afc6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.js
@@ -0,0 +1,109 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefaultNamespace
+*/
+function nodeisdefaultnamespace16() {
+ var success;
+ if(checkInitialization(builder, "nodeisdefaultnamespace16") != null) return;
+ var doc;
+ var attr;
+ var isDefault;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","lang");
+ isDefault = attr.isDefaultNamespace("http://www.w3.org/XML/1998/namespace");
+ assertFalse("nodeisdefaultnamespace16",isDefault);
+
+}
+
+
+
+
+function runTest() {
+ nodeisdefaultnamespace16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.xhtml
new file mode 100644
index 0000000..36b7dc4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodeisdefaultnamespace16.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01-expected.txt
new file mode 100644
index 0000000..79f24f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode01
+Status failure
+Message nodeisequalnode01: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.js
new file mode 100644
index 0000000..1acc476
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 Document nodes created by parsing the same xml document
+ are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode01() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode01") != null) return;
+ var doc1;
+ var doc2;
+ var isEqual;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ isEqual = doc1.isEqualNode(doc2);
+ assertTrue("nodeisequalnode01",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.xhtml
new file mode 100644
index 0000000..dcea30e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02-expected.txt
new file mode 100644
index 0000000..8dcbd73
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.js
new file mode 100644
index 0000000..52d0201
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isEqualNode check if 2 newly created Document nodes having the same namespaceURI
+ and qualifiedName are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode02() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode02") != null) return;
+ var doc;
+ var domImpl;
+ var doc1;
+ var doc2;
+ var isEqual;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+doc1 = domImpl.createDocument(rootNS,rootName,nullDocType);
+ doc2 = domImpl.createDocument(rootNS,rootName,nullDocType);
+ isEqual = doc1.isEqualNode(doc2);
+ assertTrue("nodeisequalnode02",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.xhtml
new file mode 100644
index 0000000..ac4cfca
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04-expected.txt
new file mode 100644
index 0000000..992fa81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.js
new file mode 100644
index 0000000..e7a6605
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a new Element node in this Document. return its ownerDocument and check if the
+ the ownerDocument is equal to this Document using isEqualNode.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode04() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode04") != null) return;
+ var doc;
+ var ownerDoc;
+ var elem;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+ ownerDoc = elem.ownerDocument;
+
+ isEqual = doc.isEqualNode(ownerDoc);
+ assertTrue("nodeisequalnode04",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.xhtml
new file mode 100644
index 0000000..b63fb72
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodeisequalnode04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06-expected.txt
new file mode 100644
index 0000000..fc0bc1d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.js
new file mode 100644
index 0000000..d1a139f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 Element nodes having the same nodeName and namespaceURI attribute
+ are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode06() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode06") != null) return;
+ var doc;
+ var elem1;
+ var elem2;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem1 = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:html");
+ elem2 = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:html");
+ isEqual = elem1.isEqualNode(elem2);
+ assertTrue("nodeisequalnode06",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.xhtml
new file mode 100644
index 0000000..5db3c9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07-expected.txt
new file mode 100644
index 0000000..4e337c4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.js
new file mode 100644
index 0000000..888b101
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode07() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode07") != null) return;
+ var doc1;
+ var doc2;
+ var elem1;
+ var elem2;
+ var isEqual;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ elem1 = doc1.createElementNS("http://www.w3.org/1999/xhtml","xhtml:html");
+ elem2 = doc2.createElementNS("http://www.w3.org/1999/xhtml","xhtml:html");
+ isEqual = elem1.isEqualNode(elem2);
+ assertTrue("nodeisequalnode07",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.xhtml
new file mode 100644
index 0000000..145e14b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08-expected.txt
new file mode 100644
index 0000000..ab11dc8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode08
+Status skip
+Message HTML loader does not support ignoringElementContentWhitespace=true
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.js
new file mode 100644
index 0000000..08fd583
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("ignoringElementContentWhitespace", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode08() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode08") != null) return;
+ var doc;
+ var elem1;
+ var elem2;
+ var employeeList;
+ var text;
+ var isEqual;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ employeeList = doc.getElementsByTagName("em");
+ elem1 = employeeList.item(0);
+ elem2 = doc.createElementNS("http://www.w3.org/1999/xhtml","em");
+ text = doc.createTextNode("EMP0001");
+ appendedChild = elem2.appendChild(text);
+ isEqual = elem1.isEqualNode(elem2);
+ assertTrue("nodeisequalnode08",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.xhtml
new file mode 100644
index 0000000..de41976
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09-expected.txt
new file mode 100644
index 0000000..92cead5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode09
+Status skip
+Message HTML loader does not support ignoringElementContentWhitespace=true
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.js
new file mode 100644
index 0000000..e28a7be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("ignoringElementContentWhitespace", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Get the first "em" node, construct an equivalent in a new document and see if isEqualNode
+returns true.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode09() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode09") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var elem1;
+ var elem2;
+ var employeeList;
+ var text;
+ var isEqual;
+ var nullDocType = null;
+
+ var appendedChild;
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.localName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ employeeList = doc.getElementsByTagName("em");
+ elem1 = employeeList.item(0);
+ elem2 = newDoc.createElementNS("http://www.w3.org/1999/xhtml","em");
+ text = newDoc.createTextNode("EMP0001");
+ appendedChild = elem2.appendChild(text);
+ isEqual = elem1.isEqualNode(elem2);
+ assertTrue("nodesAreEqual",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.xhtml
new file mode 100644
index 0000000..9bd61f6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10-expected.txt
new file mode 100644
index 0000000..b9538ee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.js
new file mode 100644
index 0000000..8bb1f1f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retreive 2 different "em" nodes of this Document Use isEqualNode
+ check if nodes are not equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode10() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode10") != null) return;
+ var doc;
+ var elem1;
+ var elem2;
+ var employeeList;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ employeeList = doc.getElementsByTagName("em");
+ elem1 = employeeList.item(0);
+ elem2 = employeeList.item(1);
+ isEqual = elem1.isEqualNode(elem2);
+ assertFalse("nodeisequalnode10",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.xhtml
new file mode 100644
index 0000000..629c833
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11-expected.txt
new file mode 100644
index 0000000..d07d730
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.js
new file mode 100644
index 0000000..5e937a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.js
@@ -0,0 +1,161 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var dupDocRef = null;
+ if (typeof(this.dupDoc) != 'undefined') {
+ dupDocRef = this.dupDoc;
+ }
+ docsLoaded += preload(dupDocRef, "dupDoc", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=529
+*/
+function nodeisequalnode11() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode11") != null) return;
+ var doc;
+ var domImpl;
+ var employeeList;
+ var newDoc;
+ var dupDoc;
+ var elem1;
+ var elem2;
+ var elem3;
+ var elem4;
+ var isEqual;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ employeeList = doc.getElementsByTagName("p");
+ elem1 = employeeList.item(0);
+ elem2 = newDoc.importNode(elem1,false);
+ isEqual = elem1.isEqualNode(elem2);
+ assertFalse("nodeisequalnodeFalse11",isEqual);
+elem3 = newDoc.importNode(elem1,true);
+ isEqual = elem1.isEqualNode(elem3);
+
+ if(
+ (getImplementationAttribute("validating") == true)
+ ) {
+ assertFalse("deepImportNoDTD",isEqual);
+
+ }
+
+ var dupDocRef = null;
+ if (typeof(this.dupDoc) != 'undefined') {
+ dupDocRef = this.dupDoc;
+ }
+ dupDoc = load(dupDocRef, "dupDoc", "hc_staff");
+ elem4 = dupDoc.importNode(elem1,true);
+ isEqual = elem1.isEqualNode(elem4);
+ assertTrue("deepImportSameDTD",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.xhtml
new file mode 100644
index 0000000..653c0b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12-expected.txt
new file mode 100644
index 0000000..a310026
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.js
new file mode 100644
index 0000000..faa959f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqual verify if the 2 documentElement nodes of different documents created
+ by parsing the same xml document are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode12() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode12") != null) return;
+ var doc;
+ var elem1;
+ var elem2;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem1 = doc.documentElement;
+
+ elem2 = doc.documentElement;
+
+ isEqual = elem1.isEqualNode(elem2);
+ assertTrue("nodeisequalnode12",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.xhtml
new file mode 100644
index 0000000..dcec9d9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13-expected.txt
new file mode 100644
index 0000000..b34a664
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode13
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.js
new file mode 100644
index 0000000..d37156d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode13() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode13") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var employeeList;
+ var elem1;
+ var elem2;
+ var elem3;
+ var isEqual;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ employeeList = doc.getElementsByTagName("p");
+ elem1 = employeeList.item(0);
+ elem2 = elem1.cloneNode(false);
+ isEqual = elem1.isEqualNode(elem2);
+ assertFalse("nodeisequalnodeFalse13",isEqual);
+elem3 = elem1.cloneNode(true);
+ isEqual = elem1.isEqualNode(elem3);
+ assertTrue("nodeisequalnodeTrue13",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.xhtml
new file mode 100644
index 0000000..7cb271f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14-expected.txt
new file mode 100644
index 0000000..9c54e44
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode14
+Status failure
+Message nodeisequalnode14: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.js
new file mode 100644
index 0000000..c7749b7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode14() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode14") != null) return;
+ var doc;
+ var attr1;
+ var attr2;
+ var isEqual;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attr1 = doc.createAttribute("root");
+ attr2 = doc.createAttributeNS(nullNSURI,"root");
+ isEqual = attr1.isEqualNode(attr2);
+ assertFalse("nodeisequalnode14",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.xhtml
new file mode 100644
index 0000000..b7034c7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15-expected.txt
new file mode 100644
index 0000000..0d9d3eb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode15
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.js
new file mode 100644
index 0000000..b880392
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode15() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode15") != null) return;
+ var doc;
+ var attr1;
+ var attr2;
+ var addrElement;
+ var elementList;
+ var isEqual;
+ var nullNS = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ addrElement = elementList.item(3);
+ attr1 = addrElement.getAttributeNodeNS(nullNS,"title");
+
+ if(
+ (getImplementationAttribute("namespaceAware") == true)
+ ) {
+ attr2 = doc.createAttributeNS(nullNS,"title");
+
+ }
+
+ else {
+ attr2 = doc.createAttribute("title");
+
+ }
+ attr2.value = "Yes";
+
+ isEqual = attr1.isEqualNode(attr2);
+ assertTrue("nodeisequalnode15",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.xhtml
new file mode 100644
index 0000000..941b11f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16-expected.txt
new file mode 100644
index 0000000..1215c93
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode16
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.js
new file mode 100644
index 0000000..45e4571
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if a default attribute node and a cloned default attribute
+ node are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode16() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode16") != null) return;
+ var doc;
+ var attr1;
+ var attr2;
+ var addrElement;
+ var elementList;
+ var isEqual;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ addrElement = elementList.item(3);
+ attr1 = addrElement.getAttributeNodeNS(nullNSURI,"dir");
+ attr2 = attr1.cloneNode(true);
+ isEqual = attr1.isEqualNode(attr2);
+ assertTrue("nodeisequalnode16",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.xhtml
new file mode 100644
index 0000000..7f00cd1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17-expected.txt
new file mode 100644
index 0000000..06cdbee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode17
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.js
new file mode 100644
index 0000000..31ddaeb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode17() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode17") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var attr1;
+ var attr2;
+ var isEqual;
+ var nullDocType = null;
+
+ var nullNSURI = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ attr1 = doc.createAttributeNS(nullNSURI,"root");
+ attr2 = newDoc.importNode(attr1,true);
+ isEqual = attr1.isEqualNode(attr2);
+ assertTrue("nodeisequalnode17",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.xhtml
new file mode 100644
index 0000000..f7183b1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18-expected.txt
new file mode 100644
index 0000000..30be8a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode18
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.js
new file mode 100644
index 0000000..0d03ca5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isEqualNode check if a new Attr node created in this Document is equal to
+ the attr node adopted by a new document.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode18() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode18") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var attr1;
+ var attr2;
+ var isEqual;
+ var nullDocType = null;
+
+ var nullNSURI = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ attr1 = doc.createAttributeNS(nullNSURI,"title");
+ attr2 = newDoc.adoptNode(attr1);
+
+ if(
+
+ (attr2 != null)
+
+ ) {
+ isEqual = attr1.isEqualNode(attr2);
+ assertTrue("nodeisequalnode18",isEqual);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.xhtml
new file mode 100644
index 0000000..2c861f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19-expected.txt
new file mode 100644
index 0000000..4235058
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode19
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.js
new file mode 100644
index 0000000..dc0ba7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 Attr nodes having the same nodeName but different namespaceURIs
+ are not equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode19() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode19") != null) return;
+ var doc;
+ var attr1;
+ var attr2;
+ var isEqual;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attr1 = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","lang");
+ attr2 = doc.createAttributeNS(nullNSURI,"lang");
+ isEqual = attr1.isEqualNode(attr2);
+ assertFalse("nodeisequalnode19",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.xhtml
new file mode 100644
index 0000000..612894b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20-expected.txt
new file mode 100644
index 0000000..4062f1e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode20
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.js
new file mode 100644
index 0000000..ffc3684
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isEqualNode check if an Element and an Attr nodes having the same nodeName
+ and namsepaceURI are not equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode20() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode20") != null) return;
+ var doc;
+ var attr1;
+ var elem1;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem1 = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:html");
+ attr1 = doc.createAttributeNS("http://www.w3.org/1999/xhtml","xhtml:html");
+ isEqual = attr1.isEqualNode(elem1);
+ assertFalse("nodeisequalnode20",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.xhtml
new file mode 100644
index 0000000..ff81c1f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21-expected.txt
new file mode 100644
index 0000000..1fbcf95
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode21
+Status failure
+Message nodeisequalnode21: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.js
new file mode 100644
index 0000000..25f9f5d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 DocumentType nodes returned by parsing the same xml document
+ are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode21() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode21") != null) return;
+ var doc1;
+ var doc2;
+ var docType1;
+ var docType2;
+ var isEqual;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ docType1 = doc1.doctype;
+
+ docType2 = doc2.doctype;
+
+ isEqual = docType1.isEqualNode(docType2);
+ assertTrue("nodeisequalnode21",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.xhtml
new file mode 100644
index 0000000..f6e21f0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22-expected.txt
new file mode 100644
index 0000000..03c6812
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode22
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.js
new file mode 100644
index 0000000..3eaa943
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "barfoo");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "barfoo");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 new DocumentType having null public and system ids
+ are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode22() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode22") != null) return;
+ var doc1;
+ var doc2;
+ var domImpl1;
+ var domImpl2;
+ var docType1;
+ var docType2;
+ var isEqual;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var oldDocType;
+ var rootName;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "barfoo");
+ oldDocType = doc1.doctype;
+
+ rootName = oldDocType.name;
+
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "barfoo");
+ domImpl1 = doc1.implementation;
+domImpl2 = doc2.implementation;
+docType1 = domImpl1.createDocumentType(rootName,nullPubId,nullSysId);
+ docType2 = domImpl2.createDocumentType(rootName,nullPubId,nullSysId);
+ isEqual = docType1.isEqualNode(docType2);
+ assertTrue("nodeisequalnode22",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.xhtml
new file mode 100644
index 0000000..dc112ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode22.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodeisequalnode22.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25-expected.txt
new file mode 100644
index 0000000..025d811
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode25
+Status error
+Message Line 123: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.js
new file mode 100644
index 0000000..10fce50
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 EntityNode having the same name of two DocumentType nodes
+ returned by parsing the same xml document are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode25() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode25") != null) return;
+ var doc1;
+ var doc2;
+ var docType1;
+ var docType2;
+ var entitiesMap1;
+ var entitiesMap2;
+ var alpha;
+ var beta;
+ var isEqual;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ docType1 = doc1.doctype;
+
+ docType2 = doc2.doctype;
+
+ entitiesMap1 = docType1.entities;
+
+ entitiesMap2 = docType2.entities;
+
+ alpha = entitiesMap1.getNamedItem("delta");
+ beta = entitiesMap2.getNamedItem("delta");
+ isEqual = alpha.isEqualNode(beta);
+ assertTrue("nodeisequalnode25",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.xhtml
new file mode 100644
index 0000000..925cb9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26-expected.txt
new file mode 100644
index 0000000..7e11299
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode26
+Status error
+Message Line 123: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.js
new file mode 100644
index 0000000..7c4da9e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode26";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 NotationNode having the same name of two DocumnotationType nodes
+ returned by parsing the same xml documnotation are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode26() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode26") != null) return;
+ var doc1;
+ var doc2;
+ var docType1;
+ var docType2;
+ var notationsMap1;
+ var notationsMap2;
+ var notation1;
+ var notation2;
+ var isEqual;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ docType1 = doc1.doctype;
+
+ docType2 = doc2.doctype;
+
+ notationsMap1 = docType1.notations;
+
+ notationsMap2 = docType2.notations;
+
+ notation1 = notationsMap1.getNamedItem("notation1");
+ notation2 = notationsMap2.getNamedItem("notation1");
+ isEqual = notation1.isEqualNode(notation2);
+ assertTrue("nodeisequalnode26",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode26();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.xhtml
new file mode 100644
index 0000000..373d9f5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode26.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode26.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27-expected.txt
new file mode 100644
index 0000000..23bb604
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode27
+Status error
+Message Line 109: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.js
new file mode 100644
index 0000000..4064b6a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode27";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 EntityNode having the same name of two DocumentType nodes
+ returned by parsing the same xml document are equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode27() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode27") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var notationsMap;
+ var alpha;
+ var notation1;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ notationsMap = docType.notations;
+
+ alpha = entitiesMap.getNamedItem("alpha");
+ notation1 = notationsMap.getNamedItem("notation1");
+ isEqual = notation1.isEqualNode(alpha);
+ assertFalse("nodeisequalnode27",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode27();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.xhtml
new file mode 100644
index 0000000..9028ab2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode27.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode27.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28-expected.txt
new file mode 100644
index 0000000..f06616e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode28
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.js
new file mode 100644
index 0000000..9bccd1a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode28";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 new Text nodes having null text are equal and two others
+ having different data are not equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode28() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode28") != null) return;
+ var doc;
+ var text1;
+ var text2;
+ var text3;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ text1 = doc.createTextNode("");
+ text2 = doc.createTextNode("");
+ text3 = doc.createTextNode("#Text");
+ isEqual = text1.isEqualNode(text2);
+ assertTrue("nodeisequalnodeTrue28",isEqual);
+isEqual = text1.isEqualNode(text3);
+ assertFalse("nodeisequalnodeFalse28",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode28();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.xhtml
new file mode 100644
index 0000000..2642fbd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode28.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode28.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29-expected.txt
new file mode 100644
index 0000000..edc672c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode29
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.js
new file mode 100644
index 0000000..8653edd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode29";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 new Comment nodes having the same data are equal and two others
+ having different data are not equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode29() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode29") != null) return;
+ var doc;
+ var comment1;
+ var comment2;
+ var comment3;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ comment1 = doc.createComment("comment");
+ comment2 = doc.createComment("comment");
+ comment3 = doc.createComment("#Comment");
+ isEqual = comment1.isEqualNode(comment2);
+ assertTrue("nodeisequalnodeTrue29",isEqual);
+isEqual = comment1.isEqualNode(comment3);
+ assertFalse("nodeisequalnodeFalse29",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode29();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.xhtml
new file mode 100644
index 0000000..4b45f23
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode29.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode29.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31-expected.txt
new file mode 100644
index 0000000..0651834
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode31
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.js
new file mode 100644
index 0000000..45f0dce
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode31";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 new CDATASection nodes having the same data are equal and two others
+ having different data are not equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode31() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode31") != null) return;
+ var doc;
+ var cdata1;
+ var cdata2;
+ var cdata3;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ cdata1 = doc.createCDATASection("cdata");
+ cdata2 = doc.createCDATASection("cdata");
+ cdata3 = doc.createCDATASection("#CDATASection");
+ isEqual = cdata1.isEqualNode(cdata2);
+ assertTrue("nodeisequalnodeTrue29",isEqual);
+isEqual = cdata1.isEqualNode(cdata3);
+ assertFalse("nodeisequalnodeFalse29",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode31();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.xhtml
new file mode 100644
index 0000000..9d11acb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode31.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode31.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32-expected.txt
new file mode 100644
index 0000000..3d41324
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode32
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.js b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.js
new file mode 100644
index 0000000..93dfbf2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode32";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isEqualNode check if 2 new ProcessingInstruction nodes having the same data are equal and two others
+ having different data are not equal.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqualNode
+*/
+function nodeisequalnode32() {
+ var success;
+ if(checkInitialization(builder, "nodeisequalnode32") != null) return;
+ var doc;
+ var pi1;
+ var pi2;
+ var pi3;
+ var isEqual;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ pi1 = doc.createProcessingInstruction("Target1","pi");
+ pi2 = doc.createProcessingInstruction("Target1","pi");
+ pi3 = doc.createProcessingInstruction("Target1","#ProcessingInstruction");
+ isEqual = pi1.isEqualNode(pi2);
+ assertTrue("nodeisequalnodeTrue29",isEqual);
+isEqual = pi1.isEqualNode(pi3);
+ assertFalse("nodeisequalnodeFalse29",isEqual);
+
+}
+
+
+
+
+function runTest() {
+ nodeisequalnode32();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.xhtml
new file mode 100644
index 0000000..ac8a310
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeisequalnode32.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeisequalnode32.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode01-expected.txt
new file mode 100644
index 0000000..4da977f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode01.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode01.js
new file mode 100644
index 0000000..96040c7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode01.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isSameNode to check if 2 Document nodes that are equal but do not reference the
+ same object are not the same
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode01() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode01") != null) return;
+ var doc1;
+ var doc2;
+ var isSame;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ isSame = doc1.isSameNode(doc2);
+ assertFalse("nodeissamenode01",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode01.xhtml
new file mode 100644
index 0000000..67a0c72
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode02-expected.txt
new file mode 100644
index 0000000..b41deb8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode02.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode02.js
new file mode 100644
index 0000000..6d2add6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode02.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isSameNode check if 2 DocumentType nodes that reference the same object are
+ the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode02() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode02") != null) return;
+ var doc;
+ var docType1;
+ var docType2;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType1 = doc.doctype;
+
+ docType2 = doc.doctype;
+
+ isSame = docType1.isSameNode(docType2);
+ assertTrue("nodeissamenode02",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode02.xhtml
new file mode 100644
index 0000000..09ebf0a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode03-expected.txt
new file mode 100644
index 0000000..4198312
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode03.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode03.js
new file mode 100644
index 0000000..4de3e11
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode03.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isSameNode check if 2 Element nodes that reference the same object are
+ the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode03() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode03") != null) return;
+ var doc;
+ var element1;
+ var element2;
+ var childList;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("p");
+ element1 = childList.item(0);
+ element2 = childList.item(0);
+ isSame = element2.isSameNode(element1);
+ assertTrue("nodeissamenode03",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode03.xhtml
new file mode 100644
index 0000000..f62b4aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode04-expected.txt
new file mode 100644
index 0000000..42b19cb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode04.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode04.js
new file mode 100644
index 0000000..197bdcf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode04.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isSameNode check if 2 Element nodes that are equal but do not reference the
+ same object are not the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode04() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode04") != null) return;
+ var doc;
+ var element1;
+ var element2;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ element1 = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:br");
+ element2 = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:br");
+ isSame = element2.isSameNode(element1);
+ assertFalse("nodeissamenode04",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode04.xhtml
new file mode 100644
index 0000000..76b8af2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode05-expected.txt
new file mode 100644
index 0000000..c5d9db5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode05.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode05.js
new file mode 100644
index 0000000..cef01ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode05.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isSameNode check if 2 Document Element nodes that reference the same object are
+ the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode05() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode05") != null) return;
+ var doc;
+ var element1;
+ var element2;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ element1 = doc.documentElement;
+
+ element2 = doc.documentElement;
+
+ isSame = element2.isSameNode(element1);
+ assertTrue("nodeissamenode05",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode05.xhtml
new file mode 100644
index 0000000..5b20e7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode06-expected.txt
new file mode 100644
index 0000000..a3256ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode06.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode06.js
new file mode 100644
index 0000000..0291e32
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode06.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isSameNode check if 2 Document Element nodes that reference the same object are
+ the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode06() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode06") != null) return;
+ var doc;
+ var element;
+ var element1;
+ var attr1;
+ var attr2;
+ var childList;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ element = childList.item(2);
+ element1 = childList.item(2);
+ attr1 = element.getAttributeNode("class");
+ attr2 = element1.getAttributeNode("class");
+ isSame = attr1.isSameNode(attr2);
+ assertTrue("nodeissamenode06",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode06.xhtml
new file mode 100644
index 0000000..5f0939e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode07-expected.txt
new file mode 100644
index 0000000..4ec1337
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode07
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode07.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode07.js
new file mode 100644
index 0000000..8274b24
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode07.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isSameNode check if 2 Entity nodes that reference the same object are
+ the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode07() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode07") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity1;
+ var entity2;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity1 = entitiesMap.getNamedItem("delta");
+ entity2 = entitiesMap.getNamedItem("delta");
+ isSame = entity1.isSameNode(entity2);
+ assertTrue("nodeissamenode07",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode07.xhtml
new file mode 100644
index 0000000..3325c5b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode08-expected.txt
new file mode 100644
index 0000000..0d844cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode08
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode08.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode08.js
new file mode 100644
index 0000000..b9a4d1c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode08.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isSameNode check if 2 Notation nodes that reference the same object are
+ the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode08() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode08") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var notation1;
+ var notation2;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.notations;
+
+ notation1 = entitiesMap.getNamedItem("notation1");
+ notation2 = entitiesMap.getNamedItem("notation1");
+ isSame = notation1.isSameNode(notation2);
+ assertTrue("nodeissamenode08",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode08.xhtml
new file mode 100644
index 0000000..3bed105
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode09-expected.txt
new file mode 100644
index 0000000..6221ab6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode09
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode09.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode09.js
new file mode 100644
index 0000000..66535b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode09.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ Using isSameNode check if an Entity and its docType nodes are not the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode09() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode09") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var entity;
+ var isSame;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ isSame = docType.isSameNode(entity);
+ assertFalse("nodeissamenode09",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode09.xhtml
new file mode 100644
index 0000000..2798750
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodeissamenode10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodeissamenode10-expected.txt
new file mode 100644
index 0000000..20e621d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode10.js b/LayoutTests/dom/xhtml/level3/core/nodeissamenode10.js
new file mode 100644
index 0000000..bc82b12
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode10.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using isSameNode check if an new Document and a new Element node are not the same.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isSameNode
+*/
+function nodeissamenode10() {
+ var success;
+ if(checkInitialization(builder, "nodeissamenode10") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var element;
+ var isSame;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ element = newDoc.createElementNS(rootNS,rootName);
+ isSame = newDoc.isSameNode(element);
+ assertFalse("nodeissamenode10",isSame);
+
+}
+
+
+
+
+function runTest() {
+ nodeissamenode10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeissamenode10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodeissamenode10.xhtml
new file mode 100644
index 0000000..a187d69
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodeissamenode10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodeissamenode10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.js
new file mode 100644
index 0000000..72b98e2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.js
@@ -0,0 +1,108 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_nodefaultns");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Return value from lookupNamespaceURI(null) on a Document node with no default namespace should be null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri01() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri01") != null) return;
+ var doc;
+ var namespaceURI;
+ var nullPrefix = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_nodefaultns");
+ namespaceURI = doc.lookupNamespaceURI(nullPrefix);
+ assertNull("nodelookupnamespaceuri01",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.xhtml
new file mode 100644
index 0000000..7a4c26a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri01.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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02-expected.txt
new file mode 100644
index 0000000..f7112c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.js
new file mode 100644
index 0000000..7d97f07
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using lookupNamespaceURI on a new Document node with a namespaceURI and prefix
+ and check if the value returned is the same namespaceURI.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri02() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri02") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var namespaceURI;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+ var qname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+qname = "dom3:" + rootName;
+newDoc = domImpl.createDocument(rootNS,qname,nullDocType);
+ namespaceURI = newDoc.lookupNamespaceURI("dom3");
+ assertEquals("nodelookupnamespaceuri02",rootNS,namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.xhtml
new file mode 100644
index 0000000..a58aea0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03-expected.txt
new file mode 100644
index 0000000..bc4a35c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.js
new file mode 100644
index 0000000..f27f853
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using lookupNamespaceURI on this DocumentType node check if the value returned is Null .
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri03() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri03") != null) return;
+ var doc;
+ var docType;
+ var namespaceURI;
+ var nullPrefix = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ namespaceURI = docType.lookupNamespaceURI(nullPrefix);
+ assertNull("nodelookupnamespaceuri03",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.xhtml
new file mode 100644
index 0000000..052c6f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt
new file mode 100644
index 0000000..34a961f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri04
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.js
new file mode 100644
index 0000000..e262ac3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using lookupNamespaceURI on an Entity and Notation node and check if the value returned is Null .
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri04() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri04") != null) return;
+ var doc;
+ var docType;
+ var entity;
+ var notation;
+ var entitiesMap;
+ var notationsMap;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ notationsMap = docType.notations;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ notation = notationsMap.getNamedItem("notation1");
+ namespaceURI = entity.lookupNamespaceURI("");
+ assertNull("nodelookupnamespaceuri04",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.xhtml
new file mode 100644
index 0000000..094737d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05-expected.txt
new file mode 100644
index 0000000..35626e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.js
new file mode 100644
index 0000000..1272da9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using lookupNamespaceURI on the DocumentElement node of a new document with a
+ namespaceURI and prefix and check if the namespaceURI value returned is valid.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri05() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri05") != null) return;
+ var doc;
+ var elem;
+ var domImpl;
+ var newDoc;
+ var namespaceURI;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+ var qname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ qname = "dom3:" + rootName;
+domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,qname,nullDocType);
+ elem = newDoc.documentElement;
+
+ namespaceURI = elem.lookupNamespaceURI("dom3");
+ assertEquals("nodelookupnamespaceuri05",rootNS,namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.xhtml
new file mode 100644
index 0000000..9a0d482
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06-expected.txt
new file mode 100644
index 0000000..ffb010b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.js
new file mode 100644
index 0000000..950ad7a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri06() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri06") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(2);
+ namespaceURI = elem.lookupNamespaceURI("dmstc");
+ assertEquals("nodelookupnamespaceuri06","http://www.netzero.com",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.xhtml
new file mode 100644
index 0000000..68c9d27
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07-expected.txt
new file mode 100644
index 0000000..4343b02
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.js
new file mode 100644
index 0000000..ad099ab
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri07() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri07") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(2);
+ namespaceURI = elem.lookupNamespaceURI("dmstc");
+ assertEquals("nodelookupnamespaceuri07","http://www.netzero.com",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.xhtml
new file mode 100644
index 0000000..c9b6736
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08-expected.txt
new file mode 100644
index 0000000..00fe9a2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.js
new file mode 100644
index 0000000..199f4f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri08() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri08") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var namespaceURI;
+ var namespaceURIEmpty;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ namespaceURI = elem.lookupNamespaceURI("dmstc");
+ assertEquals("nodelookupnamespaceuri08","http://www.usa.com",namespaceURI);
+ namespaceURIEmpty = elem.lookupNamespaceURI("");
+ assertNull("nodelookupnamespaceprefixEmpty08",namespaceURIEmpty);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.xhtml
new file mode 100644
index 0000000..1189bc7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09-expected.txt
new file mode 100644
index 0000000..b3bf1a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.js
new file mode 100644
index 0000000..83dc9ce
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri09() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri09") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var namespaceURI;
+ var namespaceURIEmpty;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ namespaceURI = elem.lookupNamespaceURI("dmstc");
+ assertEquals("nodelookupnamespaceuri09","http://www.usa.com",namespaceURI);
+ namespaceURIEmpty = elem.lookupNamespaceURI("");
+ assertNull("nodelookupnamespaceprefixEmpty09",namespaceURIEmpty);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.xhtml
new file mode 100644
index 0000000..8e1af52
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10-expected.txt
new file mode 100644
index 0000000..73a6b8c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.js
new file mode 100644
index 0000000..29db780
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri10() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri10") != null) return;
+ var doc;
+ var parent;
+ var child;
+ var namespaceURI;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:body");
+ child = doc.createElement("p");
+ appendedChild = parent.appendChild(child);
+ namespaceURI = child.lookupNamespaceURI("xhtml");
+ assertEquals("nodelookupnamespaceuri10","http://www.w3.org/1999/xhtml",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.xhtml
new file mode 100644
index 0000000..047017f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11-expected.txt
new file mode 100644
index 0000000..61c72b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.js
new file mode 100644
index 0000000..fbd113f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri11() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri11") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var elem;
+ var importedNode;
+ var namespaceURI;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ importedNode = newDoc.importNode(elem,true);
+ namespaceURI = importedNode.lookupNamespaceURI("dom3");
+ assertEquals("nodelookupnamespaceuri11","http://www.w3.org/1999/xhtml",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.xhtml
new file mode 100644
index 0000000..9f03cd9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13-expected.txt
new file mode 100644
index 0000000..6162236
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri13
+Status Success
+Text
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.js
new file mode 100644
index 0000000..3a56176
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri13() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri13") != null) return;
+ var doc;
+ var docElem;
+ var elem;
+ var txt;
+ var namespaceURI;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ txt = doc.createTextNode("Text");
+ appendedChild = elem.appendChild(txt);
+ appendedChild = docElem.appendChild(elem);
+ namespaceURI = txt.lookupNamespaceURI("dom3");
+ assertEquals("nodelookupnamespaceuri13","http://www.w3.org/1999/xhtml",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.xhtml
new file mode 100644
index 0000000..4f5e27b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14-expected.txt
new file mode 100644
index 0000000..b5ff094
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri14
+Status Success
+
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.js
new file mode 100644
index 0000000..b7f513f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri14() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri14") != null) return;
+ var doc;
+ var docElem;
+ var elem;
+ var cdata;
+ var lookupNamespaceURI;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ cdata = doc.createCDATASection("Text");
+ appendedChild = elem.appendChild(cdata);
+ appendedChild = docElem.appendChild(elem);
+ lookupNamespaceURI = cdata.lookupNamespaceURI("dom3");
+ assertEquals("nodelookupnamespaceuri14","http://www.w3.org/1999/xhtml",lookupNamespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.xhtml
new file mode 100644
index 0000000..70e0f7a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15-expected.txt
new file mode 100644
index 0000000..7307e56
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri15
+Status Success
+
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.js
new file mode 100644
index 0000000..684fa11
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri15() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri15") != null) return;
+ var doc;
+ var docElem;
+ var elem;
+ var comment;
+ var clonedComment;
+ var namespaceURI;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ comment = doc.createComment("Text");
+ clonedComment = comment.cloneNode(true);
+ appendedChild = elem.appendChild(clonedComment);
+ appendedChild = docElem.appendChild(elem);
+ namespaceURI = clonedComment.lookupNamespaceURI("dom3");
+ assertEquals("nodelookupnamespaceuri15","http://www.w3.org/1999/xhtml",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.xhtml
new file mode 100644
index 0000000..1447d96
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16-expected.txt
new file mode 100644
index 0000000..1b61793
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri16
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.js
new file mode 100644
index 0000000..bb81310
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke lookupNamespaceURI on a new Attribute node with with a namespace URI
+ and prefix and verify if the namespaceURI returned is null.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri16() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri16") != null) return;
+ var doc;
+ var elem;
+ var attr;
+ var attNode;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ attNode = elem.setAttributeNodeNS(attr);
+ namespaceURI = attr.lookupNamespaceURI("xml");
+ assertNull("nodelookupnamespaceuri16",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.xhtml
new file mode 100644
index 0000000..db00a31
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17-expected.txt
new file mode 100644
index 0000000..0dabc7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri17
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.js
new file mode 100644
index 0000000..04ccb9c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri17() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri17") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(2);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ namespaceURI = attr.lookupNamespaceURI("dmstc");
+ assertEquals("nodelookupnamespaceuri17","http://www.netzero.com",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.xhtml
new file mode 100644
index 0000000..21c3af3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18-expected.txt
new file mode 100644
index 0000000..ac265c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri18
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.js
new file mode 100644
index 0000000..03e6e7c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri18() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri18") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("dir");
+ namespaceURI = attr.lookupNamespaceURI("nm");
+ assertEquals("nodelookupnamespaceuri18","http://www.altavista.com",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.xhtml
new file mode 100644
index 0000000..b593557
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19-expected.txt
new file mode 100644
index 0000000..da75ff7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri19
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.js
new file mode 100644
index 0000000..e49f4f3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri19() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri19") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(3);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ namespaceURI = attr.lookupNamespaceURI("xsi");
+ assertEquals("nodelookupnamespaceuri19","http://www.w3.org/2001/XMLSchema-instance",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.xhtml
new file mode 100644
index 0000000..2755f8d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20-expected.txt
new file mode 100644
index 0000000..07edba9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri20
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.js b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.js
new file mode 100644
index 0000000..62bbd98
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespaceURI
+*/
+function nodelookupnamespaceuri20() {
+ var success;
+ if(checkInitialization(builder, "nodelookupnamespaceuri20") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var namespaceURI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:nm");
+ namespaceURI = attr.lookupNamespaceURI("nm");
+ assertEquals("nodelookupnamespaceuri20","http://www.altavista.com",namespaceURI);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupnamespaceuri20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.xhtml
new file mode 100644
index 0000000..6ead5f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupnamespaceuri20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupnamespaceuri20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01-expected.txt
new file mode 100644
index 0000000..cf874b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.js
new file mode 100644
index 0000000..18b5fd4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using lookupPrefix on this Document node check if the value returned is Null .
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix01() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix01") != null) return;
+ var doc;
+ var prefix;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ prefix = doc.lookupPrefix(nullNSURI);
+ assertNull("nodelookupprefix01",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.xhtml
new file mode 100644
index 0000000..bdc9cb5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02-expected.txt
new file mode 100644
index 0000000..08e488a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.js
new file mode 100644
index 0000000..65a38e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using lookupPrefix on a new Document node with a namespaceURI and prefix
+ and check if the value returned is the same prefix.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix02() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix02") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var prefix;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+ var qname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+qname = "dom3:" + rootName;
+newDoc = domImpl.createDocument(rootNS,qname,nullDocType);
+ prefix = newDoc.lookupPrefix(rootNS);
+ assertEquals("nodelookupprefix02","dom3",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.xhtml
new file mode 100644
index 0000000..3bbe31f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03-expected.txt
new file mode 100644
index 0000000..b96493a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.js
new file mode 100644
index 0000000..e6fa1fb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using lookupPrefix on this DocumentType node check if the value returned is Null .
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix03() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix03") != null) return;
+ var doc;
+ var docType;
+ var prefix;
+ var nullNSURI = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ prefix = docType.lookupPrefix(nullNSURI);
+ assertNull("nodelookupprefix03",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.xhtml
new file mode 100644
index 0000000..54b1071
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04-expected.txt
new file mode 100644
index 0000000..b3bb32d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix04
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.js
new file mode 100644
index 0000000..6541c6e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using lookupPrefix on an Entity and Notation node and check if the value returned is Null .
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix04() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix04") != null) return;
+ var doc;
+ var docType;
+ var entity;
+ var notation;
+ var entitiesMap;
+ var notationsMap;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ notationsMap = docType.notations;
+
+ entity = entitiesMap.getNamedItem("alpha");
+ notation = notationsMap.getNamedItem("notation1");
+ prefix = entity.lookupPrefix("");
+ assertNull("nodelookupprefixEntity04",prefix);
+ prefix = notation.lookupPrefix("");
+ assertNull("nodelookupprefixNotation04",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.xhtml
new file mode 100644
index 0000000..6b1ac5c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05-expected.txt
new file mode 100644
index 0000000..d3bb2a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.js
new file mode 100644
index 0000000..e096fe6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using lookupPrefix on the DocumentElement node of a new document with a
+ namespaceURI and prefix and check if the prefix value returned is valid.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix05() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix05") != null) return;
+ var doc;
+ var elem;
+ var domImpl;
+ var newDoc;
+ var prefix;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+ var qname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ qname = "dom3:" + rootName;
+domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,qname,nullDocType);
+ elem = newDoc.documentElement;
+
+ prefix = elem.lookupPrefix(rootNS);
+ assertEquals("nodelookupprefix05","dom3",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.xhtml
new file mode 100644
index 0000000..beee81e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06-expected.txt
new file mode 100644
index 0000000..e900aaf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.js
new file mode 100644
index 0000000..33a8bc1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix06() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix06") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(2);
+ prefix = elem.lookupPrefix("http://www.netzero.com");
+ assertEquals("nodelookupprefix06","dmstc",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.xhtml
new file mode 100644
index 0000000..6a69b59
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07-expected.txt
new file mode 100644
index 0000000..193a7a4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.js
new file mode 100644
index 0000000..492b84f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix07() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix07") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(2);
+ prefix = elem.lookupPrefix("http://www.netzero.com");
+ assertEquals("nodelookupprefix07","dmstc",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.xhtml
new file mode 100644
index 0000000..fe2fc53
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08-expected.txt
new file mode 100644
index 0000000..ea98911
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.js
new file mode 100644
index 0000000..27d244b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix08() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix08") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var prefix;
+ var prefixEmpty;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ prefix = elem.lookupPrefix("http://www.usa.com");
+ assertEquals("nodelookupprefix08","dmstc",prefix);
+ prefixEmpty = elem.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertNull("nodelookupnamespaceprefixEmpty08",prefixEmpty);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.xhtml
new file mode 100644
index 0000000..ca41718
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09-expected.txt
new file mode 100644
index 0000000..818a236
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.js
new file mode 100644
index 0000000..e25ea8b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix09() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix09") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var prefix;
+ var prefixEmpty;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ prefix = elem.lookupPrefix("http://www.usa.com");
+ assertEquals("nodelookupprefix09","dmstc",prefix);
+ prefixEmpty = elem.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertNull("nodelookupprefixEmpty09",prefixEmpty);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.xhtml
new file mode 100644
index 0000000..332bb27
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10-expected.txt
new file mode 100644
index 0000000..58b4b46
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix10
+Status failure
+Message nodelookupprefix10: assertEquals failed, actual null, expected dom3.
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.js
new file mode 100644
index 0000000..85359d5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix10() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix10") != null) return;
+ var doc;
+ var parent;
+ var child;
+ var prefix;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ child = doc.createElement("br");
+ appendedChild = parent.appendChild(child);
+ prefix = child.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertEquals("nodelookupprefix10","dom3",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.xhtml
new file mode 100644
index 0000000..0832ea0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11-expected.txt
new file mode 100644
index 0000000..fcd2195
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.js
new file mode 100644
index 0000000..2340683
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix11() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix11") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var elem;
+ var importedNode;
+ var prefix;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+ var qname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ qname = "dom3doc:" + rootName;
+domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,qname,nullDocType);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:br");
+ importedNode = newDoc.importNode(elem,true);
+ prefix = importedNode.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertEquals("nodelookupprefix11","dom3",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.xhtml
new file mode 100644
index 0000000..4b712b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12-expected.txt
new file mode 100644
index 0000000..1ada97f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix12
+Status error
+Message Line 103: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.js
new file mode 100644
index 0000000..983e058
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix12() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix12") != null) return;
+ var doc;
+ var domImpl;
+ var elem;
+ var renamedNode;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ renamedNode = doc.renameNode(elem,"http://www.w3.org/1999/xhtml","ren:br");
+ prefix = renamedNode.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertEquals("nodelookupprefix12","ren",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.xhtml
new file mode 100644
index 0000000..030b546
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13-expected.txt
new file mode 100644
index 0000000..5f8abfe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix13
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.js
new file mode 100644
index 0000000..27b7b5b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix13() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix13") != null) return;
+ var doc;
+ var bodyElem;
+ var elem;
+ var txt;
+ var prefix;
+ var appendedChild;
+ var bodyList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ txt = doc.createTextNode("Text");
+ appendedChild = elem.appendChild(txt);
+ appendedChild = bodyElem.appendChild(elem);
+ prefix = txt.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertEquals("nodelookupprefix13","dom3",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.xhtml
new file mode 100644
index 0000000..bb31b8d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14-expected.txt
new file mode 100644
index 0000000..55ec41d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix14
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.js
new file mode 100644
index 0000000..29e99c9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix14() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix14") != null) return;
+ var doc;
+ var bodyElem;
+ var elem;
+ var cdata;
+ var prefix;
+ var appendedChild;
+ var bodyList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ cdata = doc.createCDATASection("Text");
+ appendedChild = elem.appendChild(cdata);
+ appendedChild = bodyElem.appendChild(elem);
+ prefix = cdata.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertEquals("nodelookupprefix14","dom3",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.xhtml
new file mode 100644
index 0000000..9259145
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15-expected.txt
new file mode 100644
index 0000000..2f5521e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix15
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.js
new file mode 100644
index 0000000..1f7bf74
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix15() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix15") != null) return;
+ var doc;
+ var bodyElem;
+ var elem;
+ var comment;
+ var clonedComment;
+ var prefix;
+ var appendedChild;
+ var bodyList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ comment = doc.createComment("Text");
+ clonedComment = comment.cloneNode(true);
+ appendedChild = elem.appendChild(clonedComment);
+ appendedChild = bodyElem.appendChild(elem);
+ prefix = clonedComment.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertEquals("nodelookupprefix15","dom3",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.xhtml
new file mode 100644
index 0000000..8387192
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16-expected.txt
new file mode 100644
index 0000000..9ba8835
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix16
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.js
new file mode 100644
index 0000000..8a07de8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke lookupPrefix on a new Attribute node with with a namespace URI
+ and prefix and verify if the prefix returned is null.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix16() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix16") != null) return;
+ var doc;
+ var elem;
+ var attr;
+ var prefix;
+ var attNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ attNode = elem.setAttributeNodeNS(attr);
+ prefix = attr.lookupPrefix("http://www.w3.org/XML/1998/namespace");
+ assertNull("nodelookupprefix16",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.xhtml
new file mode 100644
index 0000000..f088a4c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodelookupprefix16.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17-expected.txt
new file mode 100644
index 0000000..699d35f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix17
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.js
new file mode 100644
index 0000000..71c1efe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix17() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix17") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(2);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ prefix = attr.lookupPrefix("http://www.netzero.com");
+ assertEquals("nodelookupprefix17","dmstc",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.xhtml
new file mode 100644
index 0000000..ffb0c16
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18-expected.txt
new file mode 100644
index 0000000..f2fb5a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix18
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.js
new file mode 100644
index 0000000..d69bb0a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix18() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix18") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("dir");
+ prefix = attr.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertNull("xhtmlPrefixIsNull",prefix);
+ prefix = attr.lookupPrefix("http://www.altavista.com");
+ assertEquals("nodelookupprefixB18","nm",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.xhtml
new file mode 100644
index 0000000..651c473
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.js
new file mode 100644
index 0000000..7f657d5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo_nodefaultns");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix19() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix19") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo_nodefaultns");
+ elemList = doc.getElementsByTagName("html:p");
+ elem = elemList.item(0);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("class");
+ prefix = attr.lookupPrefix("http://www.w3.org/1999/xhtml");
+ assertEquals("nodelookupprefix19","html",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.xhtml
new file mode 100644
index 0000000..7a4c26a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix19.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/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20-expected.txt
new file mode 100644
index 0000000..66f125f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix20
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.js
new file mode 100644
index 0000000..956351b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
+*/
+function nodelookupprefix20() {
+ var success;
+ if(checkInitialization(builder, "nodelookupprefix20") != null) return;
+ var doc;
+ var elem;
+ var elemList;
+ var attributesMap;
+ var attr;
+ var prefix;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attributesMap = elem.attributes;
+
+ attr = attributesMap.getNamedItem("xmlns:nm");
+ prefix = attr.lookupPrefix("http://www.altavista.com");
+ assertEquals("nodelookupprefix20","nm",prefix);
+
+}
+
+
+
+
+function runTest() {
+ nodelookupprefix20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.xhtml b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.xhtml
new file mode 100644
index 0000000..b4c8f47
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodelookupprefix20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild01-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild01-expected.txt
new file mode 100644
index 0000000..4721c35
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild01.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild01.js
new file mode 100644
index 0000000..ef2c71a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild01.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using removeChild on this Document node attempt to remove this Document node and
+ verify if a NOT_FOUND_ERR error is thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild01() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild01") != null) return;
+ var doc;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ removed = doc.removeChild(doc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("NOT_FOUND_ERR_noderemovechild01",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild01.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild01.xhtml
new file mode 100644
index 0000000..416f04c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild02-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild02-expected.txt
new file mode 100644
index 0000000..78eb171
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild02.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild02.js
new file mode 100644
index 0000000..802939d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild02.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild02() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild02") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var removed;
+ var nullDocType = null;
+
+ var docElem;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
+
+ {
+ success = false;
+ try {
+ removed = doc.removeChild(newDoc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR_1",success);
+ }
+
+ {
+ success = false;
+ try {
+ removed = newDoc.removeChild(doc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR_2",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild02.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild02.xhtml
new file mode 100644
index 0000000..d44b266
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild03.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild03.js
new file mode 100644
index 0000000..a0b082a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild03.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild03() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild03") != null) return;
+ var doc;
+ var docElem;
+ var removedChild;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ removed = doc.removeChild(docElem);
+ removedChild = doc.documentElement;
+
+ assertNull("noderemovechild03",removedChild);
+
+ {
+ success = false;
+ try {
+ removed = docElem.removeChild(doc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild03.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/noderemovechild03.xhtml-disabled
new file mode 100644
index 0000000..c0e8dd6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild03.xhtml-disabled
@@ -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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild04-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild04-expected.txt
new file mode 100644
index 0000000..117716e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild04.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild04.js
new file mode 100644
index 0000000..71745c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild04.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild04() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild04") != null) return;
+ var doc;
+ var docType;
+ var removedDocType;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ removed = doc.removeChild(docType);
+ removedDocType = doc.doctype;
+
+ assertNull("noderemovechild04",removedDocType);
+
+ {
+ success = false;
+ try {
+ removed = docType.removeChild(doc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("NOT_FOUND_ERR_noderemovechild04",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild04.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild04.xhtml
new file mode 100644
index 0000000..850b76c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild05-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild05-expected.txt
new file mode 100644
index 0000000..ab69a6f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild05.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild05.js
new file mode 100644
index 0000000..b3c5282
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild05.js
@@ -0,0 +1,147 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=417
+*/
+function noderemovechild05() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild05") != null) return;
+ var doc;
+ var domImpl;
+ var docType;
+ var removedDocType;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var appendedChild;
+ var removedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docType = doc.doctype;
+
+
+ try {
+ removedChild = doc.removeChild(docType);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ assertNotNull("removedChildNotNull",removedChild);
+removedDocType = doc.doctype;
+
+ assertNull("noderemovechild05",removedDocType);
+
+ {
+ success = false;
+ try {
+ removedChild = docType.removeChild(doc);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("NOT_FOUND_ERR_noderemovechild05",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild05.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild05.xhtml
new file mode 100644
index 0000000..1b8ab34
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='noderemovechild05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild07-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild07-expected.txt
new file mode 100644
index 0000000..990e7f6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild07
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild07.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild07.js
new file mode 100644
index 0000000..3b0f5d1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild07.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=418
+*/
+function noderemovechild07() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild07") != null) return;
+ var doc;
+ var docType;
+ var notations;
+ var notation;
+ var removedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ notations = docType.notations;
+
+ notation = notations.getNamedItem("notation1");
+
+ {
+ success = false;
+ try {
+ removedChild = doc.removeChild(notation);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("NOT_FOUND_ERR_noderemovechild07_1",success);
+ }
+
+ try {
+ removedChild = notation.removeChild(doc);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* NO_MODIFICATION_ALLOWED_ERR */ 7 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild07.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild07.xhtml
new file mode 100644
index 0000000..5f13650
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild08-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild08-expected.txt
new file mode 100644
index 0000000..8383ddf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild08.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild08.js
new file mode 100644
index 0000000..8b1816a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild08.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using removeChild on this Document node attempt to remove a new Comment node and
+ verify the data of the removed comment node..
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild08() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild08") != null) return;
+ var doc;
+ var comment;
+ var removedCmt;
+ var data;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ comment = doc.createComment("Comment");
+ appendedChild = doc.appendChild(comment);
+ removedCmt = doc.removeChild(comment);
+ data = removedCmt.data;
+
+ assertEquals("noderemovechild08","Comment",data);
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild08.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild08.xhtml
new file mode 100644
index 0000000..a5ab247
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild09-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild09-expected.txt
new file mode 100644
index 0000000..ff6959b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild09-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild09.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild09.js
new file mode 100644
index 0000000..e556a74
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild09.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using removeChild on this Document node attempt to remove a new ProcessingInstruction node and
+ verify the target of the removed ProcessingInstruction node.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild09() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild09") != null) return;
+ var doc;
+ var pi;
+ var removedPi;
+ var target;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ pi = doc.createProcessingInstruction("PIT","PID");
+ appendedChild = doc.appendChild(pi);
+ removedPi = doc.removeChild(pi);
+ target = removedPi.target;
+
+ assertEquals("noderemovechild09","PIT",target);
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild09.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild09.xhtml
new file mode 100644
index 0000000..a3a8636
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild10-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild10-expected.txt
new file mode 100644
index 0000000..269a5e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild10.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild10.js
new file mode 100644
index 0000000..20e3e4f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild10.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using removeChild on a new DocumentFragment node attempt to remove a new Element node and
+ verify the name of the removed Element node.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild10() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild10") != null) return;
+ var doc;
+ var docFrag;
+ var elem;
+ var removedElem;
+ var elemName;
+ var appendedChild;
+ var removedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docFrag = doc.createDocumentFragment();
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:br");
+ appendedChild = docFrag.appendChild(elem);
+ removedElem = docFrag.removeChild(elem);
+ elemName = removedElem.nodeName;
+
+ assertEquals("noderemovechild10","dom3:br",elemName);
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild10.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild10.xhtml
new file mode 100644
index 0000000..feb399d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild10.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='noderemovechild10.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild11-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild11-expected.txt
new file mode 100644
index 0000000..2faf219
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild11.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild11.js
new file mode 100644
index 0000000..fe66e71
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild11.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ Using removeChild on a new DocumentFragment node attempt to remove a new Text node and
+ verify the name of the removed Element node.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild11() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild11") != null) return;
+ var doc;
+ var docFrag;
+ var txt;
+ var removedTxt;
+ var appendedChild;
+ var removedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ txt = doc.createTextNode("TEXT");
+ appendedChild = docFrag.appendChild(txt);
+ removedChild = docFrag.removeChild(txt);
+ removedTxt = docFrag.firstChild;
+
+ assertNull("noderemovechild11",removedTxt);
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild11.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild11.xhtml
new file mode 100644
index 0000000..ba506a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild12-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild12-expected.txt
new file mode 100644
index 0000000..1c0e175
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild12.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild12.js
new file mode 100644
index 0000000..4e18a22
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild12.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild12() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild12") != null) return;
+ var doc;
+ var docFrag;
+ var eRef;
+ var removedERef;
+ var appendedChild;
+ var removedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ eRef = doc.createEntityReference("ent1");
+ appendedChild = docFrag.appendChild(eRef);
+ removedChild = docFrag.removeChild(eRef);
+ removedERef = docFrag.firstChild;
+
+ assertNull("noderemovechild12",removedERef);
+
+ try {
+ removedChild = eRef.removeChild(docFrag);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* NO_MODIFICATION_ALLOWED_ERR */ 7 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild12.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild12.xhtml
new file mode 100644
index 0000000..736ed92
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild13-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild13-expected.txt
new file mode 100644
index 0000000..96e56a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild13
+Status failure
+Message txtNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild13.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild13.js
new file mode 100644
index 0000000..6c80ffb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild13.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild13() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild13") != null) return;
+ var doc;
+ var txt;
+ var eRef;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ eRef = doc.createEntityReference("alpha");
+ txt = eRef.firstChild;
+
+ assertNotNull("txtNotNull",txt);
+
+ {
+ success = false;
+ try {
+ removed = eRef.removeChild(txt);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild13.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild13.xhtml
new file mode 100644
index 0000000..71317a4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild14-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild14-expected.txt
new file mode 100644
index 0000000..1235bf4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild14
+Status failure
+Message piNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild14.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild14.js
new file mode 100644
index 0000000..03d5a19
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild14.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild14() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild14") != null) return;
+ var doc;
+ var removed;
+ var eRef;
+ var pi;
+ var entName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ eRef = doc.createEntityReference("ent4");
+ pi = eRef.lastChild;
+
+ assertNotNull("piNotNull",pi);
+
+ {
+ success = false;
+ try {
+ removed = eRef.removeChild(pi);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild14.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild14.xhtml
new file mode 100644
index 0000000..0084f7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild15-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild15-expected.txt
new file mode 100644
index 0000000..802e0c2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild15
+Status failure
+Message elemNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild15.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild15.js
new file mode 100644
index 0000000..53b3f7c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild15.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using removeChild on a new EntityReference node attempt to remove an Element child
+ and verify if a NO_MODIFICATION_ALLOWED_ERR is thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild15() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild15") != null) return;
+ var doc;
+ var eRef;
+ var elem;
+ var entName;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ eRef = doc.createEntityReference("ent4");
+ elem = eRef.firstChild;
+
+ assertNotNull("elemNotNull",elem);
+
+ {
+ success = false;
+ try {
+ removed = eRef.removeChild(elem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild15.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild15.xhtml
new file mode 100644
index 0000000..0a48627
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild16-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild16-expected.txt
new file mode 100644
index 0000000..3c7bec8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild16
+Status skip
+Message HTML loader does not support ignoringElementContentWhitespace=true
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild16.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild16.js
new file mode 100644
index 0000000..d1080f5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild16.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("ignoringElementContentWhitespace", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild16() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild16") != null) return;
+ var doc;
+ var parentList;
+ var childList;
+ var parent;
+ var child;
+ var removed;
+ var removedName;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("em");
+ child = parentList.item(0);
+ parent = child.parentNode;
+
+ removed = parent.removeChild(child);
+ removedName = removed.nodeName;
+
+ assertEquals("noderemovechild16","em",removedName);
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(parent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("NOT_FOUND_ERR_noderemovechild16",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild16.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild16.xhtml
new file mode 100644
index 0000000..20da7d7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild17-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild17-expected.txt
new file mode 100644
index 0000000..b68192a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild17-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild17
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild17.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild17.js
new file mode 100644
index 0000000..36b7e5d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild17.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild17() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild17") != null) return;
+ var doc;
+ var parentList;
+ var parent;
+ var child;
+ var removed;
+ var removedValue;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("em");
+ parent = parentList.item(0);
+ child = parent.firstChild;
+
+ removed = parent.removeChild(child);
+ removedValue = removed.nodeValue;
+
+ assertEquals("noderemovechild17","EMP0001",removedValue);
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(parent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild17.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild17.xhtml
new file mode 100644
index 0000000..dfc2a99
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild18-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild18-expected.txt
new file mode 100644
index 0000000..9d01b9d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild18-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild18
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild18.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild18.js
new file mode 100644
index 0000000..cff6cf8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild18.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild18() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild18") != null) return;
+ var doc;
+ var parentList;
+ var parent;
+ var child;
+ var removed;
+ var removedValue;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("strong");
+ parent = parentList.item(1);
+ child = parent.lastChild;
+
+ removed = parent.removeChild(child);
+ removedValue = removed.nodeValue;
+
+ assertEquals("noderemovechild18","This is an adjacent CDATASection with a reference to a tab &tab;",removedValue);
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(parent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild18.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild18.xhtml
new file mode 100644
index 0000000..076c69f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild19-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild19-expected.txt
new file mode 100644
index 0000000..ddb5a4f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild19
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild19.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild19.js
new file mode 100644
index 0000000..284efc0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild19.js
@@ -0,0 +1,162 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild19() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild19") != null) return;
+ var doc;
+ var parentList;
+ var parent;
+ var child;
+ var removed;
+ var removedName;
+ var removedNode;
+ var entRefChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("acronym");
+ parent = parentList.item(1);
+ child = parent.firstChild;
+
+ removed = parent.removeChild(child);
+ removedName = removed.nodeName;
+
+ assertEquals("noderemovechild19","beta",removedName);
+
+ try {
+ removedNode = child.removeChild(parent);
+ fail("throw_DOMException");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NO_MODIFICATION_ALLOWED_ERR */ 7 :
+ break;
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ entRefChild = child.firstChild;
+
+
+ if(
+
+ (entRefChild != null)
+
+ ) {
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(entRefChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild19.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild19.xhtml
new file mode 100644
index 0000000..9a861a7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild20-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild20-expected.txt
new file mode 100644
index 0000000..f8f4354
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild20-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild20
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild20.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild20.js
new file mode 100644
index 0000000..825b269
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild20.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild20() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild20") != null) return;
+ var doc;
+ var parentList;
+ var childList;
+ var parent;
+ var child;
+ var clonedChild;
+ var removed;
+ var removedName;
+ var appendedChild;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("p");
+ parent = parentList.item(0);
+ child = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:br");
+ appendedChild = parent.appendChild(child);
+ removed = parent.removeChild(child);
+ removedName = removed.nodeName;
+
+ assertEquals("noderemovechild20","dom3:br",removedName);
+ clonedChild = child.cloneNode(true);
+
+ {
+ success = false;
+ try {
+ removedNode = parent.removeChild(clonedChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild20.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild20.xhtml
new file mode 100644
index 0000000..d002ee3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild21-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild21-expected.txt
new file mode 100644
index 0000000..9ef999f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild21
+Status Success
+
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild21.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild21.js
new file mode 100644
index 0000000..a79db9e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild21.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild21() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild21") != null) return;
+ var doc;
+ var docElem;
+ var parent;
+ var child;
+ var removed;
+ var removedName;
+ var removedNode;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ child = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:br");
+ appendedChild = parent.appendChild(child);
+ appendedChild = docElem.appendChild(parent);
+ removed = parent.removeChild(child);
+ removedName = removed.nodeName;
+
+ assertEquals("noderemovechild21","dom3:br",removedName);
+
+ {
+ success = false;
+ try {
+ removedNode = docElem.removeChild(child);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild21.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild21.xhtml
new file mode 100644
index 0000000..0af4f7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild22-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild22-expected.txt
new file mode 100644
index 0000000..59eeda3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild22-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild22
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild22.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild22.js
new file mode 100644
index 0000000..f2d2c62
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild22.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild22() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild22") != null) return;
+ var doc;
+ var parent;
+ var child;
+ var removed;
+ var removedName;
+ var removedNode;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ child = doc.createComment("DATA");
+ appendedChild = parent.appendChild(child);
+ removed = parent.removeChild(child);
+ removedName = removed.nodeValue;
+
+ assertEquals("noderemovechild22","DATA",removedName);
+
+ {
+ success = false;
+ try {
+ removedNode = parent.removeChild(child);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild22.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild22.xhtml
new file mode 100644
index 0000000..593bd83
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild22.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild22.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild23-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild23-expected.txt
new file mode 100644
index 0000000..647b47c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild23-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild23
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild23.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild23.js
new file mode 100644
index 0000000..3b491ba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild23.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild23() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild23") != null) return;
+ var doc;
+ var parent;
+ var child;
+ var removed;
+ var removedName;
+ var removedNode;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ child = doc.createProcessingInstruction("TARGET","DATA");
+ appendedChild = parent.appendChild(child);
+ removed = parent.removeChild(child);
+ removedName = removed.target;
+
+ assertEquals("noderemovechild23","TARGET",removedName);
+
+ {
+ success = false;
+ try {
+ removedNode = parent.removeChild(child);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild23.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild23.xhtml
new file mode 100644
index 0000000..77bba26
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild23.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild23.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild24-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild24-expected.txt
new file mode 100644
index 0000000..390defa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild24
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild24.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild24.js
new file mode 100644
index 0000000..17cad93
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild24.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using removeChild on an Entity node attempt to remove a Text child
+ and verify if a NO_MODIFICATION_ALLOWED_ERR gets thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild24() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild24") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var alphaEntity;
+ var alphaText;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ alphaEntity = entitiesMap.getNamedItem("alpha");
+ assertNotNull("alphaEntityNotNull",alphaEntity);
+alphaText = alphaEntity.firstChild;
+
+ assertNotNull("alphaTextNotNull",alphaText);
+
+ {
+ success = false;
+ try {
+ removed = alphaEntity.removeChild(alphaText);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild24.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild24.xhtml
new file mode 100644
index 0000000..a2aaf73
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild24.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild24.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild25-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild25-expected.txt
new file mode 100644
index 0000000..5a42ed9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild25
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild25.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild25.js
new file mode 100644
index 0000000..14b1822
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild25.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using removeChild on an Entity node attempt to remove an Element child
+ and verify if a NO_MODIFICATION_ALLOWED_ERR gets thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild25() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild25") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var ent4;
+ var span;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ ent4 = entitiesMap.getNamedItem("ent4");
+ assertNotNull("ent4NotNull",ent4);
+span = ent4.firstChild;
+
+ assertNotNull("spanNotNull",span);
+
+ {
+ success = false;
+ try {
+ removed = ent4.removeChild(span);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild25.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild25.xhtml
new file mode 100644
index 0000000..1e91ca6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild26-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild26-expected.txt
new file mode 100644
index 0000000..8ed1e81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild26-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild26
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild26.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild26.js
new file mode 100644
index 0000000..1089afd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild26.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild26";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using removeChild on an Entity node attempt to remove a ProcessingInstruction child
+ and verify if a NO_MODIFICATION_ALLOWED_ERR gets thrown.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild26() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild26") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var ent4;
+ var pi;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ ent4 = entitiesMap.getNamedItem("ent4");
+ assertNotNull("ent4NotNull",ent4);
+pi = ent4.lastChild;
+
+ assertNotNull("piNotNull",pi);
+
+ {
+ success = false;
+ try {
+ removed = ent4.removeChild(pi);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild26();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild26.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild26.xhtml
new file mode 100644
index 0000000..e747408
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild26.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild26.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild27-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild27-expected.txt
new file mode 100644
index 0000000..802e66d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild27
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild27.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild27.js
new file mode 100644
index 0000000..519bf3f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild27.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild27";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild27() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild27") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var notationsMap;
+ var child;
+ var parent;
+ var removed;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ notationsMap = docType.notations;
+
+ child = entitiesMap.getNamedItem("ent1");
+ parent = notationsMap.getNamedItem("notation1");
+
+ try {
+ removed = parent.removeChild(child);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* NO_MODIFICATION_ALLOWED_ERR */ 7 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild27();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild27.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild27.xhtml
new file mode 100644
index 0000000..e6ff624
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild27.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild27.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild28-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild28-expected.txt
new file mode 100644
index 0000000..51b1f23
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild28-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild28
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild28.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild28.js
new file mode 100644
index 0000000..0cc87cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild28.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild28";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild28() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild28") != null) return;
+ var doc;
+ var parentList;
+ var attrsMap;
+ var parent;
+ var child;
+ var elem;
+ var removed;
+ var removedName;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("acronym");
+ elem = parentList.item(0);
+ attrsMap = elem.attributes;
+
+ parent = attrsMap.getNamedItem("xsi:noNamespaceSchemaLocation");
+ child = parent.firstChild;
+
+ removed = parent.removeChild(child);
+ removedName = removed.nodeValue;
+
+ assertEquals("noderemovechild28","Yes",removedName);
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(parent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("NOT_FOUND_ERR_noderemovechild28",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild28();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild28.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild28.xhtml
new file mode 100644
index 0000000..8c0c582
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild28.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild28.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild29-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild29-expected.txt
new file mode 100644
index 0000000..aa71293
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild29-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild29
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild29.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild29.js
new file mode 100644
index 0000000..13ac9ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild29.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild29";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild29() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild29") != null) return;
+ var doc;
+ var parentList;
+ var attrsMap;
+ var parent;
+ var child;
+ var elem;
+ var removed;
+ var removedName;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("p");
+ elem = parentList.item(0);
+ attrsMap = elem.attributes;
+
+ parent = attrsMap.getNamedItem("xmlns:dmstc");
+ child = parent.firstChild;
+
+ removed = parent.removeChild(child);
+ removedName = removed.nodeValue;
+
+ assertEquals("noderemovechild29","http://www.usa.com",removedName);
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(parent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild29();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild29.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild29.xhtml
new file mode 100644
index 0000000..59363db
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild29.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild29.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild30-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild30-expected.txt
new file mode 100644
index 0000000..47195ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild30-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild30
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild30.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild30.js
new file mode 100644
index 0000000..570a45f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild30.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild30";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild30() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild30") != null) return;
+ var doc;
+ var parentList;
+ var attrsMap;
+ var parent;
+ var child;
+ var elem;
+ var removed;
+ var removedNode;
+ var removedName;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("p");
+ elem = parentList.item(3);
+ attrsMap = elem.attributes;
+
+ parent = attrsMap.getNamedItem("dir");
+ child = parent.firstChild;
+
+ removed = parent.removeChild(child);
+ removedName = removed.nodeValue;
+
+ assertEquals("noderemovechild30","rtl",removedName);
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(parent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild30();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild30.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild30.xhtml
new file mode 100644
index 0000000..4fdc709
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild30.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild30.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/noderemovechild31-expected.txt b/LayoutTests/dom/xhtml/level3/core/noderemovechild31-expected.txt
new file mode 100644
index 0000000..2783ea0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild31-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild31
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild31.js b/LayoutTests/dom/xhtml/level3/core/noderemovechild31.js
new file mode 100644
index 0000000..e9889c8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild31.js
@@ -0,0 +1,170 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild31";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066
+*/
+function noderemovechild31() {
+ var success;
+ if(checkInitialization(builder, "noderemovechild31") != null) return;
+ var doc;
+ var parentList;
+ var attrsMap;
+ var parent;
+ var child;
+ var entRef;
+ var elem;
+ var removed;
+ var removedNode;
+ var removedName;
+ var appendedChild;
+ var entRefChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parentList = doc.getElementsByTagName("acronym");
+ elem = parentList.item(3);
+ attrsMap = elem.attributes;
+
+ parent = attrsMap.getNamedItem("class");
+ entRef = doc.createEntityReference("delta");
+ appendedChild = parent.appendChild(entRef);
+ child = parent.lastChild;
+
+ removed = parent.removeChild(child);
+ removedName = removed.nodeName;
+
+ assertEquals("noderemovechild31","delta",removedName);
+
+ try {
+ removedNode = child.removeChild(parent);
+ fail("throw_DOMException");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NO_MODIFICATION_ALLOWED_ERR */ 7 :
+ break;
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ entRefChild = child.firstChild;
+
+
+ if(
+
+ (entRefChild != null)
+
+ ) {
+
+ {
+ success = false;
+ try {
+ removedNode = child.removeChild(entRefChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ noderemovechild31();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/noderemovechild31.xhtml b/LayoutTests/dom/xhtml/level3/core/noderemovechild31.xhtml
new file mode 100644
index 0000000..878f85f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/noderemovechild31.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="noderemovechild31.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild01-expected.txt
new file mode 100644
index 0000000..6dfc308
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild01.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild01.js
new file mode 100644
index 0000000..aee3a7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild01.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild01() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild01") != null) return;
+ var doc;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ try {
+ replaced = doc.replaceChild(doc,doc);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild01.xhtml
new file mode 100644
index 0000000..9d0ae1a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild02-expected.txt
new file mode 100644
index 0000000..aa3a708
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild02.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild02.js
new file mode 100644
index 0000000..c846e28
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild02.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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)
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild02() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild02") != null) return;
+ var doc;
+ var docType;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ replaced = doc.replaceChild(docType,docType);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild02.xhtml
new file mode 100644
index 0000000..a288d7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild03-expected.txt
new file mode 100644
index 0000000..f348a5f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild03.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild03.js
new file mode 100644
index 0000000..192ffcb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild03.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild03() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild03") != null) return;
+ var doc;
+ var newDoc;
+ var domImpl;
+ var nullDocType = null;
+
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument("http://www.w3.org/DOM","dom3:doc",nullDocType);
+
+ try {
+ replaced = doc.replaceChild(newDoc,doc);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* WRONG_DOCUMENT_ERR */ 4 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild03.xhtml
new file mode 100644
index 0000000..0e2f734
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild04-expected.txt
new file mode 100644
index 0000000..aba39e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild04.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild04.js
new file mode 100644
index 0000000..57253aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild04.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild04() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild04") != null) return;
+ var doc;
+ var docElem;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+
+ try {
+ replaced = doc.replaceChild(doc,docElem);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild04.xhtml
new file mode 100644
index 0000000..ce749d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild06.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild06.js
new file mode 100644
index 0000000..7295114
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild06.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild06() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild06") != null) return;
+ var doc;
+ var docElem;
+ var replaced;
+ var elem;
+ var childList;
+ var nodeName;
+ var replacedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ childList = doc.getElementsByTagName("p");
+ elem = childList.item(0);
+
+ try {
+ replacedNode = doc.replaceChild(elem,docElem);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ replaced = doc.documentElement;
+
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild06","p",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild06.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/nodereplacechild06.xhtml-disabled
new file mode 100644
index 0000000..073616b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild06.xhtml-disabled
@@ -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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild07.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild07.js
new file mode 100644
index 0000000..9f24dac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild07.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild07() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild07") != null) return;
+ var doc;
+ var docElem;
+ var replaced;
+ var elem;
+ var nodeName;
+ var replacedNode;
+ var rootNS;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ elem = doc.createElementNS(rootNS,rootName);
+
+ try {
+ replacedNode = doc.replaceChild(elem,docElem);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ replaced = doc.documentElement;
+
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild07",rootName,nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild07.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/nodereplacechild07.xhtml-disabled
new file mode 100644
index 0000000..55bfe10
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild07.xhtml-disabled
@@ -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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild08.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild08.js
new file mode 100644
index 0000000..ac197d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild08.js
@@ -0,0 +1,142 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild08() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild08") != null) return;
+ var doc;
+ var doc2;
+ var docElem;
+ var elem;
+ var nodeName;
+ var replaced;
+ var rootNS;
+ var rootName;
+ var domImpl;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ domImpl = getImplementation();
+doc2 = domImpl.createDocument(rootNS,rootName,nullDocType);
+ elem = doc2.createElementNS(rootNS,rootName);
+
+ try {
+ replaced = doc.replaceChild(elem,docElem);
+ fail("throw_WRONG_DOCUMENT_OR_NOT_SUPPORTED");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* WRONG_DOCUMENT_ERR */ 4 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild08.xhtml-disabled b/LayoutTests/dom/xhtml/level3/core/nodereplacechild08.xhtml-disabled
new file mode 100644
index 0000000..0a56adf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild08.xhtml-disabled
@@ -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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodereplacechild08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild10-expected.txt
new file mode 100644
index 0000000..98b1ee7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild10
+Status error
+Message Line 118: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild10.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild10.js
new file mode 100644
index 0000000..eb663a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild10.js
@@ -0,0 +1,158 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild10() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild10") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var ent;
+ var doc1;
+ var docType1;
+ var notationsMap;
+ var notation;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ ent = entitiesMap.getNamedItem("alpha");
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+ docType1 = doc1.doctype;
+
+ notationsMap = docType1.notations;
+
+ notation = notationsMap.getNamedItem("notation1");
+
+ try {
+ replaced = doc.replaceChild(notation,ent);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_FOUND_ERR */ 8 :
+ break;
+ case /* WRONG_DOCUMENT_ERR */ 4 :
+ break;
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild10.xhtml
new file mode 100644
index 0000000..1d0b389
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild12-expected.txt
new file mode 100644
index 0000000..3c08719
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild12.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild12.js
new file mode 100644
index 0000000..7683abd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild12.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using replaceChild on this Document node, attempt to replace a new ProcessingInstruction
+ node with new Comment node.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=416
+*/
+function nodereplacechild12() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild12") != null) return;
+ var doc;
+ var pi;
+ var replaced;
+ var comment;
+ var lastChild;
+ var nodeName;
+ var replacedNode;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ comment = doc.createComment("dom3:doc");
+ pi = doc.createProcessingInstruction("PITarget","PIData");
+ appendedChild = doc.appendChild(comment);
+ appendedChild = doc.appendChild(pi);
+ replacedNode = doc.replaceChild(comment,pi);
+ assertNotNull("returnValueNotNull",replacedNode);
+nodeName = replacedNode.nodeName;
+
+ assertEquals("returnValueIsPI","PITarget",nodeName);
+ lastChild = doc.lastChild;
+
+ assertNotNull("lastChildNotNull",lastChild);
+nodeName = lastChild.nodeName;
+
+ assertEquals("lastChildIsComment","#comment",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild12.xhtml
new file mode 100644
index 0000000..e549cc0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild12.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodereplacechild12.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild13-expected.txt
new file mode 100644
index 0000000..798370d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild13-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild13
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild13.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild13.js
new file mode 100644
index 0000000..278722a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild13.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild13() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild13") != null) return;
+ var doc;
+ var docType;
+ var newDocType;
+ var replaced;
+ var domImpl;
+ var nodeName;
+ var nullPubId = null;
+
+ var nullSysId = null;
+
+ var docElem;
+ var docElemName;
+ var docElemNS;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ docElemName = docElem.tagName;
+
+ docElemNS = docElem.namespaceURI;
+
+ docType = doc.doctype;
+
+ domImpl = doc.implementation;
+newDocType = domImpl.createDocumentType(docElemName,nullPubId,nullSysId);
+
+ try {
+ replaced = doc.replaceChild(newDocType,docType);
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild13",docElemName,nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild13.xhtml
new file mode 100644
index 0000000..7b3490b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild14-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild14-expected.txt
new file mode 100644
index 0000000..7d3357f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild14-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild14
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild14.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild14.js
new file mode 100644
index 0000000..2d8fc97
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild14.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild14() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild14") != null) return;
+ var doc;
+ var newDoc;
+ var docElem;
+ var elem;
+ var elem2;
+ var imported;
+ var replaced;
+ var domImpl;
+ var nodeName;
+ var appendedChild;
+ var nullDocType = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/DOM/Test","dom3:doc1elem");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument("http://www.w3.org/DOM/test","dom3:doc",nullDocType);
+ elem2 = newDoc.createElementNS("http://www.w3.org/DOM/Test","dom3:doc2elem");
+ imported = newDoc.importNode(elem,true);
+ docElem = newDoc.documentElement;
+
+ appendedChild = docElem.appendChild(imported);
+ appendedChild = docElem.appendChild(elem2);
+ replaced = docElem.replaceChild(imported,elem2);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild14","dom3:doc2elem",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild14.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild14.xhtml
new file mode 100644
index 0000000..fa7f708
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild15-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild15-expected.txt
new file mode 100644
index 0000000..7a6b8a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild15-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild15
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild15.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild15.js
new file mode 100644
index 0000000..dfe84c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild15.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using replaceChild on a DocumentFragment node attempt to replace an Element node with
+ another Element and the replaced element.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild15() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild15") != null) return;
+ var doc;
+ var docFrag;
+ var elem;
+ var elem2;
+ var replaced;
+ var domImpl;
+ var title;
+ var appendedChild;
+ var docElem;
+ var rootName;
+ var rootNS;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ elem = doc.createElementNS(rootNS,rootName);
+ domImpl = doc.implementation;
+docFrag = doc.createDocumentFragment();
+ elem2 = doc.createElementNS(rootNS,rootName);
+ elem2.setAttribute("title","new element");
+ appendedChild = docFrag.appendChild(elem2);
+ replaced = docFrag.replaceChild(elem,elem2);
+ title = replaced.getAttribute("title");
+ assertEquals("nodereplacechild15","new element",title);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild15.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild15.xhtml
new file mode 100644
index 0000000..f2ed7c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild16-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild16-expected.txt
new file mode 100644
index 0000000..4e869bf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild16-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild16
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild16.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild16.js
new file mode 100644
index 0000000..c9d80e2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild16.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using replaceChild on a DocumentFragment node attempt to replace an Element node with
+ another Element and verify the name of the replaced Element node.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild16() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild16") != null) return;
+ var doc;
+ var docFrag;
+ var elem;
+ var txt;
+ var replaced;
+ var nodeName;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ docFrag = doc.createDocumentFragment();
+ txt = doc.createTextNode("Comment");
+ appendedChild = docFrag.appendChild(txt);
+ appendedChild = docFrag.appendChild(elem);
+ replaced = docFrag.replaceChild(txt,elem);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild16","dom3:p",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild16.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild16.xhtml
new file mode 100644
index 0000000..0486639
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild17-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild17-expected.txt
new file mode 100644
index 0000000..baf0acf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild17-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild17
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild17.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild17.js
new file mode 100644
index 0000000..bea5d6c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild17.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild17() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild17") != null) return;
+ var doc;
+ var docFrag;
+ var pi;
+ var cmt;
+ var replacedCmt;
+ var replacedPi;
+ var data;
+ var target;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ cmt = doc.createComment("Comment");
+ pi = doc.createProcessingInstruction("target","Comment");
+ appendedChild = docFrag.appendChild(pi);
+ appendedChild = docFrag.appendChild(cmt);
+ replacedCmt = docFrag.replaceChild(pi,cmt);
+ data = replacedCmt.data;
+
+ assertEquals("nodereplacechild17_1","Comment",data);
+ replacedPi = docFrag.replaceChild(cmt,pi);
+ target = replacedPi.target;
+
+ assertEquals("nodereplacechild17_2","target",target);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild17.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild17.xhtml
new file mode 100644
index 0000000..f4b642b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild18-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild18-expected.txt
new file mode 100644
index 0000000..3d9f841
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild18-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild18
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild18.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild18.js
new file mode 100644
index 0000000..ea0b672
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild18.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild18() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild18") != null) return;
+ var doc;
+ var docFrag;
+ var entRef;
+ var cdata;
+ var replacedCData;
+ var replacedEref;
+ var cdataName;
+ var erefName;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ cdata = doc.createCDATASection("CDATASection");
+ entRef = doc.createEntityReference("alpha");
+ appendedChild = docFrag.appendChild(entRef);
+ appendedChild = docFrag.appendChild(cdata);
+ replacedCData = docFrag.replaceChild(entRef,cdata);
+ cdataName = replacedCData.nodeValue;
+
+ assertEquals("nodereplacechild18_1","CDATASection",cdataName);
+ replacedEref = docFrag.replaceChild(cdata,entRef);
+ erefName = replacedEref.nodeName;
+
+ assertEquals("nodereplacechild18_2","alpha",erefName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild18.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild18.xhtml
new file mode 100644
index 0000000..1d767b9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild19-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild19-expected.txt
new file mode 100644
index 0000000..a8a2d36
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild19-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild19
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild19.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild19.js
new file mode 100644
index 0000000..db9a17d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild19.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Using replaceChild on a DocumentFragment node attempt to replace an Element node with
+ its EntityReference child verify the nodeName of the replaced node.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild19() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild19") != null) return;
+ var doc;
+ var docFrag;
+ var entRef;
+ var elem;
+ var replaced;
+ var nodeName;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ entRef = doc.createEntityReference("alpha");
+ appendedChild = elem.appendChild(entRef);
+ appendedChild = docFrag.appendChild(elem);
+ replaced = docFrag.replaceChild(entRef,elem);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild19","dom3:p",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild19.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild19.xhtml
new file mode 100644
index 0000000..325b2cb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild20-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild20-expected.txt
new file mode 100644
index 0000000..44ca1cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild20-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild20
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild20.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild20.js
new file mode 100644
index 0000000..a6cda64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild20.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild20() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild20") != null) return;
+ var doc;
+ var docFrag;
+ var attr;
+ var elem;
+ var replaced;
+ var nodeName;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ appendedChild = docFrag.appendChild(elem);
+
+ {
+ success = false;
+ try {
+ replaced = docFrag.replaceChild(attr,elem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild20.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild20.xhtml
new file mode 100644
index 0000000..562c5c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild21-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild21-expected.txt
new file mode 100644
index 0000000..26a9066
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild21
+Status error
+Message Line 119: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild21.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild21.js
new file mode 100644
index 0000000..e69ee8c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild21.js
@@ -0,0 +1,161 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild21() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild21") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var ent;
+ var doc1;
+ var docType1;
+ var notationsMap;
+ var notation;
+ var replacedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ ent = entitiesMap.getNamedItem("alpha");
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+ docType1 = doc1.doctype;
+
+ notationsMap = docType1.notations;
+
+ notation = notationsMap.getNamedItem("notation1");
+
+ {
+ success = false;
+ try {
+ replacedChild = docType.replaceChild(notation,ent);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("NO_MODIFICATION_ALLOWED_ERR1_nodereplacechild21",success);
+ }
+
+ {
+ success = false;
+ try {
+ replacedChild = docType.replaceChild(ent,docType);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("NO_MODIFICATION_ALLOWED_ERR2_nodereplacechild21",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild21.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild21.xhtml
new file mode 100644
index 0000000..37b594e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild22-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild22-expected.txt
new file mode 100644
index 0000000..391daf2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild22-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild22
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild22.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild22.js
new file mode 100644
index 0000000..fd3f423
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild22.js
@@ -0,0 +1,145 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild22() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild22") != null) return;
+ var doc;
+ var entRefMain;
+ var entRef;
+ var elem;
+ var appendedChild;
+ var replacedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ entRefMain = doc.createEntityReference("delta");
+ entRef = doc.createEntityReference("beta");
+ appendedChild = elem.appendChild(entRef);
+
+ {
+ success = false;
+ try {
+ replacedChild = entRefMain.replaceChild(elem,entRef);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_1",success);
+ }
+
+ {
+ success = false;
+ try {
+ replacedChild = entRefMain.replaceChild(entRef,elem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_2",success);
+ }
+
+ {
+ success = false;
+ try {
+ replacedChild = entRefMain.replaceChild(entRefMain,entRef);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_3",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild22.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild22.xhtml
new file mode 100644
index 0000000..3f3254e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild22.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild22.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild23-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild23-expected.txt
new file mode 100644
index 0000000..418b77b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild23-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild23
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild23.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild23.js
new file mode 100644
index 0000000..9c31afc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild23.js
@@ -0,0 +1,178 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild23() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild23") != null) return;
+ var doc;
+ var entRef;
+ var txt;
+ var elem;
+ var comment;
+ var pi;
+ var cdata;
+ var replaced;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ entRef = doc.createEntityReference("delta");
+ txt = doc.createTextNode("Text");
+ comment = doc.createComment("Comment");
+ cdata = doc.createCDATASection("CDATASection");
+ pi = doc.createProcessingInstruction("target","data");
+ appendedChild = elem.appendChild(entRef);
+ appendedChild = elem.appendChild(txt);
+ appendedChild = elem.appendChild(comment);
+ appendedChild = elem.appendChild(pi);
+ appendedChild = elem.appendChild(cdata);
+
+ {
+ success = false;
+ try {
+ replaced = entRef.replaceChild(cdata,elem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_1",success);
+ }
+
+ {
+ success = false;
+ try {
+ replaced = entRef.replaceChild(pi,cdata);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_2",success);
+ }
+
+ {
+ success = false;
+ try {
+ replaced = entRef.replaceChild(comment,pi);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_3",success);
+ }
+
+ {
+ success = false;
+ try {
+ replaced = entRef.replaceChild(txt,comment);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_4",success);
+ }
+
+ {
+ success = false;
+ try {
+ replaced = entRef.replaceChild(elem,txt);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR_5",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild23.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild23.xhtml
new file mode 100644
index 0000000..d58a1d2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild23.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild23.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild24-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild24-expected.txt
new file mode 100644
index 0000000..c28e0db
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild24
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild24.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild24.js
new file mode 100644
index 0000000..321d504
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild24.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild24() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild24") != null) return;
+ var doc;
+ var childList;
+ var entRef;
+ var elem;
+ var replaced;
+ var nodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ elem = childList.item(1);
+ entRef = elem.firstChild;
+
+
+ {
+ success = false;
+ try {
+ replaced = entRef.replaceChild(entRef,elem);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild24.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild24.xhtml
new file mode 100644
index 0000000..4b58eb4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild24.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild24.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild25-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild25-expected.txt
new file mode 100644
index 0000000..92ce75f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild25
+Status error
+Message Line 108: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild25.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild25.js
new file mode 100644
index 0000000..8a58ee9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild25.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild25() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild25") != null) return;
+ var doc;
+ var docType;
+ var entities;
+ var entity;
+ var childList;
+ var entRef;
+ var elem;
+ var replaced;
+ var nodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entities = docType.entities;
+
+ entity = entities.getNamedItem("alpha");
+ childList = doc.getElementsByTagName("acronym");
+ elem = childList.item(1);
+ entRef = elem.firstChild;
+
+
+ {
+ success = false;
+ try {
+ replaced = elem.replaceChild(entity,entRef);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR_1",success);
+ }
+
+ {
+ success = false;
+ try {
+ replaced = elem.replaceChild(elem,entRef);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR_2",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild25.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild25.xhtml
new file mode 100644
index 0000000..14c6514
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild26-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild26-expected.txt
new file mode 100644
index 0000000..5b7d006
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild26-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild26
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild26.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild26.js
new file mode 100644
index 0000000..f6005c4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild26.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild26";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild26() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild26") != null) return;
+ var doc;
+ var childList;
+ var docElem;
+ var elem;
+ var firstChild;
+ var nodeName;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ childList = doc.getElementsByTagName("p");
+ elem = childList.item(0);
+ firstChild = elem.firstChild;
+
+
+ {
+ success = false;
+ try {
+ replaced = elem.replaceChild(docElem,firstChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild26();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild26.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild26.xhtml
new file mode 100644
index 0000000..b2a8901
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild26.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild26.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild27-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild27-expected.txt
new file mode 100644
index 0000000..3e36fc7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild27
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild27.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild27.js
new file mode 100644
index 0000000..33bbfad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild27.js
@@ -0,0 +1,145 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild27";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild27() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild27") != null) return;
+ var doc;
+ var doc2;
+ var childList;
+ var childList2;
+ var elem2;
+ var elem;
+ var firstChild;
+ var nodeName;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagNameNS("*","p");
+ elem = childList.item(0);
+ firstChild = elem.firstChild;
+
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ childList2 = doc2.getElementsByTagNameNS("*","p");
+ elem2 = childList2.item(0);
+
+ {
+ success = false;
+ try {
+ replaced = elem.replaceChild(elem2,firstChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("WRONG_DOCUMENT_ERR_nodereplacechild27",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild27();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild27.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild27.xhtml
new file mode 100644
index 0000000..f1eeaae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild27.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild27.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild28-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild28-expected.txt
new file mode 100644
index 0000000..f58a2f6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild28-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild28
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild28.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild28.js
new file mode 100644
index 0000000..680e00b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild28.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild28";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild28() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild28") != null) return;
+ var doc;
+ var childList;
+ var acronym;
+ var betaRef;
+ var dallas;
+ var betaText;
+ var appendedChild;
+ var replacedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("acronym");
+ acronym = childList.item(1);
+ betaRef = acronym.firstChild;
+
+ assertNotNull("betaRefNotNull",betaRef);
+betaText = betaRef.firstChild;
+
+ assertNotNull("betaTextNotNull",betaText);
+dallas = betaRef.nextSibling;
+
+ assertNotNull("dallasNotNull",dallas);
+
+ {
+ success = false;
+ try {
+ replacedChild = acronym.replaceChild(betaText,dallas);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild28();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild28.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild28.xhtml
new file mode 100644
index 0000000..65c65a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild28.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild28.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild29-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild29-expected.txt
new file mode 100644
index 0000000..93c73ce
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild29-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild29
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild29.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild29.js
new file mode 100644
index 0000000..e9d5292
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild29.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild29";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild29() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild29") != null) return;
+ var doc;
+ var childList;
+ var elem;
+ var oldChild;
+ var newChild;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("p");
+ elem = childList.item(0);
+ oldChild = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:br");
+ newChild = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:span");
+
+ {
+ success = false;
+ try {
+ replaced = elem.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild29();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild29.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild29.xhtml
new file mode 100644
index 0000000..8745ee4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild29.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild29.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild30-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild30-expected.txt
new file mode 100644
index 0000000..49f83e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild30-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild30
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild30.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild30.js
new file mode 100644
index 0000000..37358f9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild30.js
@@ -0,0 +1,168 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild30";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild30() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild30") != null) return;
+ var doc;
+ var parent;
+ var oldChild;
+ var newElement;
+ var newText;
+ var newComment;
+ var newPI;
+ var newCdata;
+ var newERef;
+ var replaced;
+ var nodeName;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:html");
+ oldChild = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:head");
+ newElement = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:body");
+ appendedChild = parent.appendChild(oldChild);
+ appendedChild = parent.appendChild(newElement);
+ newText = doc.createTextNode("Text");
+ appendedChild = parent.appendChild(newText);
+ newComment = doc.createComment("Comment");
+ appendedChild = parent.appendChild(newComment);
+ newPI = doc.createProcessingInstruction("target","data");
+ appendedChild = parent.appendChild(newPI);
+ newCdata = doc.createCDATASection("Cdata");
+ appendedChild = parent.appendChild(newCdata);
+ newERef = doc.createEntityReference("delta");
+ appendedChild = parent.appendChild(newERef);
+ replaced = parent.replaceChild(newElement,oldChild);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_1","xhtml:head",nodeName);
+ replaced = parent.replaceChild(oldChild,newElement);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_2","xhtml:body",nodeName);
+ replaced = parent.replaceChild(newText,oldChild);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_3","xhtml:head",nodeName);
+ replaced = parent.replaceChild(oldChild,newText);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_4","#text",nodeName);
+ replaced = parent.replaceChild(newComment,oldChild);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_5","xhtml:head",nodeName);
+ replaced = parent.replaceChild(oldChild,newComment);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_6","#comment",nodeName);
+ replaced = parent.replaceChild(oldChild,newPI);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_7","target",nodeName);
+ replaced = parent.replaceChild(oldChild,newCdata);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_8","#cdata-section",nodeName);
+ replaced = parent.replaceChild(oldChild,newERef);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild30_9","delta",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild30();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild30.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild30.xhtml
new file mode 100644
index 0000000..cdb5cbb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild30.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild30.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild31-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild31-expected.txt
new file mode 100644
index 0000000..bca9f44
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild31-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild31
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild31.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild31.js
new file mode 100644
index 0000000..d0161ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild31.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild31";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild31() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild31") != null) return;
+ var doc;
+ var childList;
+ var elem;
+ var span;
+ var ent4Ref;
+ var spanText;
+ var newChild;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ childList = doc.getElementsByTagName("var");
+ elem = childList.item(2);
+ ent4Ref = elem.firstChild;
+
+ span = ent4Ref.firstChild;
+
+ assertNotNull("spanNotNull",span);
+spanText = span.firstChild;
+
+ assertNotNull("spanTextNotNull",spanText);
+newChild = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+
+ {
+ success = false;
+ try {
+ replaced = span.replaceChild(newChild,spanText);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild31();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild31.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild31.xhtml
new file mode 100644
index 0000000..04fcef6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild31.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild31.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild32-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild32-expected.txt
new file mode 100644
index 0000000..e94de39
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild32-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild32
+Status skip
+Message HTML loader does not support expandEntityReferences=false
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild32.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild32.js
new file mode 100644
index 0000000..d078584
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild32.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild32";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild32() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild32") != null) return;
+ var doc;
+ var childList;
+ var elem;
+ var parent;
+ var oldChild;
+ var newChild;
+ var replaced;
+ var nodeName;
+ var nodeType;
+ var enRef;
+ var enRefChild;
+ var reference = "entity1";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.createTextNode("Text");
+ childList = doc.getElementsByTagNameNS("*","acronym");
+ elem = childList.item(3);
+ parent = elem.getAttributeNode("class");
+ enRef = doc.createEntityReference(reference);
+ enRefChild = parent.appendChild(enRef);
+ replaced = parent.replaceChild(newChild,enRefChild);
+ nodeName = replaced.nodeName;
+
+ assertEquals("nodereplacechild32","entity1",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild32();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild32.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild32.xhtml
new file mode 100644
index 0000000..97c47b5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild32.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild32.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild33-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild33-expected.txt
new file mode 100644
index 0000000..233f929
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild33-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild33
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild33.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild33.js
new file mode 100644
index 0000000..e74be44
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild33.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild33";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild33() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild33") != null) return;
+ var doc;
+ var childList;
+ var elem;
+ var parent;
+ var oldChild;
+ var newChild;
+ var replaced;
+ var nodeValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.createEntityReference("delta");
+ childList = doc.getElementsByTagName("p");
+ elem = childList.item(3);
+ parent = elem.getAttributeNode("dir");
+ oldChild = parent.lastChild;
+
+ replaced = parent.replaceChild(newChild,oldChild);
+ nodeValue = replaced.nodeValue;
+
+ assertEquals("nodereplacechild33","rtl",nodeValue);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild33();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild33.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild33.xhtml
new file mode 100644
index 0000000..d7990c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild33.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild33.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild34-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild34-expected.txt
new file mode 100644
index 0000000..435ee4d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild34-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild34
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild34.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild34.js
new file mode 100644
index 0000000..6f4a35a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild34.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild34";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild34() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild34") != null) return;
+ var doc;
+ var parent;
+ var oldChild;
+ var newChild;
+ var nodeValue;
+ var appendedChild;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ oldChild = doc.createEntityReference("delta");
+ appendedChild = parent.appendChild(oldChild);
+ newChild = doc.createTextNode("Text");
+ replaced = parent.replaceChild(newChild,oldChild);
+ nodeValue = parent.value;
+
+ assertEquals("nodereplacechild34","Text",nodeValue);
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild34();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild34.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild34.xhtml
new file mode 100644
index 0000000..3069bb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild34.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild34.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild35-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild35-expected.txt
new file mode 100644
index 0000000..851c988
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild35-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild35
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild35.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild35.js
new file mode 100644
index 0000000..1bae867
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild35.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild35";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild35() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild35") != null) return;
+ var doc;
+ var parent;
+ var oldChild;
+ var newChild;
+ var nodeValue;
+ var appendedChild;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ oldChild = doc.createEntityReference("delta");
+ appendedChild = parent.appendChild(oldChild);
+ newChild = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+
+ {
+ success = false;
+ try {
+ replaced = parent.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild35();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild35.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild35.xhtml
new file mode 100644
index 0000000..2e6721c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild35.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild35.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild36-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild36-expected.txt
new file mode 100644
index 0000000..9199e01
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild36-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild36
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild36.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild36.js
new file mode 100644
index 0000000..fea225b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild36.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild36";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild36() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild36") != null) return;
+ var doc;
+ var parent;
+ var oldChild;
+ var newChild;
+ var nodeValue;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ parent = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ oldChild = doc.createEntityReference("delta");
+ newChild = doc.createTextNode("Text");
+
+ {
+ success = false;
+ try {
+ replaced = parent.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild36();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild36.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild36.xhtml
new file mode 100644
index 0000000..caa880b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild36.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild36.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild37-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild37-expected.txt
new file mode 100644
index 0000000..b2c1aa5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild37-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild37
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild37.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild37.js
new file mode 100644
index 0000000..4fd0264
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild37.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild37";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild37() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild37") != null) return;
+ var doc;
+ var doc2;
+ var parent;
+ var oldChild;
+ var newChild;
+ var nodeValue;
+ var replaced;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ parent = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ oldChild = doc.createTextNode("Text");
+ newChild = doc2.createEntityReference("delta");
+ appendedChild = parent.appendChild(oldChild);
+
+ {
+ success = false;
+ try {
+ replaced = parent.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild37();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild37.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild37.xhtml
new file mode 100644
index 0000000..09ddbd2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild37.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild37.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild38-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild38-expected.txt
new file mode 100644
index 0000000..eb6fadd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild38-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild38
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild38.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild38.js
new file mode 100644
index 0000000..0939eed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild38.js
@@ -0,0 +1,196 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild38";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild38() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild38") != null) return;
+ var doc;
+ var docType;
+ var entitiesMap;
+ var ent;
+ var oldChild;
+ var entRef;
+ var txt;
+ var elem;
+ var comment;
+ var pi;
+ var cdata;
+ var replaced;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitiesMap = docType.entities;
+
+ ent = entitiesMap.getNamedItem("alpha");
+ assertNotNull("alphaEntity",ent);
+oldChild = ent.firstChild;
+
+ assertNotNull("alphaText",oldChild);
+cdata = doc.createCDATASection("CDATASection");
+
+ {
+ success = false;
+ try {
+ replaced = ent.replaceChild(cdata,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR1",success);
+ }
+pi = doc.createProcessingInstruction("target","data");
+
+ {
+ success = false;
+ try {
+ replaced = ent.replaceChild(pi,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR2",success);
+ }
+comment = doc.createComment("Comment");
+
+ {
+ success = false;
+ try {
+ replaced = ent.replaceChild(comment,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR3",success);
+ }
+txt = doc.createTextNode("Text");
+
+ {
+ success = false;
+ try {
+ replaced = ent.replaceChild(txt,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR4",success);
+ }
+elem = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+
+ {
+ success = false;
+ try {
+ replaced = ent.replaceChild(elem,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR5",success);
+ }
+entRef = doc.createEntityReference("delta");
+
+ {
+ success = false;
+ try {
+ replaced = ent.replaceChild(entRef,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR6",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild38();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild38.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild38.xhtml
new file mode 100644
index 0000000..4a94cb3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild38.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodereplacechild38.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodereplacechild39-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild39-expected.txt
new file mode 100644
index 0000000..00d45cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild39-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild39
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild39.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild39.js
new file mode 100644
index 0000000..2c65d36
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild39.js
@@ -0,0 +1,136 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild39";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild39() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild39") != null) return;
+ var doc;
+ var docElem;
+ var rootName;
+ var rootNS;
+ var newComment;
+ var newElement;
+ var retNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ rootNS = docElem.namespaceURI;
+
+ newElement = doc.createElementNS(rootNS,rootName);
+ newComment = doc.createComment("second element goes here");
+ retNode = doc.appendChild(newComment);
+
+ try {
+ retNode = doc.replaceChild(newElement,newComment);
+ fail("throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild39();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild39.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild39.xhtml
new file mode 100644
index 0000000..9f11c13
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild39.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodereplacechild39.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild40-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodereplacechild40-expected.txt
new file mode 100644
index 0000000..4a82d16
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild40-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild40
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild40.js b/LayoutTests/dom/xhtml/level3/core/nodereplacechild40.js
new file mode 100644
index 0000000..0a8815c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild40.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild40";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempt to add a second document element by a comment. The attempt should result
+in a HIERARCHY_REQUEST_ERR or NOT_SUPPORTED_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-785887307
+*/
+function nodereplacechild40() {
+ var success;
+ if(checkInitialization(builder, "nodereplacechild40") != null) return;
+ var doc;
+ var docElem;
+ var rootName;
+ var publicId = null;
+
+ var systemId = null;
+
+ var newComment;
+ var newDocType;
+ var domImpl;
+ var retNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ docElem = doc.documentElement;
+
+ rootName = docElem.tagName;
+
+ domImpl = doc.implementation;
+newDocType = domImpl.createDocumentType(rootName,publicId,systemId);
+ newComment = doc.createComment("second element goes here");
+ retNode = doc.insertBefore(newComment,docElem);
+
+ try {
+ retNode = doc.replaceChild(newDocType,newComment);
+ fail("throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodereplacechild40();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodereplacechild40.xhtml b/LayoutTests/dom/xhtml/level3/core/nodereplacechild40.xhtml
new file mode 100644
index 0000000..65a25f5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodereplacechild40.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodereplacechild40.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01-expected.txt
new file mode 100644
index 0000000..77c6509
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.js
new file mode 100644
index 0000000..194222e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempt to set textContent for a Document node and check that the document appears
+to be unaffected.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent01() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent01") != null) return;
+ var doc;
+ var nodeName;
+ var elemList;
+ var elem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ doc.textContent = "textContent";
+
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(3);
+ assertNotNull("stillHasAcronyms",elem);
+nodeName = elem.nodeName;
+
+ assertEquals("nodesettextcontent01","acronym",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.xhtml
new file mode 100644
index 0000000..9917007
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02-expected.txt
new file mode 100644
index 0000000..6326da5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.js
new file mode 100644
index 0000000..f8e1301
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent02() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent02") != null) return;
+ var doc;
+ var domImpl;
+ var newDoc;
+ var nodeName;
+ var elemChild;
+ var newElem;
+ var elemList;
+ var nullDocType = null;
+
+ var appendedChild;
+ var documentElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test","dom3:elem",nullDocType);
+ newElem = newDoc.createElementNS("http://www.w3.org/DOM/Test","dom3:childElem");
+ documentElem = newDoc.documentElement;
+
+ appendedChild = documentElem.appendChild(newElem);
+ newDoc.textContent = "textContent";
+
+ elemList = newDoc.getElementsByTagNameNS("*","childElem");
+ elemChild = elemList.item(0);
+ nodeName = elemChild.nodeName;
+
+ assertEquals("nodesettextcontent02","dom3:childElem",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.xhtml
new file mode 100644
index 0000000..e0346ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03-expected.txt
new file mode 100644
index 0000000..a39f5ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.js
new file mode 100644
index 0000000..112a8a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent03() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent03") != null) return;
+ var doc;
+ var docType;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ docType.textContent = "textContent";
+
+ textContent = docType.textContent;
+
+ assertNull("nodesettextcontent03",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.xhtml
new file mode 100644
index 0000000..1dbddf0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04-expected.txt
new file mode 100644
index 0000000..6312f74
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent04
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.js
new file mode 100644
index 0000000..9a72645
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent04() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent04") != null) return;
+ var doc;
+ var docType;
+ var notationsMap;
+ var notation1;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ notationsMap = docType.notations;
+
+ notation1 = notationsMap.getNamedItem("notation1");
+ notation1.textContent = "textContent";
+
+ textContent = notation1.textContent;
+
+ assertNull("nodesettextcontent04",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.xhtml
new file mode 100644
index 0000000..889c864
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05-expected.txt
new file mode 100644
index 0000000..ac77d06
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.js
new file mode 100644
index 0000000..973fa7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent05() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent05") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(3);
+ attr = elem.getAttributeNode("dir");
+ attr.textContent = "NA";
+
+ textContent = attr.textContent;
+
+ assertEquals("nodesettextcontent05","NA",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.xhtml
new file mode 100644
index 0000000..450909e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06-expected.txt
new file mode 100644
index 0000000..8393c56
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.js
new file mode 100644
index 0000000..75b6b89
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent06() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent06") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr;
+ var attrNode;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ attrNode = elem.setAttributeNodeNS(attr);
+ attr.textContent = "NA";
+
+ textContent = attr.textContent;
+
+ assertEquals("nodesettextcontent06","NA",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.xhtml
new file mode 100644
index 0000000..fb964dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07-expected.txt
new file mode 100644
index 0000000..98a13a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.js
new file mode 100644
index 0000000..4963d9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent07() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent07") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var txt;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ txt = elem.firstChild;
+
+ txt.textContent = "Text";
+
+ textContent = txt.textContent;
+
+ assertEquals("nodegettextcontent10","Text",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.xhtml
new file mode 100644
index 0000000..b44f42f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08-expected.txt
new file mode 100644
index 0000000..4407501
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.js
new file mode 100644
index 0000000..43a7c03
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent08() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent08") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var pi;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+ pi = doc.createProcessingInstruction("PIT","PID");
+ appendedChild = elem.appendChild(pi);
+ pi.textContent = "PID";
+
+ textContent = pi.textContent;
+
+ assertEquals("nodesettextcontent08","PID",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.xhtml
new file mode 100644
index 0000000..2e27487
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10-expected.txt
new file mode 100644
index 0000000..d760934
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.js
new file mode 100644
index 0000000..1571ae7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent10() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent10") != null) return;
+ var doc;
+ var elem;
+ var txt;
+ var comment;
+ var entRef;
+ var cdata;
+ var pi;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/DOM/Test","dom3:elem");
+ txt = doc.createTextNode("Text ");
+ comment = doc.createComment("Comment ");
+ entRef = doc.createEntityReference("ent1");
+ pi = doc.createProcessingInstruction("PIT","PIData ");
+ cdata = doc.createCDATASection("CData");
+ appendedChild = elem.appendChild(txt);
+ appendedChild = elem.appendChild(comment);
+ appendedChild = elem.appendChild(entRef);
+ appendedChild = elem.appendChild(pi);
+ appendedChild = elem.appendChild(cdata);
+ elem.textContent = "ELEMENT";
+
+ textContent = elem.textContent;
+
+ assertEquals("nodesettextcontent10","ELEMENT",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.xhtml
new file mode 100644
index 0000000..2ede760
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11-expected.txt
new file mode 100644
index 0000000..bbc1470
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent11
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.js
new file mode 100644
index 0000000..d4431f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent11() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent11") != null) return;
+ var doc;
+ var docFrag;
+ var elem;
+ var elemChild;
+ var txt;
+ var comment;
+ var entRef;
+ var cdata;
+ var pi;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFrag = doc.createDocumentFragment();
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+ txt = doc.createTextNode("Text ");
+ comment = doc.createComment("Comment ");
+ entRef = doc.createEntityReference("alpha");
+ pi = doc.createProcessingInstruction("PIT","PIData ");
+ cdata = doc.createCDATASection("CData");
+ appendedChild = elem.appendChild(txt);
+ appendedChild = elem.appendChild(comment);
+ appendedChild = elem.appendChild(entRef);
+ appendedChild = elem.appendChild(pi);
+ appendedChild = elem.appendChild(cdata);
+ appendedChild = docFrag.appendChild(elem);
+ elem.textContent = "DOCUMENTFRAGMENT";
+
+ elemChild = docFrag.lastChild;
+
+ textContent = elemChild.textContent;
+
+ assertEquals("nodegettextcontent11","DOCUMENTFRAGMENT",textContent);
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.xhtml
new file mode 100644
index 0000000..42cbd04
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12-expected.txt
new file mode 100644
index 0000000..2a0fbf4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent12
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.js
new file mode 100644
index 0000000..86c36fe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent12() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent12") != null) return;
+ var doc;
+ var elem;
+ var entRef;
+ var textContent;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.documentElement;
+
+ entRef = doc.createEntityReference("beta");
+ appendedChild = elem.appendChild(entRef);
+
+ {
+ success = false;
+ try {
+ entRef.textContent = "NA";
+
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("nodesettextcontent12",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.xhtml
new file mode 100644
index 0000000..64bf968
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13-expected.txt
new file mode 100644
index 0000000..d51929c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent13
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.js b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.js
new file mode 100644
index 0000000..a438273
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+*/
+function nodesettextcontent13() {
+ var success;
+ if(checkInitialization(builder, "nodesettextcontent13") != null) return;
+ var doc;
+ var docType;
+ var entity;
+ var entitymap;
+ var textContent;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entitymap = docType.entities;
+
+ entity = entitymap.getNamedItem("delta");
+
+ {
+ success = false;
+ try {
+ entity.textContent = "NA";
+
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("nodesettextcontent13",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ nodesettextcontent13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.xhtml
new file mode 100644
index 0000000..cbdf72f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesettextcontent13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesettextcontent13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01-expected.txt
new file mode 100644
index 0000000..97224fc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata01
+Status error
+Message Line 104: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.js
new file mode 100644
index 0000000..0069036
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata01() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata01") != null) return;
+ var doc;
+ var userData;
+ var prevUserData;
+ var nullHandler = null;
+
+ var nullData = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ if (null == nullHandler) {
+ doc.setUserData("something", nullData, null);
+ } else {
+ doc.setUserData("something", nullData, nullHandler.handle);
+ }
+ assertNull("nodesetuserdata01",prevUserData);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.xhtml
new file mode 100644
index 0000000..37a8026
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02-expected.txt
new file mode 100644
index 0000000..ec27449
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata02
+Status error
+Message Line 105: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.js
new file mode 100644
index 0000000..5b235fe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata02() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata02") != null) return;
+ var doc;
+ var userData;
+ var prevUserData;
+ var test = null;
+
+ var str = "Junk";
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ if (null == nullHandler) {
+ doc.setUserData("something", test, null);
+ } else {
+ doc.setUserData("something", test, nullHandler.handle);
+ }
+ assertNull("nodesetuserdata02",prevUserData);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.xhtml
new file mode 100644
index 0000000..3c05359
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03-expected.txt
new file mode 100644
index 0000000..6070ed6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata03
+Status error
+Message Line 107: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.js
new file mode 100644
index 0000000..7fd102d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata03() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata03") != null) return;
+ var doc;
+ var userData;
+ var retUserData;
+ var returnedUserData;
+ var success;
+ var elem;
+ var txt;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p");
+ txt = doc.createTextNode("TEXT");
+ if (null == nullHandler) {
+ doc.setUserData("Key1", elem, null);
+ } else {
+ doc.setUserData("Key1", elem, nullHandler.handle);
+ }
+ if (null == nullHandler) {
+ doc.setUserData("Key1", txt, null);
+ } else {
+ doc.setUserData("Key1", txt, nullHandler.handle);
+ }
+ success = retUserData.isEqualNode(elem);
+ assertTrue("nodesetuserdata03",success);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.xhtml
new file mode 100644
index 0000000..cb37601
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04-expected.txt
new file mode 100644
index 0000000..214ea8c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata04
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.js
new file mode 100644
index 0000000..87c51a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata04() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata04") != null) return;
+ var doc;
+ var userData;
+ var returned1;
+ var returned2;
+ var retUserData;
+ var success;
+ var elem;
+ var txt;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ txt = doc.createTextNode("TEXT");
+ if (null == nullHandler) {
+ elem.setUserData("Key1", txt, null);
+ } else {
+ elem.setUserData("Key1", txt, nullHandler.handle);
+ }
+ if (null == nullHandler) {
+ elem.setUserData("Key2", txt, null);
+ } else {
+ elem.setUserData("Key2", txt, nullHandler.handle);
+ }
+ returned1 = elem.getUserData("Key1");
+ returned2 = elem.getUserData("Key2");
+ success = returned1.isEqualNode(returned2);
+ assertTrue("nodesetuserdata04",success);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.xhtml
new file mode 100644
index 0000000..5fc4a02
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05-expected.txt
new file mode 100644
index 0000000..bf402d8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata05
+Status error
+Message Line 121: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.js
new file mode 100644
index 0000000..6248b83
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.js
@@ -0,0 +1,142 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata05() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata05") != null) return;
+ var doc;
+ var doc2;
+ var userData;
+ var returned1;
+ var returned2;
+ var retUserData;
+ var success;
+ var attr;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","lang");
+ if (null == nullHandler) {
+ attr.setUserData("Key1", doc, null);
+ } else {
+ attr.setUserData("Key1", doc, nullHandler.handle);
+ }
+ if (null == nullHandler) {
+ attr.setUserData("Key2", doc2, null);
+ } else {
+ attr.setUserData("Key2", doc2, nullHandler.handle);
+ }
+ returned1 = attr.getUserData("Key1");
+ returned2 = attr.getUserData("Key2");
+ success = returned1.isEqualNode(returned2);
+ assertTrue("nodesetuserdata05",success);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.xhtml
new file mode 100644
index 0000000..22c29be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06-expected.txt
new file mode 100644
index 0000000..38900ce
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata06
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.js
new file mode 100644
index 0000000..fd9ff06
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata06() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata06") != null) return;
+ var doc;
+ var docType;
+ var entities;
+ var entity;
+ var comment;
+ var userData;
+ var returned;
+ var retUserData;
+ var success;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ entities = docType.entities;
+
+ entity = entities.getNamedItem("delta");
+ comment = doc.createComment("COMMENT_NODE");
+ if (null == nullHandler) {
+ comment.setUserData("Key1", entity, null);
+ } else {
+ comment.setUserData("Key1", entity, nullHandler.handle);
+ }
+ if (null == nullHandler) {
+ comment.setUserData("Key1", entity, null);
+ } else {
+ comment.setUserData("Key1", entity, nullHandler.handle);
+ }
+ success = returned.isEqualNode(entity);
+ assertTrue("nodesetuserdata06",success);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.xhtml
new file mode 100644
index 0000000..517e478
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07-expected.txt
new file mode 100644
index 0000000..041d55e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata07
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.js
new file mode 100644
index 0000000..513b1e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata07() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata07") != null) return;
+ var doc;
+ var docType;
+ var notations;
+ var notation;
+ var comment;
+ var userData;
+ var returned;
+ var success;
+ var retUserData;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+ notations = docType.notations;
+
+ notation = notations.getNamedItem("notation1");
+ comment = doc.createComment("COMMENT_NODE");
+ if (null == nullHandler) {
+ notation.setUserData("Key1", comment, null);
+ } else {
+ notation.setUserData("Key1", comment, nullHandler.handle);
+ }
+ if (null == nullHandler) {
+ notation.setUserData("Key1", comment, null);
+ } else {
+ notation.setUserData("Key1", comment, nullHandler.handle);
+ }
+ success = returned.isEqualNode(comment);
+ assertTrue("nodesetuserdata07",success);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.xhtml
new file mode 100644
index 0000000..097af76
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08-expected.txt
new file mode 100644
index 0000000..68d7af2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata08
+Status error
+Message Line 113: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.js
new file mode 100644
index 0000000..9b6f586
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata08() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata08") != null) return;
+ var doc;
+ var docElem;
+ var entRef;
+ var cData;
+ var elemList;
+ var elemName;
+ var userData;
+ var returned1;
+ var returned2;
+ var success;
+ var retUserData;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ entRef = doc.createEntityReference("delta");
+ cData = doc.createCDATASection("CDATASection");
+ if (null == nullHandler) {
+ entRef.setUserData("Key1", doc, null);
+ } else {
+ entRef.setUserData("Key1", doc, nullHandler.handle);
+ }
+ if (null == nullHandler) {
+ cData.setUserData("Key2", docElem, null);
+ } else {
+ cData.setUserData("Key2", docElem, nullHandler.handle);
+ }
+ returned1 = entRef.getUserData("Key1");
+ returned2 = cData.getUserData("Key2");
+ success = returned1.isEqualNode(returned2);
+ assertFalse("nodesetuserdata08",success);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.xhtml
new file mode 100644
index 0000000..4f46406
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09-expected.txt
new file mode 100644
index 0000000..aebd5ae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata09
+Status error
+Message Line 107: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.js
new file mode 100644
index 0000000..dddf3b5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata09() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata09") != null) return;
+ var doc;
+ var docElem;
+ var returned;
+ var nullHandler = null;
+
+ var retUserData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ if (null == nullHandler) {
+ docElem.setUserData("Key1", doc, null);
+ } else {
+ docElem.setUserData("Key1", doc, nullHandler.handle);
+ }
+ returned = doc.getUserData("Key1");
+ assertNull("nodesetuserdata09",returned);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.xhtml
new file mode 100644
index 0000000..2a9ca6a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10-expected.txt b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10-expected.txt
new file mode 100644
index 0000000..5d62115
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata10
+Status error
+Message Line 116: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.js b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.js
new file mode 100644
index 0000000..e8c8669
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.js
@@ -0,0 +1,137 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-setUserData
+*/
+function nodesetuserdata10() {
+ var success;
+ if(checkInitialization(builder, "nodesetuserdata10") != null) return;
+ var doc;
+ var docElem;
+ var entRef;
+ var cData;
+ var varList;
+ var varElem;
+ var userData;
+ var returned1;
+ var returned2;
+ var success;
+ var retUserData;
+ var nullHandler = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docElem = doc.documentElement;
+
+ varList = doc.getElementsByTagName("var");
+ varElem = varList.item(2);
+ entRef = varElem.firstChild;
+
+ cData = doc.createCDATASection("CDATASection");
+ if (null == nullHandler) {
+ entRef.setUserData("Key1", doc, null);
+ } else {
+ entRef.setUserData("Key1", doc, nullHandler.handle);
+ }
+ if (null == nullHandler) {
+ cData.setUserData("Key2", docElem, null);
+ } else {
+ cData.setUserData("Key2", docElem, nullHandler.handle);
+ }
+ returned1 = entRef.getUserData("Key1");
+ returned2 = cData.getUserData("Key2");
+ success = returned1.isEqualNode(returned2);
+ assertFalse("nodesetuserdata08",success);
+
+}
+
+
+
+
+function runTest() {
+ nodesetuserdata10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.xhtml b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.xhtml
new file mode 100644
index 0000000..e5e4493
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/nodesetuserdata10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="nodesetuserdata10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/normalizecharacters01-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters01-expected.txt
new file mode 100644
index 0000000..d3b9420
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters01
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters01.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters01.js
new file mode 100644
index 0000000..4f050b7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters01.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with normalize-characters set to false, check that
+characters are not normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters01() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters01") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("normalize-characters", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters01.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters01.xhtml
new file mode 100644
index 0000000..b349af2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters02-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters02-expected.txt
new file mode 100644
index 0000000..cbf7da3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters02
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters02.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters02.js
new file mode 100644
index 0000000..531676a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters02.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize document with normalize-characters set to true, check that
+characters are normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters02() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters02") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("normalize-characters",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("normalize-characters", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("charNormalized","barsuçon",textValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters02.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters02.xhtml
new file mode 100644
index 0000000..8e7ae3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters03-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters03-expected.txt
new file mode 100644
index 0000000..66a1b2e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters03
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters03.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters03.js
new file mode 100644
index 0000000..7ca0d61
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters03.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize an element with normalize-characters set to false, check that
+characters are not normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters03() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters03") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("normalize-characters", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ pElem.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters03.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters03.xhtml
new file mode 100644
index 0000000..2f0f7f1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters04-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters04-expected.txt
new file mode 100644
index 0000000..0fd1297
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters04
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters04.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters04.js
new file mode 100644
index 0000000..d73ae0a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters04.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize an element with normalize-characters set to true, check that
+characters are normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters04() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters04") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("normalize-characters",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("normalize-characters", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ pElem.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters04.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters04.xhtml
new file mode 100644
index 0000000..4604268
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters05-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters05-expected.txt
new file mode 100644
index 0000000..e7005e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters05
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters05.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters05.js
new file mode 100644
index 0000000..37784e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters05.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize an document (using Node.normalize) with normalize-characters set to false, check that
+characters are not normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters05() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters05") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("normalize-characters", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters05.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters05.xhtml
new file mode 100644
index 0000000..8ace813
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters06-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters06-expected.txt
new file mode 100644
index 0000000..4ae98ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters06
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters06.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters06.js
new file mode 100644
index 0000000..f00aefc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters06.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize a document (using Node.normalize) with normalize-characters set to true, check that
+characters are normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters06() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters06") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("normalize-characters",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("normalize-characters", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.firstChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","barsuçon",textValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters06.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters06.xhtml
new file mode 100644
index 0000000..c51f2e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters06.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters06.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters07-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters07-expected.txt
new file mode 100644
index 0000000..83f7cf3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters07
+Status error
+Message Line 110: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters07.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters07.js
new file mode 100644
index 0000000..7553ce4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters07.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize a text node with normalize-characters set to false, check that
+characters are not normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters07() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters07") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("normalize-characters", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ retval.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.lastChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","suçon",textValue);
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters07.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters07.xhtml
new file mode 100644
index 0000000..dd940a5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters07.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters07.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters08-expected.txt b/LayoutTests/dom/xhtml/level3/core/normalizecharacters08-expected.txt
new file mode 100644
index 0000000..4041084
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters08
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters08.js b/LayoutTests/dom/xhtml/level3/core/normalizecharacters08.js
new file mode 100644
index 0000000..23d3944
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters08.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Normalize a text node with normalize-characters set to true, check that
+characters are normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-normalize-characters
+* @see http://www.w3.org/TR/2003/WD-charmod-20030822/
+*/
+function normalizecharacters08() {
+ var success;
+ if(checkInitialization(builder, "normalizecharacters08") != null) return;
+ var doc;
+ var docElem;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var pList;
+ var pElem;
+ var text;
+ var textValue;
+ var retval;
+ var canSet;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("normalize-characters",true);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("normalize-characters", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = doc.createTextNode("suçon");
+ retval = pElem.appendChild(text);
+ retval.normalize();
+ errorMonitor.assertLowerSeverity("normalizeError", 2);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ text = pElem.lastChild;
+
+ textValue = text.nodeValue;
+
+ assertEquals("noCharNormalization","suçon",textValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ normalizecharacters08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/normalizecharacters08.xhtml b/LayoutTests/dom/xhtml/level3/core/normalizecharacters08.xhtml
new file mode 100644
index 0000000..191d737
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/normalizecharacters08.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='normalizecharacters08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/resources/COPYRIGHT.xhtml b/LayoutTests/dom/xhtml/level3/core/resources/COPYRIGHT.xhtml
new file mode 100644
index 0000000..d14215b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/resources/COPYRIGHT.xhtml
@@ -0,0 +1,106 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+ <title>W3C IPR SOFTWARE NOTICE</title>
+<style type="text/css">
+<!--
+html, body { background: #fff; color: #000; } /* body for Windows IE3 */
+-->
+</style>
+ </head>
+ <body>
+ <h1>
+ W3C IPR SOFTWARE NOTICE
+ </h1>
+ <h3>
+ Copyright &copy; 2002-2004 <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved.
+ </h3>
+ <p>
+ The DOM Conformance Test Suite for Level 3 core is published under
+ the W3C Software Copyright Notice and License. The software
+ license requires "Notice of any changes or modifications to the
+ W3C files, including the date changes were made." Consequently,
+ modified versions of the DOM ECMAScript or Java tests must
+ document that they do not conform to the DOM Conformance Test
+ Suites; in the case of the Java language binding, the package
+ names can no longer be in the 'org.w3c' package.
+ </p>
+ <p>
+ <b>Note:</b> The original version of the W3C Software Copyright Notice
+ and License could be found at <a
+ href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
+ </p>
+ <h3>
+ Copyright &copy; 1994-2004 <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/
+ </h3>
+ <p>
+ This W3C work (including software, documents, or other related items) is
+ being provided by the copyright holders under the following license. By
+ obtaining, using and/or copying this work, you (the licensee) agree that
+ you have read, understood, and will comply with the following terms and
+ conditions:
+ </p>
+ <p>
+ Permission to use, copy, and modify this software and its documentation,
+ with or without modification,&nbsp; for any purpose and without fee or
+ royalty is hereby granted, provided that you include the following on ALL
+ copies of the software and documentation or portions thereof, including
+ modifications, that you make:
+ </p>
+ <ol>
+ <li>
+ The full text of this NOTICE in a location viewable to users of the
+ redistributed or derivative work.
+ </li>
+ <li>
+ Any pre-existing intellectual property disclaimers, notices, or terms
+ and conditions. If none exist, a short notice of the following form
+ (hypertext is preferred, text is permitted) should be used within the
+ body of any redistributed or derivative code: "Copyright &copy;
+ [$date-of-software] <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/"
+ </li>
+ <li>
+ Notice of any changes or modifications to the W3C files, including the
+ date changes were made. (We recommend you provide URIs to the location
+ from which the code is derived.)
+ </li>
+ </ol>
+ <p>
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+ HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+ DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+ TRADEMARKS OR OTHER RIGHTS.
+ </p>
+ <p>
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+ DOCUMENTATION.
+ </p>
+ <p>
+ The name and trademarks of copyright holders may NOT be used in
+ advertising or publicity pertaining to the software without specific,
+ written prior permission. Title to copyright in this software and any
+ associated documentation will at all times remain with copyright
+ holders.
+ </p>
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/selfxhtml.js b/LayoutTests/dom/xhtml/level3/core/selfxhtml.js
new file mode 100644
index 0000000..8976ccf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/selfxhtml.js
@@ -0,0 +1,743 @@
+/*
+Copyright (c) 2001-2005 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
+*/
+
+ function assertSize(descr, expected, actual) {
+ var actualSize;
+ assertNotNull(descr, actual);
+ actualSize = actual.length;
+ assertEquals(descr, expected, actualSize);
+ }
+
+ function assertEqualsAutoCase(context, descr, expected, actual) {
+ if (builder.contentType == "text/html") {
+ if(context == "attribute") {
+ assertEquals(descr, expected.toLowerCase(), actual.toLowerCase());
+ } else {
+ assertEquals(descr, expected.toUpperCase(), actual);
+ }
+ } else {
+ assertEquals(descr, expected, actual);
+ }
+ }
+
+
+ function assertEqualsCollectionAutoCase(context, descr, expected, actual) {
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+
+ //
+ // if there length is the same, then every entry in the expected list
+ // must appear once and only once in the actual list
+ var expectedLen = expected.length;
+ var expectedValue;
+ var actualLen = actual.length;
+ var i;
+ var j;
+ var matches;
+ for(i = 0; i < expectedLen; i++) {
+ matches = 0;
+ expectedValue = expected[i];
+ for(j = 0; j < actualLen; j++) {
+ if (builder.contentType == "text/html") {
+ if (context == "attribute") {
+ if (expectedValue.toLowerCase() == actual[j].toLowerCase()) {
+ matches++;
+ }
+ } else {
+ if (expectedValue.toUpperCase() == actual[j]) {
+ matches++;
+ }
+ }
+ } else {
+ if(expectedValue == actual[j]) {
+ matches++;
+ }
+ }
+ }
+ if(matches == 0) {
+ assert(descr + ": No match found for " + expectedValue,false);
+ }
+ if(matches > 1) {
+ assert(descr + ": Multiple matches found for " + expectedValue, false);
+ }
+ }
+ }
+
+ function assertEqualsCollection(descr, expected, actual) {
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+ //
+ // if there length is the same, then every entry in the expected list
+ // must appear once and only once in the actual list
+ var expectedLen = expected.length;
+ var expectedValue;
+ var actualLen = actual.length;
+ var i;
+ var j;
+ var matches;
+ for(i = 0; i < expectedLen; i++) {
+ matches = 0;
+ expectedValue = expected[i];
+ for(j = 0; j < actualLen; j++) {
+ if(expectedValue == actual[j]) {
+ matches++;
+ }
+ }
+ if(matches == 0) {
+ assert(descr + ": No match found for " + expectedValue,false);
+ }
+ if(matches > 1) {
+ assert(descr + ": Multiple matches found for " + expectedValue, false);
+ }
+ }
+ }
+
+
+ function assertEqualsListAutoCase(context, descr, expected, actual) {
+ var minLength = expected.length;
+ if (actual.length < minLength) {
+ minLength = actual.length;
+ }
+ //
+ for(var i = 0; i < minLength; i++) {
+ assertEqualsAutoCase(context, descr, expected[i], actual[i]);
+ }
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+ }
+
+
+ function assertEqualsList(descr, expected, actual) {
+ var minLength = expected.length;
+ if (actual.length < minLength) {
+ minLength = actual.length;
+ }
+ //
+ for(var i = 0; i < minLength; i++) {
+ if(expected[i] != actual[i]) {
+ assertEquals(descr, expected[i], actual[i]);
+ }
+ }
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+ }
+
+ function assertInstanceOf(descr, type, obj) {
+ if(type == "Attr") {
+ assertEquals(descr,2,obj.nodeType);
+ var specd = obj.specified;
+ }
+ }
+
+ function assertSame(descr, expected, actual) {
+ if(expected != actual) {
+ assertEquals(descr, expected.nodeType, actual.nodeType);
+ assertEquals(descr, expected.nodeValue, actual.nodeValue);
+ }
+ }
+
+ function assertURIEquals(assertID, scheme, path, host, file, name, query, fragment, isAbsolute, actual) {
+ //
+ // URI must be non-null
+ assertNotNull(assertID, actual);
+
+ var uri = actual;
+
+ var lastPound = actual.lastIndexOf("#");
+ var actualFragment = "";
+ if(lastPound != -1) {
+ //
+ // substring before pound
+ //
+ uri = actual.substring(0,lastPound);
+ actualFragment = actual.substring(lastPound+1);
+ }
+ if(fragment != null) assertEquals(assertID,fragment, actualFragment);
+
+ var lastQuestion = uri.lastIndexOf("?");
+ var actualQuery = "";
+ if(lastQuestion != -1) {
+ //
+ // substring before pound
+ //
+ uri = actual.substring(0,lastQuestion);
+ actualQuery = actual.substring(lastQuestion+1);
+ }
+ if(query != null) assertEquals(assertID, query, actualQuery);
+
+ var firstColon = uri.indexOf(":");
+ var firstSlash = uri.indexOf("/");
+ var actualPath = uri;
+ var actualScheme = "";
+ if(firstColon != -1 && firstColon < firstSlash) {
+ actualScheme = uri.substring(0,firstColon);
+ actualPath = uri.substring(firstColon + 1);
+ }
+
+ if(scheme != null) {
+ assertEquals(assertID, scheme, actualScheme);
+ }
+
+ if(path != null) {
+ assertEquals(assertID, path, actualPath);
+ }
+
+ if(host != null) {
+ var actualHost = "";
+ if(actualPath.substring(0,2) == "//") {
+ var termSlash = actualPath.substring(2).indexOf("/") + 2;
+ actualHost = actualPath.substring(0,termSlash);
+ }
+ assertEquals(assertID, host, actualHost);
+ }
+
+ if(file != null || name != null) {
+ var actualFile = actualPath;
+ var finalSlash = actualPath.lastIndexOf("/");
+ if(finalSlash != -1) {
+ actualFile = actualPath.substring(finalSlash+1);
+ }
+ if (file != null) {
+ assertEquals(assertID, file, actualFile);
+ }
+ if (name != null) {
+ var actualName = actualFile;
+ var finalDot = actualFile.lastIndexOf(".");
+ if (finalDot != -1) {
+ actualName = actualName.substring(0, finalDot);
+ }
+ assertEquals(assertID, name, actualName);
+ }
+ }
+
+ if(isAbsolute != null) {
+ assertEquals(assertID, isAbsolute, actualPath.substring(0,1) == "/");
+ }
+ }
+
+
+// size() used by assertSize element
+function size(collection)
+{
+ return collection.length;
+}
+
+function same(expected, actual)
+{
+ return expected === actual;
+}
+
+function equalsAutoCase(context, expected, actual) {
+ if (builder.contentType == "text/html") {
+ if (context == "attribute") {
+ return expected.toLowerCase() == actual;
+ }
+ return expected.toUpperCase() == actual;
+ }
+ return expected == actual;
+}
+
+function toLowerArray(src) {
+ var newArray = new Array();
+ var i;
+ for (i = 0; i < src.length; i++) {
+ newArray[i] = src[i].toLowerCase();
+ }
+ return newArray;
+}
+
+function createTempURI(scheme) {
+ if (scheme == "http") {
+ return "http://localhost:8080/webdav/tmp" + Math.floor(Math.random() * 100000) + ".xml";
+ }
+ return "file:///tmp/domts" + Math.floor(Math.random() * 100000) + ".xml";
+}
+
+
+
+function EventMonitor() {
+ this.atEvents = new Array();
+ this.bubbledEvents = new Array();
+ this.capturedEvents = new Array();
+ this.allEvents = new Array();
+}
+
+EventMonitor.prototype.handleEvent = function(evt) {
+ switch(evt.eventPhase) {
+ case 1:
+ monitor.capturedEvents[monitor.capturedEvents.length] = evt;
+ break;
+
+ case 2:
+ monitor.atEvents[monitor.atEvents.length] = evt;
+ break;
+
+ case 3:
+ monitor.bubbledEvents[monitor.bubbledEvents.length] = evt;
+ break;
+ }
+ monitor.allEvents[monitor.allEvents.length] = evt;
+}
+
+function DOMErrorImpl(err) {
+ this.severity = err.severity;
+ this.message = err.message;
+ this.type = err.type;
+ this.relatedException = err.relatedException;
+ this.relatedData = err.relatedData;
+ this.location = err.location;
+}
+
+
+
+function DOMErrorMonitor() {
+ this.allErrors = new Array();
+}
+
+DOMErrorMonitor.prototype.handleError = function(err) {
+ errorMonitor.allErrors[errorMonitor.allErrors.length] = new DOMErrorImpl(err);
+}
+
+DOMErrorMonitor.prototype.assertLowerSeverity = function(id, severity) {
+ var i;
+ for (i = 0; i < this.allErrors.length; i++) {
+ if (this.allErrors[i].severity >= severity) {
+ assertEquals(id, severity - 1, this.allErrors[i].severity);
+ }
+ }
+}
+
+function UserDataNotification(operation, key, data, src, dst) {
+ this.operation = operation;
+ this.key = key;
+ this.data = data;
+ this.src = src;
+ this.dst = dst;
+}
+
+function UserDataMonitor() {
+ this.allNotifications = new Array();
+}
+
+UserDataMonitor.prototype.handle = function(operation, key, data, src, dst) {
+ userDataMonitor.allNotifications[userDataMonitor.allNotifications.length] =
+ new UserDataNotification(operation, key, data, src, dst);
+}
+
+
+
+function HTMLBuilder() {
+ this.contentType = "application/xhtml+xml";
+ this.supportedContentTypes = [ "application/xhtml+xml" ];
+
+ this.supportsAsyncChange = false;
+ this.async = false;
+ this.fixedAttributeNames = [
+ "validating", "expandEntityReferences", "coalescing",
+ "signed", "hasNullString", "ignoringElementContentWhitespace", "namespaceAware", "ignoringComments", "schemaValidating"];
+
+ this.fixedAttributeValues = [false, true, false, true, true , false, true, false, false ];
+ this.configurableAttributeNames = [ ];
+ this.configurableAttributeValues = [ ];
+ this.initializationError = null;
+ this.initializationFatalError = null;
+ this.skipIncompatibleTests = true;
+ this.documentURLs = new Array();
+ this.documentVarnames = new Array();
+}
+
+HTMLBuilder.prototype.hasFeature = function(feature, version) {
+ return document.implementation.hasFeature(feature, version);
+}
+
+HTMLBuilder.prototype.getImplementation = function() {
+ return document.implementation;
+}
+
+HTMLBuilder.prototype.preload = function(frame, varname, url) {
+ var i;
+ this.documentVarnames[this.documentVarnames.length] = varname;
+ this.documentURLs[this.documentURLs.length] = url;
+ if (this.documentURLs.length > 1) {
+ //
+ // if all the urls are not the same
+ //
+ for (i = 1; i < this.documentURLs.length; i++) {
+ if (this.documentURLs[i] != this.documentURLs[0]) {
+ throw "Tests with multiple loads of different documents are not currently supported";
+ }
+ }
+ }
+ return 1;
+}
+
+HTMLBuilder.prototype.cloneNode = function(srcNode, doc) {
+ var clone = null;
+ switch(srcNode.nodeType) {
+ //
+ // element
+ case 1:
+ clone = doc.createElementNS(srcNode.namespaceURI, srcNode.nodeName);
+ var attrs = srcNode.attributes;
+ for(var i = 0; i < attrs.length; i++) {
+ var srcAttr = attrs.item(i);
+ clone.setAttributeNS(srcAttr.namespaceURI, srcAttr.nodeName, srcAttr.nodeValue);
+ }
+ var srcChild = srcNode.firstChild;
+ while(srcChild != null) {
+ var cloneChild = this.cloneNode(srcChild, doc);
+ if (cloneChild != null) {
+ clone.appendChild(cloneChild);
+ }
+ srcChild = srcChild.nextSibling;
+ }
+ break;
+
+ case 3:
+ clone = doc.createTextNode(srcNode.nodeValue);
+ break;
+
+ case 4:
+ clone = doc.createCDATASection(srcNode.nodeValue);
+ break;
+
+ case 5:
+ clone = doc.createEntityReference(srcNode.nodeName);
+ break;
+
+ case 7:
+ clone = doc.createProcessingInstruction(srcNode.target, srcNode.data);
+ break;
+
+ case 8:
+ clone = doc.createComment(srcNode.nodeValue);
+ break;
+ }
+ return clone;
+
+}
+
+
+HTMLBuilder.prototype.load = function(frame, varname, url) {
+ if (this.documentVarnames[0] == varname) {
+ return document;
+ }
+ //
+ //
+ // not a perfect way to do this
+ // Document.cloneNode is implementation dependent but exists in L1
+ // and implemented in IE. The alternative brute force copy
+ // only works in L2 or higher implementations and can't copy
+ // entity and notation definitions, etc.
+ var clone = null;
+ try {
+ clone = document.cloneNode(true);
+ } catch(ex) {
+ }
+ if (clone == null) {
+ clone = document.implementation.createDocument(
+ document.documentElement.namespaceURI,
+ document.documentElement.nodeName,
+ null);
+ //
+ // Work-around since
+ // Safari does not create document element
+ // create document.
+ if (clone.documentElement == null) {
+ clone.appendChild(clone.createElementNS(
+ document.documentElement.namespaceURI,
+ document.documentElement.nodeName));
+ }
+ var attrs = document.documentElement.attributes;
+ for(var i = 0; i < attrs.length; i++) {
+ var srcAttr = attrs.item(i);
+ clone.documentElement.setAttributeNS(
+ srcAttr.namespaceURI, srcAttr.nodeName, srcAttr.nodeValue);
+ }
+
+ var srcNode = document.firstChild;
+ while(srcNode != null && srcNode.nodeType != 1) {
+ if (srcNode.nodeType != 10) {
+ var cloneNode = this.cloneNode(srcNode, clone);
+ clone.insertBefore(cloneNode, clone.documentElement);
+ }
+ srcNode = srcNode.nextSibling;
+ }
+ srcNode = document.documentElement.nextSibling;
+ while(srcNode != null) {
+ var cloneNode = this.cloneNode(srcNode, clone);
+ clone.appendChild(cloneNode);
+ srcNode = srcNode.nextSibling;
+ }
+ srcNode = document.documentElement.firstChild;
+ while(srcNode != null) {
+ var cloneNode = this.cloneNode(srcNode, clone);
+ if (cloneNode != null) {
+ clone.documentElement.appendChild(cloneNode);
+ }
+ srcNode = srcNode.nextSibling;
+ }
+ }
+ return clone;
+}
+
+HTMLBuilder.prototype.getImplementationAttribute = function(attr) {
+ for (var i = 0; i < this.fixedAttributeNames.length; i++) {
+ if (this.fixedAttributeNames[i] == attr) {
+ return this.fixedAttributeValues[i];
+ }
+ }
+ throw "Unrecognized implementation attribute: " + attr;
+}
+
+
+HTMLBuilder.prototype.setImplementationAttribute = function(attribute, value) {
+ var supported = this.getImplementationAttribute(attribute);
+ if (supported != value) {
+ this.initializationError = "HTML loader does not support " + attribute + "=" + value;
+ }
+}
+
+HTMLBuilder.prototype.canSetImplementationAttribute = function(attribute, value) {
+ var supported = this.getImplementationAttribute(attribute);
+ return (supported == value);
+}
+
+
+
+
+function createConfiguredBuilder() {
+ return new HTMLBuilder();
+}
+
+function catchInitializationError(buildr, ex) {
+ buildr.initializationError = ex;
+ buildr.initializationFatalError = ex;
+}
+
+
+function checkFeature(feature, version)
+{
+ if (!builder.hasFeature(feature, version))
+ {
+ //
+ // don't throw exception so that users can select to ignore the precondition
+ //
+ builder.initializationError = "builder does not support feature " + feature + " version " + version;
+ }
+}
+
+function setResult(resultType, message) {
+ var testName = getTargetURI();
+ document.title = testName + ":" + resultType;
+ var xhtmlNS = "http://www.w3.org/1999/xhtml";
+ var newBody = document.createElementNS(xhtmlNS, "body");
+ var newTable = document.createElementNS(xhtmlNS, "table");
+ newTable.width = "100%";
+ newTable.border = "1";
+ newBody.appendChild(newTable);
+ var testRow = newTable.insertRow(-1);
+ var testDiv1 = testRow.insertCell(-1);
+ testDiv1.appendChild(document.createTextNode("Test"));
+ var testDiv2 = testRow.insertCell(-1);
+ testDiv2.appendChild(document.createTextNode(testName));
+ var statusRow = newTable.insertRow(-1);
+ var statusDiv1 = statusRow.insertCell(-1);
+ statusDiv1.appendChild(document.createTextNode("Status"));
+ var statusDiv2 = statusRow.insertCell(-1);
+ var style = "color:green";
+ if (resultType == null) {
+ statusDiv2.appendChild(document.createTextNode("Success"));
+ } else {
+ statusDiv2.appendChild(document.createTextNode(resultType));
+ if (resultType == "skip") {
+ style = "color:blue";
+ } else {
+ style = "color:red";
+ }
+ }
+ newTable.setAttributeNS(null, "style", style);
+ if (message != null) {
+ var messageRow = newTable.insertRow(-1);
+ var messageDiv1 = messageRow.insertCell(-1);
+ messageDiv1.appendChild(document.createTextNode("Message"));
+ var messageDiv2 = messageRow.insertCell(-1);
+ messageDiv2.appendChild(document.createTextNode((message instanceof Error) ? ("Line " + message.line + ": " + message.name) : message));
+ }
+ var oldBody = document.getElementsByTagName("body")[0];
+ oldBody.parentNode.replaceChild(newBody, oldBody);
+ if (parent != window && typeof(parent.setResult) != 'undefined') {
+ parent.setResult(testName, resultType, message);
+ }
+}
+
+function checkInitialization(buildr, testname) {
+ return buildr.initializationError;
+}
+
+function preload(docRef, varname, href) {
+ return builder.preload(docRef, varname, href);
+}
+
+
+function load(docRef, varname, href) {
+ return builder.load(docRef, varname, href);
+}
+
+
+function getImplementationAttribute(attr) {
+ return builder.getImplementationAttribute(attr);
+}
+
+
+function setImplementationAttribute(attribute, value) {
+ builder.setImplementationAttribute(attribute, value);
+}
+
+function createXPathEvaluator(doc) {
+ try {
+ return doc.getFeature("XPath", null);
+ }
+ catch(ex) {
+ }
+ return doc;
+}
+
+
+function getImplementation() {
+ return builder.getImplementation();
+}
+
+function assertEquals(id, expected, actual) {
+ var myActual;
+ if (expected != actual) {
+ myActual = actual;
+ if (actual == null) {
+ myActual = "null";
+ }
+ throw "failure:" + id + ": assertEquals failed, actual " + myActual + ", expected " + expected + ".";
+ }
+}
+
+function assertNull(id, actual) {
+ if (actual != null) {
+ throw "failure:" + id + ": assertNull failed, actual " + actual;
+ }
+}
+
+
+function assertTrue(id, actual) {
+ if (!actual) {
+ throw "failure:" + id + ": assertTrue failed";
+ }
+}
+
+
+function assertFalse(id, actual) {
+ if (actual) {
+ throw "failure:" + id + ": assertTrue failed";
+ }
+}
+
+function assertNotNull(id, actual) {
+ if (actual == null) {
+ throw "failure:" + id + ": assertNotNull failed";
+ }
+}
+
+function fail(id) {
+ throw "failure:" + id + ": fail";
+}
+
+
+
+function getSuffix(contentType) {
+ switch(contentType) {
+ case "text/html":
+ return ".html";
+
+ case "text/xml":
+ return ".xml";
+
+ case "image/svg+xml":
+ return ".svg";
+
+ case "text/mathml":
+ return ".mml";
+ }
+ return ".xhtml";
+}
+
+
+function getResourceURI(name, scheme, contentType) {
+ var base = document.documentURI;
+ if (base == null) {
+ base = "";
+ } else {
+ base = base.substring(0, base.lastIndexOf('/') + 1) + "files/";
+ }
+ return base + name + getSuffix(contentType);
+}
+
+
+
+function startTest() {
+
+//
+// WebKit modification: 18-August-2005
+//
+// Inform the test controller that this test has a text-format result and so should
+// be dumped as text, and also that the dump should not occur automatically.
+//
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+//
+// End WebKit modification
+//
+
+ //
+ // invoke test setup
+ //
+ setUpPage();
+ try {
+ runTest();
+ if (builder.initializationError == null) {
+ setResult(null, null);
+ } else {
+ setResult("skip", builder.initializationError);
+ }
+ } catch(ex) {
+ if (typeof(ex.substring) != 'undefined' && ex.substring(0, 8) == "failure:") {
+ setResult("failure", ex.substring(8));
+ } else {
+ setResult("error", ex);
+ }
+ }
+
+//
+// WebKit modification: 18-August-2005
+//
+// Inform the test controller that this test is complete, so it's time to dump.
+//
+ if (window.layoutTestController) {
+ layoutTestController.notifyDone();
+ }
+//
+// End WebKit modification
+//
+
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/splitcdatasections01-expected.txt b/LayoutTests/dom/xhtml/level3/core/splitcdatasections01-expected.txt
new file mode 100644
index 0000000..52e3aca
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/splitcdatasections01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/splitcdatasections01
+Status error
+Message Line 115: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/splitcdatasections01.js b/LayoutTests/dom/xhtml/level3/core/splitcdatasections01.js
new file mode 100644
index 0000000..1310d70
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/splitcdatasections01.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/splitcdatasections01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Add a CDATASection containing "]]>" and call Node.normalize which should not
+split or raise warning.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-normalize
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-split-cdata-sections
+*/
+function splitcdatasections01() {
+ var success;
+ if(checkInitialization(builder, "splitcdatasections01") != null) return;
+ var doc;
+ var elem;
+ var domConfig;
+ var elemList;
+ var newChild;
+ var oldChild;
+ var retval;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ oldChild = elem.firstChild;
+
+ newChild = doc.createCDATASection("this is not ]]> good");
+ retval = elem.replaceChild(newChild,oldChild);
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("split-cdata-sections", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalize();
+ errorMonitor.assertLowerSeverity("noErrors", 2);
+
+}
+
+
+
+
+function runTest() {
+ splitcdatasections01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/splitcdatasections01.xhtml b/LayoutTests/dom/xhtml/level3/core/splitcdatasections01.xhtml
new file mode 100644
index 0000000..d7b0d2f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/splitcdatasections01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='splitcdatasections01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01-expected.txt b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01-expected.txt
new file mode 100644
index 0000000..a7de2a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.js b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.js
new file mode 100644
index 0000000..cbed415
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.js
@@ -0,0 +1,109 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace
+*/
+function textiselementcontentwhitespace01() {
+ var success;
+ if(checkInitialization(builder, "textiselementcontentwhitespace01") != null) return;
+ var doc;
+ var newText;
+ var hasWhitespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ newText = doc.createTextNode(" ");
+ hasWhitespace = newText.isElementContentWhitespace;
+
+ assertFalse("isWhitespace",hasWhitespace);
+
+}
+
+
+
+
+function runTest() {
+ textiselementcontentwhitespace01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.xhtml b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.xhtml
new file mode 100644
index 0000000..03b2c0e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='textiselementcontentwhitespace01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02-expected.txt b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02-expected.txt
new file mode 100644
index 0000000..2b05df8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.js b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.js
new file mode 100644
index 0000000..3f7c7d2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace
+*/
+function textiselementcontentwhitespace02() {
+ var success;
+ if(checkInitialization(builder, "textiselementcontentwhitespace02") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var textNode;
+ var isElemContentWhitespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ textNode = pElem.firstChild;
+
+ isElemContentWhitespace = textNode.isElementContentWhitespace;
+
+ assertFalse("notElemContentOrWhitespace",isElemContentWhitespace);
+
+}
+
+
+
+
+function runTest() {
+ textiselementcontentwhitespace02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.xhtml b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.xhtml
new file mode 100644
index 0000000..c862456
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='textiselementcontentwhitespace02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03-expected.txt b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03-expected.txt
new file mode 100644
index 0000000..a4614b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace03
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.js b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.js
new file mode 100644
index 0000000..7352bfb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("ignoringElementContentWhitespace", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Get the newline between the "body" and "p" element. Since node is both in element content
+and whitespace, isElementContentWhitespace should return true.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace
+*/
+function textiselementcontentwhitespace03() {
+ var success;
+ if(checkInitialization(builder, "textiselementcontentwhitespace03") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var textNode;
+ var isElemContentWhitespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ textNode = pElem.previousSibling;
+
+ isElemContentWhitespace = textNode.isElementContentWhitespace;
+
+ assertTrue("isElementContentWhitespace",isElemContentWhitespace);
+
+}
+
+
+
+
+function runTest() {
+ textiselementcontentwhitespace03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.xhtml b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.xhtml
new file mode 100644
index 0000000..e01852e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='textiselementcontentwhitespace03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt
new file mode 100644
index 0000000..238f6ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace04
+Status error
+Message Line 106: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.js b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.js
new file mode 100644
index 0000000..865fb11
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace
+*/
+function textiselementcontentwhitespace04() {
+ var success;
+ if(checkInitialization(builder, "textiselementcontentwhitespace04") != null) return;
+ var doc;
+ var pList;
+ var pElem;
+ var textNode;
+ var blankNode;
+ var returnedNode;
+ var isElemContentWhitespace;
+ var domConfig;
+ var canSetValidation;
+ var replacedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSetValidation = domConfig.canSetParameter("validate",true);
+
+ if(
+ canSetValidation
+ ) {
+ domConfig.setParameter("validate", true);
+ pList = doc.getElementsByTagName("p");
+ pElem = pList.item(0);
+ textNode = pElem.firstChild;
+
+ blankNode = doc.createTextNode(" ");
+ replacedNode = pElem.replaceChild(blankNode,textNode);
+ doc.normalizeDocument();
+ textNode = pElem.firstChild;
+
+ isElemContentWhitespace = textNode.isElementContentWhitespace;
+
+ assertFalse("notElemContent",isElemContentWhitespace);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ textiselementcontentwhitespace04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.xhtml b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.xhtml
new file mode 100644
index 0000000..f9f2769
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='textiselementcontentwhitespace04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt
new file mode 100644
index 0000000..af402a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace05
+Status error
+Message Line 111: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.js b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.js
new file mode 100644
index 0000000..1366acc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace
+*/
+function textiselementcontentwhitespace05() {
+ var success;
+ if(checkInitialization(builder, "textiselementcontentwhitespace05") != null) return;
+ var doc;
+ var bodyList;
+ var bodyElem;
+ var textNode;
+ var nonBlankNode;
+ var returnedNode;
+ var isElemContentWhitespace;
+ var domConfig;
+ var canSetValidation;
+ var refChild;
+ errorMonitor = new DOMErrorMonitor();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSetValidation = domConfig.canSetParameter("validate",true);
+
+ if(
+ canSetValidation
+ ) {
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ refChild = bodyElem.firstChild;
+
+ nonBlankNode = doc.createTextNode("not blank");
+ returnedNode = bodyElem.insertBefore(nonBlankNode,refChild);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("noErrors", 2);
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ textNode = bodyElem.firstChild;
+
+ isElemContentWhitespace = textNode.isElementContentWhitespace;
+
+ assertFalse("notElemContent",isElemContentWhitespace);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ textiselementcontentwhitespace05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.xhtml b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.xhtml
new file mode 100644
index 0000000..f624399
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace05.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='textiselementcontentwhitespace05.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt
new file mode 100644
index 0000000..9080a9e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace06
+Status error
+Message Line 112: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.js b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.js
new file mode 100644
index 0000000..4d6cffb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-isElementContentWhitespace
+*/
+function textiselementcontentwhitespace06() {
+ var success;
+ if(checkInitialization(builder, "textiselementcontentwhitespace06") != null) return;
+ var doc;
+ var bodyList;
+ var bodyElem;
+ var refChild;
+ var textNode;
+ var blankNode;
+ var returnedNode;
+ var isElemContentWhitespace;
+ var domConfig;
+ var canSetValidation;
+ var replacedNode;
+ errorMonitor = new DOMErrorMonitor();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domConfig = doc.domConfig;
+
+ canSetValidation = domConfig.canSetParameter("validate",true);
+
+ if(
+ canSetValidation
+ ) {
+ domConfig.setParameter("validate", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ refChild = bodyElem.firstChild;
+
+ blankNode = doc.createTextNode(" ");
+ replacedNode = bodyElem.insertBefore(blankNode,refChild);
+ doc.normalizeDocument();
+ errorMonitor.assertLowerSeverity("noErrors", 2);
+ bodyList = doc.getElementsByTagName("body");
+ bodyElem = bodyList.item(0);
+ textNode = bodyElem.firstChild;
+
+ isElemContentWhitespace = textNode.isElementContentWhitespace;
+
+ assertTrue("isElemContentWhitespace",isElemContentWhitespace);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ textiselementcontentwhitespace06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.xhtml b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.xhtml
new file mode 100644
index 0000000..e7b7af4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textiselementcontentwhitespace06.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='textiselementcontentwhitespace06.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01-expected.txt
new file mode 100644
index 0000000..c233a30
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.js
new file mode 100644
index 0000000..5973b80
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+*/
+function textreplacewholetext01() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext01") != null) return;
+ var doc;
+ var itemList;
+ var elementName;
+ var textNode;
+ var replacedText;
+ var wholeText;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ itemList = doc.getElementsByTagName("strong");
+ elementName = itemList.item(0);
+ textNode = elementName.firstChild;
+
+ replacedText = textNode.replaceWholeText("New Content");
+ wholeText = replacedText.wholeText;
+
+ assertEquals("textreplacewholetext01_1","New Content",wholeText);
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.xhtml
new file mode 100644
index 0000000..7abfbbf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textreplacewholetext01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02-expected.txt
new file mode 100644
index 0000000..f94941d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.js
new file mode 100644
index 0000000..2de237a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+*/
+function textreplacewholetext02() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext02") != null) return;
+ var doc;
+ var itemList;
+ var elementName;
+ var textNode;
+ var replacedText;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ itemList = doc.getElementsByTagName("strong");
+ elementName = itemList.item(0);
+ textNode = elementName.firstChild;
+
+ replacedText = textNode.replaceWholeText("");
+ assertNull("textreplacewholetext02",replacedText);
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.xhtml
new file mode 100644
index 0000000..8c17126
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textreplacewholetext02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03-expected.txt
new file mode 100644
index 0000000..0e9c27a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.js
new file mode 100644
index 0000000..ebae125
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+*/
+function textreplacewholetext03() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext03") != null) return;
+ var doc;
+ var textNode;
+ var replacedText;
+ var wholeText;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textNode = doc.createTextNode("New Text");
+ replacedText = textNode.replaceWholeText(" a b c b ");
+ wholeText = replacedText.wholeText;
+
+ assertEquals("textreplacewholetext03"," a b c b ",wholeText);
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.xhtml
new file mode 100644
index 0000000..7b4a1da
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textreplacewholetext03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04-expected.txt
new file mode 100644
index 0000000..c6b130b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.js
new file mode 100644
index 0000000..ca8ff0c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.js
@@ -0,0 +1,109 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke replaceWholeText on an new Text Node to replace its value with an
+ empty value.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+*/
+function textreplacewholetext04() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext04") != null) return;
+ var doc;
+ var textNode;
+ var replacedText;
+ var wholeText;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ textNode = doc.createTextNode("New Text");
+ replacedText = textNode.replaceWholeText("");
+ assertNull("retvalIsNull",replacedText);
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.xhtml
new file mode 100644
index 0000000..d6bd834
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textreplacewholetext04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05-expected.txt
new file mode 100644
index 0000000..b9b2cae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.js
new file mode 100644
index 0000000..5540692
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+*/
+function textreplacewholetext05() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext05") != null) return;
+ var doc;
+ var itemList;
+ var elementName;
+ var textNode;
+ var cdataNode;
+ var replacedText;
+ var wholeText;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ itemList = doc.getElementsByTagName("strong");
+ elementName = itemList.item(0);
+ textNode = doc.createTextNode("New Text");
+ cdataNode = doc.createCDATASection("New CDATA");
+ appendedChild = elementName.appendChild(textNode);
+ appendedChild = elementName.appendChild(cdataNode);
+ textNode = elementName.firstChild;
+
+ replacedText = textNode.replaceWholeText("New Text and Cdata");
+ wholeText = replacedText.wholeText;
+
+ assertEquals("textreplacewholetext05","New Text and Cdata",wholeText);
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.xhtml
new file mode 100644
index 0000000..61317ce
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textreplacewholetext05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06-expected.txt
new file mode 100644
index 0000000..925a380
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.js
new file mode 100644
index 0000000..4d18f27
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+ setImplementationAttribute("expandEntityReferences", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+*/
+function textreplacewholetext06() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext06") != null) return;
+ var doc;
+ var itemList;
+ var elementStrong;
+ var textNode;
+ var erefNode;
+ var replacedText;
+ var appendedChild;
+ var nodeValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ itemList = doc.getElementsByTagName("strong");
+ elementStrong = itemList.item(0);
+ textNode = doc.createTextNode("New Text");
+ erefNode = doc.createEntityReference("beta");
+ appendedChild = elementStrong.appendChild(textNode);
+ appendedChild = elementStrong.appendChild(erefNode);
+ textNode = elementStrong.firstChild;
+
+ replacedText = textNode.replaceWholeText("New Text and Cdata");
+ nodeValue = textNode.nodeValue;
+
+ assertEquals("textreplacewholetext06","New Text and Cdata",nodeValue);
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.xhtml
new file mode 100644
index 0000000..7970b60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textreplacewholetext06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07-expected.txt
new file mode 100644
index 0000000..1075ecb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.js
new file mode 100644
index 0000000..1e64d32
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author IBM
+* @author Neil Delima
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=425
+*/
+function textreplacewholetext07() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext07") != null) return;
+ var doc;
+ var itemList;
+ var elementName;
+ var textNode;
+ var erefNode;
+ var replacedText;
+ var appendedChild;
+ var node;
+ var nodeValue;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ itemList = doc.getElementsByTagName("strong");
+ elementName = itemList.item(0);
+ erefNode = doc.createEntityReference("ent4");
+ textNode = doc.createTextNode("New Text");
+ appendedChild = elementName.appendChild(erefNode);
+ appendedChild = elementName.appendChild(textNode);
+ textNode = elementName.firstChild;
+
+ replacedText = textNode.replaceWholeText("New Text and Cdata");
+ textNode = elementName.firstChild;
+
+ assertSame("retval_same",textNode,replacedText);
+nodeValue = textNode.nodeValue;
+
+ assertEquals("nodeValueSame","New Text and Cdata",nodeValue);
+ node = textNode.nextSibling;
+
+ assertNotNull("secondChildNotNull",node);
+nodeType = node.nodeType;
+
+ assertEquals("secondChildIsEntRef",5,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.xhtml
new file mode 100644
index 0000000..2d2977b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textreplacewholetext07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08-expected.txt b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08-expected.txt
new file mode 100644
index 0000000..2451a46
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext08
+Status failure
+Message throw_NO_MODIFICATION_ALLOWED_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.js b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.js
new file mode 100644
index 0000000..e0854b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textreplacewholetext08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-replaceWholeText
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=425
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=540
+*/
+function textreplacewholetext08() {
+ var success;
+ if(checkInitialization(builder, "textreplacewholetext08") != null) return;
+ var doc;
+ var itemList;
+ var p;
+ var entRef;
+ var node;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ itemList = doc.getElementsByTagName("p");
+ p = itemList.item(0);
+ entRef = doc.createEntityReference("ent2");
+ node = p.appendChild(entRef);
+ node = p.firstChild;
+
+
+ {
+ success = false;
+ try {
+ node = node.replaceWholeText("yo");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ textreplacewholetext08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.xhtml b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.xhtml
new file mode 100644
index 0000000..8fae996
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textreplacewholetext08.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='textreplacewholetext08.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/textwholetext01-expected.txt b/LayoutTests/dom/xhtml/level3/core/textwholetext01-expected.txt
new file mode 100644
index 0000000..f3daa4d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textwholetext01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textwholetext01.js b/LayoutTests/dom/xhtml/level3/core/textwholetext01.js
new file mode 100644
index 0000000..51acd5b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext01.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textwholetext01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke wholetext on an existing Text Node that contains whitespace and verify if
+ the value returned is correct.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-wholeText
+*/
+function textwholetext01() {
+ var success;
+ if(checkInitialization(builder, "textwholetext01") != null) return;
+ var doc;
+ var itemList;
+ var elementName;
+ var textNode;
+ var nameWholeText;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ itemList = doc.getElementsByTagName("strong");
+ elementName = itemList.item(0);
+ textNode = elementName.firstChild;
+
+ nameWholeText = textNode.wholeText;
+
+ assertEquals("textwholetext01","Margaret Martin",nameWholeText);
+
+}
+
+
+
+
+function runTest() {
+ textwholetext01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textwholetext01.xhtml b/LayoutTests/dom/xhtml/level3/core/textwholetext01.xhtml
new file mode 100644
index 0000000..751ee2b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textwholetext01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textwholetext02-expected.txt b/LayoutTests/dom/xhtml/level3/core/textwholetext02-expected.txt
new file mode 100644
index 0000000..abf9396
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textwholetext02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textwholetext02.js b/LayoutTests/dom/xhtml/level3/core/textwholetext02.js
new file mode 100644
index 0000000..53ec21f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext02.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textwholetext02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke wholetext on an existing Text Node that contains whitespace and and verify if
+ the value returned is correct.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-wholeText
+*/
+function textwholetext02() {
+ var success;
+ if(checkInitialization(builder, "textwholetext02") != null) return;
+ var doc;
+ var itemList;
+ var elementName;
+ var textNode;
+ var newTextNode;
+ var wholeText;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ itemList = doc.getElementsByTagName("strong");
+ elementName = itemList.item(0);
+ newTextNode = doc.createTextNode("New Text");
+ appendedChild = elementName.appendChild(newTextNode);
+ textNode = elementName.firstChild;
+
+ wholeText = textNode.wholeText;
+
+ assertEquals("textwholetext02","Margaret MartinNew Text",wholeText);
+
+}
+
+
+
+
+function runTest() {
+ textwholetext02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textwholetext02.xhtml b/LayoutTests/dom/xhtml/level3/core/textwholetext02.xhtml
new file mode 100644
index 0000000..a764fd7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textwholetext02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/textwholetext03-expected.txt b/LayoutTests/dom/xhtml/level3/core/textwholetext03-expected.txt
new file mode 100644
index 0000000..ae68f7c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext03-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textwholetext03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level3/core/textwholetext03.js b/LayoutTests/dom/xhtml/level3/core/textwholetext03.js
new file mode 100644
index 0000000..cf02ce6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext03.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/textwholetext03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke wholetext on two newly created text nodes and verify if the value returned
+ is correct.
+
+* @author IBM
+* @author Neil Delima
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Text3-wholeText
+*/
+function textwholetext03() {
+ var success;
+ if(checkInitialization(builder, "textwholetext03") != null) return;
+ var doc;
+ var elem;
+ var text1;
+ var text2;
+ var appendedChild;
+ var combinedText;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","p");
+ text1 = doc.createTextNode("Text I");
+ text2 = doc.createTextNode(" Text II");
+ appendedChild = elem.appendChild(text1);
+ appendedChild = elem.appendChild(text2);
+ combinedText = text1.wholeText;
+
+ assertEquals("textwholetext03","Text I Text II",combinedText);
+
+}
+
+
+
+
+function runTest() {
+ textwholetext03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/textwholetext03.xhtml b/LayoutTests/dom/xhtml/level3/core/textwholetext03.xhtml
new file mode 100644
index 0000000..bd44551
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/textwholetext03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="textwholetext03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfo.svg.xsd b/LayoutTests/dom/xhtml/level3/core/typeinfo.svg.xsd
new file mode 100644
index 0000000..e2f7cb1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/typeinfo.xsd b/LayoutTests/dom/xhtml/level3/core/typeinfo.xsd
new file mode 100644
index 0000000..201d5dd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/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/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03-expected.txt
new file mode 100644
index 0000000..8d82d62
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypename03
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.js b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.js
new file mode 100644
index 0000000..3a62311
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypename03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+*/
+function typeinfogettypename03() {
+ var success;
+ if(checkInitialization(builder, "typeinfogettypename03") != null) return;
+ var doc;
+ var elemList;
+ var attrid;
+ var acElem;
+ var attrTypeInfo;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acElem = elemList.item(2);
+ attrid = acElem.getAttributeNode("id");
+ attrTypeInfo = attrid.schemaTypeInfo;
+
+ typeName = attrTypeInfo.typeName;
+
+ assertEquals("typeinfogettypename03_1","ID",typeName);
+
+}
+
+
+
+
+function runTest() {
+ typeinfogettypename03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.xhtml
new file mode 100644
index 0000000..c1e2c82
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfogettypename03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04-expected.txt
new file mode 100644
index 0000000..51a20f0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypename04
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.js b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.js
new file mode 100644
index 0000000..7f19f25
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypename04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+*/
+function typeinfogettypename04() {
+ var success;
+ if(checkInitialization(builder, "typeinfogettypename04") != null) return;
+ var doc;
+ var docElem;
+ var elemList;
+ var emElem;
+ var elemTypeInfo;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ emElem = elemList.item(0);
+ elemTypeInfo = emElem.schemaTypeInfo;
+
+ typeName = elemTypeInfo.typeName;
+
+ assertEquals("typeinfogettypename04_1","emType",typeName);
+
+}
+
+
+
+
+function runTest() {
+ typeinfogettypename04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.xhtml
new file mode 100644
index 0000000..258ee3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypename04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfogettypename04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01-expected.txt
new file mode 100644
index 0000000..0cea83d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypenamespace01
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.js b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.js
new file mode 100644
index 0000000..072d4c2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypenamespace01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeNamespace
+*/
+function typeinfogettypenamespace01() {
+ var success;
+ if(checkInitialization(builder, "typeinfogettypenamespace01") != null) return;
+ var doc;
+ var elemList;
+ var acElem;
+ var titleAttr;
+ var attrTypeInfo;
+ var typeNamespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acElem = elemList.item(0);
+ titleAttr = acElem.getAttributeNode("title");
+ attrTypeInfo = titleAttr.schemaTypeInfo;
+
+ typeNamespace = attrTypeInfo.typeNamespace;
+
+ assertEquals("typeinfogettypename01_1","http://www.w3.org/2001/XMLSchema",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ typeinfogettypenamespace01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.xhtml
new file mode 100644
index 0000000..1f7463a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfogettypenamespace01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03-expected.txt
new file mode 100644
index 0000000..1119951
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypenamespace03
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.js b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.js
new file mode 100644
index 0000000..3d76108
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypenamespace03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+*/
+function typeinfogettypenamespace03() {
+ var success;
+ if(checkInitialization(builder, "typeinfogettypenamespace03") != null) return;
+ var doc;
+ var elemList;
+ var classAttr;
+ var attrTypeInfo;
+ var typeNamespace;
+ var acElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acElem = elemList.item(1);
+ classAttr = acElem.getAttributeNode("class");
+ attrTypeInfo = classAttr.schemaTypeInfo;
+
+ typeNamespace = attrTypeInfo.typeNamespace;
+
+ assertEquals("typeinfogettypename03_1","http://www.w3.org/1999/xhtml",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ typeinfogettypenamespace03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.xhtml
new file mode 100644
index 0000000..d58681b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfogettypenamespace03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04-expected.txt
new file mode 100644
index 0000000..c24c650
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypenamespace04
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.js b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.js
new file mode 100644
index 0000000..e2b0261
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypenamespace04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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)
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-typeName
+*/
+function typeinfogettypenamespace04() {
+ var success;
+ if(checkInitialization(builder, "typeinfogettypenamespace04") != null) return;
+ var doc;
+ var elemList;
+ var emElem;
+ var elemTypeInfo;
+ var typeNamespace;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ emElem = elemList.item(0);
+ elemTypeInfo = emElem.schemaTypeInfo;
+
+ typeNamespace = elemTypeInfo.typeNamespace;
+
+ assertEquals("typeinfogettypenamespace04_1","http://www.w3.org/1999/xhtml",typeNamespace);
+
+}
+
+
+
+
+function runTest() {
+ typeinfogettypenamespace04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.xhtml
new file mode 100644
index 0000000..5b60ab0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfogettypenamespace04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfogettypenamespace04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01-expected.txt
new file mode 100644
index 0000000..3fda323
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom01
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.js
new file mode 100644
index 0000000..4d11765
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+DTD types always return false for isDerivedFrom.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom01() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom01") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/TR/REC-xml","CDATA",0);
+ assertFalse("isDerived0",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/TR/REC-xml","CDATA",15);
+ assertFalse("isDerived15",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.xhtml
new file mode 100644
index 0000000..6232cc4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom01.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02-expected.txt
new file mode 100644
index 0000000..cbd5a57
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom02
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.js
new file mode 100644
index 0000000..f3f76b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check how xsd:string is derived from itself.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom02() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom02") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",1);
+ assertTrue("derivedFromSelfRestriction",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",14);
+ assertFalse("derivedFromSelfOther",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",0);
+ assertTrue("derivedFromSelfAny",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",15);
+ assertTrue("derivedFromSelfAll",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.xhtml
new file mode 100644
index 0000000..034e176
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom02.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03-expected.txt
new file mode 100644
index 0000000..825c943
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom03
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.js
new file mode 100644
index 0000000..3d667fc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check that isDerivedFrom does considers xsd:string to be derived from anySimpleType.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom03() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom03") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","string",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",15);
+ assertTrue("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.xhtml
new file mode 100644
index 0000000..c30d325
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom03.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04-expected.txt
new file mode 100644
index 0000000..f45a758
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom04
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.js
new file mode 100644
index 0000000..44b9b9a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if xsd:string is derived from xsd:anyType by any method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom04() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom04") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","string",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",15);
+ assertTrue("derivedFromAnyType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.xhtml
new file mode 100644
index 0000000..0757436
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom04.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05-expected.txt
new file mode 100644
index 0000000..349c5a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom05
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.js
new file mode 100644
index 0000000..5ab1d34
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if xsd:string is derived from xsd:anyType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom05() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom05") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","string",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",1);
+ assertTrue("derivedFromAnyTypeRestrictionOnly",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom05();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.xhtml
new file mode 100644
index 0000000..fa9b221
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom05.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06-expected.txt
new file mode 100644
index 0000000..a690d94
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom06
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.js
new file mode 100644
index 0000000..a9eef3c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if xsd:string is derived from xsd:anyType by any method except restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom06() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom06") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","string",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",14);
+ assertFalse("derivedFromAnyTypeExceptRestriction",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom06();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.xhtml
new file mode 100644
index 0000000..8995567
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom06.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07-expected.txt
new file mode 100644
index 0000000..ee3a4f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom07
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.js
new file mode 100644
index 0000000..d359272
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if xsd:string is derived from xsd:anyType using 0 as derivation method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom07() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom07") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ attr = acronymElem.getAttributeNode("title");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","string",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",0);
+ assertTrue("derivedFromAnyType0",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom07();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.xhtml
new file mode 100644
index 0000000..f7647d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom07.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08-expected.txt
new file mode 100644
index 0000000..92f1e23
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom08
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.js
new file mode 100644
index 0000000..b306a9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if classType is derived from xsd:string by any method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom08() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom08") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","classType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",15);
+ assertTrue("derivedFromString",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom08();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.xhtml
new file mode 100644
index 0000000..a20a68d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom08.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09-expected.txt
new file mode 100644
index 0000000..67e3c54
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom09
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.js
new file mode 100644
index 0000000..0cbd8b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom09";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if classType is derived from xsd:anySimpleType by any method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom09() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom09") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","classType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",15);
+ assertTrue("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom09();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.xhtml
new file mode 100644
index 0000000..ed220e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom09.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom09.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10-expected.txt
new file mode 100644
index 0000000..46eaad9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom10
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.js
new file mode 100644
index 0000000..659f9af
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom10";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if classType is derived from anyType by any method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom10() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom10") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","classType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",15);
+ assertTrue("derivedFromAnyType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom10();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.xhtml
new file mode 100644
index 0000000..00e76b3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom10.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom10.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11-expected.txt
new file mode 100644
index 0000000..cef2107
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom11
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.js
new file mode 100644
index 0000000..72618c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom11";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if classType is derived from xsd:anyType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom11() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom11") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","classType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",1);
+ assertTrue("derivedFromAnyTypeRestrictionOnly",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom11();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.xhtml
new file mode 100644
index 0000000..fa708be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom11.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom11.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12-expected.txt
new file mode 100644
index 0000000..9fbd2c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom12
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.js
new file mode 100644
index 0000000..6d3ea2b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom12";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check classType is derived from anyType specifying derivationMethod as 0.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom12() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom12") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("nameIsString","classType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",0);
+ assertTrue("derivedFromAnyType0",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom12();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.xhtml
new file mode 100644
index 0000000..c4f1243
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom12.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom12.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13-expected.txt
new file mode 100644
index 0000000..0f59440
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom13
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.js
new file mode 100644
index 0000000..61c3479
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom13";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if classType is derived from xsd:anyType by any method other than restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom13() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom13") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("name","classType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",14);
+ assertFalse("derivedFromAnyTypeExceptRestriction",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom13();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.xhtml
new file mode 100644
index 0000000..4f65504
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom13.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom13.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14-expected.txt
new file mode 100644
index 0000000..06f3eaf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom14
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.js
new file mode 100644
index 0000000..e0c488a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom14";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check how classType is derived from itself.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom14() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom14") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ attr = acronymElem.getAttributeNode("class");
+ typeInfo = attr.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("name","classType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","classType",1);
+ assertTrue("derivedFromSelfRestriction",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","classType",14);
+ assertFalse("notDerivedFromSelfOther",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","classType",15);
+ assertTrue("derivedFromSelfAll",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","classType",0);
+ assertTrue("derivedFromSelfAny",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom14();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.xhtml
new file mode 100644
index 0000000..fae8c3a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom14.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom14.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15-expected.txt
new file mode 100644
index 0000000..c8edc52
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom15
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.js
new file mode 100644
index 0000000..2bca22d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom15";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check "emType" is derived from emp0001_3Type by any method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom15() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom15") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("name","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emp0001_3Type",15);
+ assertTrue("derivedFromEmp13AnyMethod",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom15();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.xhtml
new file mode 100644
index 0000000..cec33be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom15.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom15.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16-expected.txt
new file mode 100644
index 0000000..d315a9c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom16
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.js
new file mode 100644
index 0000000..5bc0207
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom16";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check emType is derived from emp0001_3Type by union.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom16() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom16") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("name","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emp0001_3Type",4);
+ assertTrue("derivedFromEmp13Union",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom16();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.xhtml
new file mode 100644
index 0000000..ab5aef6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom16.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom16.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17-expected.txt
new file mode 100644
index 0000000..7320993
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom17
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.js
new file mode 100644
index 0000000..dee06df
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom17";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if emType is derived from emp0001_3Type by any method other than union.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom17() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom17") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("name","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emp0001_3Type",11);
+ assertFalse("derivedFromEmp13NotUnion",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom17();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.xhtml
new file mode 100644
index 0000000..5b14801
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom17.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom17.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18-expected.txt
new file mode 100644
index 0000000..389ad07
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom18
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.js
new file mode 100644
index 0000000..c998e72
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom18";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if emType is derived from xsd:ID by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom18() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom18") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","ID",1);
+ assertFalse("derivedFromID",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom18();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.xhtml
new file mode 100644
index 0000000..9625498
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom18.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom18.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19-expected.txt
new file mode 100644
index 0000000..3229f5f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom19
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.js
new file mode 100644
index 0000000..0392720
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom19";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check emType is derived from anySimpleType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom19() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom19") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",1);
+ assertTrue("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom19();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.xhtml
new file mode 100644
index 0000000..a197435
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom19.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom19.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20-expected.txt
new file mode 100644
index 0000000..8a6d650
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom20
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.js
new file mode 100644
index 0000000..fc9caab
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom20";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if emType is derived from anyType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom20() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom20") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",1);
+ assertTrue("derivedFromAnyType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom20();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.xhtml
new file mode 100644
index 0000000..d39dfd6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom20.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom20.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21-expected.txt
new file mode 100644
index 0000000..296c624
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom21
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.js
new file mode 100644
index 0000000..94cbb7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom21";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if emType is derived from itself.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom21() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom21") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emType",1);
+ assertTrue("derivedFromSelfByRestriction",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emType",14);
+ assertFalse("notDerivedFromSelfOtherMethod",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emType",0);
+ assertTrue("derivedFromSelfByAny",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emType",15);
+ assertTrue("derivedFromSelfByAll",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom21();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.xhtml
new file mode 100644
index 0000000..2f057df
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom21.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom21.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22-expected.txt
new file mode 100644
index 0000000..f1b9696
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom22
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.js
new file mode 100644
index 0000000..8397819
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom22";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check strongType is derived from xsd:string by any method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom22() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom22") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",15);
+ assertTrue("derivedFromStringAnyMethod",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom22();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.xhtml
new file mode 100644
index 0000000..c092fbe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom22.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom22.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23-expected.txt
new file mode 100644
index 0000000..acbfea2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom23
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.js
new file mode 100644
index 0000000..f9f8d85
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom23";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if strongType is derived from xsd:string by list.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom23() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom23") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",8);
+ assertTrue("derivedFromStringList",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom23();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.xhtml
new file mode 100644
index 0000000..7cab797
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom23.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom23.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24-expected.txt
new file mode 100644
index 0000000..cc1f719
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom24
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.js
new file mode 100644
index 0000000..22a0af2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom24";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if strongType is derived from xsd:string by any method other than list.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom24() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom24") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",7);
+ assertFalse("derivedFromStringNotList",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom24();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.xhtml
new file mode 100644
index 0000000..c765b67
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom24.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom24.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25-expected.txt
new file mode 100644
index 0000000..81e3450
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom25
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.js
new file mode 100644
index 0000000..63a1c51
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom25";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if strongType is derived from anySimpleType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom25() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom25") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",1);
+ assertTrue("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom25();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.xhtml
new file mode 100644
index 0000000..a8a8387
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom25.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom25.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26-expected.txt
new file mode 100644
index 0000000..b8e800d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom26
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.js
new file mode 100644
index 0000000..cdf927a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom26";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if strongType is derived from anyType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom26() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom26") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",1);
+ assertTrue("derivedFromAnyType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom26();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.xhtml
new file mode 100644
index 0000000..190d892
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom26.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom26.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27-expected.txt
new file mode 100644
index 0000000..f75b6d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom27
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.js
new file mode 100644
index 0000000..ff22603
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom27";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if strongType is derived from anyType by union or extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom27() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom27") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",6);
+ assertFalse("derivedFromAnyType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom27();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.xhtml
new file mode 100644
index 0000000..0c94a61
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom27.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom27.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28-expected.txt
new file mode 100644
index 0000000..5db6f7f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom28
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.js
new file mode 100644
index 0000000..6a08220
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom28";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check how strongType is derived from itself.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom28() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom28") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","strongType",1);
+ assertTrue("notDerivedFromSelfRestriction",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","strongType",14);
+ assertFalse("notDerivedFromSelfOther",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","strongType",15);
+ assertTrue("notDerivedFromSelfAll",isDerived);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","strongType",0);
+ assertTrue("notDerivedFromSelfAny",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom28();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.xhtml
new file mode 100644
index 0000000..aacd8b7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom28.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom28.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29-expected.txt
new file mode 100644
index 0000000..96726da
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom29
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.js
new file mode 100644
index 0000000..0765b98
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom29";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type for p element is derived from pType.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom29() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom29") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","pType",15);
+ assertTrue("derivedFromPTypeAnyMethod",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom29();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.xhtml
new file mode 100644
index 0000000..8637ea5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom29.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom29.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30-expected.txt
new file mode 100644
index 0000000..3ae3a5c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom30
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.js
new file mode 100644
index 0000000..066647f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom30";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type for p element is derived from pType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom30() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom30") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","pType",1);
+ assertTrue("derivedFromPTypeRestriction",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom30();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.xhtml
new file mode 100644
index 0000000..97d064e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom30.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom30.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31-expected.txt
new file mode 100644
index 0000000..3c6b765
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom31
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.js
new file mode 100644
index 0000000..200aa37
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom31";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check anonymous type for p element is derived from pType by any method other than restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom31() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom31") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","pType",14);
+ assertFalse("derivedFromPTypeNotRestriction",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom31();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.xhtml
new file mode 100644
index 0000000..edd29bc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom31.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom31.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32-expected.txt
new file mode 100644
index 0000000..a19bb4d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom32
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.js
new file mode 100644
index 0000000..cf41158
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom32";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of p element is derived from part1.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom32() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom32") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","part1",15);
+ assertTrue("derivedFromPart1AnyMethod",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom32();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.xhtml
new file mode 100644
index 0000000..7b72072
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom32.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom32.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33-expected.txt
new file mode 100644
index 0000000..520eeba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom33
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.js
new file mode 100644
index 0000000..6700f8b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom33";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check is anonymous type of p element is derived by extension from part1.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom33() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom33") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","part1",2);
+ assertTrue("derivedFromPart1Extension",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom33();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.xhtml
new file mode 100644
index 0000000..2006e0e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom33.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom33.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34-expected.txt
new file mode 100644
index 0000000..15d7db8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom34
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.js
new file mode 100644
index 0000000..64125dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom34";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of p element is derived from part1 by any method other than extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom34() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom34") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","part1",13);
+ assertFalse("derivedFromPart1NotExtension",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom34();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.xhtml
new file mode 100644
index 0000000..85387a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom34.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom34.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35-expected.txt
new file mode 100644
index 0000000..d454bc9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom35
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.js
new file mode 100644
index 0000000..5d02480
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom35";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of p element is derived from xsd:simpleType.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom35() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom35") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",15);
+ assertFalse("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom35();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.xhtml
new file mode 100644
index 0000000..544c8af
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom35.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom35.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36-expected.txt
new file mode 100644
index 0000000..573e5da
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom36
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.js
new file mode 100644
index 0000000..fd7e823
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom36";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of p element is derived from xsd:anyType.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom36() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom36") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",15);
+ assertTrue("derivedFromAnyTypeAnyMethod",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom36();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.xhtml
new file mode 100644
index 0000000..a0af02a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom36.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom36.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37-expected.txt
new file mode 100644
index 0000000..b94cb8d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom37
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.js
new file mode 100644
index 0000000..5f14c5d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom37";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of p element is derived from xsd:anyType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom37() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom37") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",1);
+ assertFalse("derivedFromAnyTypeRestriction",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom37();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.xhtml
new file mode 100644
index 0000000..26537f4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom37.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom37.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38-expected.txt
new file mode 100644
index 0000000..395ee3f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom38
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.js
new file mode 100644
index 0000000..09efa6b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom38";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of p element is derived from xsd:anyType by any method other
+than extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom38() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom38") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",13);
+ assertFalse("derivedFromAnyTypeNotExtension",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom38();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.xhtml
new file mode 100644
index 0000000..c40238d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom38.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom38.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39-expected.txt
new file mode 100644
index 0000000..6445357
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom39
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.js
new file mode 100644
index 0000000..63fe963
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom39";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of p element derives from itself.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom39() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom39") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+ var typeNS;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("p");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ typeNS = typeInfo.typeNamespace;
+
+ isDerived = typeInfo.isDerivedFrom(typeNS,typeName,15);
+ assertFalse("notDerivedFromSelf",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom39();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.xhtml
new file mode 100644
index 0000000..a177654
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom39.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom39.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40-expected.txt
new file mode 100644
index 0000000..3b55f14
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom40
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.js
new file mode 100644
index 0000000..afea4a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom40";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if emType is derived from xsd:ID by union.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom40() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom40") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","ID",4);
+ assertTrue("derivedFromID",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom40();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.xhtml
new file mode 100644
index 0000000..5a00449
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom40.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom40.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41-expected.txt
new file mode 100644
index 0000000..b678652
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom41
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.js
new file mode 100644
index 0000000..09b1f1d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom41";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if emType is derived from xsd:ID by any method other than union or restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom41() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom41") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","emType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","ID",10);
+ assertFalse("derivedFromID",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom41();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.xhtml
new file mode 100644
index 0000000..55757ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom41.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom41.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42-expected.txt
new file mode 100644
index 0000000..c5c069b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom42
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.js
new file mode 100644
index 0000000..95936c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom42";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if strongType is derived from anySimpleType by list.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom42() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom42") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+ var typeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+typeName = typeInfo.typeName;
+
+ assertEquals("typeName","strongType",typeName);
+ isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",8);
+ assertTrue("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom42();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.xhtml
new file mode 100644
index 0000000..d03db09
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom42.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom42.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43-expected.txt
new file mode 100644
index 0000000..009de6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom43
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.js
new file mode 100644
index 0000000..328888b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom43";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of acronym element derived from anyType by restriction.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom43() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom43") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ typeInfo = acronymElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",1);
+ assertFalse("derivedFromAnyType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom43();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.xhtml
new file mode 100644
index 0000000..c4b02f8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom43.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom43.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44-expected.txt
new file mode 100644
index 0000000..3947ad6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom44
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.js
new file mode 100644
index 0000000..f77fcae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom44";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of acronym element derived from anyType by any method other than extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom44() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom44") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ typeInfo = acronymElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",13);
+ assertFalse("derivedFromAnyType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom44();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.xhtml
new file mode 100644
index 0000000..ef6871d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom44.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom44.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45-expected.txt
new file mode 100644
index 0000000..9ca8ca8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom45
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.js
new file mode 100644
index 0000000..21a428c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom45";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of acronym element derived from anySimpleType by extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom45() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom45") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ typeInfo = acronymElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",2);
+ assertTrue("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom45();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.xhtml
new file mode 100644
index 0000000..7b56e64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom45.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom45.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46-expected.txt
new file mode 100644
index 0000000..229d6ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom46
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.js
new file mode 100644
index 0000000..3cc44a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom46";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of acronym element derived from anySimpleType by any method other than extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom46() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom46") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ typeInfo = acronymElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",13);
+ assertFalse("derivedFromAnySimpleType",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom46();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.xhtml
new file mode 100644
index 0000000..902e72c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom46.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom46.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47-expected.txt
new file mode 100644
index 0000000..ca2abfa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom47
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.js
new file mode 100644
index 0000000..cd2ba1b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom47";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of acronym element derived from xsd:string by extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom47() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom47") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ typeInfo = acronymElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",2);
+ assertTrue("derivedFromString",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom47();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.xhtml
new file mode 100644
index 0000000..b01e50d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom47.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom47.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48-expected.txt
new file mode 100644
index 0000000..7c8cfe2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom48
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.js
new file mode 100644
index 0000000..c54084f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom48";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if anonymous type of acronym element derived from xsd:string by any method other than extension.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom48() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom48") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(2);
+ typeInfo = acronymElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",13);
+ assertFalse("derivedFromString",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom48();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.xhtml
new file mode 100644
index 0000000..ac19cfc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom48.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom48.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49-expected.txt
new file mode 100644
index 0000000..d6bb864
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom49
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.js
new file mode 100644
index 0000000..ad7dac3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom49";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom49() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom49") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","double",8);
+ assertTrue("derivedFromDoubleList",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom49();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.xhtml
new file mode 100644
index 0000000..39e8a21
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom49.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom49.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50-expected.txt
new file mode 100644
index 0000000..dcc1062
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom50
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.js
new file mode 100644
index 0000000..96b2b4b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom50";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom50() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom50") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","double",0);
+ assertTrue("derivedFromDoubleAny",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom50();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.xhtml
new file mode 100644
index 0000000..ceca340
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom50.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom50.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51-expected.txt
new file mode 100644
index 0000000..350142c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom51
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.js
new file mode 100644
index 0000000..fd0a9db
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom51";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom51() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom51") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","double",7);
+ assertFalse("derivedFromDoubleNonList",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom51();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.xhtml
new file mode 100644
index 0000000..b454225
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom51.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom51.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52-expected.txt
new file mode 100644
index 0000000..4285828
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom52
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.js
new file mode 100644
index 0000000..364676f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom52";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom52() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom52") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",1);
+ assertFalse("derivedFromAnySimpleRestriction",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom52();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.xhtml
new file mode 100644
index 0000000..6abc42e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom52.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom52.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53-expected.txt
new file mode 100644
index 0000000..9cbc21f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom53
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.js
new file mode 100644
index 0000000..7d7ce8e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom53";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom53() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom53") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",2);
+ assertTrue("derivedFromAnySimpleExtension",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom53();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.xhtml
new file mode 100644
index 0000000..7301115
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom53.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom53.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54-expected.txt
new file mode 100644
index 0000000..47e8b1c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom54
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.js
new file mode 100644
index 0000000..9d3f558
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom54";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom54() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom54") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anySimpleType",8);
+ assertTrue("derivedFromAnySimpleList",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom54();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.xhtml
new file mode 100644
index 0000000..92880ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom54.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom54.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55-expected.txt
new file mode 100644
index 0000000..5e1c9ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom55
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.js
new file mode 100644
index 0000000..83fa8fd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom55";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom55() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom55") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",2);
+ assertTrue("derivedFromAnyRestriction",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom55();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.xhtml
new file mode 100644
index 0000000..4f17c1f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom55.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom55.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56-expected.txt
new file mode 100644
index 0000000..1a9dbaf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom56
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.js
new file mode 100644
index 0000000..6a6943a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom56";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom56() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom56") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",2);
+ assertTrue("derivedFromAnyExtension",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom56();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.xhtml
new file mode 100644
index 0000000..dd7d500
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom56.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom56.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57-expected.txt
new file mode 100644
index 0000000..4b051a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom57
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.js
new file mode 100644
index 0000000..863cf2f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom57";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom57() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom57") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("acronym");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","anyType",8);
+ assertTrue("derivedFromAnyList",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom57();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.xhtml
new file mode 100644
index 0000000..d0bf95d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom57.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom57.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58-expected.txt
new file mode 100644
index 0000000..e3585ba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom58
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.js
new file mode 100644
index 0000000..1c1de08
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom58";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom58() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom58") != null) return;
+ var doc;
+ var elemList;
+ var codeElem;
+ var attr;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("code");
+ codeElem = elemList.item(0);
+ typeInfo = codeElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","unbounded",4);
+ assertTrue("isDerived",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom58();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.xhtml
new file mode 100644
index 0000000..053553f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom58.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom58.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59-expected.txt
new file mode 100644
index 0000000..5e24398
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom59
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.js
new file mode 100644
index 0000000..e140ef8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom59";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom59() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom59") != null) return;
+ var doc;
+ var elemList;
+ var codeElem;
+ var attr;
+ var elem;
+ var elemName;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("code");
+ codeElem = elemList.item(0);
+ typeInfo = codeElem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","integer",4);
+ assertTrue("isDerived",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom59();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.xhtml
new file mode 100644
index 0000000..0b62eaf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom59.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom59.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60-expected.txt
new file mode 100644
index 0000000..13035a5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom60
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.js
new file mode 100644
index 0000000..f0a0798
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom60";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if xs:IDREFS is derived by list from xs:IDREF.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom60() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom60") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var attr;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("strong");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","IDREF",8);
+ assertTrue("isDerived",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom60();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.xhtml
new file mode 100644
index 0000000..6200b5a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom60.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom60.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61-expected.txt
new file mode 100644
index 0000000..e02174e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom61
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.js
new file mode 100644
index 0000000..0f5f3b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom61";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if xs:byte is derived by restriction from xs:short
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom61() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom61") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","short",1);
+ assertTrue("isDerived",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom61();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.xhtml
new file mode 100644
index 0000000..f6f4aac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom61.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom61.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62-expected.txt
new file mode 100644
index 0000000..3607159
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom62
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.js
new file mode 100644
index 0000000..56ae6ee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom62";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "typeinfo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check if xs:byte is derived by restriction from xs:decimal
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom62() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom62") != null) return;
+ var doc;
+ var elemList;
+ var elem;
+ var typeInfo;
+ var isDerived;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "typeinfo");
+ elemList = doc.getElementsByTagName("em");
+ elem = elemList.item(0);
+ typeInfo = elem.schemaTypeInfo;
+
+ assertNotNull("typeInfoNotNull",typeInfo);
+isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","decimal",1);
+ assertTrue("isDerived",isDerived);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom62();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.xhtml
new file mode 100644
index 0000000..50d00b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom62.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><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='typeinfoisderivedfrom62.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+ <body onload="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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63-expected.txt
new file mode 100644
index 0000000..2435b11
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom63
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.js
new file mode 100644
index 0000000..ddce59a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom63";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom63() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom63") != null) return;
+ var doc;
+ var elemList;
+ var acronymElem;
+ var retValue;
+ var typeNamespace;
+ var nullName = null;
+
+ var elemTypeInfo;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acronymElem = elemList.item(0);
+ elemTypeInfo = acronymElem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/TR/REC-xml",nullName,0);
+ assertFalse("typeinfoisderivedfrom63",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom63();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.xhtml
new file mode 100644
index 0000000..d2aec4c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom63.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom63.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64-expected.txt
new file mode 100644
index 0000000..11caa74
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom64
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.js
new file mode 100644
index 0000000..4c5f24e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom64";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Check that the simpleType of an attributes derives by restriction from itself
+and from its base type.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom64() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom64") != null) return;
+ var doc;
+ var docElem;
+ var elemList;
+ var acElem;
+ var classAttr;
+ var attrTypeInfo;
+ var typeName;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("acronym");
+ acElem = elemList.item(1);
+ classAttr = acElem.getAttributeNode("class");
+ attrTypeInfo = classAttr.schemaTypeInfo;
+
+ retValue = attrTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","classType",1);
+ assertTrue("derivedFromClassType",retValue);
+retValue = attrTypeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",1);
+ assertTrue("derivedFromString",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom64();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.xhtml
new file mode 100644
index 0000000..f9cadd7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom64.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom64.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65-expected.txt
new file mode 100644
index 0000000..d38dbcf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom65
+Status skip
+Message HTML loader does not support schemaValidating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.js
new file mode 100644
index 0000000..0c511a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom65";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom65() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom65") != null) return;
+ var doc;
+ var docElem;
+ var elemTypeInfo;
+ var elemList;
+ var strongElem;
+ var attrTypeInfo;
+ var typeName;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("strong");
+ strongElem = elemList.item(0);
+ elemTypeInfo = strongElem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",8);
+ assertTrue("lisrDerivedFromString",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom65();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.xhtml
new file mode 100644
index 0000000..ad01c30
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom65.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom65.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66-expected.txt
new file mode 100644
index 0000000..e095507
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom66
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.js
new file mode 100644
index 0000000..10882e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom66";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ 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.
+
+
+* @author IBM
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom66() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom66") != null) return;
+ var doc;
+ var unionElem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("em");
+ unionElem = elemList.item(0);
+ elemTypeInfo = unionElem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emp0004_5Type",0);
+ assertTrue("typeinfoisderivedfrom66",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom66();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.xhtml
new file mode 100644
index 0000000..04a0cff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom66.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom66.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67-expected.txt
new file mode 100644
index 0000000..f4788b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom67
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.js
new file mode 100644
index 0000000..11b2b53
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom67";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that isDerivedFrom(...,METHOD_UNION) returns true when there
+are multiple union derivation steps between the target and
+ancestor type.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom67() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom67") != null) return;
+ var doc;
+ var elem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("sup");
+ elem = elemList.item(0);
+ elemTypeInfo = elem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emp0004_5Type",4);
+ assertTrue("isDerived",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom67();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.xhtml
new file mode 100644
index 0000000..eaf4a61
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom67.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom67.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68-expected.txt
new file mode 100644
index 0000000..e0063be
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom68
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.js
new file mode 100644
index 0000000..42b04da
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom68";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that isDerivedFrom(...,0) returns true when there
+is more than one union derivation steps between the target and
+ancestor type.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom68() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom68") != null) return;
+ var doc;
+ var elem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("sup");
+ elem = elemList.item(0);
+ elemTypeInfo = elem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emp0004_5Type",0);
+ assertTrue("isDerived",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom68();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.xhtml
new file mode 100644
index 0000000..ae01d0e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom68.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom68.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69-expected.txt
new file mode 100644
index 0000000..a9ed8aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom69
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.js
new file mode 100644
index 0000000..31a6989
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom69";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom69() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom69") != null) return;
+ var doc;
+ var elem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("sup");
+ elem = elemList.item(0);
+ elemTypeInfo = elem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","integer",12);
+ assertFalse("isDerived",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom69();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.xhtml
new file mode 100644
index 0000000..46489fe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom69.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom69.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70-expected.txt
new file mode 100644
index 0000000..3932082
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom70
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.js
new file mode 100644
index 0000000..ad42903
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom70";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that isDerivedFrom(...,0) returns true when there
+is both a union and list derivation steps between the target and
+ancestor type.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom70() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom70") != null) return;
+ var doc;
+ var elem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("sup");
+ elem = elemList.item(0);
+ elemTypeInfo = elem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema","string",0);
+ assertTrue("isDerived",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom70();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.xhtml
new file mode 100644
index 0000000..9fd98d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom70.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom70.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71-expected.txt
new file mode 100644
index 0000000..a94dd94
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom71
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.js
new file mode 100644
index 0000000..d0f59c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom71";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that isDerivedFrom(...,0) returns true when target type is a list
+of an union of the ancestor type.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom71() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom71") != null) return;
+ var doc;
+ var elem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("code");
+ elem = elemList.item(0);
+ elemTypeInfo = elem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","field",0);
+ assertTrue("isDerived",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom71();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.xhtml
new file mode 100644
index 0000000..a24d3d9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom71.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom71.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72-expected.txt
new file mode 100644
index 0000000..fbbec66
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom72
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.js
new file mode 100644
index 0000000..9e2524b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom72";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that isDerivedFrom(...,DERIVATION_LIST|DERIVATION_UNION) returns false when target type is a list
+of an union.
+ancestor type.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom72() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom72") != null) return;
+ var doc;
+ var elem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("code");
+ elem = elemList.item(0);
+ elemTypeInfo = elem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","field",12);
+ assertFalse("isDerived",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom72();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.xhtml
new file mode 100644
index 0000000..4a58fe5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom72.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom72.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73-expected.txt b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73-expected.txt
new file mode 100644
index 0000000..61e4bd6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom73
+Status skip
+Message HTML loader does not support validating=true
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.js b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.js
new file mode 100644
index 0000000..13ad0aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.js
@@ -0,0 +1,116 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom73";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("schemaValidating", true);
+ setImplementationAttribute("validating", true);
+ setImplementationAttribute("namespaceAware", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+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.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#TypeInfo-isDerivedFrom
+*/
+function typeinfoisderivedfrom73() {
+ var success;
+ if(checkInitialization(builder, "typeinfoisderivedfrom73") != null) return;
+ var doc;
+ var elem;
+ var elemTypeInfo;
+ var typeName;
+ var elemList;
+ var retValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elemList = doc.getElementsByTagName("sup");
+ elem = elemList.item(0);
+ elemTypeInfo = elem.schemaTypeInfo;
+
+ retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml","emType",0);
+ assertTrue("isDerived",retValue);
+
+}
+
+
+
+
+function runTest() {
+ typeinfoisderivedfrom73();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.xhtml b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.xhtml
new file mode 100644
index 0000000..6e48f0b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/typeinfoisderivedfrom73.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 "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!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="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="typeinfoisderivedfrom73.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="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">&beta; Dallas, &gamma;
+ 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&alpha;" 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/LayoutTests/dom/xhtml/level3/core/userdatahandler01-expected.txt b/LayoutTests/dom/xhtml/level3/core/userdatahandler01-expected.txt
new file mode 100644
index 0000000..c4b9965
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler01
+Status error
+Message Line 119: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler01.js b/LayoutTests/dom/xhtml/level3/core/userdatahandler01.js
new file mode 100644
index 0000000..1a6968a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler01.js
@@ -0,0 +1,181 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//UserDataMonitor's require a document level variable named userDataMonitor
+var userDataMonitor;
+
+/**
+*
+Call setUserData on a node providing a UserDataHandler and rename the node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent
+*/
+function userdatahandler01() {
+ var success;
+ if(checkInitialization(builder, "userdatahandler01") != null) return;
+ var doc;
+ var node;
+ var pList;
+ userDataMonitor = new UserDataMonitor();
+
+ var oldUserData;
+ var elementNS;
+ var newNode;
+ var notifications = new Array();
+
+ var notification;
+ var operation;
+ var key;
+ var data;
+ var src;
+ var dst;
+ var greetingCount = 0;
+ var salutationCount = 0;
+ var hello = "Hello";
+ var mister = "Mr.";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ node = pList.item(0);
+ if (null == userDataMonitor) {
+ node.setUserData("greeting", hello, null);
+ } else {
+ node.setUserData("greeting", hello, userDataMonitor.handle);
+ }
+ if (null == userDataMonitor) {
+ node.setUserData("salutation", mister, null);
+ } else {
+ node.setUserData("salutation", mister, userDataMonitor.handle);
+ }
+ elementNS = node.namespaceURI;
+
+ newNode = doc.renameNode(node,elementNS,"div");
+ notifications = userDataMonitor.allNotifications;
+assertSize("twoNotifications",2,notifications);
+for(var indexN1009E = 0;indexN1009E < notifications.length; indexN1009E++) {
+ notification = notifications[indexN1009E];
+ operation = notification.operation;
+assertEquals("operationIsRename",4,operation);
+ key = notification.key;
+data = notification.data;
+
+ if(
+ ("greeting" == key)
+ ) {
+ assertEquals("greetingDataHello",hello,data);
+ greetingCount += 1;
+
+ }
+
+ else {
+ assertEquals("saluationKey","salutation",key);
+ assertEquals("salutationDataMr",mister,data);
+ salutationCount += 1;
+
+ }
+ src = notification.src;
+assertSame("srcIsNode",node,src);
+dst = notification.dst;
+
+ if(
+
+ (dst == null)
+
+ ) {
+ assertSame("ifDstNullRenameMustReuseNode",node,newNode);
+
+ }
+
+ else {
+ assertSame("dstIsNewNode",newNode,dst);
+
+ }
+
+ }
+ assertEquals("greetingCountIs1",1,greetingCount);
+ assertEquals("salutationCountIs1",1,salutationCount);
+
+}
+
+
+
+
+function runTest() {
+ userdatahandler01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler01.xhtml b/LayoutTests/dom/xhtml/level3/core/userdatahandler01.xhtml
new file mode 100644
index 0000000..3f2fc49
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler01.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='userdatahandler01.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler02-expected.txt b/LayoutTests/dom/xhtml/level3/core/userdatahandler02-expected.txt
new file mode 100644
index 0000000..26b925c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler02
+Status error
+Message Line 119: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler02.js b/LayoutTests/dom/xhtml/level3/core/userdatahandler02.js
new file mode 100644
index 0000000..b125a8f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler02.js
@@ -0,0 +1,168 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//UserDataMonitor's require a document level variable named userDataMonitor
+var userDataMonitor;
+
+/**
+*
+Call setUserData on a node providing a UserDataHandler and clone the node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent
+*/
+function userdatahandler02() {
+ var success;
+ if(checkInitialization(builder, "userdatahandler02") != null) return;
+ var doc;
+ var node;
+ var pList;
+ userDataMonitor = new UserDataMonitor();
+
+ var oldUserData;
+ var elementNS;
+ var newNode;
+ var notifications = new Array();
+
+ var notification;
+ var operation;
+ var key;
+ var data;
+ var src;
+ var dst;
+ var greetingCount = 0;
+ var salutationCount = 0;
+ var hello = "Hello";
+ var mister = "Mr.";
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ pList = doc.getElementsByTagName("p");
+ node = pList.item(0);
+ if (null == userDataMonitor) {
+ node.setUserData("greeting", hello, null);
+ } else {
+ node.setUserData("greeting", hello, userDataMonitor.handle);
+ }
+ if (null == userDataMonitor) {
+ node.setUserData("salutation", mister, null);
+ } else {
+ node.setUserData("salutation", mister, userDataMonitor.handle);
+ }
+ elementNS = node.namespaceURI;
+
+ newNode = node.cloneNode(true);
+ notifications = userDataMonitor.allNotifications;
+assertSize("twoNotifications",2,notifications);
+for(var indexN1009C = 0;indexN1009C < notifications.length; indexN1009C++) {
+ notification = notifications[indexN1009C];
+ operation = notification.operation;
+assertEquals("operationIsClone",1,operation);
+ key = notification.key;
+data = notification.data;
+
+ if(
+ ("greeting" == key)
+ ) {
+ assertEquals("greetingDataHello",hello,data);
+ greetingCount += 1;
+
+ }
+
+ else {
+ assertEquals("saluationKey","salutation",key);
+ assertEquals("salutationDataMr",mister,data);
+ salutationCount += 1;
+
+ }
+ src = notification.src;
+assertSame("srcIsNode",node,src);
+dst = notification.dst;
+assertSame("dstIsNewNode",newNode,dst);
+
+ }
+ assertEquals("greetingCountIs1",1,greetingCount);
+ assertEquals("salutationCountIs1",1,salutationCount);
+
+}
+
+
+
+
+function runTest() {
+ userdatahandler02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler02.xhtml b/LayoutTests/dom/xhtml/level3/core/userdatahandler02.xhtml
new file mode 100644
index 0000000..e2d0587
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler02.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='userdatahandler02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler03-expected.txt b/LayoutTests/dom/xhtml/level3/core/userdatahandler03-expected.txt
new file mode 100644
index 0000000..2726fee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler03
+Status error
+Message Line 134: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler03.js b/LayoutTests/dom/xhtml/level3/core/userdatahandler03.js
new file mode 100644
index 0000000..fdcb756
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler03.js
@@ -0,0 +1,183 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//UserDataMonitor's require a document level variable named userDataMonitor
+var userDataMonitor;
+
+/**
+*
+Call setUserData on a node providing a UserDataHandler and import the node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent
+*/
+function userdatahandler03() {
+ var success;
+ if(checkInitialization(builder, "userdatahandler03") != null) return;
+ var doc;
+ var node;
+ var pList;
+ userDataMonitor = new UserDataMonitor();
+
+ var oldUserData;
+ var elementNS;
+ var newNode;
+ var notifications = new Array();
+
+ var notification;
+ var operation;
+ var key;
+ var data;
+ var src;
+ var dst;
+ var greetingCount = 0;
+ var salutationCount = 0;
+ var hello = "Hello";
+ var mister = "Mr.";
+ var newDoc;
+ var rootName;
+ var rootNS;
+ var domImpl;
+ var docType = null;
+
+ var docElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ newDoc = domImpl.createDocument(rootNS,rootName,docType);
+ pList = doc.getElementsByTagName("p");
+ node = pList.item(0);
+ if (null == userDataMonitor) {
+ node.setUserData("greeting", hello, null);
+ } else {
+ node.setUserData("greeting", hello, userDataMonitor.handle);
+ }
+ if (null == userDataMonitor) {
+ node.setUserData("salutation", mister, null);
+ } else {
+ node.setUserData("salutation", mister, userDataMonitor.handle);
+ }
+ elementNS = node.namespaceURI;
+
+ newNode = doc.importNode(node,true);
+ notifications = userDataMonitor.allNotifications;
+assertSize("twoNotifications",2,notifications);
+for(var indexN100CE = 0;indexN100CE < notifications.length; indexN100CE++) {
+ notification = notifications[indexN100CE];
+ operation = notification.operation;
+assertEquals("operationIsImport",2,operation);
+ key = notification.key;
+data = notification.data;
+
+ if(
+ ("greeting" == key)
+ ) {
+ assertEquals("greetingDataHello",hello,data);
+ greetingCount += 1;
+
+ }
+
+ else {
+ assertEquals("saluationKey","salutation",key);
+ assertEquals("salutationDataMr",mister,data);
+ salutationCount += 1;
+
+ }
+ src = notification.src;
+assertSame("srcIsNode",node,src);
+dst = notification.dst;
+assertSame("dstIsNewNode",newNode,dst);
+
+ }
+ assertEquals("greetingCountIs1",1,greetingCount);
+ assertEquals("salutationCountIs1",1,salutationCount);
+
+}
+
+
+
+
+function runTest() {
+ userdatahandler03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler03.xhtml b/LayoutTests/dom/xhtml/level3/core/userdatahandler03.xhtml
new file mode 100644
index 0000000..93022ec
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler03.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='userdatahandler03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler04-expected.txt b/LayoutTests/dom/xhtml/level3/core/userdatahandler04-expected.txt
new file mode 100644
index 0000000..72de39a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler04
+Status error
+Message Line 134: TypeError
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler04.js b/LayoutTests/dom/xhtml/level3/core/userdatahandler04.js
new file mode 100644
index 0000000..6f404df
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler04.js
@@ -0,0 +1,183 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "barfoo");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//UserDataMonitor's require a document level variable named userDataMonitor
+var userDataMonitor;
+
+/**
+*
+Call setUserData on a node providing a UserDataHandler and adopt the node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-handleUserDataEvent
+*/
+function userdatahandler04() {
+ var success;
+ if(checkInitialization(builder, "userdatahandler04") != null) return;
+ var doc;
+ var node;
+ var pList;
+ userDataMonitor = new UserDataMonitor();
+
+ var oldUserData;
+ var elementNS;
+ var newNode;
+ var notifications = new Array();
+
+ var notification;
+ var operation;
+ var key;
+ var data;
+ var src;
+ var dst;
+ var greetingCount = 0;
+ var salutationCount = 0;
+ var hello = "Hello";
+ var mister = "Mr.";
+ var newDoc;
+ var rootName;
+ var rootNS;
+ var domImpl;
+ var docType = null;
+
+ var docElem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "barfoo");
+ domImpl = doc.implementation;
+docElem = doc.documentElement;
+
+ rootNS = docElem.namespaceURI;
+
+ rootName = docElem.tagName;
+
+ newDoc = domImpl.createDocument(rootNS,rootName,docType);
+ pList = doc.getElementsByTagName("p");
+ node = pList.item(0);
+ if (null == userDataMonitor) {
+ node.setUserData("greeting", hello, null);
+ } else {
+ node.setUserData("greeting", hello, userDataMonitor.handle);
+ }
+ if (null == userDataMonitor) {
+ node.setUserData("salutation", mister, null);
+ } else {
+ node.setUserData("salutation", mister, userDataMonitor.handle);
+ }
+ elementNS = node.namespaceURI;
+
+ newNode = doc.adoptNode(node);
+ notifications = userDataMonitor.allNotifications;
+assertSize("twoNotifications",2,notifications);
+for(var indexN100CD = 0;indexN100CD < notifications.length; indexN100CD++) {
+ notification = notifications[indexN100CD];
+ operation = notification.operation;
+assertEquals("operationIsImport",5,operation);
+ key = notification.key;
+data = notification.data;
+
+ if(
+ ("greeting" == key)
+ ) {
+ assertEquals("greetingDataHello",hello,data);
+ greetingCount += 1;
+
+ }
+
+ else {
+ assertEquals("saluationKey","salutation",key);
+ assertEquals("salutationDataMr",mister,data);
+ salutationCount += 1;
+
+ }
+ src = notification.src;
+assertSame("srcIsNode",node,src);
+dst = notification.dst;
+assertNull("dstIsNull",dst);
+
+ }
+ assertEquals("greetingCountIs1",1,greetingCount);
+ assertEquals("salutationCountIs1",1,salutationCount);
+
+}
+
+
+
+
+function runTest() {
+ userdatahandler04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/userdatahandler04.xhtml b/LayoutTests/dom/xhtml/level3/core/userdatahandler04.xhtml
new file mode 100644
index 0000000..cf36d7f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/userdatahandler04.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>
+<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='userdatahandler04.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
+<body onload="loadComplete()">
+<p>bar</p>
+</body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed01-expected.txt b/LayoutTests/dom/xhtml/level3/core/wellformed01-expected.txt
new file mode 100644
index 0000000..3f1d8a4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed01
+Status error
+Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed01.js b/LayoutTests/dom/xhtml/level3/core/wellformed01.js
new file mode 100644
index 0000000..25ddbe1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed01.js
@@ -0,0 +1,166 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Create a document with an XML 1.1 valid but XML 1.0 invalid element and
+normalize document with well-formed set to true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed
+*/
+function wellformed01() {
+ var success;
+ if(checkInitialization(builder, "wellformed01") != null) return;
+ var domImpl;
+ var nullString = null;
+
+ var nullDoctype = null;
+
+ var doc;
+ var elem;
+ var retval;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var severity;
+ var type;
+ var locator;
+ var relatedNode;
+ domImpl = getImplementation();
+doc = domImpl.createDocument(nullString,nullString,nullDoctype);
+
+ {
+ success = false;
+ try {
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed01","LegalNameࢎ");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("xml10InvalidName",success);
+ }
+
+ try {
+ doc.xmlVersion = "1.1";
+
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed01","LegalNameࢎ");
+ retval = doc.appendChild(elem);
+ doc.xmlVersion = "1.0";
+
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("well-formed", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100A9 = 0;indexN100A9 < errors.length; indexN100A9++) {
+ error = errors[indexN100A9];
+ severity = error.severity;
+
+ assertEquals("severity",2,severity);
+ type = error.type;
+
+ assertEquals("type","wf-invalid-character-in-node-name",type);
+ locator = error.location;
+
+ relatedNode = locator.relatedNode;
+
+ assertSame("relatedNode",elem,relatedNode);
+
+ }
+ assertSize("oneError",1,errors);
+
+}
+
+
+
+
+function runTest() {
+ wellformed01();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed01.xhtml b/LayoutTests/dom/xhtml/level3/core/wellformed01.xhtml
new file mode 100644
index 0000000..a4e317d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed01.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='wellformed01.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed02-expected.txt b/LayoutTests/dom/xhtml/level3/core/wellformed02-expected.txt
new file mode 100644
index 0000000..f475595
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed02
+Status error
+Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed02.js b/LayoutTests/dom/xhtml/level3/core/wellformed02.js
new file mode 100644
index 0000000..9212677
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed02.js
@@ -0,0 +1,154 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Create a document with an XML 1.1 valid but XML 1.0 invalid element and
+normalize document with well-formed set to false.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed
+*/
+function wellformed02() {
+ var success;
+ if(checkInitialization(builder, "wellformed02") != null) return;
+ var domImpl;
+ var nullString = null;
+
+ var nullDoctype = null;
+
+ var doc;
+ var elem;
+ var retval;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var canSet;
+ domImpl = getImplementation();
+doc = domImpl.createDocument(nullString,nullString,nullDoctype);
+
+ {
+ success = false;
+ try {
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed02","LegalNameࢎ");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("xml10InvalidName",success);
+ }
+
+ try {
+ doc.xmlVersion = "1.1";
+
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ elem = doc.createElementNS("http://www.example.org/domts/wellformed02","LegalNameࢎ");
+ retval = doc.appendChild(elem);
+ doc.xmlVersion = "1.0";
+
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("well-formed",false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("well-formed", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+assertSize("noError",0,errors);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ wellformed02();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed02.xhtml b/LayoutTests/dom/xhtml/level3/core/wellformed02.xhtml
new file mode 100644
index 0000000..34b28de
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed02.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='wellformed02.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed03-expected.txt b/LayoutTests/dom/xhtml/level3/core/wellformed03-expected.txt
new file mode 100644
index 0000000..8533c15
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed03
+Status error
+Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed03.js b/LayoutTests/dom/xhtml/level3/core/wellformed03.js
new file mode 100644
index 0000000..d016f84
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed03.js
@@ -0,0 +1,167 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Create a document with an XML 1.1 valid but XML 1.0 invalid attribute and
+normalize document with well-formed set to true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed
+*/
+function wellformed03() {
+ var success;
+ if(checkInitialization(builder, "wellformed03") != null) return;
+ var domImpl;
+ var nullDoctype = null;
+
+ var doc;
+ var docElem;
+ var attr;
+ var retval;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var severity;
+ var type;
+ var locator;
+ var relatedNode;
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDoctype);
+ docElem = doc.documentElement;
+
+
+ {
+ success = false;
+ try {
+ attr = doc.createAttribute("LegalNameࢎ");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("xml10InvalidName",success);
+ }
+
+ try {
+ doc.xmlVersion = "1.1";
+
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ docElem.setAttribute("LegalNameࢎ","foo");
+ attr = docElem.getAttributeNode("LegalNameࢎ");
+ doc.xmlVersion = "1.0";
+
+ domConfig = doc.domConfig;
+
+ domConfig.setParameter("well-formed", true);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100AA = 0;indexN100AA < errors.length; indexN100AA++) {
+ error = errors[indexN100AA];
+ severity = error.severity;
+
+ assertEquals("severity",2,severity);
+ type = error.type;
+
+ assertEquals("type","wf-invalid-character-in-node-name",type);
+ locator = error.location;
+
+ relatedNode = locator.relatedNode;
+
+ assertSame("relatedNode",attr,relatedNode);
+
+ }
+ assertSize("oneError",1,errors);
+
+}
+
+
+
+
+function runTest() {
+ wellformed03();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed03.xhtml b/LayoutTests/dom/xhtml/level3/core/wellformed03.xhtml
new file mode 100644
index 0000000..2d4e74b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed03.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='wellformed03.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed04-expected.txt b/LayoutTests/dom/xhtml/level3/core/wellformed04-expected.txt
new file mode 100644
index 0000000..d2a8f9d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed04
+Status error
+Message Error: INVALID_CHARACTER_ERR: DOM Exception 5
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed04.js b/LayoutTests/dom/xhtml/level3/core/wellformed04.js
new file mode 100644
index 0000000..79bf2a7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed04.js
@@ -0,0 +1,161 @@
+
+/*
+Copyright © 2001-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® 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
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+//DOMErrorMonitor's require a document level variable named errorMonitor
+var errorMonitor;
+
+/**
+*
+Create a document with an XML 1.1 valid but XML 1.0 invalid attribute and
+normalize document with well-formed set to false.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-well-formed
+*/
+function wellformed04() {
+ var success;
+ if(checkInitialization(builder, "wellformed04") != null) return;
+ var domImpl;
+ var nullDoctype = null;
+
+ var doc;
+ var docElem;
+ var attr;
+ var retval;
+ var domConfig;
+ errorMonitor = new DOMErrorMonitor();
+
+ var errors = new Array();
+
+ var error;
+ var canSet;
+ var nullNS = null;
+
+ domImpl = getImplementation();
+doc = domImpl.createDocument("http://www.w3.org/1999/xhtml","html",nullDoctype);
+ docElem = doc.documentElement;
+
+
+ {
+ success = false;
+ try {
+ attr = doc.createAttributeNS(nullNS,"LegalNameࢎ");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("xml10InvalidName",success);
+ }
+
+ try {
+ doc.xmlVersion = "1.1";
+
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* NOT_SUPPORTED_ERR */ 9 :
+ return ;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+ docElem.setAttributeNS(nullNS,"LegalNameࢎ","foo");
+ doc.xmlVersion = "1.0";
+
+ domConfig = doc.domConfig;
+
+ canSet = domConfig.canSetParameter("well-formed",false);
+
+ if(
+ canSet
+ ) {
+ domConfig.setParameter("well-formed", false);
+ domConfig.setParameter("error-handler", errorMonitor.handleError);
+ doc.normalizeDocument();
+ errors = errorMonitor.allErrors;
+for(var indexN100AA = 0;indexN100AA < errors.length; indexN100AA++) {
+ error = errors[indexN100AA];
+ assertNull("noErrorsExpected",error);
+
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ wellformed04();
+}
diff --git a/LayoutTests/dom/xhtml/level3/core/wellformed04.xhtml b/LayoutTests/dom/xhtml/level3/core/wellformed04.xhtml
new file mode 100644
index 0000000..02f29e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/wellformed04.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<!--
+Copyright(c) 2001-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
+-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>implementation</title>
+ <script type='text/javascript' src='selfxhtml.js'></script>
+ <script type='text/javascript' charset='UTF-8' src='wellformed04.js'></script>
+ <script type='text/javascript'>function loadComplete() { startTest(); }</script>
+ </head>
+ <body onload="loadComplete()">
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level3/core/xhtml-lat1.ent b/LayoutTests/dom/xhtml/level3/core/xhtml-lat1.ent
new file mode 100644
index 0000000..ffee223
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/xhtml-lat1.ent
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+ %HTMLlat1;
+-->
+
+<!ENTITY nbsp "&#160;"> <!-- no-break space = non-breaking space,
+ U+00A0 ISOnum -->
+<!ENTITY iexcl "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+ U+00A6 ISOnum -->
+<!ENTITY sect "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml "&#168;"> <!-- diaeresis = spacing diaeresis,
+ U+00A8 ISOdia -->
+<!ENTITY copy "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo "&#171;"> <!-- left-pointing double angle quotation mark
+ = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not "&#172;"> <!-- not sign = angled dash,
+ U+00AC ISOnum -->
+<!ENTITY shy "&#173;"> <!-- soft hyphen = discretionary hyphen,
+ U+00AD ISOnum -->
+<!ENTITY reg "&#174;"> <!-- registered sign = registered trade mark sign,
+ U+00AE ISOnum -->
+<!ENTITY macr "&#175;"> <!-- macron = spacing macron = overline
+ = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+ U+00B1 ISOnum -->
+<!ENTITY sup2 "&#178;"> <!-- superscript two = superscript digit two
+ = squared, U+00B2 ISOnum -->
+<!ENTITY sup3 "&#179;"> <!-- superscript three = superscript digit three
+ = cubed, U+00B3 ISOnum -->
+<!ENTITY acute "&#180;"> <!-- acute accent = spacing acute,
+ U+00B4 ISOdia -->
+<!ENTITY micro "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para "&#182;"> <!-- pilcrow sign = paragraph sign,
+ U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+ = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1 "&#185;"> <!-- superscript one = superscript digit one,
+ U+00B9 ISOnum -->
+<!ENTITY ordm "&#186;"> <!-- masculine ordinal indicator,
+ U+00BA ISOnum -->
+<!ENTITY raquo "&#187;"> <!-- right-pointing double angle quotation mark
+ = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+ = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+ = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+ = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+ = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+ = latin capital letter A grave,
+ U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+ U+00C1 ISOlat1 -->
+<!ENTITY Acirc "&#194;"> <!-- latin capital letter A with circumflex,
+ U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+ U+00C3 ISOlat1 -->
+<!ENTITY Auml "&#196;"> <!-- latin capital letter A with diaeresis,
+ U+00C4 ISOlat1 -->
+<!ENTITY Aring "&#197;"> <!-- latin capital letter A with ring above
+ = latin capital letter A ring,
+ U+00C5 ISOlat1 -->
+<!ENTITY AElig "&#198;"> <!-- latin capital letter AE
+ = latin capital ligature AE,
+ U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+ U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+ U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+ U+00C9 ISOlat1 -->
+<!ENTITY Ecirc "&#202;"> <!-- latin capital letter E with circumflex,
+ U+00CA ISOlat1 -->
+<!ENTITY Euml "&#203;"> <!-- latin capital letter E with diaeresis,
+ U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+ U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+ U+00CD ISOlat1 -->
+<!ENTITY Icirc "&#206;"> <!-- latin capital letter I with circumflex,
+ U+00CE ISOlat1 -->
+<!ENTITY Iuml "&#207;"> <!-- latin capital letter I with diaeresis,
+ U+00CF ISOlat1 -->
+<!ENTITY ETH "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+ U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+ U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+ U+00D3 ISOlat1 -->
+<!ENTITY Ocirc "&#212;"> <!-- latin capital letter O with circumflex,
+ U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+ U+00D5 ISOlat1 -->
+<!ENTITY Ouml "&#214;"> <!-- latin capital letter O with diaeresis,
+ U+00D6 ISOlat1 -->
+<!ENTITY times "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+ = latin capital letter O slash,
+ U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+ U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+ U+00DA ISOlat1 -->
+<!ENTITY Ucirc "&#219;"> <!-- latin capital letter U with circumflex,
+ U+00DB ISOlat1 -->
+<!ENTITY Uuml "&#220;"> <!-- latin capital letter U with diaeresis,
+ U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+ U+00DD ISOlat1 -->
+<!ENTITY THORN "&#222;"> <!-- latin capital letter THORN,
+ U+00DE ISOlat1 -->
+<!ENTITY szlig "&#223;"> <!-- latin small letter sharp s = ess-zed,
+ U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+ = latin small letter a grave,
+ U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+ U+00E1 ISOlat1 -->
+<!ENTITY acirc "&#226;"> <!-- latin small letter a with circumflex,
+ U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+ U+00E3 ISOlat1 -->
+<!ENTITY auml "&#228;"> <!-- latin small letter a with diaeresis,
+ U+00E4 ISOlat1 -->
+<!ENTITY aring "&#229;"> <!-- latin small letter a with ring above
+ = latin small letter a ring,
+ U+00E5 ISOlat1 -->
+<!ENTITY aelig "&#230;"> <!-- latin small letter ae
+ = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+ U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+ U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+ U+00E9 ISOlat1 -->
+<!ENTITY ecirc "&#234;"> <!-- latin small letter e with circumflex,
+ U+00EA ISOlat1 -->
+<!ENTITY euml "&#235;"> <!-- latin small letter e with diaeresis,
+ U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+ U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+ U+00ED ISOlat1 -->
+<!ENTITY icirc "&#238;"> <!-- latin small letter i with circumflex,
+ U+00EE ISOlat1 -->
+<!ENTITY iuml "&#239;"> <!-- latin small letter i with diaeresis,
+ U+00EF ISOlat1 -->
+<!ENTITY eth "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+ U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+ U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+ U+00F3 ISOlat1 -->
+<!ENTITY ocirc "&#244;"> <!-- latin small letter o with circumflex,
+ U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+ U+00F5 ISOlat1 -->
+<!ENTITY ouml "&#246;"> <!-- latin small letter o with diaeresis,
+ U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+ = latin small letter o slash,
+ U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+ U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+ U+00FA ISOlat1 -->
+<!ENTITY ucirc "&#251;"> <!-- latin small letter u with circumflex,
+ U+00FB ISOlat1 -->
+<!ENTITY uuml "&#252;"> <!-- latin small letter u with diaeresis,
+ U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+ U+00FD ISOlat1 -->
+<!ENTITY thorn "&#254;"> <!-- latin small letter thorn,
+ U+00FE ISOlat1 -->
+<!ENTITY yuml "&#255;"> <!-- latin small letter y with diaeresis,
+ U+00FF ISOlat1 -->
diff --git a/LayoutTests/dom/xhtml/level3/core/xhtml-special.ent b/LayoutTests/dom/xhtml/level3/core/xhtml-special.ent
new file mode 100644
index 0000000..ca358b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/xhtml-special.ent
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+ %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot "&#34;"> <!-- quotation mark, U+0022 ISOnum -->
+<!ENTITY amp "&#38;#38;"> <!-- ampersand, U+0026 ISOnum -->
+<!ENTITY lt "&#38;#60;"> <!-- less-than sign, U+003C ISOnum -->
+<!ENTITY gt "&#62;"> <!-- greater-than sign, U+003E ISOnum -->
+<!ENTITY apos "&#39;"> <!-- apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig "&#338;"> <!-- latin capital ligature OE,
+ U+0152 ISOlat2 -->
+<!ENTITY oelig "&#339;"> <!-- latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron "&#352;"> <!-- latin capital letter S with caron,
+ U+0160 ISOlat2 -->
+<!ENTITY scaron "&#353;"> <!-- latin small letter s with caron,
+ U+0161 ISOlat2 -->
+<!ENTITY Yuml "&#376;"> <!-- latin capital letter Y with diaeresis,
+ U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ "&#710;"> <!-- modifier letter circumflex accent,
+ U+02C6 ISOpub -->
+<!ENTITY tilde "&#732;"> <!-- small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj "&#8204;"> <!-- zero width non-joiner,
+ U+200C NEW RFC 2070 -->
+<!ENTITY zwj "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo "&#8216;"> <!-- left single quotation mark,
+ U+2018 ISOnum -->
+<!ENTITY rsquo "&#8217;"> <!-- right single quotation mark,
+ U+2019 ISOnum -->
+<!ENTITY sbquo "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo "&#8220;"> <!-- left double quotation mark,
+ U+201C ISOnum -->
+<!ENTITY rdquo "&#8221;"> <!-- right double quotation mark,
+ U+201D ISOnum -->
+<!ENTITY bdquo "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo "&#8249;"> <!-- single left-pointing angle quotation mark,
+ U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo "&#8250;"> <!-- single right-pointing angle quotation mark,
+ U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro "&#8364;"> <!-- euro sign, U+20AC NEW -->
diff --git a/LayoutTests/dom/xhtml/level3/core/xhtml-symbol.ent b/LayoutTests/dom/xhtml/level3/core/xhtml-symbol.ent
new file mode 100644
index 0000000..63c2abf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/xhtml-symbol.ent
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+ %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof "&#402;"> <!-- latin small letter f with hook = function
+ = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma "&#915;"> <!-- greek capital letter gamma,
+ U+0393 ISOgrk3 -->
+<!ENTITY Delta "&#916;"> <!-- greek capital letter delta,
+ U+0394 ISOgrk3 -->
+<!ENTITY Epsilon "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta "&#920;"> <!-- greek capital letter theta,
+ U+0398 ISOgrk3 -->
+<!ENTITY Iota "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda "&#923;"> <!-- greek capital letter lamda,
+ U+039B ISOgrk3 -->
+<!ENTITY Mu "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma "&#931;"> <!-- greek capital letter sigma,
+ U+03A3 ISOgrk3 -->
+<!ENTITY Tau "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon "&#933;"> <!-- greek capital letter upsilon,
+ U+03A5 ISOgrk3 -->
+<!ENTITY Phi "&#934;"> <!-- greek capital letter phi,
+ U+03A6 ISOgrk3 -->
+<!ENTITY Chi "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi "&#936;"> <!-- greek capital letter psi,
+ U+03A8 ISOgrk3 -->
+<!ENTITY Omega "&#937;"> <!-- greek capital letter omega,
+ U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha "&#945;"> <!-- greek small letter alpha,
+ U+03B1 ISOgrk3 -->
+<!ENTITY beta "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma "&#947;"> <!-- greek small letter gamma,
+ U+03B3 ISOgrk3 -->
+<!ENTITY delta "&#948;"> <!-- greek small letter delta,
+ U+03B4 ISOgrk3 -->
+<!ENTITY epsilon "&#949;"> <!-- greek small letter epsilon,
+ U+03B5 ISOgrk3 -->
+<!ENTITY zeta "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta "&#952;"> <!-- greek small letter theta,
+ U+03B8 ISOgrk3 -->
+<!ENTITY iota "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa "&#954;"> <!-- greek small letter kappa,
+ U+03BA ISOgrk3 -->
+<!ENTITY lambda "&#955;"> <!-- greek small letter lamda,
+ U+03BB ISOgrk3 -->
+<!ENTITY mu "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf "&#962;"> <!-- greek small letter final sigma,
+ U+03C2 ISOgrk3 -->
+<!ENTITY sigma "&#963;"> <!-- greek small letter sigma,
+ U+03C3 ISOgrk3 -->
+<!ENTITY tau "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon "&#965;"> <!-- greek small letter upsilon,
+ U+03C5 ISOgrk3 -->
+<!ENTITY phi "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega "&#969;"> <!-- greek small letter omega,
+ U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
+ U+03D1 NEW -->
+<!ENTITY upsih "&#978;"> <!-- greek upsilon with hook symbol,
+ U+03D2 NEW -->
+<!ENTITY piv "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull "&#8226;"> <!-- bullet = black small circle,
+ U+2022 ISOpub -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+ U+2026 ISOpub -->
+<!ENTITY prime "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime "&#8243;"> <!-- double prime = seconds = inches,
+ U+2033 ISOtech -->
+<!ENTITY oline "&#8254;"> <!-- overline = spacing overscore,
+ U+203E NEW -->
+<!ENTITY frasl "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp "&#8472;"> <!-- script capital P = power set
+ = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image "&#8465;"> <!-- black-letter capital I = imaginary part,
+ U+2111 ISOamso -->
+<!ENTITY real "&#8476;"> <!-- black-letter capital R = real part symbol,
+ U+211C ISOamso -->
+<!ENTITY trade "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+ U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+ U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr "&#8629;"> <!-- downwards arrow with corner leftwards
+ = carriage return, U+21B5 NEW -->
+<!ENTITY lArr "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+ but also does not have any other character for that function. So lArr can
+ be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr "&#8658;"> <!-- rightwards double arrow,
+ U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have
+ another character with this function so rArr can be used for 'implies'
+ as ISOtech suggests -->
+<!ENTITY dArr "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr "&#8660;"> <!-- left right double arrow,
+ U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part "&#8706;"> <!-- partial differential, U+2202 ISOtech -->
+<!ENTITY exist "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla "&#8711;"> <!-- nabla = backward difference,
+ U+2207 ISOtech -->
+<!ENTITY isin "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod "&#8719;"> <!-- n-ary product = product sign,
+ U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+ the same glyph might be used for both -->
+<!ENTITY sum "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+ though the same glyph might be used for both -->
+<!ENTITY minus "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic "&#8730;"> <!-- square root = radical sign,
+ U+221A ISOtech -->
+<!ENTITY prop "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4 "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim "&#8764;"> <!-- tilde operator = varies with = similar to,
+ U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+ although the same glyph might be used to represent both -->
+<!ENTITY cong "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp "&#8776;"> <!-- almost equal to = asymptotic to,
+ U+2248 ISOamsr -->
+<!ENTITY ne "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge "&#8805;"> <!-- greater-than or equal to,
+ U+2265 ISOtech -->
+<!ENTITY sub "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe "&#8839;"> <!-- superset of or equal to,
+ U+2287 ISOtech -->
+<!ENTITY oplus "&#8853;"> <!-- circled plus = direct sum,
+ U+2295 ISOamsb -->
+<!ENTITY otimes "&#8855;"> <!-- circled times = vector product,
+ U+2297 ISOamsb -->
+<!ENTITY perp "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+ U+22A5 ISOtech -->
+<!ENTITY sdot "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil "&#8968;"> <!-- left ceiling = APL upstile,
+ U+2308 ISOamsc -->
+<!ENTITY rceil "&#8969;"> <!-- right ceiling, U+2309 ISOamsc -->
+<!ENTITY lfloor "&#8970;"> <!-- left floor = APL downstile,
+ U+230A ISOamsc -->
+<!ENTITY rfloor "&#8971;"> <!-- right floor, U+230B ISOamsc -->
+<!ENTITY lang "&#9001;"> <!-- left-pointing angle bracket = bra,
+ U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign'
+ or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang "&#9002;"> <!-- right-pointing angle bracket = ket,
+ U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign'
+ or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs "&#9827;"> <!-- black club suit = shamrock,
+ U+2663 ISOpub -->
+<!ENTITY hearts "&#9829;"> <!-- black heart suit = valentine,
+ U+2665 ISOpub -->
+<!ENTITY diams "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/LayoutTests/dom/xhtml/level3/core/xhtml1-frameset.dtd b/LayoutTests/dom/xhtml/level3/core/xhtml1-frameset.dtd
new file mode 100644
index 0000000..7b4098f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/xhtml1-frameset.dtd
@@ -0,0 +1,1235 @@
+<!--
+ Extensible HTML version 1.0 Frameset DTD
+
+ This is the same as HTML 4 Frameset except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
+
+ $Revision: 10628 $
+ $Date: 2005-09-26 16:39:51 -0700 (Mon, 26 Sep 2005) $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+ <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % MultiLengths "CDATA">
+ <!-- comma-separated list of MultiLength -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+ Black = #000000 Green = #008000
+ Silver = #C0C0C0 Lime = #00FF00
+ Gray = #808080 Olive = #808000
+ White = #FFFFFF Yellow = #FFFF00
+ Maroon = #800000 Navy = #000080
+ Red = #FF0000 Blue = #0000FF
+ Purple = #800080 Teal = #008080
+ Fuchsia= #FF00FF Aqua = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+ align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.extra
+ "object | applet | img | map | iframe">
+
+<!ENTITY % special.basic
+ "br | span | bdo">
+
+<!ENTITY % special
+ "%special.basic; | %special.extra;">
+
+<!ENTITY % fontstyle.extra "big | small | font | basefont">
+
+<!ENTITY % fontstyle.basic "tt | i | b | u
+ | s | strike ">
+
+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
+
+<!ENTITY % phrase.extra "sub | sup">
+<!ENTITY % phrase.basic "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | isindex | fieldset | table">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+ sub, sup, font, or basefont -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
+ %inline.forms; | %misc.inline;)*">
+
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | br | span | bdo | object | applet | img | map |
+ %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, frameset)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ id ID #IMPLIED
+ href %URI; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ language CDATA #IMPLIED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--======================= Frames =======================================-->
+
+<!-- only one noframes element permitted per document -->
+
+<!ELEMENT frameset (frameset|frame|noframes)*>
+<!ATTLIST frameset
+ %coreattrs;
+ rows %MultiLengths; #IMPLIED
+ cols %MultiLengths; #IMPLIED
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ >
+
+<!-- reserved frame names start with "_" otherwise starts with letter -->
+
+<!-- tiled window within frameset -->
+
+<!ELEMENT frame EMPTY>
+<!ATTLIST frame
+ %coreattrs;
+ longdesc %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ src %URI; #IMPLIED
+ frameborder (1|0) "1"
+ marginwidth %Pixels; #IMPLIED
+ marginheight %Pixels; #IMPLIED
+ noresize (noresize) #IMPLIED
+ scrolling (yes|no|auto) "auto"
+ >
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+ %coreattrs;
+ longdesc %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ src %URI; #IMPLIED
+ frameborder (1|0) "1"
+ marginwidth %Pixels; #IMPLIED
+ marginheight %Pixels; #IMPLIED
+ scrolling (yes|no|auto) "auto"
+ align %ImgAlign; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes (body)>
+<!ATTLIST noframes
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ background %URI; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ text %Color; #IMPLIED
+ link %Color; #IMPLIED
+ vlink %Color; #IMPLIED
+ alink %Color; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ type %ULStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ >
+
+<!-- Ordered list numbering style
+
+ 1 arabic numbers 1, 2, 3, ...
+ a lower alpha a, b, c, ...
+ A upper alpha A, B, C, ...
+ i lower roman i, ii, iii, ...
+ I upper roman I, II, III, ...
+
+ The style is applied to the sequence number which by default
+ is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ type %OLStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ start %Number; #IMPLIED
+ >
+
+<!-- single column list (DEPRECATED) -->
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- multiple column list (DEPRECATED) -->
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ type %LIStyle; #IMPLIED
+ value %Number; #IMPLIED
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ align (left|center|right) #IMPLIED
+ noshade (noshade) #IMPLIED
+ size %Pixels; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding
+ "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ width %Number; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+ %attrs;
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ clear (left|all|right|none) "none"
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;> <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;> <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;> <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY> <!-- base font size -->
+<!ATTLIST basefont
+ id ID #IMPLIED
+ size CDATA #REQUIRED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+ %coreattrs;
+ %i18n;
+ size CDATA #IMPLIED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form |%inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Pixels; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #REQUIRED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Java applet ==================================-->
+<!--
+ One of code or object attributes must be present.
+ Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+ %coreattrs;
+ codebase %URI; #IMPLIED
+ archive CDATA #IMPLIED
+ code CDATA #IMPLIED
+ object CDATA #IMPLIED
+ alt %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ width %Length; #REQUIRED
+ height %Length; #REQUIRED
+ align %ImgAlign; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ name NMTOKEN #IMPLIED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Pixels; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ name NMTOKEN #IMPLIED
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ align %LAlign; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+ %coreattrs;
+ %i18n;
+ prompt %Text; #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=":"
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ align %TAlign; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+ %attrs;
+ align %CAlign; #IMPLIED
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ bgcolor %Color; #IMPLIED
+ >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Pixels; #IMPLIED
+ height %Pixels; #IMPLIED
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Pixels; #IMPLIED
+ height %Pixels; #IMPLIED
+ >
+
diff --git a/LayoutTests/dom/xhtml/level3/core/xhtml1-strict.dtd b/LayoutTests/dom/xhtml/level3/core/xhtml1-strict.dtd
new file mode 100644
index 0000000..42f75b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/xhtml1-strict.dtd
@@ -0,0 +1,978 @@
+<!--
+ Extensible HTML version 1.0 Strict DTD
+
+ This is the same as HTML 4 Strict except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+
+ $Revision: 10628 $
+ $Date: 2005-09-26 16:39:51 -0700 (Mon, 26 Sep 2005) $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.pre
+ "br | span | bdo | map">
+
+
+<!ENTITY % special
+ "%special.pre; | object | img ">
+
+<!ENTITY % fontstyle "tt | i | b | big | small ">
+
+<!ENTITY % phrase "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym | sub | sup ">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl">
+<!ENTITY % blocktext "pre | hr | blockquote | address">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding big, small, sup or sup -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;
+ | %inline.forms;)*">
+
+<!-- form uses %Block; excluding form -->
+
+<!ENTITY % form.content "(%block; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form and form controls -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | %special; | %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ href %URI; #REQUIRED
+ id ID #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Block;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Block;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ >
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ >
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Block;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+ Note that in this DTD there is no name attribute. That
+ is only available in the transitional and frameset DTD.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form and form controls
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ >
+
+<!ATTLIST caption
+ %attrs;
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
diff --git a/LayoutTests/dom/xhtml/level3/core/xhtml1-transitional.dtd b/LayoutTests/dom/xhtml/level3/core/xhtml1-transitional.dtd
new file mode 100644
index 0000000..d2d9fd7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level3/core/xhtml1-transitional.dtd
@@ -0,0 +1,1201 @@
+<!--
+ Extensible HTML version 1.0 Transitional DTD
+
+ This is the same as HTML 4 Transitional except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+ $Revision: 10628 $
+ $Date: 2005-09-26 16:39:51 -0700 (Mon, 26 Sep 2005) $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+ <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+ Black = #000000 Green = #008000
+ Silver = #C0C0C0 Lime = #00FF00
+ Gray = #808080 Olive = #808000
+ White = #FFFFFF Yellow = #FFFF00
+ Maroon = #800000 Navy = #000080
+ Red = #FF0000 Blue = #0000FF
+ Purple = #800080 Teal = #008080
+ Fuchsia= #FF00FF Aqua = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+ align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.extra
+ "object | applet | img | map | iframe">
+
+<!ENTITY % special.basic
+ "br | span | bdo">
+
+<!ENTITY % special
+ "%special.basic; | %special.extra;">
+
+<!ENTITY % fontstyle.extra "big | small | font | basefont">
+
+<!ENTITY % fontstyle.basic "tt | i | b | u
+ | s | strike ">
+
+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
+
+<!ENTITY % phrase.extra "sub | sup">
+<!ENTITY % phrase.basic "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+ font, or basefont -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
+ %inline.forms; | %misc.inline;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | br | span | bdo | object | applet | img | map |
+ %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ id ID #IMPLIED
+ href %URI; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ language CDATA #IMPLIED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--======================= Frames =======================================-->
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+ %coreattrs;
+ longdesc %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ src %URI; #IMPLIED
+ frameborder (1|0) "1"
+ marginwidth %Pixels; #IMPLIED
+ marginheight %Pixels; #IMPLIED
+ scrolling (yes|no|auto) "auto"
+ align %ImgAlign; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes %Flow;>
+<!ATTLIST noframes
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ background %URI; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ text %Color; #IMPLIED
+ link %Color; #IMPLIED
+ vlink %Color; #IMPLIED
+ alink %Color; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ type %ULStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ >
+
+<!-- Ordered list numbering style
+
+ 1 arabic numbers 1, 2, 3, ...
+ a lower alpha a, b, c, ...
+ A upper alpha A, B, C, ...
+ i lower roman i, ii, iii, ...
+ I upper roman I, II, III, ...
+
+ The style is applied to the sequence number which by default
+ is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ type %OLStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ start %Number; #IMPLIED
+ >
+
+<!-- single column list (DEPRECATED) -->
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- multiple column list (DEPRECATED) -->
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ type %LIStyle; #IMPLIED
+ value %Number; #IMPLIED
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ align (left|center|right) #IMPLIED
+ noshade (noshade) #IMPLIED
+ size %Pixels; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding
+ "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ width %Number; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+ %attrs;
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ clear (left|all|right|none) "none"
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;> <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;> <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;> <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY> <!-- base font size -->
+<!ATTLIST basefont
+ id ID #IMPLIED
+ size CDATA #REQUIRED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+ %coreattrs;
+ %i18n;
+ size CDATA #IMPLIED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Pixels; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #REQUIRED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Java applet ==================================-->
+<!--
+ One of code or object attributes must be present.
+ Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+ %coreattrs;
+ codebase %URI; #IMPLIED
+ archive CDATA #IMPLIED
+ code CDATA #IMPLIED
+ object CDATA #IMPLIED
+ alt %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ width %Length; #REQUIRED
+ height %Length; #REQUIRED
+ align %ImgAlign; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ name NMTOKEN #IMPLIED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Length; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name CDATA #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ name NMTOKEN #IMPLIED
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ align %LAlign; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+ %coreattrs;
+ %i18n;
+ prompt %Text; #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ align %TAlign; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+ %attrs;
+ align %CAlign; #IMPLIED
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ bgcolor %Color; #IMPLIED
+ >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Length; #IMPLIED
+ height %Length; #IMPLIED
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Length; #IMPLIED
+ height %Length; #IMPLIED
+ >
+
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid02-expected.txt
new file mode 100644
index 0000000..0b1c4f4
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid03-expected.txt
new file mode 100644
index 0000000..91e4369
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid07-expected.txt
new file mode 100644
index 0000000..1317b7f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/attrisid07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/attrisid07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform01-expected.txt
new file mode 100644
index 0000000..17d1165
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform02-expected.txt
new file mode 100644
index 0000000..903f38d
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform03-expected.txt
new file mode 100644
index 0000000..34715b9
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform04-expected.txt
new file mode 100644
index 0000000..ed54fd9
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform05-expected.txt
new file mode 100644
index 0000000..448845f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform07-expected.txt
new file mode 100644
index 0000000..ed414ec
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform10-expected.txt
new file mode 100644
index 0000000..8215e8a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform10
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform11-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform11-expected.txt
new file mode 100644
index 0000000..81213cc
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform11
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform12-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform12-expected.txt
new file mode 100644
index 0000000..30b473f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/canonicalform12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/canonicalform12
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/cdatasections01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/cdatasections01-expected.txt
new file mode 100644
index 0000000..d48b1c4
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/cdatasections01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/cdatasections01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt
new file mode 100644
index 0000000..ee96c14
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt
new file mode 100644
index 0000000..babef80
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt
new file mode 100644
index 0000000..c2296fe
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/checkcharacternormalization03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/checkcharacternormalization03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/comments01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/comments01-expected.txt
new file mode 100644
index 0000000..fa6673a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/comments01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/comments01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization13-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization13-expected.txt
new file mode 100644
index 0000000..32e2df4
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization13
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization14-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization14-expected.txt
new file mode 100644
index 0000000..0f6454d
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization14
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization15-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization15-expected.txt
new file mode 100644
index 0000000..8b246c9
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization15
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization16-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization16-expected.txt
new file mode 100644
index 0000000..6e10d6b
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization16
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization17-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization17-expected.txt
new file mode 100644
index 0000000..f2de5e8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization17
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization18-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization18-expected.txt
new file mode 100644
index 0000000..c379609
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/datatypenormalization18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/datatypenormalization18
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode17-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode17-expected.txt
new file mode 100644
index 0000000..7135a12
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode17
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode18-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode18-expected.txt
new file mode 100644
index 0000000..9c29c2f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode18
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode19-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode19-expected.txt
new file mode 100644
index 0000000..8df5585
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode19
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode20-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode20-expected.txt
new file mode 100644
index 0000000..fcf7431
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentadoptnode20-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentadoptnode20
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt
new file mode 100644
index 0000000..5578121
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetinputencoding04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt
new file mode 100644
index 0000000..ee7c988
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetxmlencoding05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt
new file mode 100644
index 0000000..4d4ab37
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt
new file mode 100644
index 0000000..052bdb8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt
new file mode 100644
index 0000000..c16fbc7
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt
new file mode 100644
index 0000000..c98c3ac
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt
new file mode 100644
index 0000000..60c5321
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt
new file mode 100644
index 0000000..368cd6a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt
new file mode 100644
index 0000000..f32b545
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt
new file mode 100644
index 0000000..33aa6ad
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument09
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt
new file mode 100644
index 0000000..2dae259
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentnormalizedocument13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument13
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode01-expected.txt
new file mode 100644
index 0000000..b835117
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode02-expected.txt
new file mode 100644
index 0000000..50875b4
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode03-expected.txt
new file mode 100644
index 0000000..6a55055
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode04-expected.txt
new file mode 100644
index 0000000..117bd72
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode05-expected.txt
new file mode 100644
index 0000000..fb70cc5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode06-expected.txt
new file mode 100644
index 0000000..bcc1fd7
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode07-expected.txt
new file mode 100644
index 0000000..d2d5845
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode09-expected.txt
new file mode 100644
index 0000000..2b228bb
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode09
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode15-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode15-expected.txt
new file mode 100644
index 0000000..47d5c6a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode15
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode16-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode16-expected.txt
new file mode 100644
index 0000000..24f7736
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode16
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode17-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode17-expected.txt
new file mode 100644
index 0000000..2dab419
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode17
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode28-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode28-expected.txt
new file mode 100644
index 0000000..02b3e29
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/documentrenamenode28-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentrenamenode28
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt
new file mode 100644
index 0000000..a5be085
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcanonicalform1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcanonicalform1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt
new file mode 100644
index 0000000..f9706d6
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcdatasections1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcdatasections1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt
new file mode 100644
index 0000000..6719ab7
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcheckcharacternormalization1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcheckcharacternormalization1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcomments1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcomments1-expected.txt
new file mode 100644
index 0000000..b01228d
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigcomments1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigcomments1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt
new file mode 100644
index 0000000..4381829
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigdatatypenormalization1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt
new file mode 100644
index 0000000..038572e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigdatatypenormalization2-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigdatatypenormalization2
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt
new file mode 100644
index 0000000..0568b49
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigelementcontentwhitespace1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigelementcontentwhitespace1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigentities1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigentities1-expected.txt
new file mode 100644
index 0000000..2669e83
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigentities1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigentities1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt
new file mode 100644
index 0000000..d207bc3
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigerrorhandler1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt
new file mode 100644
index 0000000..2b3c4fd
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigerrorhandler2-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigerrorhandler2
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfiginfoset1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfiginfoset1-expected.txt
new file mode 100644
index 0000000..734b0a0
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfiginfoset1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfiginfoset1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt
new file mode 100644
index 0000000..e4838e5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespacedeclarations1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespacedeclarations1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces1-expected.txt
new file mode 100644
index 0000000..a6ec41c
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespaces1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces2-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces2-expected.txt
new file mode 100644
index 0000000..8c49600
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignamespaces2-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignamespaces2
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt
new file mode 100644
index 0000000..67e5d56
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfignormalizecharacters1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfignormalizecharacters1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt
new file mode 100644
index 0000000..9a4de4b
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschemalocation1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigschemalocation1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschematype1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschematype1-expected.txt
new file mode 100644
index 0000000..ad606b2
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigschematype1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigschematype1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt
new file mode 100644
index 0000000..ced1c6e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigsplitcdatasections1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigsplitcdatasections1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt
new file mode 100644
index 0000000..9565f22
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt
new file mode 100644
index 0000000..73440e6
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt
new file mode 100644
index 0000000..451ed1f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt
new file mode 100644
index 0000000..dcb9456
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationcansetparameter06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt
new file mode 100644
index 0000000..58d1389
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigurationgetparameter01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationgetparameter01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidate1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidate1-expected.txt
new file mode 100644
index 0000000..11cda3a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidate1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigvalidate1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt
new file mode 100644
index 0000000..635718a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigvalidateifschema1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigvalidateifschema1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigwellformed1-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigwellformed1-expected.txt
new file mode 100644
index 0000000..9e8f160
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domconfigwellformed1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigwellformed1
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt
new file mode 100644
index 0000000..2c2b2ef
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt
new file mode 100644
index 0000000..3c36558
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt
new file mode 100644
index 0000000..df705bf
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt
new file mode 100644
index 0000000..5e60f30
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt
new file mode 100644
index 0000000..d7688bd
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationgetfeature06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationgetfeature06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry01-expected.txt
new file mode 100644
index 0000000..7cacb9f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry01
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry02-expected.txt
new file mode 100644
index 0000000..c996b81
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry02
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry03-expected.txt
new file mode 100644
index 0000000..2b378cd
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry03
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry04-expected.txt
new file mode 100644
index 0000000..2fca2ed
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry04
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry05-expected.txt
new file mode 100644
index 0000000..1a01028
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry05
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry06-expected.txt
new file mode 100644
index 0000000..89820d7
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry06
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry07-expected.txt
new file mode 100644
index 0000000..174427e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry07
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry08-expected.txt
new file mode 100644
index 0000000..f7699e5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry08
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry09-expected.txt
new file mode 100644
index 0000000..635474b
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry09
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry10-expected.txt
new file mode 100644
index 0000000..9784526
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry10
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry11-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry11-expected.txt
new file mode 100644
index 0000000..11e46dc
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry11
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry13-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry13-expected.txt
new file mode 100644
index 0000000..7504127
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry13
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry14-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry14-expected.txt
new file mode 100644
index 0000000..02ba944
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry14
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry15-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry15-expected.txt
new file mode 100644
index 0000000..c631c59
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry15
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry16-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry16-expected.txt
new file mode 100644
index 0000000..410f499
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry16
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry17-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry17-expected.txt
new file mode 100644
index 0000000..b093e9e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry17-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry17
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry18-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry18-expected.txt
new file mode 100644
index 0000000..163a4c5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry18
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry19-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry19-expected.txt
new file mode 100644
index 0000000..99e43f0
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry19-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry19
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry20-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry20-expected.txt
new file mode 100644
index 0000000..b11327a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry20-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry20
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry21-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry21-expected.txt
new file mode 100644
index 0000000..78bee38
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry21
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry22-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry22-expected.txt
new file mode 100644
index 0000000..95d3334
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry22-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry22
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry24-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry24-expected.txt
new file mode 100644
index 0000000..f007117
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry24
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry25-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry25-expected.txt
new file mode 100644
index 0000000..6bd97d5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domimplementationregistry25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domimplementationregistry25
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains01-expected.txt
new file mode 100644
index 0000000..d830683
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistcontains01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains02-expected.txt
new file mode 100644
index 0000000..b27eb38
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistcontains02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistcontains02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt
new file mode 100644
index 0000000..bce702a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistgetlength01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistgetlength01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem01-expected.txt
new file mode 100644
index 0000000..72e1c6a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistitem01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem02-expected.txt
new file mode 100644
index 0000000..314dfba
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/domstringlistitem02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/domstringlistitem02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt
new file mode 100644
index 0000000..0e05d85
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt
new file mode 100644
index 0000000..752fede
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt
new file mode 100644
index 0000000..bb67c67
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementcontentwhitespace03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementcontentwhitespace03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute01-expected.txt
new file mode 100644
index 0000000..a0d7cf7
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute03-expected.txt
new file mode 100644
index 0000000..feb03f8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute04-expected.txt
new file mode 100644
index 0000000..6f03f64
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute07-expected.txt
new file mode 100644
index 0000000..f6eb1a1
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute08-expected.txt
new file mode 100644
index 0000000..0f97e49
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute09-expected.txt
new file mode 100644
index 0000000..71bd931
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute09
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute10-expected.txt
new file mode 100644
index 0000000..d0d70fc
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute10
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute11-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute11-expected.txt
new file mode 100644
index 0000000..25e475e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattribute11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattribute11
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt
new file mode 100644
index 0000000..25b9821
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt
new file mode 100644
index 0000000..f0ac284
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt
new file mode 100644
index 0000000..4c747c0
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt
new file mode 100644
index 0000000..4bf3d3e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt
new file mode 100644
index 0000000..8e9483f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt
new file mode 100644
index 0000000..9550923
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt
new file mode 100644
index 0000000..816a972
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributenode10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributenode10
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens01-expected.txt
new file mode 100644
index 0000000..ed6ca4e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens02-expected.txt
new file mode 100644
index 0000000..954629b
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens03-expected.txt
new file mode 100644
index 0000000..f370feb
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens04-expected.txt
new file mode 100644
index 0000000..63e09b8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens05-expected.txt
new file mode 100644
index 0000000..d69954c
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens10-expected.txt
new file mode 100644
index 0000000..f5994cc
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens10
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens11-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens11-expected.txt
new file mode 100644
index 0000000..ebe169e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens11
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens12-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens12-expected.txt
new file mode 100644
index 0000000..c0b9901
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens12
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens13-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens13-expected.txt
new file mode 100644
index 0000000..47d607a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens13
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens14-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens14-expected.txt
new file mode 100644
index 0000000..2735785
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/elementsetidattributens14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementsetidattributens14
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities01-expected.txt
new file mode 100644
index 0000000..782e075
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities02-expected.txt
new file mode 100644
index 0000000..0d5344d
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities03-expected.txt
new file mode 100644
index 0000000..a6d223f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities04-expected.txt
new file mode 100644
index 0000000..c26cce4
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entities04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt
new file mode 100644
index 0000000..e2b43dc
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetinputencoding01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetinputencoding01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt
new file mode 100644
index 0000000..ca33376
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt
new file mode 100644
index 0000000..172d9ac
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlencoding02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlencoding02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt
new file mode 100644
index 0000000..f6597af
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/entitygetxmlversion01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/entitygetxmlversion01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror01-expected.txt
new file mode 100644
index 0000000..67feeba
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/handleerror01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror02-expected.txt
new file mode 100644
index 0000000..f4d8a72
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/handleerror02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/handleerror02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset01-expected.txt
new file mode 100644
index 0000000..ed0288a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset02-expected.txt
new file mode 100644
index 0000000..e591ff5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset03-expected.txt
new file mode 100644
index 0000000..86ea93e
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset04-expected.txt
new file mode 100644
index 0000000..92433b1
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset05-expected.txt
new file mode 100644
index 0000000..d460e48
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset08-expected.txt
new file mode 100644
index 0000000..f77a597
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset09-expected.txt
new file mode 100644
index 0000000..f29aeb6
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/infoset09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset09
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations01-expected.txt
new file mode 100644
index 0000000..cebdea8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/namespacedeclarations01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations02-expected.txt
new file mode 100644
index 0000000..2f5a673
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/namespacedeclarations02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/namespacedeclarations02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt
new file mode 100644
index 0000000..d9c6dd7
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition03
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt
new file mode 100644
index 0000000..63ca0be
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition05
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt
new file mode 100644
index 0000000..4dd6d0d
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition16
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt
new file mode 100644
index 0000000..cf185e2
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition22-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition22
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt
new file mode 100644
index 0000000..512a544
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition23-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition23
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt
new file mode 100644
index 0000000..dd64386
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition24
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt
new file mode 100644
index 0000000..4d94332
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodecomparedocumentposition33-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition33
+Status error
+Message Line undefined: ReferenceError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt
new file mode 100644
index 0000000..8a02bad
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri12
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt
new file mode 100644
index 0000000..b94bee9
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri13
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt
new file mode 100644
index 0000000..9f29a38
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetbaseuri14-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri14
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature01-expected.txt
new file mode 100644
index 0000000..9afcc65
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature02-expected.txt
new file mode 100644
index 0000000..032ff44
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature03-expected.txt
new file mode 100644
index 0000000..cdccf11
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature04-expected.txt
new file mode 100644
index 0000000..ffd52a0
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature05-expected.txt
new file mode 100644
index 0000000..2d2907c
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature06-expected.txt
new file mode 100644
index 0000000..1c1d496
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature07-expected.txt
new file mode 100644
index 0000000..fb6c2e1
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature08-expected.txt
new file mode 100644
index 0000000..f87bd16
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature09-expected.txt
new file mode 100644
index 0000000..2616b56
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature09
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature10-expected.txt
new file mode 100644
index 0000000..089fe59
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature10
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature11-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature11-expected.txt
new file mode 100644
index 0000000..a440497
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature11-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature11
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature12-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature12-expected.txt
new file mode 100644
index 0000000..e514615
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature12
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature13-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature13-expected.txt
new file mode 100644
index 0000000..8ce4df9
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetfeature13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetfeature13
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent05-expected.txt
new file mode 100644
index 0000000..039d79a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent15-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent15-expected.txt
new file mode 100644
index 0000000..b6908d1
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent15-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent15
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent16-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent16-expected.txt
new file mode 100644
index 0000000..f7034d2
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent16-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent16
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent18-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent18-expected.txt
new file mode 100644
index 0000000..d63afee
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegettextcontent18-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent18
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata01-expected.txt
new file mode 100644
index 0000000..74ba9c0
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata02-expected.txt
new file mode 100644
index 0000000..05a197f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata03-expected.txt
new file mode 100644
index 0000000..e157d1a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata04-expected.txt
new file mode 100644
index 0000000..b984398
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata05-expected.txt
new file mode 100644
index 0000000..5e67571
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata06-expected.txt
new file mode 100644
index 0000000..5d50734
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata07-expected.txt
new file mode 100644
index 0000000..97b66ae
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodegetuserdata07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetuserdata07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt
new file mode 100644
index 0000000..9da79a6
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisdefaultnamespace04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnamespace04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode25-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode25-expected.txt
new file mode 100644
index 0000000..6830118
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode25
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode26-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode26-expected.txt
new file mode 100644
index 0000000..e679df6
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode26-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode26
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode27-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode27-expected.txt
new file mode 100644
index 0000000..9c27e83
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeisequalnode27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode27
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode07-expected.txt
new file mode 100644
index 0000000..58900f3
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode08-expected.txt
new file mode 100644
index 0000000..c670d66
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode09-expected.txt
new file mode 100644
index 0000000..d2ede2a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodeissamenode09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeissamenode09
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt
new file mode 100644
index 0000000..6fc333b
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupnamespaceuri04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupnamespaceuri04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix04-expected.txt
new file mode 100644
index 0000000..5d6c515
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix12-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix12-expected.txt
new file mode 100644
index 0000000..5e2ff94
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodelookupprefix12-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix12
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild07-expected.txt
new file mode 100644
index 0000000..a545e2b
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild24-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild24-expected.txt
new file mode 100644
index 0000000..f49e112
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild24-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild24
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild25-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild25-expected.txt
new file mode 100644
index 0000000..2d6c8e5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild25
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild26-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild26-expected.txt
new file mode 100644
index 0000000..603e600
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild26-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild26
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild27-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild27-expected.txt
new file mode 100644
index 0000000..c3e86f1
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/noderemovechild27-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild27
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild10-expected.txt
new file mode 100644
index 0000000..3a4d331
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild10
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild21-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild21-expected.txt
new file mode 100644
index 0000000..3a2d1b0
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild21-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild21
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild25-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild25-expected.txt
new file mode 100644
index 0000000..a86ab79
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild25-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild25
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild38-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild38-expected.txt
new file mode 100644
index 0000000..8a76c62
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodereplacechild38-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild38
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent04-expected.txt
new file mode 100644
index 0000000..eae4623
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent13-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent13-expected.txt
new file mode 100644
index 0000000..4e143f8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesettextcontent13-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesettextcontent13
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata01-expected.txt
new file mode 100644
index 0000000..5caa1b4
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata02-expected.txt
new file mode 100644
index 0000000..a5f01a3
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata03-expected.txt
new file mode 100644
index 0000000..46405b8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata04-expected.txt
new file mode 100644
index 0000000..d181ff9
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata05-expected.txt
new file mode 100644
index 0000000..b81177f
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata06-expected.txt
new file mode 100644
index 0000000..9a94563
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata07-expected.txt
new file mode 100644
index 0000000..ca8e1c2
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata08-expected.txt
new file mode 100644
index 0000000..ef0fde5
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata09-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata09-expected.txt
new file mode 100644
index 0000000..c4e90fd
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata09-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata09
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata10-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata10-expected.txt
new file mode 100644
index 0000000..0c962bd
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/nodesetuserdata10-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodesetuserdata10
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters01-expected.txt
new file mode 100644
index 0000000..775d378
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters02-expected.txt
new file mode 100644
index 0000000..45fec07
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters03-expected.txt
new file mode 100644
index 0000000..9320a37
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters04-expected.txt
new file mode 100644
index 0000000..c49ba9c
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters05-expected.txt
new file mode 100644
index 0000000..8edafe8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters06-expected.txt
new file mode 100644
index 0000000..8bc0f75
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters07-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters07-expected.txt
new file mode 100644
index 0000000..892b2e1
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters07
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters08-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters08-expected.txt
new file mode 100644
index 0000000..678b28c
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/normalizecharacters08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/normalizecharacters08
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/splitcdatasections01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/splitcdatasections01-expected.txt
new file mode 100644
index 0000000..acf3004
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/splitcdatasections01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/splitcdatasections01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt
new file mode 100644
index 0000000..af0ea5a
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace04
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt
new file mode 100644
index 0000000..b274480
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace05-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace05
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt
new file mode 100644
index 0000000..7c517da
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/textiselementcontentwhitespace06-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace06
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler01-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler01-expected.txt
new file mode 100644
index 0000000..a37e6f8
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler01-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler01
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler02-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler02-expected.txt
new file mode 100644
index 0000000..1f1f383
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler02-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler02
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler03-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler03-expected.txt
new file mode 100644
index 0000000..f327984
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler03
+Status error
+Message Line undefined: TypeError
diff --git a/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler04-expected.txt b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler04-expected.txt
new file mode 100644
index 0000000..2a29de4
--- /dev/null
+++ b/LayoutTests/platform/android-v8/dom/xhtml/level3/core/userdatahandler04-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/userdatahandler04
+Status error
+Message Line undefined: TypeError