| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<xsd:schema targetNamespace="http://cpe.mitre.org/dictionary/2.0" xmlns:cpe_dict="http://cpe.mitre.org/dictionary/2.0" |
| 3 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" |
| 4 |
xmlns:cpe-name="http://cpe.mitre.org/naming/2.0" version="2.3"> |
| 5 |
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../../common/xml.xsd"/> |
| 6 |
<xsd:annotation> |
| 7 |
<xsd:documentation xml:lang="en">This is an XML Schema for the CPE Dictionary. It is used to transfer a |
| 8 |
collection of official CPE Names along with any necessary supporting information (title, references, |
| 9 |
automated check, etc.) For more information, consult the CPE Specification document.</xsd:documentation> |
| 10 |
<xsd:appinfo> |
| 11 |
<schema>CPE Dictionary</schema> |
| 12 |
<author>Neal Ziring, Andrew Buttner, David Waltermire</author> |
| 13 |
<version>2.3</version> |
| 14 |
<date>2011-07-29</date> |
| 15 |
</xsd:appinfo> |
| 16 |
</xsd:annotation> |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
<xsd:import namespace="http://cpe.mitre.org/naming/2.0" schemaLocation="../../cpe/2.3/cpe-naming_2.3.xsd"/> |
| 21 |
<xsd:element name="cpe-list" type="cpe_dict:ListType"> |
| 22 |
<xsd:annotation> |
| 23 |
<xsd:documentation xml:lang="en">The cpe-list element acts as a top-level container for CPE Name items. Each |
| 24 |
individual item must be unique. Please refer to the description of ListType for additional information |
| 25 |
about the structure of this element.</xsd:documentation> |
| 26 |
</xsd:annotation> |
| 27 |
<xsd:key name="itemURIKey"> |
| 28 |
<xsd:selector xpath="./cpe_dict:cpe-item"/> |
| 29 |
<xsd:field xpath="@name"/> |
| 30 |
</xsd:key> |
| 31 |
</xsd:element> |
| 32 |
<xsd:element name="cpe-item" type="cpe_dict:ItemType"> |
| 33 |
<xsd:annotation> |
| 34 |
<xsd:documentation xml:lang="en">The cpe-item element denotes a single CPE Name. Please refer to the |
| 35 |
description of ItemType for additional information about the structure of this |
| 36 |
element.</xsd:documentation> |
| 37 |
</xsd:annotation> |
| 38 |
<xsd:unique name="titleLangKey"> |
| 39 |
<xsd:selector xpath="./cpe_dict:title"/> |
| 40 |
<xsd:field xpath="@xml:lang"/> |
| 41 |
</xsd:unique> |
| 42 |
<xsd:unique name="notesLangKey"> |
| 43 |
<xsd:selector xpath="./cpe_dict:notes"/> |
| 44 |
<xsd:field xpath="@xml:lang"/> |
| 45 |
</xsd:unique> |
| 46 |
<xsd:unique name="checkSystemKey"> |
| 47 |
<xsd:selector xpath="./cpe_dict:check"/> |
| 48 |
<xsd:field xpath="@system"/> |
| 49 |
</xsd:unique> |
| 50 |
</xsd:element> |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
<xsd:complexType name="GeneratorType"> |
| 55 |
<xsd:annotation> |
| 56 |
<xsd:documentation xml:lang="en">The GeneratorType complex type defines an element that is used to hold |
| 57 |
information about when a particular document was compiled, what version of the schema was used, what |
| 58 |
tool compiled the document, and what version of that tool was used. Additional generator information is |
| 59 |
also allowed although it is not part of the official schema. Individual organizations can place |
| 60 |
generator information that they feel is important and it will be skipped during the validation. All that |
| 61 |
this schema really cares about is that the stated generator information is there.</xsd:documentation> |
| 62 |
</xsd:annotation> |
| 63 |
<xsd:sequence> |
| 64 |
<xsd:element name="product_name" type="xsd:string" minOccurs="0" maxOccurs="1"> |
| 65 |
<xsd:annotation> |
| 66 |
<xsd:documentation xml:lang="en">The optional product_name element specifies the name of the |
| 67 |
application used to generate the file.</xsd:documentation> |
| 68 |
</xsd:annotation> |
| 69 |
</xsd:element> |
| 70 |
<xsd:element name="product_version" type="xsd:string" minOccurs="0" maxOccurs="1"> |
| 71 |
<xsd:annotation> |
| 72 |
<xsd:documentation xml:lang="en">The optional product_version element specifies the version of the |
| 73 |
application used to generate the file.</xsd:documentation> |
| 74 |
</xsd:annotation> |
| 75 |
</xsd:element> |
| 76 |
<xsd:element name="schema_version" type="xsd:decimal" minOccurs="1" maxOccurs="1"> |
| 77 |
<xsd:annotation> |
| 78 |
<xsd:documentation xml:lang="en">The required schema_version element specifies the version of the |
| 79 |
schema that the document has been written against and that should be used for |
| 80 |
validation.</xsd:documentation> |
| 81 |
</xsd:annotation> |
| 82 |
</xsd:element> |
| 83 |
<xsd:element name="timestamp" type="xsd:dateTime" minOccurs="1" maxOccurs="1"> |
| 84 |
<xsd:annotation> |
| 85 |
<xsd:documentation xml:lang="en">The required timestamp element specifies when the particular |
| 86 |
document was compiled. The format for the timestamp is yyyy-mm-ddThh:mm:ss. Note that the |
| 87 |
timestamp element does not specify when an item in the document was created or modified but |
| 88 |
rather when the actual XML document that contains the items was created. For example, a document |
| 89 |
might pull a bunch of existing items together, each of which was created at some point in the |
| 90 |
past. The timestamp in this case would be when this combined document was |
| 91 |
created.</xsd:documentation> |
| 92 |
</xsd:annotation> |
| 93 |
</xsd:element> |
| 94 |
<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/> |
| 95 |
</xsd:sequence> |
| 96 |
</xsd:complexType> |
| 97 |
<xsd:complexType name="ItemType"> |
| 98 |
<xsd:annotation> |
| 99 |
<xsd:documentation xml:lang="en">The ItemType complex type defines an element that represents a single CPE |
| 100 |
Name. The required name attribute is a URI which must be a unique key and should follow the URI |
| 101 |
structure outlined in the CPE Specification. The optional title element is used to provide a |
| 102 |
human-readable title for the platform. To support uses intended for multiple languages, this element |
| 103 |
supports the ‘xml:lang’ attribute. At most one title element can appear for each language. The notes |
| 104 |
element holds optional descriptive material. Multiple notes elements are allowed, but only one per |
| 105 |
language should be used. Note that the language associated with the notes element applies to all child |
| 106 |
note elements. The optional references element holds external info references. The optional check |
| 107 |
element is used to call out an OVAL Definition that can confirm or reject an IT system as an instance of |
| 108 |
the named platform. Additional elements not part of the CPE namespace are allowed and are just skipped |
| 109 |
by validation. In essence, a dictionary file can contain additional information that a user can choose |
| 110 |
to use or not, but this information is not required to be used or understood.</xsd:documentation> |
| 111 |
</xsd:annotation> |
| 112 |
<xsd:sequence> |
| 113 |
<xsd:element name="title" type="cpe_dict:TextType" minOccurs="0" maxOccurs="unbounded"/> |
| 114 |
<xsd:element name="notes" type="cpe_dict:NotesType" minOccurs="0" maxOccurs="unbounded"/> |
| 115 |
<xsd:element name="references" type="cpe_dict:ReferencesType" minOccurs="0" maxOccurs="1"/> |
| 116 |
<xsd:element name="check" type="cpe_dict:CheckType" minOccurs="0" maxOccurs="unbounded"/> |
| 117 |
<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/> |
| 118 |
</xsd:sequence> |
| 119 |
<xsd:attribute name="name" type="cpe-name:cpe22Type" use="required"/> |
| 120 |
<xsd:attribute name="deprecated" type="xsd:boolean" use="optional" default="false"/> |
| 121 |
<xsd:attribute name="deprecated_by" type="cpe-name:cpe22Type" use="optional"/> |
| 122 |
<xsd:attribute name="deprecation_date" type="xsd:dateTime" use="optional"/> |
| 123 |
</xsd:complexType> |
| 124 |
<xsd:complexType name="ListType"> |
| 125 |
<xsd:annotation> |
| 126 |
<xsd:documentation xml:lang="en">The ListType complex type defines an element that is used to hold a |
| 127 |
collection of individual items. The required generator section provides information about when the |
| 128 |
definition file was compiled and under what version. Additional elements not part of the CPE namespace |
| 129 |
are allowed and are just skipped by validation. In essence, a dictionary file can contain additional |
| 130 |
information that a user can choose to use or not, but this information is not required to be used or |
| 131 |
understood.</xsd:documentation> |
| 132 |
</xsd:annotation> |
| 133 |
<xsd:sequence> |
| 134 |
<xsd:element name="generator" type="cpe_dict:GeneratorType" minOccurs="0" maxOccurs="1"/> |
| 135 |
<xsd:element ref="cpe_dict:cpe-item" minOccurs="1" maxOccurs="unbounded"/> |
| 136 |
<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/> |
| 137 |
</xsd:sequence> |
| 138 |
</xsd:complexType> |
| 139 |
<xsd:complexType name="TextType"> |
| 140 |
<xsd:annotation> |
| 141 |
<xsd:documentation xml:lang="en">The TextType complex type allows the xml:lang attribute to associate a |
| 142 |
specific language with an element's string content.</xsd:documentation> |
| 143 |
</xsd:annotation> |
| 144 |
<xsd:simpleContent> |
| 145 |
<xsd:extension base="xsd:string"> |
| 146 |
<xsd:attribute ref="xml:lang"/> |
| 147 |
</xsd:extension> |
| 148 |
</xsd:simpleContent> |
| 149 |
</xsd:complexType> |
| 150 |
<xsd:complexType name="NotesType"> |
| 151 |
<xsd:annotation> |
| 152 |
<xsd:documentation xml:lang="en">The NotesType complex type defines an element that consists of one or more |
| 153 |
child note elements. It is assumed that each of these note elements is representative of the same |
| 154 |
language as defined by their parent.</xsd:documentation> |
| 155 |
</xsd:annotation> |
| 156 |
<xsd:sequence> |
| 157 |
<xsd:element name="note" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/> |
| 158 |
</xsd:sequence> |
| 159 |
<xsd:attribute ref="xml:lang"/> |
| 160 |
</xsd:complexType> |
| 161 |
<xsd:complexType name="ReferencesType"> |
| 162 |
<xsd:annotation> |
| 163 |
<xsd:documentation xml:lang="en">The ReferencesType complex type defines an element used to hold a |
| 164 |
collection of individual references. Each reference consists of a piece of text (intended to be |
| 165 |
human-readable) and a URI (intended to be a URL, and point to a real resource) and is used to point to |
| 166 |
extra descriptive material, for example a supplier's web site or platform |
| 167 |
documentation.</xsd:documentation> |
| 168 |
</xsd:annotation> |
| 169 |
<xsd:sequence> |
| 170 |
<xsd:element name="reference" minOccurs="1" maxOccurs="unbounded"> |
| 171 |
<xsd:complexType> |
| 172 |
<xsd:simpleContent> |
| 173 |
<xsd:extension base="xsd:string"> |
| 174 |
<xsd:attribute name="href" type="xsd:anyURI"/> |
| 175 |
</xsd:extension> |
| 176 |
</xsd:simpleContent> |
| 177 |
</xsd:complexType> |
| 178 |
</xsd:element> |
| 179 |
</xsd:sequence> |
| 180 |
</xsd:complexType> |
| 181 |
<xsd:complexType name="CheckType"> |
| 182 |
<xsd:annotation> |
| 183 |
<xsd:documentation xml:lang="en">The CheckType complex type is used to define an element to hold information |
| 184 |
about an individual check. It includes a checking system specification URI, string content, and an |
| 185 |
optional external file reference. The checking system specification should be the URI for a particular |
| 186 |
version of OVAL or a related system testing language, and the content will be an identifier of a test |
| 187 |
written in that language. The external file reference could be used to point to the file in which the |
| 188 |
content test identifier is defined.</xsd:documentation> |
| 189 |
</xsd:annotation> |
| 190 |
<xsd:simpleContent> |
| 191 |
<xsd:extension base="xsd:string"> |
| 192 |
<xsd:attribute name="system" type="xsd:anyURI" use="required"/> |
| 193 |
<xsd:attribute name="href" type="xsd:anyURI" use="optional"/> |
| 194 |
</xsd:extension> |
| 195 |
</xsd:simpleContent> |
| 196 |
</xsd:complexType> |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
</xsd:schema> |