Main Page Packages Class Hierarchy Compound List File List Compound Members

# documentinvalidcharacterexceptioncreateattribute Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| documentinvalidcharacterexceptioncreateattribute (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

The "createAttribute(tagName)" method raises an INVALID_CHARACTER_ERR DOMException if the specified tagName contains an invalid character.

Retrieve the entire DOM document and invoke its "createAttribute(tagName)" 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-1084891198 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1084891198')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198

Definition at line 49 of file documentinvalidcharacterexceptioncreateattribute.java.

## Constructor & Destructor Documentation

documentinvalidcharacterexceptioncreateattribute::documentinvalidcharacterexceptioncreateattribute | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 51 of file documentinvalidcharacterexceptioncreateattribute.java.
    00052  {
    00053       super(factory);
    00054
    00055    }

## Member Function Documentation

String documentinvalidcharacterexceptioncreateattribute::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 75 of file documentinvalidcharacterexceptioncreateattribute.java.
    00075                                 {
    00076       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreateattribute";
    00077    }

void documentinvalidcharacterexceptioncreateattribute::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 78 of file documentinvalidcharacterexceptioncreateattribute.java. References DOMTestCase::doMain().
    00078                                           {
    00079         DOMTestCase.doMain(documentinvalidcharacterexceptioncreateattribute.class,args);
    00080    }

void documentinvalidcharacterexceptioncreateattribute::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 57 of file documentinvalidcharacterexceptioncreateattribute.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00057                                                     {
    00058       Document doc;
    00059       Attr createdAttr;
    00060       doc = load("staff");
    00061
    00062         {
    00063                 boolean success = false;
    00064                 try {
    00065                         createdAttr = doc.createAttribute("invalid^Name");
    00066
    00067                 }
    00068                 catch(DOMException ex) {
    00069                         success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
    00070                 }
    00071                 assertTrue("documentInvalidCharacterExceptionCreateAttributeAssert",success);
    00072         }
    00073
    00074    }

The documentation for this class was generated from the following file:

- documentinvalidcharacterexceptioncreateattribute.java