<?xml version="1.0" encoding="UTF-8"?>
<xs:schema 
        xmlns="https://xml.opengrc.org/2021/threats"
	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	elementFormDefault="unqualified"
	attributeFormDefault="unqualified">
  <xs:element name="threats">
    <xs:complexType>
      <xs:sequence>
        <xs:element type="xs:string" name="identifier"/>
        <xs:element type="xs:string" name="name"/>
        <xs:element type="xs:string" name="title"/>
        <xs:element type="xs:string" name="version"/>
        <xs:element name="threat" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element type="xs:string" name="identifier" use="required"/>
              <xs:element type="xs:string" name="name" use="required"/>
              <xs:element type="xs:string" name="title" use="optional"/>
              <xs:element type="xs:string" name="type" minOccurs="1"/>
              <xs:element type="xs:string" name="category" use="optional"/>
              <xs:element type="xs:string" name="definition" minOccurs="0"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="lang" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>
