<?xml version="1.0" encoding="UTF-8"?>
<!--
    DOCUMENT:		ocil.xsd
    CREATED ON:	7 February 2005 (Interactive Schema)
    LAST UPDATED ON:	20 November 2008 (OCIL)
    AUTHORS:		David Waltermire, Jon Baker, Maria Casipe, Charles Schmidt
    VERSION:		1.0
    
    DESCRIPTION:	XML Schema for defining interactive questions to be used as external checks
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:inter="http://www.mitre.org/ocil/1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace"
	targetNamespace="http://www.mitre.org/ocil/1.0" elementFormDefault="qualified"
	attributeFormDefault="unqualified">

	<xsd:annotation>
		<xsd:documentation>VERSION 1.0</xsd:documentation>
		<xsd:documentation> The Open Checklist Interactive Language (OCIL) is a language to express
			a set of questions to be presented to a user and procedures to interpret responses to
			these questions for the purpose of developing security checklists. Although its intended
			domain of use is IT security, its generic nature allows for other applications. For
			instance, it could be used for authoring research surveys, academic course exams, and
			instructional walkthroughs. </xsd:documentation>
		<xsd:documentation> This document was originally developed by David Waltermire (The Center
			for Internet Security) and has been revised by The MITRE Corp with input from the
			security benchmark community. It is intended for developers and assumes familiarity with
			XML. </xsd:documentation>
	</xsd:annotation>

	<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
		schemaLocation="http://www.w3.org/2001/03/xml.xsd">
		<xsd:annotation>
			<xsd:documentation> This namespace is required for xml:lang support.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:import>

	<!-- **************************************************************************** -->
	<!-- *   ocil (Root) Element                                          			* -->
	<!-- **************************************************************************** -->
	<xsd:element name="ocil">
		<xsd:annotation>
			<xsd:documentation> The ocil element is the root XML element of an OCIL document. It
				contains information about one or more questionnaires. It may also contain results
				elements to store prior responses. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="generator" type="inter:GeneratorType" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>The generator element contains information related to the
							generation of the file. Specifically, a generator contains information
							about the application used to create the file, when it was created, and
							the schema to use to validate it. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="document" type="inter:DocumentType" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation> This element contains document-level information,
							including title, descriptions, and notices. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="inter:questionnaire" minOccurs="1" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>A questionnaire contains a set of questions that
							determines compliance with a check. Each questionnaire returns a value
							based on the responses to the various questions that it references. Each
							questionnaire should represent a single compliance check, such as might
							be referenced by an XCCDF Rule.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="inter:test_action" minOccurs="1" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>The test_action element contains information about what
							action to take based on the answer to a referenced question element
							within a questionnaire. It can be a compound_test_action,
							boolean_question_test_action, choice_question_test_action,
							numeric_question_test_action, or string_question_test_action.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="inter:question" minOccurs="1" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>The question element contains information for a single
							question to be answered. Based on the data type of acceptable answers to
							the question, it can be a boolean_question, choice_question,
							numeric_question, or string_question. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="inter:choice_group" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> Holds choice groups which represent possible sets of
							choices for choice_questions. Choice_groups may be reused across
							multiple choice_questions. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="inter:results" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>The results element contains the results of an evaluation
							of the OCIL file. This includes records of all questionnaire results,
							question results, and test_action results.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
			<xsd:attribute name="scope" use="optional" default="FULL" type="inter:ScopeType">
				<xsd:annotation>
					<xsd:documentation>This specifies the test_actions referenced by the
						questionnaires in this document should be evaluated. If a value of FULL is
						provided, then all test_actions in a questionnaire will be evaluated
						regardless of whether the result can be known ahead of time. If a value of
						SHORT is provided a questionnaire will stop evaluating test_actions as soon
						as the final result has been determined. (For example, if one test_action
						evaluates to FAIL and the test_actions of a questionnaire are being ANDed
						together, the result is immediately known to be FAIL regardless of the
						results of other test_actions. If the scope is FULL, even though it is known
						that the questionnaire will return FAIL, the other test_actions will still
						be evaluated. If the scope is SHORT, no further test_actions would be
						evaluated since the final result had been determined.)</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>

		<!-- **************************************************************************** -->
		<!-- *  Questionnaire  references		                                                      	* -->
		<!-- **************************************************************************** -->
		<xsd:key name="questionnaireIdKey">
			<xsd:selector xpath="inter:questionnaire"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:questionnaireIdKey" name="questionnaireKeyRef">
			<xsd:selector xpath=".//inter:questionnaire_result"/>
			<xsd:field xpath="@questionnaire_ref"/>
		</xsd:keyref>

		<!-- **************************************************************************** -->
		<!-- *  Test Action  references		                                                      	* -->
		<!-- **************************************************************************** -->
		<xsd:key name="testActionIdKey">
			<xsd:annotation>
				<xsd:documentation>test_actions include question_test_action and
					compound_test_action (Questionnaires are CompoundTestAction)</xsd:documentation>
			</xsd:annotation>
			<xsd:selector
				xpath="inter:boolean_question_test_action|inter:choice_question_test_action|inter:numeric_question_test_action|inter:string_question_test_action|inter:questionnaire"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:testActionIdKey" name="testActionKeyRef">
			<xsd:selector xpath=".//inter:test_action_ref"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:keyref refer="inter:testActionIdKey" name="testActionResultKeyRef">
			<xsd:selector xpath=".//inter:test_action_result"/>
			<xsd:field xpath="@test_action_ref"/>
		</xsd:keyref>

		<!-- **************************************************************************** -->
		<!-- *  Question references		                                                      	* -->
		<!-- **************************************************************************** -->
		<xsd:key name="booleanQuestionIdKey">
			<xsd:selector xpath="inter:boolean_question"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:booleanQuestionIdKey" name="booleanQuestionTestActionKeyRef">
			<xsd:selector xpath="inter:boolean_question_test_action|inter:boolean_question_result"/>
			<xsd:field xpath="@question_ref"/>
		</xsd:keyref>
		<xsd:key name="choiceQuestionIdKey">
			<xsd:selector xpath="inter:choice_question"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:choiceQuestionIdKey" name="choiceQuestionTestActionKeyRef">
			<xsd:selector xpath="inter:choice_question_test_action|inter:choice_question_result"/>
			<xsd:field xpath="@question_ref"/>
		</xsd:keyref>
		<xsd:key name="numericQuestionIdKey">
			<xsd:selector xpath="inter:numeric_question"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:numericQuestionIdKey" name="numericQuestionTestActionKeyRef">
			<xsd:selector xpath="inter:numeric_question_test_action|inter:numeric_question_result"/>
			<xsd:field xpath="@question_ref"/>
		</xsd:keyref>
		<xsd:key name="stringQuestionIdKey">
			<xsd:selector xpath="inter:string_question"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:stringQuestionIdKey" name="stringQuestionTestActionKeyRef">
			<xsd:selector xpath="inter:string_question_test_action|inter:string_question_result"/>
			<xsd:field xpath="@question_ref"/>
		</xsd:keyref>

		<!-- **************************************************************************** -->
		<!-- *  Choice and choice_group reference keys		                   	* -->
		<!-- **************************************************************************** -->
		<xsd:key name="choiceIdKey">
			<xsd:selector xpath=".//inter:choice"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:choiceIdKey" name="choiceIdKeyRef">
			<xsd:selector xpath=".//inter:when_choice/inter:choice_ref"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:keyref refer="inter:choiceIdKey" name="defaultAnswerKeyRef">
			<xsd:selector xpath=".//inter:choice_question"/>
			<xsd:field xpath="@default_answer_ref"/>
		</xsd:keyref>
		<xsd:key name="choiceGroupIdKey">
			<xsd:selector xpath=".//inter:choice_group"/>
			<xsd:field xpath="@id"/>
		</xsd:key>
		<xsd:keyref refer="inter:choiceGroupIdKey" name="choiceGroupIdKeyRef">
			<xsd:selector xpath=".//inter:choice_question/inter:choice_group_ref"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
	</xsd:element>


	<!-- **************************************************************************** -->
	<!-- *   Questionnaire Element                                                      		* -->
	<!-- **************************************************************************** -->
	<xsd:element name="questionnaire">
		<xsd:annotation>
			<xsd:documentation>A questionnaire represents specific question or set of questions that
				evaluate to a single result. A questionnaire may contain multiple test_actions.
				test_actions may be nested and aggregated thru some acceptable operation to produce
				the result of a check. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:CompoundTestActionType">
					<xsd:attribute name="id" type="inter:QuestionnaireIDPattern" use="required">
						<xsd:annotation>
							<xsd:documentation> Each questionnaire is required to have a unique
								identifier that conforms to the definition of NCName in the
								Recommendation "Namespaces in XML 1.0", i.e., all XML 1.0 names that
								does not contain colons. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="priority" type="inter:PriorityType" use="optional"
						default="LOW">
						<xsd:annotation>
							<xsd:documentation> Priority is an optional attribute that can either be
								HIGH, MEDIUM or LOW. It specifies the importance of a paritcular
								test action reference. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="child_only" type="xsd:boolean" use="optional"
						default="false">
						<xsd:annotation>
							<xsd:documentation>This attribute specifies whether or not this
								questionnaire should only appear as a child of another
								questionnaire. All questionnaires must be defined within the body of
								the ocil element and, by default, interpreters might simply grab all
								questionnaires and present them to a user. However, questionnaires
								can reference other questionnaires through a test_action_ref. If an
								author references a questionnaire in this way they may not wish that
								the questionnaire be presented to a user except as a child of
								another questionnaire. By setting the child_only attribute to true,
								the author is indicating that the given questionnaire should not be
								a "top-level" questionnaire but should instead only be presented as
								the child of another questionnaire.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- **************************************************************************** -->
	<!-- *   Question Elements                                                      			* -->
	<!-- **************************************************************************** -->
	<xsd:element name="question" type="inter:QuestionType" abstract="true">
		<xsd:annotation>
			<xsd:documentation> A question elements contains information one question that needs to
				be answered by a user. It can be a boolean_question, choice_question,
				numeric_question, or string_question depending on the set of acceptable answers.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="boolean_question" substitutionGroup="inter:question">
		<xsd:annotation>
			<xsd:documentation> A boolean_question is a type of question with valid responses of
				either {TRUE, FALSE} or {YES, NO}. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionType">
					<xsd:attribute name="default_answer" type="xsd:boolean" use="optional">
						<xsd:annotation>
							<xsd:documentation> The default_answer attribute specifies the default
								value of the boolean_question. Its value may be set to true or
								false.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="model" default="MODEL_YES_NO" use="optional"
						type="inter:BooleanQuestionModelType">
						<xsd:annotation>
							<xsd:documentation> The model attribute specifies whether to the user
								should respond with {True, False} or {YES, NO}. If the value of this
								attribute is not set, then it defaults to MODEL_YES_NO (i.e.
								response can either be YES or NO). </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="choice_question" substitutionGroup="inter:question">
		<xsd:annotation>
			<xsd:documentation> A choice_question is a type of question element with one or more
				acceptable answers specified by the author. The user will select one of these
				specified answers as their response. Acceptable answers are specified either
				explicitly using the choice element or implicitly using the choice_group_ref element
				to reference a choice_group element. Choices are presented in the order in which
				they are provided. All the choices in a choice_group are inserted in the order in
				which they appear within the choice_group. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionType">
					<xsd:choice minOccurs="1" maxOccurs="unbounded">
						<xsd:element ref="inter:choice">
							<xsd:annotation>
								<xsd:documentation> Holds the information associated with one of the
									possible responses to this choice_question. </xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="choice_group_ref" type="inter:ChoiceGroupIDPattern">
							<xsd:annotation>
								<xsd:documentation> Holds a reference to a choice_group. The
									questions described in this choice group are used as possible
									responses for this choice_question. </xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:choice>
					<xsd:attribute name="default_answer_ref" type="inter:ChoiceIDPattern"
						use="optional">
						<xsd:annotation>
							<xsd:documentation> The default_answer_ref specifies the choice id of
								the default answer to the question. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
		<xsd:unique name="choiceGroupIdUniqueInQuestion">
			<xsd:selector xpath="inter:choice_group_ref"/>
			<xsd:field xpath="."/>
		</xsd:unique>
	</xsd:element>
	<xsd:element name="numeric_question" substitutionGroup="inter:question">
		<xsd:annotation>
			<xsd:documentation> A numeric_question is a type of question_element that requires a
				numeric answer. Acceptable values may be positive or negative and may include
				decimals.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionType">
					<xsd:attribute name="default_answer" type="xsd:decimal" use="optional">
						<xsd:annotation>
							<xsd:documentation> An optional default value may be specified as the
								answer. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="string_question" substitutionGroup="inter:question">
		<xsd:annotation>
			<xsd:documentation> A string_question is a type of question element that requires a
				string answer. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionType">
					<xsd:attribute name="default_answer" type="xsd:string" use="optional">
						<xsd:annotation>
							<xsd:documentation> An optional default value may be specified as the
								answer. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- **************************************************************************** -->
	<!-- *   TestAction Elements                                                      		* -->
	<!-- **************************************************************************** -->
	<xsd:element name="test_action" type="inter:ItemBaseType" abstract="true">
		<xsd:annotation>
			<xsd:documentation>This is a common base element for the question_test_action element.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="question_test_action" type="inter:QuestionTestActionType" abstract="true"
		substitutionGroup="inter:test_action">
		<xsd:annotation>
			<xsd:documentation> The question_test_action element contains a reference to a single
				question along with a set of handlers that indicate how processing should proceed
				based on the answer provided by the user. This element is abstract and is
				implemented in a document as a boolean_test_action, choice_test_action,
				numeric_test_action, or string_test_action. The type of question_test_action must
				match the type of question referenced. (E.g. a boolean_test_action MUST reference a
				boolean_question, etc..) </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="boolean_question_test_action" substitutionGroup="inter:question_test_action">
		<xsd:annotation>
			<xsd:documentation> A boolean_question_test_action element references a boolean_question
				and includes handlers for TRUE (YES) or FALSE (NO) responses. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionTestActionType">
					<xsd:sequence>
						<xsd:element name="when_true" type="inter:ResultChoiceType" minOccurs="1"
							maxOccurs="1">
							<xsd:annotation>
								<xsd:documentation>The element when_true specifies the action to do
									when the answer is true.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="when_false" type="inter:ResultChoiceType" minOccurs="1"
							maxOccurs="1">
							<xsd:annotation>
								<xsd:documentation>The element when_false specifies the action to do
									when the answer is false.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="choice_question_test_action" substitutionGroup="inter:question_test_action">
		<xsd:annotation>
			<xsd:documentation>A choice_question_test_action element references a choice_question
				and includes handlers for the various choices set out in the choice_question.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionTestActionType">
					<xsd:sequence>
						<xsd:element ref="inter:when_choice" minOccurs="1" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation> Specifies the action to perform when the
									indicated choice is selected by the user. </xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
		<xsd:unique name="choiceRefUniqueInTestAction">
			<xsd:annotation>
				<xsd:documentation> Ensure that no choice_test_action has multiple branches for a
					single choice </xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath="inter:when_choice/inter:choice_ref"/>
			<xsd:field xpath="."/>
		</xsd:unique>

	</xsd:element>
	<xsd:element name="numeric_question_test_action" substitutionGroup="inter:question_test_action">
		<xsd:annotation>
			<xsd:documentation>A numeric_question_test_action element references a numeric_question
				and includes handlers that indicate actions to perform based on whether the user's
				response matches a particular value or falls within a particular range.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionTestActionType">
					<xsd:choice>
						<xsd:annotation>
							<xsd:documentation> This structure is used to ensure that any number of
								when_equals and when_range handlers may appear, but there must be at
								least one handler (of one type or the other) and any when_equals
								handlers must precede any when_range. </xsd:documentation>
						</xsd:annotation>
						<xsd:sequence>
							<xsd:element ref="inter:when_equals" minOccurs="1" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation> This element holds information on what to do
										when the answer matches the specified value.
									</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element ref="inter:when_range" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation> This element holds information on what to do
										when the answer is within a specified range of values.
									</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
						</xsd:sequence>
						<xsd:element ref="inter:when_range" minOccurs="1" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation> This element holds information on what to do
									when the answer is within a specified range of values.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:choice>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="string_question_test_action" substitutionGroup="inter:question_test_action">
		<xsd:annotation>
			<xsd:documentation> A string_question_test_action element references a string_question
				and includes handlers that indicate actions to perform based on whether the user's
				response matches a given regular expression. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionTestActionType">
					<xsd:sequence>
						<xsd:element ref="inter:when_pattern" minOccurs="1" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation> This element holds information on what to do
									when the answer matches a specified regular expression pattern.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- **************************************************************************** -->
	<!-- *   Result Elements                                               			* -->
	<!-- **************************************************************************** -->
	<xsd:element name="results">
		<xsd:annotation>
			<xsd:documentation> The results element stores information about the results of
				processing the questionnaires, test_actions, and questions in a document.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="title" type="inter:TextType" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation> The title element contains a descriptive heading or
							caption describing the result set. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="target" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> The target element contains identifying information
							about the host that was targeted by the assessment. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="target_address" type="xsd:string" minOccurs="0"
					maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> The target_address element contains address information
							about the host that was targeted by the assessment. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="questionnaire_result" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> The questionnaire_result element contains information
							about the result of a particular questionnaire. </xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:attribute name="questionnaire_ref" type="inter:QuestionnaireIDPattern"
							use="required">
							<xsd:annotation>
								<xsd:documentation> The questionnaire_ref attribute identifies a
									particular questionnaire using its id. </xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
						<xsd:attribute name="result" type="inter:ResultType" use="required">
							<xsd:annotation>
								<xsd:documentation> The result attribute holds the result of
									evaluating the specified questionnaire. </xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
					</xsd:complexType>
				</xsd:element>
				<xsd:element ref="inter:question_result" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> A question_result element contains result information
							associated with a specific question. One of these elements (or rather,
							one of its derrived elements) will appear for each question
						evaluated.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="test_action_result" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> The test_action_result element contains the result of a
							test_action evaluation. One of these elements will appear for each
							test_action evaluated.</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:attribute name="test_action_ref" type="inter:TestActionRefValuePattern"
							use="required">
							<xsd:annotation>
								<xsd:documentation> The test_action_ref attribute identifies a
									specific test_action using its id. </xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
						<xsd:attribute name="result" type="inter:ResultType" use="required">
							<xsd:annotation>
								<xsd:documentation> The result attribute holds the result of
									evaluating the specified test_action specified.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
			<xsd:attribute name="start_time" type="xsd:dateTime" use="optional">
				<xsd:annotation>
					<xsd:documentation> The start_time attribute is an optional attribute the
						specifies when the evaluation of this OCIL file started.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="end_time" type="xsd:dateTime" use="optional">
				<xsd:annotation>
					<xsd:documentation> The end_time attribute is an optional attribute the
						specifies when the evaluation of this OCIL file ended. </xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="question_result" type="inter:QuestionResultType" abstract="true">
		<xsd:annotation>
			<xsd:documentation> A question_result element contains result information associated
				with a specific question. The specific type of question_result
				(boolean_question_result, choice_question_result, etc.) depends on the type of the
				associated question (boolean_question, choice_question, etc.) </xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="boolean_question_result" substitutionGroup="inter:question_result">
		<xsd:annotation>
			<xsd:documentation> A boolean_question_result element contains a reference to a
				boolean_question, the user's response, and whether the question was successfully
				posed. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionResultType">
					<xsd:sequence>
						<xsd:element name="answer" type="xsd:boolean" maxOccurs="1" nillable="true">
							<xsd:annotation>
								<xsd:documentation>The value of the answer to the boolean_question.
									It could either be TRUE or FALSE.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="choice_question_result" substitutionGroup="inter:question_result">
		<xsd:annotation>
			<xsd:documentation> A choice_question_result element contains a reference to a
				choice_question, the user's response, and whether the question was successfully
				posed. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionResultType">
					<xsd:sequence>
						<xsd:element name="answer" maxOccurs="1" nillable="true">
							<xsd:annotation>
								<xsd:documentation>The answer element contains a choice_ref
									attribute that identifies the choice selected by the
								user.</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:attribute name="choice_ref" type="inter:ChoiceIDPattern">
									<xsd:annotation>
										<xsd:documentation>The choice_ref attribute specifies an id
											of the choice selected by the user.</xsd:documentation>
									</xsd:annotation>
								</xsd:attribute>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="numeric_question_result" substitutionGroup="inter:question_result">
		<xsd:annotation>
			<xsd:documentation> A numeric_question_result element contains a reference to a
				numeric_question, the result provided by the user, and whether the question was
				successfully posed. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionResultType">
					<xsd:sequence>
						<xsd:element name="answer" type="xsd:decimal" maxOccurs="1" nillable="true">
							<xsd:annotation>
								<xsd:documentation>The decimal value of the answer to a
									numeric_question as provided by the user. </xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="string_question_result" substitutionGroup="inter:question_result">
		<xsd:annotation>
			<xsd:documentation> A string_question_result element contains a reference to a
				string_question, the string provided by the user in response, and whether the
				question was successfully posed. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:QuestionResultType">
					<xsd:sequence>
						<xsd:element name="answer" type="xsd:string" maxOccurs="1" nillable="true">
							<xsd:annotation>
								<xsd:documentation> The string value of the answer to a
									string_question provided by the user. </xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- **************************************************************************** -->
	<!-- *   Global Types                                                           			* -->
	<!-- **************************************************************************** -->
	<xsd:simpleType name="ScopeType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="FULL">
				<xsd:annotation>
					<xsd:documentation> The FULL value indicates that all questions must be asked
						regardless of whether or not it they are all needed to produce a result for
						a questionnaire. </xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="SHORT">
				<xsd:annotation>
					<xsd:documentation> The SHORT value indicates that once a result value can be
						computed for a questionnaire, then it is safe to stop asking questions.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="BooleanQuestionModelType">
		<xsd:annotation>
			<xsd:documentation> Provides the acceptable models (i.e. set of acceptable responses)
				for a boolean_question. </xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="MODEL_YES_NO">
				<xsd:annotation>
					<xsd:documentation> MODEL_YES_NO represents a response set of {YES, NO}.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="MODEL_TRUE_FALSE">
				<xsd:annotation>
					<xsd:documentation> MODEL_TRUE_FALSE represents a response set of {TRUE, FALSE}.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="OperatorType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="AND">
				<xsd:annotation>
					<xsd:documentation> The AND operator produces a true result if every argument is
						true. If one or more arguments are false, the result of the AND is false.
						See the truth table provided in the ResultType type for a complete list of
						how the various result types are combined by an AND operation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="OR">
				<xsd:annotation>
					<xsd:documentation> The OR operator produces a true result if one or more
						arguments is true. If every argument is false, the result of the OR is
						false. See the truth table provided in the ResultType type for a complete
						list of how the various result types are combined by an AND
					operation.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="CompoundTestActionType">
		<xsd:annotation>
			<xsd:documentation>The CompoundTestActionType type describes the structures used to
				combine multiple test_action elements into a single result.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="inter:ItemBaseType">
				<xsd:sequence>
					<xsd:element name="title" type="inter:TextType" minOccurs="0" maxOccurs="1">
						<xsd:annotation>
							<xsd:documentation> The title element contains a descriptive heading for
								this set of test_actions. </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="description" type="inter:TextType" minOccurs="0"
						maxOccurs="1">
						<xsd:annotation>
							<xsd:documentation> The description element contains a caption
								describing the set of test_actions. </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="reference" type="inter:ReferenceType" minOccurs="0"
						maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation> The reference element contains information about any
								external references related to this step. Examples could include
								references to other standards such as CVE, CCE, or CPE.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="actions" type="inter:OperationType" minOccurs="1"
						maxOccurs="1">
						<xsd:annotation>
							<xsd:documentation> The actions element holds one or more test_action
								elements along with the operators used to combine them into a single
								result.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="GeneratorType">
		<xsd:annotation>
			<xsd:documentation> The GeneratorType type defines an element that is used to hold
				information about when a particular OCIL document was generated, what version of the
				schema was used, what tool was used to generate the document, and what version of
				the tool was used. </xsd:documentation>
			<xsd:documentation>Additional generator information is also allowed although it is not
				part of the official OCIL language. Individual organizations can place generator
				information that they feel are important. </xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="product_name" type="xsd:string" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>The optional product_name specifies the name of the
						application used to generate the file.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="product_version" type="xsd:string" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>The optional product_version specifies the version of the
						application used to generate the file.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="author" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation> Identifies one of the authors of this document
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:string">
							<xsd:attribute name="organization" type="xsd:string" use="optional">
								<xsd:annotation>
									<xsd:documentation> Optionally, identify the organization for
										whom this author works. </xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="schema_version" type="xsd:decimal" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>The required schema_version specifies the version of the OCIL
						schema that the document has been written in and that should be used for
						validation.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="timestamp" type="xsd:dateTime" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>The required timestamp specifies when the particular OCIL
						document was generated. The format for the timestamp is yyyy-mm-ddThh:mm:ss.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="DocumentType">
		<xsd:annotation>
			<xsd:documentation> This type describes structures used to provide document-level
				information, including title, descriptions, and notices. </xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="title" type="xsd:string" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation> Used to provide a title for this document
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation> Each description element contains part of an overall
						description for the entire document. (Note that questionnaires contain their
						own description for questionnaire specific descriptions.)
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="notice" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation> Each notice contains a notice or warning to the user of this
						document. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="ItemBaseType">
		<xsd:annotation>
			<xsd:documentation> The ItemBaseType complex type defines structures allowing a set of
				notes to be included. This type is inherited by many of the elements in the OCIL
				language.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="notes" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation> An optional set of notes to describe additional information.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="OperationType">
		<xsd:annotation>
			<xsd:documentation> The OperationType type defines structures that hold a set of
				test_actions and provide instructions as to how to aggregate their individual
				results into a single result. </xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element ref="inter:test_action_ref" minOccurs="1" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation> The test_action_ref elements holds the identifier of a
						test_action element. At least one test_action_ref must be included.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="operation" default="AND" type="inter:OperatorType">
			<xsd:annotation>
				<xsd:documentation> The operation attribute describes how to aggregate the results
					of a set of testActions. Its value defaults to the Boolean operator "AND".
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="negate" type="xsd:boolean" default="false">
			<xsd:annotation>
				<xsd:documentation> The negate attribute can be used to specify whether to toggle
					the result from PASS to FAIL, and vice versa. A result other than PASS or FAIL
					(e.g. ERROR, NOT_TESTED, etc.) will be unchanged by a negate operation.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="priority" type="inter:PriorityType" use="optional" default="LOW">
			<xsd:annotation>
				<xsd:documentation> Priority is an optional attribute that can either be HIGH,
					MEDIUM or LOW. It specifies the importance of the referenced set of test_action
					elements. </xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="PatternType">
		<xsd:annotation>
			<xsd:documentation>The pattern element specifies a regular expression against which a
				string will be compared. </xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:annotation>
					<xsd:documentation>This contents of this field must be a Perl Compatable Regular
						Expression (PCRE). </xsd:documentation>
				</xsd:annotation>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<xsd:simpleType name="PriorityType">
		<xsd:annotation>
			<xsd:documentation> This type provides the possible priorities of a set of test_actions.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="HIGH"/>
			<xsd:enumeration value="MEDIUM"/>
			<xsd:enumeration value="LOW"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="QuestionTestActionType">
		<xsd:annotation>
			<xsd:documentation> The QuestionTestActionType type defines structures that are used to
				hold handlers for non-standard results (UNKNOWN, NOT_TESTED, NOT_APPLICABLE, and
				ERROR) received from a referenced question. All children of question_test_action
				extend this type. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="inter:ItemBaseType">
				<xsd:sequence>
					<xsd:element name="title" type="inter:TextType" minOccurs="0" maxOccurs="1">
						<xsd:annotation>
							<xsd:documentation> The title element contains a descriptive heading for
								this set of handlers. </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="when_unknown" type="inter:ResultChoiceType" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation> The when_unknown element contains processing
								instructions for when when the received result is UNKNOWN.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="when_not_tested" type="inter:ResultChoiceType" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation> The when_not_tested element contains processing
								instructions for when when the received result is NOT_TESTED.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="when_not_applicable" type="inter:ResultChoiceType"
						minOccurs="0">
						<xsd:annotation>
							<xsd:documentation> The when_not_applicable element contains processing
								instructions for when when the received result is NOT_APPLICABLE.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="when_error" type="inter:ResultChoiceType" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation> The when_error element contains processing
								instructions for when when the received result is ERROR.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:attribute name="question_ref" type="inter:QuestionIDPattern" use="required">
					<xsd:annotation>
						<xsd:documentation> The question_ref attribute contains the id value of a
							question element. </xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
				<xsd:attribute name="id" type="inter:QuestionTestActionIDPattern" use="required">
					<xsd:annotation>
						<xsd:documentation> Each item is required to have a unique identifier that
							conforms to the definition of NCName in the Recommendation "Namespaces
							in XML 1.0", i.e., all XML 1.0 names that does not contain colons.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="QuestionResultType">
		<xsd:annotation>
			<xsd:documentation> The QuestionResultType complex type defines structures that hold
				information about a question and the user's response to it. </xsd:documentation>
		</xsd:annotation>
		<xsd:attribute name="question_ref" type="inter:QuestionIDPattern" use="required">
			<xsd:annotation>
				<xsd:documentation> The question_ref attribute contains the id of a question.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="success" type="xsd:boolean" use="required">
			<xsd:annotation>
				<xsd:documentation> The success attribute indicates whether a question was
					successfully posed to the user. A value of true indicates a successfully posed
					question. A value of false indicates that there was a problem posing the
					question and will lead to an ERROR result state. </xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="QuestionType">
		<xsd:annotation>
			<xsd:documentation> The QuestionType complex type defines a structure to describe a
				question and any instructions to help in determining an answer. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="inter:ItemBaseType">
				<xsd:sequence>
					<xsd:element name="question_text" type="xsd:string" minOccurs="1"
						maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation> Provides the text of the question to pose to the
								user. </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="inter:instructions" minOccurs="0" maxOccurs="1">
						<xsd:annotation>
							<xsd:documentation> An optional instructions field may be included to
								hold additional instructions to assist the user in determining the
								answer to the question. </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:attribute name="id" type="inter:QuestionIDPattern" use="required">
					<xsd:annotation>
						<xsd:documentation> Each item is required to have a unique identifier that
							conforms to the definition of NCName in the Recommendation "Namespaces
							in XML 1.0", i.e., all XML 1.0 names that does not contain colons.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="RangeType">
		<xsd:annotation>
			<xsd:documentation> This type describes structures to define a range against which a
				numeric user response is to be compared. </xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="min" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation> The min element contains a minimum value.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:decimal">
							<xsd:attribute name="inclusive" type="xsd:boolean" default="true">
								<xsd:annotation>
									<xsd:documentation> The inclusive attribute specifies whether
										the minimum value should be in the specified range. The
										default is true, indicating it is included.
									</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="max" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation> The max element contains a maximum value.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="xsd:decimal">
							<xsd:attribute name="inclusive" type="xsd:boolean" default="true">
								<xsd:annotation>
									<xsd:documentation> The inclusive attribute specifies whether
										the minimum value should be included in the range. The
										default is true, indicating it is included.
									</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="ResultChoiceType">
		<xsd:annotation>
			<xsd:documentation> The ResultChoiceType complex type specifies processing instructions
				- either produce a result or move on to another test. The ResultChoiceType is
				extended by all handlers ("when_...") in test_actions.</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:element name="result" type="inter:ResultType">
				<xsd:annotation>
					<xsd:documentation> This element indicates that a final value (i.e. PASS, FAIL,
						ERROR, UNKNOWN, NOT_TESTED, NOT_APPLICABLE) should be returned if the
						encapsulating handler is invoked. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="inter:test_action_ref">
				<xsd:annotation>
					<xsd:documentation> This element indicates that a new test_action should be
						processed if the encapsulating handler is invoked. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:choice>
	</xsd:complexType>
	<xsd:simpleType name="ResultType">
		<xsd:annotation>
			<xsd:documentation>The ResultType simple type defines acceptable result values for
				questionnaires and test_actions.</xsd:documentation>
			<xsd:documentation> || P | F | E | U | NT | NA ||
				---------------||-----------------------------||------------------||------------------------------------------
				|| 1+ | 0 | 0 | 0 | 0 | 0+ || Pass || 0+ | 1+ | 0+ | 0+ | 0+ | 0+ || Fail AND || 0+
				| 0 | 1+ | 0+ | 0+ | 0+ || Error || 0+ | 0 | 0 | 1+ | 0+ | 0+ || Unknown || 0+ | 0 |
				0 | 0 | 1+ | 0+ || Not Tested || 0 | 0 | 0 | 0 | 0 | 1+ || Not Applicable || 0 | 0 |
				0 | 0 | 0 | 0 || Not Tested
				---------------||-----------------------------||------------------||------------------------------------------
				|| 1+ | 0+ | 0+ | 0+ | 0+ | 0+ || Pass || 0 | 1+ | 0 | 0 | 0 | 0+ || Fail OR || 0 |
				0+ | 1+ | 0+ | 0+ | 0+ || Error || 0 | 0+ | 0 | 1+ | 0+ | 0+ || Unknown || 0 | 0+ |
				0 | 0 | 1+ | 0+ || Not Tested || 0 | 0 | 0 | 0 | 0 | 1+ || Not Applicable || 0 | 0 |
				0 | 0 | 0 | 0 || Not Tested </xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="PASS">
				<xsd:annotation>
					<xsd:documentation>A PASS value indicates that the check passed its
					test.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="FAIL">
				<xsd:annotation>
					<xsd:documentation>A FAIL value indicates that the check did not pass its
					test.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="UNKNOWN">
				<xsd:annotation>
					<xsd:documentation>An UNKNOWN value indicates that the result of a test cannot
						be determined.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="ERROR">
				<xsd:annotation>
					<xsd:documentation>An ERROR value indicates that an error occured while
						processing the check.</xsd:documentation>
					<xsd:documentation> Among other causes, this can indicate an unexpected response
						from the user. </xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="NOT_TESTED">
				<xsd:annotation>
					<xsd:documentation>A NOT_TESTED value indicates that the check has not been
						tested yet. </xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="NOT_APPLICABLE">
				<xsd:annotation>
					<xsd:documentation>A NOT_APPLICABLE value indicates that the check is not
						relevant and can be skipped.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="TextType">
		<xsd:annotation>
			<xsd:documentation> The TextType complex type defines an element that holds any
				information. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="xsd:anyType">
				<xsd:attribute ref="xml:lang">
					<xsd:annotation>
						<xsd:documentation> This attribute specifies the language in which to
							interpret the information. </xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- **************************************************************************** -->
	<!-- *   ID Patterns                                                           			* -->
	<!-- **************************************************************************** -->
	<xsd:simpleType name="QuestionnaireIDPattern">
		<xsd:annotation>
			<xsd:documentation> ID values for questionnaires must match this pattern.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="ocil:[A-Za-z0-9_\-\.]+:questionnaire:[1-9][0-9]*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="QuestionIDPattern">
		<xsd:annotation>
			<xsd:documentation> ID values for questions must match this pattern. Each ID must be
				unique within an OCIL document. </xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="ocil:[A-Za-z0-9_\-\.]+:question:[1-9][0-9]*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="QuestionTestActionIDPattern">
		<xsd:annotation>
			<xsd:documentation> ID values for test_actions must match this pattern. Each ID must be
				unique within an OCIL document. </xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="ocil:[A-Za-z0-9_\-\.]+:testaction:[1-9][0-9]*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="TestActionRefValuePattern">
		<xsd:annotation>
			<xsd:documentation> A test_action_ref may refer to either a test_action or a
				questionnaire. This type represents the union of these two ID patterns.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="ocil:[A-Za-z0-9_\-\.]+:testaction:[1-9][0-9]*"/>
			<xsd:pattern value="ocil:[A-Za-z0-9_\-\.]+:questionnaire:[1-9][0-9]*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ChoiceIDPattern">
		<xsd:annotation>
			<xsd:documentation> ID values for choices in choice_questions must match this pattern.
				Each ID must be unique within an OCIL document. </xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="ocil:[A-Za-z0-9_\-\.]+:choice:[1-9][0-9]*"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ChoiceGroupIDPattern">
		<xsd:annotation>
			<xsd:documentation> ID values for choice_group references in choice_questions must match
				this pattern. Each ID must be unique within an OCIL document. </xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="ocil:[A-Za-z0-9_\-\.]+:choicegroup:[1-9][0-9]*"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!-- **************************************************************************** -->
	<!-- *   Global Elements                                                           			* -->
	<!-- **************************************************************************** -->
	<xsd:element name="test_action_ref">
		<xsd:annotation>
			<xsd:documentation> The test_action_ref element holds a reference (id) to a test_action
				or questionnaire. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:simpleContent>
				<xsd:extension base="inter:TestActionRefValuePattern">
					<xsd:attribute name="negate" type="xsd:boolean" default="false">
						<xsd:annotation>
							<xsd:documentation> The negate attribute can be used to specify whether
								to toggle the result from PASS to FAIL, and vice versa. A result
								other than PASS or FAIL (e.g. ERROR, NOT_TESTED, etc.) will be
								unchanged by a negate operation. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="priority" type="inter:PriorityType" use="optional"
						default="LOW">
						<xsd:annotation>
							<xsd:documentation> Priority is an optional attribute that can either be
								HIGH, MEDIUM or LOW. It specifies the importance of a priority test
								action reference. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:simpleContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="when_choice">
		<xsd:annotation>
			<xsd:documentation>The element when_choice specifies the action to take in a
				choice_test_action when a particular choice is selected by a user in response to a
				choice_question. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:ResultChoiceType">
					<xsd:sequence>
						<xsd:element name="choice_ref" type="inter:ChoiceIDPattern"
							maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>The choice_ref element specifies the id of a
									choice. </xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="choice">
		<xsd:annotation>
			<xsd:documentation> A choice element holds information about one acceptable answer to a
				choice_question. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:simpleContent>
				<xsd:extension base="xsd:string">
					<xsd:attribute name="id" type="inter:ChoiceIDPattern" use="required">
						<xsd:annotation>
							<xsd:documentation> All choices are tagged with a unique identifier that
								may be referenced by a choice_test_action referencing the
								encapsulating choice_question. </xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:simpleContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="choice_group">
		<xsd:annotation>
			<xsd:documentation> A choice_group defines a group of choices that may then be reused in
				multiple choice_question elements. For example, a document may include multiple
				choice_questions with the options of "Good", "Fair", or "Poor". By defining these
				choices in a single choice_group, the author would not need to list them out
				explicitly in every choice_question. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="inter:choice" minOccurs="1" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> Holds the information associated with one of the
							possible responses for a choice_question. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
			<xsd:attribute name="id" type="inter:ChoiceGroupIDPattern" use="required">
				<xsd:annotation>
					<xsd:documentation> Holds the id of this choice group. This id is referenced
						within choice_question elements to include the choices contained in a group.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="when_equals">
		<xsd:annotation>
			<xsd:documentation> The element when_equals specifies the action to take in a
				numeric_test_action when a particular value is given by a user in response to a
				numeric_question. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:ResultChoiceType">
					<xsd:sequence>
						<xsd:element name="value" type="xsd:decimal" minOccurs="1"
							maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation> Each value holds what is to be matched.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="when_range">
		<xsd:annotation>
			<xsd:documentation> The element when_range specifies the action to take in a
				numeric_test_action when a value given by a user in response to a numeric_question
				falls within the indicated range. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:ResultChoiceType">
					<xsd:sequence>
						<xsd:element name="range" type="inter:RangeType" minOccurs="1"
							maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation> Each range element holds a single numeric range.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="when_pattern">
		<xsd:annotation>
			<xsd:documentation> The element when_pattern specifies the action to take in a
				string_test_action when a string given by a user in response to a string_question
				matches the given regular expression. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inter:ResultChoiceType">
					<xsd:sequence>
						<xsd:element name="pattern" type="inter:PatternType" minOccurs="1"
							maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation> Each pattern element holds a regular expression
									against which the user's response string is to be compared.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>


	<!-- **************************************************************************** -->
	<!-- *   Instructions Element and Supporting Types            			* -->
	<!-- **************************************************************************** -->
	<xsd:complexType name="ReferenceType" mixed="true">
		<xsd:annotation>
			<xsd:documentation> The ReferenceType complex type defines structures used to hold
				information about an external reference given its URI and description. </xsd:documentation>
			<xsd:documentation> This structure may be used to reference other standards such as CVE,
				CCE, or CPE. To do so, the href attribute would give the relevant namespace. For
				example, the namespace of the current version of CPE is
				http://cpe.mitre.org/dictionary/2.0 and the body of this element would hold a
				specific CPE identifier. References to other information (documents, web pages,
				etc.) are also permitted. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="inter:TextType">
				<xsd:attribute name="href" type="xsd:anyURI">
					<xsd:annotation>
						<xsd:documentation> The href attribute holds the URI of an external
							reference. This may be the namespace associated with the information in
							the body or a web URL containing relevant information.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="StepType">
		<xsd:annotation>
			<xsd:documentation> The StepType complex type defines structures that describe one step
				(out of possibly multiple steps) that a user should take in order to respond to a
				question. The steps would appear as parts of the question's instructions element.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="description" type="inter:TextType" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation> The description element contains some information about this
						step. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="reference" minOccurs="0" maxOccurs="unbounded"
				type="inter:ReferenceType">
				<xsd:annotation>
					<xsd:documentation> The reference element contains information about any
						external references related to this step. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="inter:step" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation> The step element contains substeps for this particular step.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="is_done" type="xsd:boolean" default="false">
			<xsd:annotation>
				<xsd:documentation> The is_done attribute indicates whether this step has been done.
					The value is true when it is done. Otherwise, it is false, It is an optional
					attribute that defaults to false. </xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="is_required" type="xsd:boolean" default="true">
			<xsd:annotation>
				<xsd:documentation>The is_required attribute indicates whether a step is required or
					not. If it is not, then it can be skipped. It is an optional attribute that
					defaults to true.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:element name="step" type="inter:StepType">
		<xsd:annotation>
			<xsd:documentation>The step element describes one step in the procedures a user should
				undertake in order to answer an encapsulating question.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="instructions">
		<xsd:annotation>
			<xsd:documentation> The instructions element contains a step by step procedure to guide
				the user in answering a question. </xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="title" type="inter:TextType">
					<xsd:annotation>
						<xsd:documentation> The title element contains a descriptive heading for the
							instructions. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="inter:step" minOccurs="1" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation> The step element contains information about one step of
							the instructions. </xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

</xsd:schema>
