Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
  2.  
  3. <!--
  4.  
  5. Copyright (c) 2001 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. <!DOCTYPE test SYSTEM "dom2.dtd">
  18. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2" name="elementsetattributens08">
  19.   <metadata>
  20.     <title>elementsetattributens08</title>
  21.     <creator>IBM</creator>
  22.     <description>
  23.       The method setAttributeNS adds a new attribute and raises a NAMESPACE_ERR
  24.       if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI is
  25.       different from "http://www.w3.org/2000/xmlns/".
  26.      
  27.       Invoke the setAttributeNS method on a new Element object with namespaceURI that is
  28.       http://www.w3.org/DOMTest/level2 and a qualifiedName that has the prefix xmlns and once
  29.       again with a qualifiedName that is xmlns.  
  30.       Check if the NAMESPACE_ERR was thrown.
  31.     </description>
  32.     <contributor>Neil Delima</contributor>
  33.     <date qualifier="created">2002-04-28</date>
  34.     <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-ElSetAttrNS"/>
  35.   </metadata>
  36.   <var name="doc" type="Document"/>
  37.   <var name="element" type="Element"/>
  38.   <load var="doc" href="staffNS" willBeModified="true"/>
  39.   <createElementNS var="element" obj="doc"
  40.                    namespaceURI='"http://www.w3.org/DOMTest/level2"'
  41.                    qualifiedName='"dom:elem"'/>
  42.   <assertDOMException id="elementsetattributens08_Err1">
  43.     <NAMESPACE_ERR>
  44.       <setAttributeNS obj="element"  
  45.                       namespaceURI='"http://www.w3.org/DOMTest/level2"'
  46.                       qualifiedName='"xmlns"' value='"test"'/>
  47.     </NAMESPACE_ERR>
  48.   </assertDOMException>
  49.   <assertDOMException id="elementsetattributens08_Err2">
  50.     <NAMESPACE_ERR>
  51.       <setAttributeNS obj="element"  
  52.                       namespaceURI='"http://www.w3.org/DOMTest/level2"'
  53.                       qualifiedName='"xmlns:root"' value='"test"'/>
  54.     </NAMESPACE_ERR>
  55.   </assertDOMException>
  56. </test>
  57.