Add RSS 1.0 Service Status module XML schema

This commit is contained in:
~lucidiot 2023-11-18 08:51:58 +01:00
parent 741ed6eaa7
commit ad71f1ba8f
1 changed files with 96 additions and 0 deletions

96
xsd/servicestatus.xsd Normal file
View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Service Status RDF Site Summary 1.0 Module schema
Copyright (c) 2023 ~lucidiot
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<xs:schema
targetNamespace="http://purl.org/rss/1.0/modules/servicestatus/"
version="1.0"
elementFormDefault="qualified"
xmlns="http://purl.org/rss/1.0/modules/servicestatus/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:annotation>
<xs:documentation>
Schema for the Service Status RDF Site Summary 1.0 Module, Draft 4 (2002-06-07).
</xs:documentation>
<xs:documentation>
<![CDATA[Derived from the online documentation at <https://web.resource.org/rss/1.0/modules/servicestatus/>.]]>
</xs:documentation>
</xs:annotation>
<xs:simpleType name="Percentage">
<xs:annotation>
<xs:documentation>An integer representing a percentage, from 0 to 100.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="100" />
</xs:restriction>
</xs:simpleType>
<xs:element name="aboutStats" type="rdf:resource">
<xs:annotation>
<xs:documentation>Resource describing how the availability percentage and average response time are calculated.</xs:documentation>
<xs:documentation>This should be added to the channel element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="availability" type="Percentage">
<xs:annotation>
<xs:documentation>A percentage representing the availability of the service. How this is calculated is left up to the service, and should be described by the `aboutStats` resource.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="averageResponseTime" type="xs:decimal">
<xs:annotation>
<xs:documentation>The average response time of the service, in seconds. How this is calculated is left up to the service, and should be described by the `aboutStats` resource.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="lastChecked" type="xs:datetime">
<xs:annotation>
<xs:documentation>The most recent time that the service was checked, no matter how the service responded.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="lastSeen" type="xs:datetime">
<xs:annotation>
<xs:documentation>The most recent time that the service has successfully responded.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="responding" type="xs:boolean">
<xs:annotation>
<xs:documentation>Whether or not the service is currently responding.</xs:documentation>
<xs:documentation>When this is true, the `lastChecked` and `lastSeen` datetimes should be equal.</xs:documentation>
<xs:documentation>When this is false, the difference between the `lastChecked` and `lastSeen` datetimes may be used to get an approximation of how long the service has been unavailable.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="statusMessage" type="xs:string">
<xs:annotation>
<xs:documentation>A message providing further details about the service's status.</xs:documentation>
<xs:documentation>This may be useful to report progress on fixing an issue with the service, or warning about scheduled outages.</xs:documentation>
<xs:documentation>This may be used regardless of whether or not the service is responding.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>