sysmodellibs/sysmodelgen/src/old/resources/xsd/Shapes.xsd
author Bob Rosenberg <bob.rosenberg@nokia.com>
Wed, 13 Oct 2010 14:00:36 +0100
changeset 6 5b32dc297d05
parent 1 sysmodellibs/sysmodelgen/resources/xsd/Shapes.xsd@b538b70cbe51
permissions -rw-r--r--
Prepare old system model generator for 2.0 update

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://www.symbian.com/Shapes" xmlns="http://www.symbian.com/Shapes"
	elementFormDefault="qualified" attributeFormDefault="unqualified"
	xmlns:svg="http://www.w3.org/2000/svg">
	<xs:import namespace="http://www.w3.org/2000/svg"
		schemaLocation="http://www.w3.org/TR/2002/WD-SVG11-20020108/SVG.xsd" />
	<xs:element name="shapes">
		<xs:complexType>
			<xs:sequence>
				<!--
					<xs:element ref="svg:defs" xmlns:svg="http://www.w3.org/2000/svg"
					maxOccurs="unbounded" minOccurs="0"/>
				-->
				<xs:element name="borders" maxOccurs="unbounded"
					minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="border" maxOccurs="unbounded"
								minOccurs="1">
								<xs:complexType mixed="true">
									<xs:sequence>
										<xs:element ref="svg:path" minOccurs="0"
											xmlns:svg="http://www.w3.org/2000/svg" maxOccurs="unbounded" />
									</xs:sequence>
									<xs:attribute name="type" use="optional">
										<xs:annotation>
											<xs:documentation>
												The regular expression on the
												"type"
												attribute is as follows: 1)
												one of the special keywords as
												specified or 2) "#" followed by
												one or more character
											</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:pattern
													value="box|round|hexagon|box-clipRT|box-clipRB|box-clipLT|box-clipLB|box-clipAll|#.+">
												</xs:pattern>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute type="xs:string" name="value" use="optional" />
									<xs:attribute type="xs:string" name="viewBox" use="optional" />
									<xs:attribute name="rule" type="xs:string" use="optional">
									</xs:attribute>
									<xs:attribute name="label" use="optional" default="no">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:enumeration value="yes"></xs:enumeration>
												<xs:enumeration value="no"></xs:enumeration>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute type="xs:string" name="match" use="optional"
							default="component" />
						<xs:attribute type="xs:string" name="use" use="optional" />
						<xs:attribute type="xs:string" name="label" use="optional" />
						<xs:attribute name="sort" use="optional" default="no">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="show-unused" use="optional"
							default="no">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="literal" use="optional" default="no">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="patterns" maxOccurs="unbounded"
					minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="overlay" maxOccurs="unbounded"
								minOccurs="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="svg:path" minOccurs="0"
											xmlns:svg="http://www.w3.org/2000/svg" maxOccurs="unbounded" />
									</xs:sequence>
									<xs:attribute name="type" use="optional">
										<xs:annotation>
											<xs:documentation>
												The regular expression on the
												"type"
												attribute is as follows: 1)
												one of the special keywords as
												specified
          						</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:pattern
													value="box|round|hexagon|box-clipRT|box-clipRB|box-clipLT|box-clipLB|box-clipAll|#.+">
												</xs:pattern>
												<xs:enumeration value="big-X"></xs:enumeration>
												<xs:enumeration value="striped-diag-up">
												</xs:enumeration>
												<xs:enumeration value="radial-grad">
												</xs:enumeration>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute type="xs:string" name="value" use="optional" />

									<xs:attribute type="xs:string" name="label" use="optional" />
									<xs:attribute type="xs:string" name="viewBox" use="optional" />
									<xs:attribute name="rule" type="xs:string" use="optional">
									</xs:attribute>
									<xs:attribute name="literal" use="optional"
										default="no">
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:enumeration value="yes"></xs:enumeration>
												<xs:enumeration value="no"></xs:enumeration>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute type="xs:string" name="match" default="component"
							use="optional" />
						<xs:attribute type="xs:string" name="use" use="optional" />
						<xs:attribute type="xs:string" name="label" use="optional" />
						<xs:attribute name="sort" default="no" use="optional">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="show-unused" use="optional"
							default="no">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="literal" default="no" use="optional">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="styles" maxOccurs="unbounded"
					minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="style" maxOccurs="unbounded"
								minOccurs="1">
								<xs:complexType>
									<xs:simpleContent>
										<xs:extension base="xs:string">
											<xs:attribute type="xs:string" name="rule" use="optional" />
											<xs:attribute type="xs:string" name="label" use="optional" />
											<xs:attribute type="xs:string" name="value" use="optional" />
											<xs:attribute name="literal" use="optional"
												default="no">
												<xs:simpleType>
													<xs:restriction base="xs:string">
														<xs:enumeration value="yes">
														</xs:enumeration>
														<xs:enumeration value="no">
														</xs:enumeration>
													</xs:restriction>
												</xs:simpleType>
											</xs:attribute>
										</xs:extension>
									</xs:simpleContent>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute type="xs:string" name="match" default="component"
							use="optional" />
						<xs:attribute type="xs:string" name="use" use="optional" />
						<xs:attribute type="xs:string" name="label" use="optional" />
						<xs:attribute name="sort" default="no" use="optional">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="show-unused" use="optional"
							default="no">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="literal" use="optional" default="no">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="yes"></xs:enumeration>
									<xs:enumeration value="no"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="colors" maxOccurs="unbounded"
					minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="color" maxOccurs="unbounded"
								minOccurs="1">
								<xs:complexType>
									<xs:simpleContent>
										<xs:extension base="xs:string">
											<xs:attribute type="xs:string" name="label" use="optional" />
											<xs:attribute type="xs:string" name="value" use="optional" />
											<xs:attribute type="xs:string" name="rule" use="optional" />
											<xs:attribute name="color" 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:attribute name="literal" use="optional" default="no">
          							<xs:simpleType>
          								<xs:restriction
          									base="xs:string">
          									<xs:enumeration
          										value="yes">
          									</xs:enumeration>
          									<xs:enumeration
          										value="no">
          									</xs:enumeration>
          								</xs:restriction>
          							</xs:simpleType>
          						</xs:attribute>
          					</xs:extension>
          				</xs:simpleContent>
          			</xs:complexType>
          		</xs:element>
          	</xs:sequence>
          	<xs:attribute name="default" use="optional">
          		<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:attribute type="xs:string" name="match" use="optional"
          		default="component" />
          	<xs:attribute type="xs:string" name="use" use="optional" />
          	<xs:attribute type="xs:string" name="label"
          		use="optional" />
          	<xs:attribute name="sort" use="optional" default="no">
          		<xs:simpleType>
          			<xs:restriction base="xs:string">
          				<xs:enumeration value="yes"></xs:enumeration>
          				<xs:enumeration value="no"></xs:enumeration>
          			</xs:restriction>
          		</xs:simpleType>
          	</xs:attribute>
          	<xs:attribute name="show-unused" use="optional"
          		default="no">
          		<xs:simpleType>
          			<xs:restriction base="xs:string">
          				<xs:enumeration value="yes"></xs:enumeration>
          				<xs:enumeration value="no"></xs:enumeration>
          			</xs:restriction>
          		</xs:simpleType>
          	</xs:attribute>
          	<xs:attribute name="type" use="optional"
          		default="background">
          		<xs:simpleType>
          			<xs:restriction base="xs:string">
          				<xs:enumeration value="background"></xs:enumeration>
          				<xs:enumeration value="text-highlight"></xs:enumeration>
          				<xs:enumeration value="highlight"></xs:enumeration>
          			</xs:restriction>
          		</xs:simpleType>
          	</xs:attribute>
          	<xs:attribute name="literal" use="optional"
          		default="no">
          		<xs:simpleType>
          			<xs:restriction base="xs:string">
          				<xs:enumeration value="yes"></xs:enumeration>
          				<xs:enumeration value="no"></xs:enumeration>
          			</xs:restriction>
          		</xs:simpleType>
          	</xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="examples" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
          	<xs:sequence>
          		<xs:element name="cmp" maxOccurs="unbounded"
          			minOccurs="0">
          			<xs:complexType>
          				<xs:simpleContent>
          					<xs:extension base="xs:string">
          						<xs:attribute type="xs:string"
          							name="color" use="optional" />
          						<xs:attribute type="xs:string"
          							name="overlay" use="optional" />
          						<xs:attribute type="xs:string"
          							name="border" use="optional" />
          						<xs:attribute name="highlight"
          							type="xs:string" use="optional">
          						</xs:attribute>
          						<xs:attribute name="text-highlight"
          							type="xs:string" use="optional">
          						</xs:attribute>
          						<xs:attribute name="style"
          							type="xs:string" use="optional">
          						</xs:attribute>
          					</xs:extension>
          				</xs:simpleContent>
          			</xs:complexType>
          		</xs:element>
          	</xs:sequence>
          	<xs:attribute type="xs:string" name="label"
          		use="optional" />
          	<xs:attribute name="literal" use="optional" default="no">
          		<xs:simpleType>
          			<xs:restriction base="xs:string">
          				<xs:enumeration value="yes"></xs:enumeration>
          				<xs:enumeration value="no"></xs:enumeration>
          			</xs:restriction>
          		</xs:simpleType>
          	</xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>