Trying to validate XML output from "sadf -Hx" fails because some
elements are expected to be found, e.g.:
$ sadf -Hx | xmllint --schema xml/sysstat.xsd -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sysstat PUBLIC "DTD v3.8 sysstat //EN" "http://pagesperso-orange.fr/sebastien.godard/sysstat-3.8.dtd">
<sysstat xmlns="http://pagesperso-orange.fr/sebastien.godard/sysstat" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pagesperso-orange.fr/sebastien.godard sysstat.xsd">
<sysdata-version>3.8</sysdata-version>
<host nodename="linux-4.home">
<sysname>Linux</sysname>
<release>5.0.16-100.fc28.x86_64</release>
<machine>x86_64</machine>
<number-of-cpus>8</number-of-cpus>
<file-date>2019-10-12</file-date>
<file-utc-time>16:03:24</file-utc-time>
<timezone>CET</timezone>
</host>
</sysstat>
-:9: element host: Schemas validity error : Element '{http://pagesperso-orange.fr/sebastien.godard/sysstat}host': Missing child element(s). Expected is ( {http://pagesperso-orange.fr/sebastien.godard/sysstat}statistics ).
- fails to validate
Update XSD document to indicate that "statistics" and "restarts"
elements may not exist.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
<xs:element name="file-date" type="file-date-type"></xs:element>
<xs:element name="file-utc-time" type="file-utc-time-type"></xs:element>
<xs:element name="timezone" type="timezone-type" minOccurs="0"></xs:element>
- <xs:element name="statistics" type="statistics-type"></xs:element>
- <xs:element name="restarts" type="restarts-type"></xs:element>
+ <xs:element name="statistics" type="statistics-type" minOccurs="0" maxOccurs="1"></xs:element>
+ <xs:element name="restarts" type="restarts-type" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="comments" type="comments-type" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="nodename" type="xs:string" use="required"></xs:attribute>