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-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. <!DOCTYPE test SYSTEM "dom3.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="attrisid07">
  20. <metadata>
  21. <title>attrisid07</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         The method isId returns whether this attribute is known to be of type ID or not.
  25.        
  26.         Add a new attribute of type ID to the third acronym element node of this document. Verify that the method
  27.        isId returns true. The use of Element.setIdAttributeNS() makes 'isId' a user-determined ID attribute.
  28.         Import the newly created attribute node into this document.  
  29.        Since user data assocated to the imported node is not carried over, verify that the method isId
  30.        returns false on the imported attribute node.        
  31.  
  32. </description>
  33. <contributor>Neil Delima</contributor>
  34. <date qualifier="created">2003-03-04</date>
  35. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Attr-isId"/>
  36. </metadata>
  37. <implementationAttribute name="namespaceAware" value="true"/>
  38. <var name="doc" type="Document"/>
  39. <var name="elemList" type="NodeList"/>
  40. <var name="acronymElem" type="Element"/>
  41. <var name="attributesMap" type="NamedNodeMap"/>
  42. <var name="attr" type="Attr"/>
  43. <var name="attrImported" type="Attr"/>
  44. <var name="id" type="boolean" value="false"/>
  45. <var name="elem" type="Element"/>
  46. <var name="elemName" type="DOMString"/>
  47. <load var="doc" href="hc_staff" willBeModified="false"/>
  48. <getElementsByTagNameNS var="elemList" obj="doc" localName='"acronym"' namespaceURI='"*"' interface="Document"/>
  49. <item var="acronymElem" obj="elemList" index="2" interface="NodeList"/>
  50. <setAttributeNS obj="acronymElem" namespaceURI='"http://www.w3.org/DOM"' qualifiedName='"dom3:newAttr"' value='"null"'/>
  51. <setIdAttributeNS obj="acronymElem" localName='"newAttr"' namespaceURI='"http://www.w3.org/DOM"' isId="true"/>
  52. <getAttributeNodeNS var="attr" obj="acronymElem" namespaceURI='"http://www.w3.org/DOM"' localName='"newAttr"'/>
  53. <isId var="id" obj="attr"/>
  54. <assertTrue actual="id" id="AttrIsIDTrue07_1"/>
  55. <importNode var="attrImported" obj="doc" importedNode="attr" deep="false"/>
  56. <isId var="id" obj="attrImported"/>
  57. <assertFalse actual="id" id="AttrIsID07_isFalseforImportedNode"/>
  58. </test>
  59.