org.w3c.domts.level2.core

Class setAttributeNodeNS05

public final class setAttributeNodeNS05 extends DOMTestCase

The "setAttributeNodeNS(newAttr)" method raises an "WRONG_DOCUMENT_ERR DOMException if the "newAttr" was created from a different document than the one that created this document. Retrieve the first emp:address and attempt to set a new attribute node. The new attribute was created from a document other than the one that created this element, therefore a WRONG_DOCUMENT_ERR DOMException should be raised. This test uses the "createAttributeNS(newAttr)" method from the Document interface.

See Also: http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='WRONG_DOCUMENT_ERR']) http://www.w3.org/TR/DOM-Level-2-Core/core#ID-ElSetAtNodeNS http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-ElSetAtNodeNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])

Constructor Summary
setAttributeNodeNS05(DOMTestDocumentBuilderFactory factory)
Constructor.
Method Summary
StringgetTargetURI()
Gets URI that identifies the test.
static voidmain(String[] args)
Runs this test from the command line.
voidrunTest()
Runs the test case.

Constructor Detail

setAttributeNodeNS05

public setAttributeNodeNS05(DOMTestDocumentBuilderFactory factory)
Constructor.

Parameters: factory document factory, may not be null

Throws: org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration

Method Detail

getTargetURI

public String getTargetURI()
Gets URI that identifies the test.

Returns: uri identifier of test

main

public static void main(String[] args)
Runs this test from the command line.

Parameters: args command line arguments

runTest

public void runTest()
Runs the test case.

Throws: Throwable Any uncaught exception causes test to fail