Add initial XSD schema

This commit is contained in:
2026-05-27 11:31:18 +01:00
parent a2b0d13e2c
commit e5665a40ca
+55
View File
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This specification is licensed under CC BY-SA 4.0.
Implementing this specification in software is permitted without restriction.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://markembling.info/xmlschema/colourchooser/palette/1"
xmlns="http://markembling.info/xmlschema/colourchooser/palette/1"
elementFormDefault="qualified"
version="1.0.0">
<xs:annotation>
<xs:documentation>
Palette Format Specification
Version 1.0.0
The schema for the Palette XML format, a simple format for representing
colour palettes.
Namespace: http://markembling.info/xmlschema/colourchooser/palette/1
Spec: https://git.markembling.info/markembling/palette-spec
Copyright Mark Embling
Licensed under Creative Commons Attribution-ShareAlike 4.0 International
(CC BY-SA 4.0) https://creativecommons.org/licenses/by-sa/4.0/
Implementing this specification in software, including commercial software,
is explicitly permitted without restriction.
</xs:documentation>
</xs:annotation>
<xs:element name="palette">
<xs:complexType>
<xs:sequence>
<xs:element name="colour" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:all>
<xs:element name="name" type="xs:string" />
<xs:element name="r" type="xs:unsignedByte" />
<xs:element name="g" type="xs:unsignedByte" />
<xs:element name="b" type="xs:unsignedByte" />
<xs:element name="opacity">
<xs:simpleType>
<xs:restriction base="xs:unsignedByte">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="100"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>