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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } | 118 } |
119 doc = load(docRef, "doc", "hc_staff"); | 119 doc = load(docRef, "doc", "hc_staff"); |
120 docElem = doc.documentElement; | 120 docElem = doc.documentElement; |
121 | 121 |
122 rootName = docElem.tagName; | 122 rootName = docElem.tagName; |
123 | 123 |
124 rootNS = docElem.namespaceURI; | 124 rootNS = docElem.namespaceURI; |
125 | 125 |
126 domImpl = doc.implementation; | 126 domImpl = doc.implementation; |
127 newDoc = domImpl.createDocument(rootNS,rootName,nullDocType); | 127 newDoc = domImpl.createDocument(rootNS,rootName,nullDocType); |
128 newAttr = doc.createAttribute("xml:lang"); | 128 newAttr = doc.createAttributeNS(xmlNS,"xml:lang"); |
129 newText = doc.createTextNode("Text Node"); | 129 newText = doc.createTextNode("Text Node"); |
130 newEntRef = doc.createEntityReference("alpha"); | 130 newEntRef = doc.createEntityReference("alpha"); |
131 appendedChild = newAttr.appendChild(newText); | 131 appendedChild = newAttr.appendChild(newText); |
132 appendedChild = newAttr.appendChild(newEntRef); | 132 appendedChild = newAttr.appendChild(newEntRef); |
133 adoptedAttr = newDoc.adoptNode(newAttr); | 133 adoptedAttr = newDoc.adoptNode(newAttr); |
134 | 134 |
135 if( | 135 if( |
136 | 136 |
137 (adoptedAttr != null) | 137 (adoptedAttr != null) |
138 | 138 |
(...skipping 27 matching lines...) Expand all Loading... |
166 } | 166 } |
167 | 167 |
168 } | 168 } |
169 | 169 |
170 | 170 |
171 | 171 |
172 | 172 |
173 function runTest() { | 173 function runTest() { |
174 documentadoptnode06(); | 174 documentadoptnode06(); |
175 } | 175 } |
OLD | NEW |