Blame SOURCES/oval_5_11_2_parsing_issues.patch

fa2dd6
From 3d081a4345b2b4f838e5e9fb4fab78b1bad717a9 Mon Sep 17 00:00:00 2001
fa2dd6
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
fa2dd6
Date: Wed, 22 May 2019 15:03:52 +0200
fa2dd6
Subject: [PATCH] Resolve parsing issues with OVAL 5.11.2 schemas
fa2dd6
fa2dd6
Similar to 8ba623120fc9f479285f9d6032cb925db420011d but for OVAL 5.11.2.
fa2dd6
The missing namespace imports have already been fixed in
fa2dd6
32d4d9be295084f95bfbaec07ea84373b3b4aeb7. Addressing:
fa2dd6
```
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1446: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1459: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1472: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1485: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1652: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1665: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1678: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
File '/root/openscap/schemas/oval/5.11.2/oval-definitions-schema.xsd'
fa2dd6
line 1691: local union type: A type, derived by list or union, must have
fa2dd6
the simple ur-type definition as base type, not
fa2dd6
'{http://oval.mitre.org/XMLSchema/oval-definitions-5}(NULL)'.
fa2dd6
OpenSCAP Error: Could not parse XML schema [validate.c:113]
fa2dd6
```
fa2dd6
---
fa2dd6
 schemas/oval/5.11.2/oval-definitions-schema.xsd  | 16 ++++++++--------
fa2dd6
 .../oval-system-characteristics-schema.xsd       |  8 ++++----
fa2dd6
 2 files changed, 12 insertions(+), 12 deletions(-)
fa2dd6
fa2dd6
diff --git a/schemas/oval/5.11.2/oval-definitions-schema.xsd b/schemas/oval/5.11.2/oval-definitions-schema.xsd
fa2dd6
index 9aa338603..42c238e1e 100644
fa2dd6
--- a/schemas/oval/5.11.2/oval-definitions-schema.xsd
fa2dd6
+++ b/schemas/oval/5.11.2/oval-definitions-schema.xsd
fa2dd6
@@ -1450,7 +1450,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntitySimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:hexBinary oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="binary"/>                                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -1463,7 +1463,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntitySimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:boolean oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="boolean"/>                                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -1476,7 +1476,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntitySimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:float oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="float"/>                                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -1489,7 +1489,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntitySimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:integer oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="int"/>                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -1656,7 +1656,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntityStateSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:hexBinary oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="binary"/>                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -1669,7 +1669,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntityStateSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:boolean oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="boolean"/>                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -1682,7 +1682,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntityStateSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:float oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="float"/>                                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -1695,7 +1695,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-def:EntityStateSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:integer oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="int"/>                
fa2dd6
             </xsd:restriction>
fa2dd6
diff --git a/schemas/oval/5.11.2/oval-system-characteristics-schema.xsd b/schemas/oval/5.11.2/oval-system-characteristics-schema.xsd
fa2dd6
index 030274c4a..c71de366a 100644
fa2dd6
--- a/schemas/oval/5.11.2/oval-system-characteristics-schema.xsd
fa2dd6
+++ b/schemas/oval/5.11.2/oval-system-characteristics-schema.xsd
fa2dd6
@@ -493,7 +493,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-sc:EntityItemSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:hexBinary oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="binary"/>                                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -506,7 +506,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-sc:EntityItemSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:boolean oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="boolean"/>                                                
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -519,7 +519,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-sc:EntityItemSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:float oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="float"/>
fa2dd6
             </xsd:restriction>
fa2dd6
@@ -532,7 +532,7 @@
fa2dd6
         <xsd:simpleContent>
fa2dd6
             <xsd:restriction base="oval-sc:EntityItemSimpleBaseType">
fa2dd6
                 <xsd:simpleType>
fa2dd6
-                    <xsd:union memberTypes="xsd:integer oval:EmptyStringType"/>
fa2dd6
+                    <xsd:restriction base="xsd:string"/>
fa2dd6
                 </xsd:simpleType>
fa2dd6
                 <xsd:attribute name="datatype" type="oval:SimpleDatatypeEnumeration" use="required" fixed="int"/>
fa2dd6
             </xsd:restriction>