KML 2.2 Validator

Scope

The OGC KML conformance test suite implements the abstract test suite (ATS) for OGC KML 2.2 and provides a basis for verifying the structure and content of KML 2.2 documents.

Three conformance levels are defined in the KML 2.2 specification, where each level builds upon the lower level by imposing additional constraints; these essentially correspond to the imperative terms defined in RFC 2119 (MUST, SHOULD, MAY).

The test suite definition file (testng.xml) is located in the root package, org.opengis.cite.kml22. A conformance class corresponds to a <test> element; each test element includes a set of test classes that contain the actual test methods. The essential structure of the test suite is shown in Table 1.

Table 1 - Test suite structure
Conformance class Test classes
Level 1
  • org.opengis.cite.kml22.level1.KmlDocumentTests
  • org.opengis.cite.kml22.level1.SpatialTests
  • org.opengis.cite.kml22.level1.StyleTests
  • org.opengis.cite.kml22.level1.TemporalElementTests
  • org.opengis.cite.kml22.level1.LinkTests
  • org.opengis.cite.kml22.level1.FeatureTests
  • org.opengis.cite.kml22.level1.UserDefinedDataTests
  • org.opengis.cite.kml22.level1.ViewTests
Level 2
  • org.opengis.cite.kml22.level2.Level2Tests
  • org.opengis.cite.kml22.level2.Recommendations
  • org.opengis.cite.kml22.level2.StyleRecommendations
Level 3
  • org.opengis.cite.kml22.level3.Level3Tests
  • org.opengis.cite.kml22.level3.Options

The Javadoc documentation provides more detailed information about the test classes and test methods that comprise the suite.

Test requirements

The documents listed below stipulate requirements that must be satisfied by a conforming instance document.

How to run the tests

The test suite may be run in any of the following environments:

The test run arguments are summarized in Table 2. The value domain is expressed in terms of XML Schema datatypes for convenience. The Obligation descriptor can have the following values: M (mandatory), O (optional), or C (conditional).

Table 2 - Test run arguments
Name Value domain Obligation Description
iut anyURI M A URI that refers to the instance document under test. Ampersand ('&') characters must be percent-encoded as '%26'.
ics positiveInteger O Indicates which conformance level (1-3) will be used to validate the instance document. If not specified, the lowest conformance level will be checked (ics=1).