domimplementationfeaturexmlversion2public final class domimplementationfeaturexmlversion2 extends org.w3c.domts.DOMTestCase The "feature" parameter in the
"hasFeature(feature,version)" method is the package name
of the feature. Legal values are XML and HTML.
(Test for feature "xml" and version "2.0")
Retrieve the entire DOM document and invoke its
"getImplementation()" method. This should create a
DOMImplementation object whose "hasFeature(feature,
version)" method is invoked with "feature" equal to "xml".
The method should return a boolean "true". |
Constructors Summary |
---|
public domimplementationfeaturexmlversion2(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/level2/core/domimplementationfeaturexmlversion2";
| public static void | main(java.lang.String[] args)Runs this test from the command line.
DOMTestCase.doMain(domimplementationfeaturexmlversion2.class, args);
| public void | runTest()Runs the test case.
Document doc;
DOMImplementation domImpl;
boolean state;
doc = (Document) load("staff", false);
domImpl = doc.getImplementation();
state = domImpl.hasFeature("xml", "2.0");
assertTrue("domimplementationFeaturexmlVersion2Assert", state);
|
|