<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:apache-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache" elementFormDefault="qualified" version="5.5">
      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="oval-common-schema.xsd"/>
      <xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
      <xsd:annotation>
            <xsd:documentation>The following is a description of the elements, types, and attributes that compose the Apache specific tests found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here.</xsd:documentation>
            <xsd:documentation>The OVAL Schema is maintained by The Mitre Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
            <xsd:appinfo>
                  <schema>Apache Definition</schema>
                  <version>5.5</version>
                  <date>9/26/2008 7:30:54 AM</date>
                  <terms_of_use>Copyright (c) 2002-2008, The MITRE Corporation. All rights reserved.  The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema.  When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
                  <sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
                  <sch:ns prefix="apache-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache"/>
                  <sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
            </xsd:appinfo>
      </xsd:annotation>
      <!-- =============================================================================== -->
      <!-- =================================  HTTPD TEST  ================================ -->
      <!-- =============================================================================== -->
      <xsd:element name="httpd_test" substitutionGroup="oval-def:test">
            <xsd:annotation>
                  <xsd:documentation>The httpd test is used to check the version of an installed httpd binary. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an httpd_test and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
                  <xsd:appinfo>
                        <sch:pattern id="httpdtst">
                              <sch:rule context="apache-def:httpd_test/apache-def:object">
                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/apache-def:httpd_object/@id"><sch:value-of select="../@id"/> - the object child element of a httpd_test must reference a httpd_object</sch:assert>
                              </sch:rule>
                              <sch:rule context="apache-def:httpd_test/apache-def:state">
                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/apache-def:httpd_state/@id"><sch:value-of select="../@id"/> - the state child element of a httpd_test must reference a httpd_state</sch:assert>
                              </sch:rule>
                        </sch:pattern>
                  </xsd:appinfo>
            </xsd:annotation>
            <xsd:complexType>
                  <xsd:complexContent>
                        <xsd:extension base="oval-def:TestType">
                              <xsd:sequence>
                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
                              </xsd:sequence>
                        </xsd:extension>
                  </xsd:complexContent>
            </xsd:complexType>
      </xsd:element>
      <xsd:element name="httpd_object" substitutionGroup="oval-def:object">
            <xsd:annotation>
                  <xsd:documentation>The httpd_object element is used by a httpd test to define the different httpd binary installed on a system. There is actually only one object relating to this and it is the collection of all httpd binaries. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element. A tool that implements the httpd_test and collects the httpd_object must know how to find all the httpd binaries on the system and verify that they are in fact httpd binaries.</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
                  <xsd:complexContent>
                        <xsd:extension base="oval-def:ObjectType"/>
                  </xsd:complexContent>
            </xsd:complexType>
      </xsd:element>
      <xsd:element name="httpd_state" substitutionGroup="oval-def:state">
            <xsd:annotation>
                  <xsd:documentation>The version_state element defines information associated with a specific httpd binary.</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
                  <xsd:complexContent>
                        <xsd:extension base="oval-def:StateType">
                              <xsd:sequence>
                                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                                          <xsd:annotation>
                                                <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
                                                <xsd:appinfo>
                                                      <sch:pattern id="httpdstepath">
                                                            <sch:rule context="apache-def:httpd_state/apache-def:path">
                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the path entity of a httpd_state should be 'string'</sch:assert>
                                                            </sch:rule>
                                                      </sch:pattern>
                                                </xsd:appinfo>
                                          </xsd:annotation>
                                    </xsd:element>
                                    <xsd:element name="binary_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1" nillable="true">
                                          <xsd:annotation>
                                                <xsd:documentation>The filename element specifies the name of the file. If the nillable attribute is set to true, then the object being specified is the higher level path. In this case, the filename element should not be collected or used in analysis. Setting nil equal to true is different than using a .* pattern match, says to collect every file under a given path.</xsd:documentation>
                                                <xsd:appinfo>
                                                      <sch:pattern id="httpdstebinaryname">
                                                            <sch:rule context="apache-def:httpd_state/apache-def:binary_name">
                                                                  <sch:assert test="not(@datatype) or @datatype='string'"><sch:value-of select="../@id"/> - datatype attribute for the binary_name entity of a httpd_state should be 'string'</sch:assert>
                                                            </sch:rule>
                                                      </sch:pattern>
                                                </xsd:appinfo>
                                          </xsd:annotation>
                                    </xsd:element>
                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                                          <xsd:annotation>
                                                <xsd:documentation>The version entity is used to check the version of the httpd binary. The datatype for the version entity is 'version' which means the value should be a delimited set of numbers. It is obtained by running 'httpd -v'.</xsd:documentation>
                                                <xsd:appinfo>
                                                      <sch:pattern id="httpdsteversion">
                                                            <sch:rule context="apache-def:httpd_state/apache-def:version">
                                                                  <sch:assert test="@datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of a httpd_state should be 'version'</sch:assert>
                                                            </sch:rule>
                                                      </sch:pattern>
                                                </xsd:appinfo>
                                          </xsd:annotation>
                                    </xsd:element>
                              </xsd:sequence>
                        </xsd:extension>
                  </xsd:complexContent>
            </xsd:complexType>
      </xsd:element>
      <!-- =============================================================================== -->
      <!-- ================================  VERSION TEST  =============================== -->
      <!-- =============================================================================== -->
      <xsd:element name="version_test" substitutionGroup="oval-def:test">
            <xsd:annotation>
                  <xsd:documentation>This test has been deprecated. It will be removed from the next major version release (6.0) of the OVAL Schema. It has been replaced by the httpd_test.</xsd:documentation>
                  <xsd:documentation>The version test is used to check the version of Apache installed system. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an version_object and the optional state element specifies the data to check. The evaluation of the test is guided by the check attribute that is inherited from the TestType.</xsd:documentation>
                  <xsd:appinfo>
                        <sch:pattern id="apachevertst">
                              <sch:rule context="apache-def:version_test/apache-def:object">
                                    <sch:assert test="@object_ref=/oval-def:oval_definitions/oval-def:objects/apache-def:version_object/@id"><sch:value-of select="../@id"/> - the object child element of a version_test must reference a version_object</sch:assert>
                              </sch:rule>
                              <sch:rule context="apache-def:version_test/apache-def:state">
                                    <sch:assert test="@state_ref=/oval-def:oval_definitions/oval-def:states/apache-def:version_state/@id"><sch:value-of select="../@id"/> - the state child element of a version_test must reference a version_state</sch:assert>
                              </sch:rule>
                        </sch:pattern>
                  </xsd:appinfo>
            </xsd:annotation>
            <xsd:complexType>
                  <xsd:complexContent>
                        <xsd:extension base="oval-def:TestType">
                              <xsd:sequence>
                                    <xsd:element name="object" type="oval-def:ObjectRefType" minOccurs="1" maxOccurs="1"/>
                                    <xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="1"/>
                              </xsd:sequence>
                        </xsd:extension>
                  </xsd:complexContent>
            </xsd:complexType>
      </xsd:element>
      <xsd:element name="version_object" substitutionGroup="oval-def:object">
            <xsd:annotation>
                  <xsd:documentation>This object has been deprecated. It will be removed from the next major version release (6.0) of the OVAL Schema. It has been replaced by the httpd_object.</xsd:documentation>
                  <xsd:documentation>The version_object element is used by a version test to define the different version information associated with an Apache installation. There is actually only one object relating to version and this is the Apche installation as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check version will reference the same version_object which is basically an empty object element.</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
                  <xsd:complexContent>
                        <xsd:extension base="oval-def:ObjectType"/>
                  </xsd:complexContent>
            </xsd:complexType>
      </xsd:element>
      <xsd:element name="version_state" substitutionGroup="oval-def:state">
            <xsd:annotation>
                  <xsd:documentation>This state has been deprecated. It will be removed from the next major version release (6.0) of the OVAL Schema. It has been replaced by the httpd_state.</xsd:documentation>
                  <xsd:documentation>The version_state element defines the version information of an Apache installation. This is obtained by running 'httpd -v'.</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
                  <xsd:complexContent>
                        <xsd:extension base="oval-def:StateType">
                              <xsd:sequence>
                                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                                          <xsd:annotation>
                                                <xsd:documentation>The version entity is used to check the version of the Apache installation.</xsd:documentation>
                                                <xsd:appinfo>
                                                      <sch:pattern id="apcheversteversion">
                                                            <sch:rule context="apache-def:version_state/apache-def:version">
                                                                  <sch:assert test="not(@datatype) or @datatype='version'"><sch:value-of select="../@id"/> - datatype attribute for the version entity of an version_state should be 'version'</sch:assert>
                                                            </sch:rule>
                                                      </sch:pattern>
                                                </xsd:appinfo>
                                          </xsd:annotation>
                                    </xsd:element>
                              </xsd:sequence>
                        </xsd:extension>
                  </xsd:complexContent>
            </xsd:complexType>
      </xsd:element>
      <!-- =============================================================================== -->
      <!-- =============================================================================== -->
      <!-- =============================================================================== -->
</xsd:schema>
