FileDocCategorySizeDatePackage
domimplementationfeaturexmlversion2.javaAPI DocAndroid 1.5 API3058Wed May 06 22:41:04 BST 2009org.w3c.domts.level2.core

domimplementationfeaturexmlversion2

public 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".
author
NIST
author
Mary Brady
see
http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7

Fields Summary
Constructors Summary
public domimplementationfeaturexmlversion2(org.w3c.domts.DOMTestDocumentBuilderFactory factory)
Constructor.

param
factory document factory, may not be null
throws
org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration

      super(factory);

    //
    //   check if loaded documents are supported for content type
    //
    String contentType = getContentType();
    preload(contentType, "staff", false);
    
Methods Summary
public java.lang.StringgetTargetURI()
Gets URI that identifies the test.

return
uri identifier of test

      return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/domimplementationfeaturexmlversion2";
   
public static voidmain(java.lang.String[] args)
Runs this test from the command line.

param
args command line arguments

        DOMTestCase.doMain(domimplementationfeaturexmlversion2.class, args);
   
public voidrunTest()
Runs the test case.

throws
Throwable Any uncaught exception causes test to fail

      Document doc;
      DOMImplementation domImpl;
      boolean state;
      doc = (Document) load("staff", false);
      domImpl = doc.getImplementation();
      state = domImpl.hasFeature("xml", "2.0");
assertTrue("domimplementationFeaturexmlVersion2Assert", state);