Skip to content

Commit

Permalink
Removing use of DebianRPMEVRStringType entity type
Browse files Browse the repository at this point in the history
Changing to inline declaration of evr_string and debian_evr_string
entity datatypes. Updated Schematron message prefix to align with
intrinsic message level parsing from some tools.
  • Loading branch information
David Rothenberg committed Apr 13, 2015
1 parent 4224b23 commit fb6543d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
20 changes: 17 additions & 3 deletions schemas/linux-definitions-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<xsd:appinfo>
<schema>Linux Definition</schema>
<version>5.11.1:1.1</version>
<date>3/30/2015 09:00:00 AM</date>
<date>4/13/2015 09:00:00 AM</date>
<terms_of_use>Copyright (c) 2002-2015, 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="linux-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"/>
Expand Down Expand Up @@ -164,17 +164,31 @@
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="evr" type="oval-def:EntityStateDebianRPMEVRStringType" minOccurs="0" maxOccurs="1">
<xsd:element name="evr" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>This represents the epoch, upstream_version, and debian_revision fields, for a Debian package, as a single version string. It has the form "EPOCH:UPSTREAM_VERSION-DEBIAN_REVISION". Note that a null epoch (or '(none)' as returned by dpkg) is equivalent to '0' and would hence have the form 0:UPSTREAM_VERSION-DEBIAN_REVISION.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="linux-def_dpkginfosteevr_id">
<sch:rule context="linux-def:dpkginfo_state/linux-def:evr">
<sch:report test="@datatype='evr_string'"><sch:value-of select="../@id"/> WARNING: There are differences in the algorithms for how the version strings of Debian and RPM packages are compared. As a result, a new debian_evr_string datatype was added to the OVAL Language and should be used, for this entity, instead of the evr_string datatype.</sch:report>
<sch:report test="@datatype='evr_string'"><sch:value-of select="../@id"/> Warning: There are differences in the algorithms for how the version strings of Debian and RPM packages are compared. As a result, a new debian_evr_string datatype was added to the OVAL Language and should be used, for this entity, instead of the evr_string datatype.</sch:report>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateAnySimpleType">
<xsd:attribute name="datatype" use="required">
<xsd:simpleType>
<xsd:restriction base="oval:SimpleDatatypeEnumeration">
<xsd:enumeration value="evr_string"/>
<xsd:enumeration value="debian_evr_string"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
Expand Down
20 changes: 17 additions & 3 deletions schemas/linux-system-characteristics-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<xsd:appinfo>
<schema>Linux System Characteristics</schema>
<version>5.11.1:1.1</version>
<date>3/30/2015 09:00:00 AM</date>
<date>4/13/2015 09:00:00 AM</date>
<terms_of_use>Copyright (c) 2002-2015, 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-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
<sch:ns prefix="linux-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux"/>
Expand Down Expand Up @@ -93,17 +93,31 @@
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="evr" type="oval-sc:EntityItemDebianRPMEVRStringType" minOccurs="0" maxOccurs="1">
<xsd:element name="evr" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>This type represents the epoch, upstream_version, and debian_revision fields, for a Debian package, as a single version string. It has the form "EPOCH:UPSTREAM_VERSION-DEBIAN_REVISION". Note that a null epoch (or '(none)' as returned by dpkg) is equivalent to '0' and would hence have the form 0:UPSTREAM_VERSION-DEBIAN_REVISION.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="linux-sc_dpkginfoitemevrstring_id">
<sch:rule context="linux-sc:dpkginfo_item/linux-sc:evr">
<sch:report test="@datatype='evr_string'"><sch:value-of select="../@id"/> WARNING: There are differences in the algorithms for how the version strings of Debian and RPM packages are compared. As a result, a new debian_evr_string datatype was added to the OVAL Language and should be used, for this entity, instead of the evr_string datatype.</sch:report>
<sch:report test="@datatype='evr_string'"><sch:value-of select="../@id"/> Warning: There are differences in the algorithms for how the version strings of Debian and RPM packages are compared. As a result, a new debian_evr_string datatype was added to the OVAL Language and should be used, for this entity, instead of the evr_string datatype.</sch:report>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:restriction base="oval-sc:EntityItemAnySimpleType">
<xsd:attribute name="datatype" use="required">
<xsd:simpleType>
<xsd:restriction base="oval:SimpleDatatypeEnumeration">
<xsd:enumeration value="evr_string"/>
<xsd:enumeration value="debian_evr_string"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
Expand Down

0 comments on commit fb6543d

Please sign in to comment.