Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

elementinvalidcharacterexception Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 elementinvalidcharacterexception (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The "setAttribute(name,value)" method raises an

"INVALID_CHARACTER_ERR DOMException if the specified

name contains an invalid character.

Retrieve the last child of the first employee and

call its "setAttribute(name,value)" method with

"name" containing an invalid character.

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-F68F082')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])

Definition at line 55 of file elementinvalidcharacterexception.java.


Constructor & Destructor Documentation

elementinvalidcharacterexception::elementinvalidcharacterexception DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 57 of file elementinvalidcharacterexception.java.

00058  {
00059       super(factory);
00060 
00061    }


Member Function Documentation

String elementinvalidcharacterexception::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 84 of file elementinvalidcharacterexception.java.

00084                                 {
00085       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementinvalidcharacterexception";
00086    }

void elementinvalidcharacterexception::main String    args[] [inline, static]
 

Definition at line 87 of file elementinvalidcharacterexception.java.

References DOMTestCase::doMain().

00087                                           {
00088         DOMTestCase.doMain(elementinvalidcharacterexception.class,args);
00089    }

void elementinvalidcharacterexception::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 63 of file elementinvalidcharacterexception.java.

References DOMTestCase::assertTrue(), and DOMTest::load().

00063                                                     {
00064       Document doc;
00065       NodeList elementList;
00066       Element testAddress;
00067       doc = load("staff");
00068       elementList = doc.getElementsByTagName("address");
00069       testAddress = (Element)elementList.item(0);
00070       
00071         {
00072                 boolean success = false;
00073                 try {
00074                         testAddress.setAttribute("invalid^Name","value");
00075       
00076                 }
00077                 catch(DOMException ex) {
00078                         success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
00079                 }
00080                 assertTrue("elementInvalidCharacterExceptionAssert",success);
00081         }
00082 
00083    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:50 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001