org.w3c.domts.level2.core

Class setNamedItemNS02

public final class setNamedItemNS02 extends DOMTestCase

The "setNamedItemNS(arg)" method for a NamedNodeMap should raise WRONG_DOCUMENT_ERR DOMException if arg was created from a different document than the one that created this map. Create an attr node in a different document with qualifiedName equals "dmstc:domestic" and namespaceURI is "http://www.usa.com". Access the namednodemap of the first "address" element in this document. Invoke method setNamedItemNS(arg) with arg being the attr node from above. Method should raise WRONG_DOCUMENT_ERR DOMException.

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-setNamedItemNS http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-setNamedItemNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])

Constructor Summary
setNamedItemNS02(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

setNamedItemNS02

public setNamedItemNS02(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