OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 Copyright © 2001-2004 World Wide Web Consortium, | 3 Copyright © 2001-2004 World Wide Web Consortium, |
4 (Massachusetts Institute of Technology, European Research Consortium | 4 (Massachusetts Institute of Technology, European Research Consortium |
5 for Informatics and Mathematics, Keio University). All | 5 for Informatics and Mathematics, Keio University). All |
6 Rights Reserved. This work is distributed under the W3C® Software License [1] i
n the | 6 Rights Reserved. This work is distributed under the W3C® Software License [1] i
n the |
7 hope that it will be useful, but WITHOUT ANY WARRANTY; without even | 7 hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
9 | 9 |
10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 | 10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 var nodePrefix; | 94 var nodePrefix; |
95 var attrOwnerElem; | 95 var attrOwnerElem; |
96 var isSpecified; | 96 var isSpecified; |
97 var xmlNS = "http://www.w3.org/XML/1998/namespace"; | 97 var xmlNS = "http://www.w3.org/XML/1998/namespace"; |
98 | 98 |
99 var docRef = null; | 99 var docRef = null; |
100 if (typeof(this.doc) != 'undefined') { | 100 if (typeof(this.doc) != 'undefined') { |
101 docRef = this.doc; | 101 docRef = this.doc; |
102 } | 102 } |
103 doc = load(docRef, "doc", "hc_staff"); | 103 doc = load(docRef, "doc", "hc_staff"); |
104 newAttr = doc.createAttribute("xml:lang"); | 104 newAttr = doc.createAttributeNS(xmlNS,"xml:lang"); |
105 adoptedAttr = doc.adoptNode(newAttr); | 105 adoptedAttr = doc.adoptNode(newAttr); |
106 | 106 |
107 if( | 107 if( |
108 | 108 |
109 (adoptedAttr != null) | 109 (adoptedAttr != null) |
110 | 110 |
111 ) { | 111 ) { |
112 nodeName = adoptedAttr.nodeName; | 112 nodeName = adoptedAttr.nodeName; |
113 | 113 |
114 nodeNamespaceURI = adoptedAttr.namespaceURI; | 114 nodeNamespaceURI = adoptedAttr.namespaceURI; |
115 | 115 |
116 nodePrefix = adoptedAttr.prefix; | 116 nodePrefix = adoptedAttr.prefix; |
117 | 117 |
118 attrOwnerElem = adoptedAttr.ownerElement; | 118 attrOwnerElem = adoptedAttr.ownerElement; |
119 | 119 |
120 isSpecified = adoptedAttr.specified; | 120 isSpecified = adoptedAttr.specified; |
121 | 121 |
122 assertEquals("documentadoptode03_nodeName","xml:lang",nodeName); | 122 assertEquals("documentadoptode03_nodeName","xml:lang",nodeName); |
| 123 assertEquals("documentadoptNode03_namespaceURI",xmlNS,nodeNamespaceURI); |
123 assertEquals("documentadoptnode03_prefix","xml",nodePrefix); | 124 assertEquals("documentadoptnode03_prefix","xml",nodePrefix); |
124 assertNull("documentadoptnode03_ownerDoc",attrOwnerElem); | 125 assertNull("documentadoptnode03_ownerDoc",attrOwnerElem); |
125 assertTrue("documentadoptnode03_specified",isSpecified); | 126 assertTrue("documentadoptnode03_specified",isSpecified); |
126 | 127 |
127 } | 128 } |
128 | 129 |
129 } | 130 } |
130 | 131 |
131 | 132 |
132 | 133 |
133 | 134 |
134 function runTest() { | 135 function runTest() { |
135 documentadoptnode03(); | 136 documentadoptnode03(); |
136 } | 137 } |
OLD | NEW |