Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

documentinvalidcharacterexceptioncreatepi Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "createProcessingInstruction(target,data) method raises an INVALID_CHARACTER_ERR DOMException if the specified tagName contains an invalid character.

Retrieve the entire DOM document and invoke its "createProcessingInstruction(target,data)" method with the tagName equal to the string "invalid^Name". Due to the invalid character the desired EXCEPTION should be raised.

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-135944439 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-135944439')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])

Definition at line 49 of file documentinvalidcharacterexceptioncreatepi.java.


Constructor & Destructor Documentation

documentinvalidcharacterexceptioncreatepi::documentinvalidcharacterexceptioncreatepi DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 51 of file documentinvalidcharacterexceptioncreatepi.java.

00052  {
00053       super(factory);
00054 
00055    }


Member Function Documentation

String documentinvalidcharacterexceptioncreatepi::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 75 of file documentinvalidcharacterexceptioncreatepi.java.

00075                                 {
00076       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi";
00077    }

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

Definition at line 78 of file documentinvalidcharacterexceptioncreatepi.java.

References DOMTestCase::doMain().

00078                                           {
00079         DOMTestCase.doMain(documentinvalidcharacterexceptioncreatepi.class,args);
00080    }

void documentinvalidcharacterexceptioncreatepi::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 57 of file documentinvalidcharacterexceptioncreatepi.java.

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

00057                                                     {
00058       Document doc;
00059       ProcessingInstruction badPI;
00060       doc = load("staff");
00061       
00062         {
00063                 boolean success = false;
00064                 try {
00065                         badPI = doc.createProcessingInstruction("invalid^Name","data");
00066       
00067                 }
00068                 catch(DOMException ex) {
00069                         success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
00070                 }
00071                 assertTrue("documentInvalidCharacterExceptionCreatePIAssert",success);
00072         }
00073 
00074    }


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