notationgetpublicidnullpublic final class notationgetpublicidnull extends org.w3c.domts.DOMTestCase The "getPublicId()" method of a Notation node contains
the public identifier associated with the notation, if
one was not specified a null value should be returned.
Retrieve the notation named "notation2" and access its
public identifier. Since a public identifier was not
specified for this notation, the "getPublicId()" method
should return null. |
Constructors Summary |
---|
public notationgetpublicidnull(org.w3c.domts.DOMTestDocumentBuilderFactory factory)Constructor.
super(factory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "staff", false);
|
Methods Summary |
---|
public java.lang.String | getTargetURI()Gets URI that identifies the test.
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/notationgetpublicidnull";
| public static void | main(java.lang.String[] args)Runs this test from the command line.
DOMTestCase.doMain(notationgetpublicidnull.class, args);
| public void | runTest()Runs the test case.
Document doc;
DocumentType docType;
NamedNodeMap notations;
Notation notationNode;
String publicId;
doc = (Document) load("staff", false);
docType = doc.getDoctype();
assertNotNull("docTypeNotNull", docType);
notations = docType.getNotations();
assertNotNull("notationsNotNull", notations);
notationNode = (Notation) notations.getNamedItem("notation2");
publicId = notationNode.getPublicId();
assertNull("publicId", publicId);
|
|