//**************************************************************************
//
//
//                       National Institute Of Standards and Technology
//                                     DTS Version 1.0
//
//                              DOMImplementation Interface
//**************************************************************************

var i = 2;

function DOMImplementation()
{
   var tests = new Array (core0001DI(), core0002DI(), core0003DI(),
			  core0004DI(), core0005DI());

  
   return tests;
}
//------------------------ test case core-0001DI ------------------------
//
// Testing feature - The "feature" parameter in the 
//                   "hasFeature(feature,version)" method is the package 
//                   name of the feature.  Legal values are HTML and XML.
//                   (test for XML, upper case)
//
// Testing approach - Retrieve the entire DOM document and invoke its
//                    "implementation" attribute.  This should create
//                    a DOMImplementation object whose "hasFeature(feature,
//                    version)" method is invoked with feature = "XML".  The
//                    method should return a true value. 
//
// Semantic Requirements: 1, 2, 4
//
// Last modification date - April, 29 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0001DI()
 {
   var computedValue = "";
   var expectedValue = true;
   var testNode = "";

   results = new testResults("Core0001DI");

   results.description = "Check for feature = XML in the \"hasFeature(feature,version)\" method."; 
//
// Retrieve the targeted data and invoke its "hasFeature(feature,version)".
// method.
//
    testNode = getDOMDocument();
    computedValue = testNode.implementation.hasFeature("XML","1.0");
//
// Write out results.
//

    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}
//------------------------ End test case core-0001DI --------------------------
//
//------------------------ test case core-0002DI ------------------------
//
// Testing feature - The "feature" parameter in the
//                   "hasFeature(feature,version)" method is the package
//                   name of the feature.  Legal values are HTML and XML.
//                   (test for XML, lower case)
//
// Testing approach - Retrieve the entire DOM document and invoke its
//                    "implementation" attribute.  This should create
//                    a DOMImplementation object whose "hasFeature(feature,
//                    version)" method is invoked with feature = "xml".  The
//                    method should return a true value.
//
// Semantic Requirements: 1, 2, 4
//
// Last modification date - April, 29 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0002DI()
 {
   var computedValue = "";
   var expectedValue = true;
   var testNode = "";


   results = new testResults("Core0002DI");

   results.description = "Check for feature = xml in the \"hasFeature(feature,version)\" method."; 
//
// Retrieve the targeted data and invoke its "hasFeature(feature,version)".
// method.
//
    testNode = getDOMDocument();
    computedValue = testNode.implementation.hasFeature("xml","1.0");
//
// Write out results.
//

    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}
//------------------------ End test case core-0002DI --------------------------
//
//------------------------ test case core-0003DI ------------------------
//
// Testing feature - The "feature" parameter in the
//                   "hasFeature(feature,version)" method is the package
//                   name of the feature.  Legal values are HTML and XML.
//                   (test for HTML, upper case)
//
// Testing approach - Retrieve the entire DOM document and invoke its
//                    "implementation" attribute.  This should create
//                    a DOMImplementation object whose "hasFeature(feature,
//                    version)" method is invoked with feature = "HTML".  The
//                    method should return a true or false value.  Since this
//                    is the XML section of the specs, either value for the
//                    HTML feature will be acceptable.
//
// Semantic Requirements: 1, 2, 4, 5
//
// Last modification date - April, 29 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0003DI()
 {
   var computedValue = "";
   var expectedValue = (true, false);
   var testNode = "";


   results = new testResults("Core0003DI");

   results.description = "Check for feature = HTML in the \"hasFeature(feature,version)\" method."; 
//
// Retrieve the targeted data and invoke its "hasFeature(feature,version)".
// method.
//
    testNode = getDOMDocument();
    computedValue = testNode.implementation.hasFeature("HTML","1.0");
//
// Write out results.
//

    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}
//------------------------ End test case core-0003DI --------------------------
//
//------------------------ test case core-0004DI ------------------------
//
// Testing feature - The "feature" parameter in the
//                   "hasFeature(feature,version)" method is the package
//                   name of the feature.  Legal values are HTML and XML.
//                   (test for HTML, lower case)
//
// Testing approach - Retrieve the entire DOM document and invoke its
//                    "implementation" attribute.  This should create
//                    a DOMImplementation object whose "hasFeature(feature,
//                    version)" method is invoked with feature = "html".  The
//                    method should return a true or false value.  Since this
//                    is the XML section of the specs, either value for the
//                    HTML feature will be acceptable.
//
// Semantic Requirements: 1, 2, 4, 5
//
// Last modification date - April, 29 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0004DI()
 {
   var computedValue = "";
   var expectedValue = (true, false);
   var testNode = "";


   results = new testResults("Core0004DI");

   results.description = "Check for feature = html in the \"hasFeature(feature,version)\" method."; 
//
// Retrieve the targeted data and invoke its "hasFeature(feature,version)".
// method.
//
    testNode = getDOMDocument();
    computedValue = testNode.implementation.hasFeature("html","1.0");
//
// Write out results.
//

    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}
//------------------------ End test case core-0004DI --------------------------
//
//------------------------ test case core-0005DI ------------------------
//
// Testing feature - if the The "version" parameter is not specified in the 
//                   "hasFeature(feature,version)" method then supporting
//                   any version of the feature will cause the method to 
//                   return true.
//
// Testing approach - Retrieve the entire DOM document and invoke its
//                    "implementation" attribute.  This should create
//                    a DOMImplementation object whose "hasFeature(feature,
//                    version)" method is invoked with version = "".  The
//                    method should return a true value for any supported 
//                    version of the feature.
//
// Semantic Requirements: 3
//
// Last modification date - April, 29 1999
//
// Written by: Carmelo Montanez
//----------------------------------------------------------------------------

 function core0005DI()
 {
   var computedValue = "";
   var expectedValue = true;
   var testNode = "";


   results = new testResults("Core0005DI");

   results.description = "Check for version not specified in the " +
                         "\"hasFeature(feature,version)\" method."; 
//
// Retrieve the targeted data and invoke its "hasFeature(feature,version)".
// method.
//
    testNode = getDOMDocument();
    computedValue = testNode.implementation.hasFeature("XML","");
//
// Write out results.
//

    results.expected = expectedValue;
    results.actual = computedValue;

    return results;
}
//------------------------ End test case core-0005DI --------------------------