sysmodellibs/sysmodelgen/src/old/resources/xsd/Colours.xsd
changeset 6 5b32dc297d05
parent 1 b538b70cbe51
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysmodellibs/sysmodelgen/src/old/resources/xsd/Colours.xsd	Wed Oct 13 14:00:36 2010 +0100
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema attributeFormDefault="unqualified"
+	elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+	<xs:element name="values">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
+					<xs:complexType>
+						<xs:sequence>
+							<xs:element name="component" maxOccurs="unbounded"
+								minOccurs="0">
+								<xs:complexType>
+									<xs:simpleContent>
+										<xs:extension base="xs:string">
+											<xs:attribute type="xs:string" name="name" use="required" />
+										</xs:extension>
+									</xs:simpleContent>
+								</xs:complexType>
+							</xs:element>
+						</xs:sequence>
+						<xs:attribute type="xs:string" name="label" use="optional" />
+						<xs:attribute name="value" use="required">
+							<xs:annotation>
+								<xs:documentation>The regular expression in the constraint of
+									the "value" attribute is: 1) a valid rgb() expression or 2) a
+									valid hex number or 3) a valid alpha expression or 4) a three
+									digit hex triple or 5) a valid %rgb() expression.</xs:documentation>
+							</xs:annotation>
+							<xs:simpleType>
+<!-- TODO: Need to modify the last pattern below (%rgb() to accept digits from 0 to 100 instead of from 1 to 99 -->
+								<xs:restriction base="xs:string">
+									<xs:pattern
+										value="rgb\((((\d{1,2})|(1\d{2})|(2[0-4]\d)|(25[0-5])),\s?){2}(((\d{1,2})|(1\d{2})|(2[0-4]\d)|(25[0-5]))){1}\)|#(([0-9a-fA-F]){6})|([A-Z,a-z]+)|#([0-9a-fA-F]){3}|rgb\(([1-9][0-9]{0,1}%,\s?){2}([1-9][0-9]{0,1}%)\)">
+									</xs:pattern>
+								</xs:restriction>
+							</xs:simpleType>
+						</xs:attribute>
+					</xs:complexType>
+				</xs:element>
+			</xs:sequence>
+			<xs:attribute type="xs:string" name="default" use="optional" />
+			<xs:attribute type="xs:string" name="label" use="optional" />
+		</xs:complexType>
+	</xs:element>
+</xs:schema>