|
1 <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> |
|
2 |
|
3 <!-- |
|
4 |
|
5 Copyright (c) 2004 World Wide Web Consortium, |
|
6 (Massachusetts Institute of Technology, Institut National de |
|
7 Recherche en Informatique et en Automatique, Keio University). All |
|
8 Rights Reserved. This program is distributed under the W3C's Software |
|
9 Intellectual Property License. This program is distributed in the |
|
10 hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
|
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
12 PURPOSE. |
|
13 |
|
14 See W3C License http://www.w3.org/Consortium/Legal/ for more details. |
|
15 |
|
16 --> |
|
17 |
|
18 |
|
19 <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="datatypenormalization08"> |
|
20 <metadata> |
|
21 <title>datatypenormalization08</title> |
|
22 <creator>Curt Arnold</creator> |
|
23 <description> |
|
24 The default value for the decimal element must be provided in canonical lexical form. |
|
25 </description> |
|
26 <date qualifier="created">2004-02-24</date> |
|
27 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-normalizeDocument"/> |
|
28 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-datatype-normalization"/> |
|
29 </metadata> |
|
30 <implementationAttribute name="namespaceAware" value="true"/> |
|
31 <var name="doc" type="Document"/> |
|
32 <var name="elemList" type="NodeList"/> |
|
33 <var name="element" type="Element"/> |
|
34 <var name="domConfig" type="DOMConfiguration"/> |
|
35 <var name="str" type="DOMString"/> |
|
36 <var name="canSetNormalization" type="boolean"/> |
|
37 <var name="canSetValidate" type="boolean"/> |
|
38 <var name="canSetXMLSchema" type="boolean"/> |
|
39 <var name="xsdNS" type="DOMString" value='"http://www.w3.org/2001/XMLSchema"'/> |
|
40 <var name="errorMonitor" type="DOMErrorMonitor"/> |
|
41 <load var="doc" href="datatype_normalization" willBeModified="true"/> |
|
42 |
|
43 <domConfig obj="doc" var="domConfig" interface="Document"/> |
|
44 <canSetParameter var="canSetNormalization" obj="domConfig" name='"datatype-normalization"' value="true"/> |
|
45 <canSetParameter var="canSetValidate" obj="domConfig" name='"validate"' value="true"/> |
|
46 <canSetParameter var="canSetXMLSchema" obj="domConfig" name='"schema-type"' value="xsdNS"/> |
|
47 <if> |
|
48 <and> |
|
49 <isTrue value="canSetNormalization"/> |
|
50 <isTrue value="canSetValidate"/> |
|
51 <isTrue value="canSetXMLSchema"/> |
|
52 </and> |
|
53 <setParameter obj="domConfig" name='"datatype-normalization"' value="true"/> |
|
54 <setParameter obj="domConfig" name='"validate"' value="true"/> |
|
55 <setParameter obj="domConfig" name='"schema-type"' value='xsdNS'/> |
|
56 <setParameter obj="domConfig" name='"error-handler"' value="errorMonitor"/> |
|
57 <normalizeDocument obj="doc"/> |
|
58 <!-- fail test if normalize had any errors or fatal errors --> |
|
59 <assertLowerSeverity obj="errorMonitor" id="normalizeError" severity="SEVERITY_ERROR"/> |
|
60 <getElementsByTagNameNS |
|
61 var="elemList" |
|
62 obj="doc" |
|
63 namespaceURI='"http://www.w3.org/2001/DOM-Test-Suite/Level-3/datatype_normalization"' |
|
64 localName='"decimal"' |
|
65 interface="Document"/> |
|
66 <item var="element" obj="elemList" interface="NodeList" index="0"/> |
|
67 <getAttribute var="str" obj="element" name='"default"'/> |
|
68 <assertEquals actual="str" expected='"3.1415926"' ignoreCase="false" id="firstValue"/> |
|
69 </if> |
|
70 </test> |
|
71 |
|
72 |