Main Page Packages Class Hierarchy Compound List File List Compound Members

# documentinvalidcharacterexceptioncreateentref Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

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

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

Definition at line 48 of file documentinvalidcharacterexceptioncreateentref.java.

## Constructor & Destructor Documentation

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

| Definition at line 50 of file documentinvalidcharacterexceptioncreateentref.java.
    00051  {
    00052       super(factory);
    00053
    00054    }

## Member Function Documentation

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

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

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

| Definition at line 77 of file documentinvalidcharacterexceptioncreateentref.java. References DOMTestCase::doMain().
    00077                                           {
    00078         DOMTestCase.doMain(documentinvalidcharacterexceptioncreateentref.class,args);
    00079    }

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

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

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

- documentinvalidcharacterexceptioncreateentref.java