| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!-- *************************************************************************** |
| 3 | * Copyright (c) 2014 École Polytechnique de Montréal |
| 4 | * |
| 5 | * All rights reserved. This program and the accompanying materials are |
| 6 | * made available under the terms of the Eclipse Public License v1.0 which |
| 7 | * accompanies this distribution, and is available at |
| 8 | * http://www.eclipse.org/legal/epl-v10.html |
| 9 | * |
| 10 | * Contributors: |
| 11 | * Florian Wininger - Initial API and implementation |
| 12 | *************************************************************************** --> |
| 13 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 14 | attributeFormDefault="unqualified" elementFormDefault="qualified"> |
| 15 | |
| 16 | <xs:complexType name="definedValue"> |
| 17 | <xs:annotation> |
| 18 | <xs:documentation>Maps a string (usually a human-readable value used by the XML elements) to another string (a value in the system, which can be converted to an integer, long by the a stateValue element or used as-is).</xs:documentation></xs:annotation> |
| 19 | <xs:attribute name="name" type="xs:string" use="required" > |
| 20 | <xs:annotation> |
| 21 | <xs:documentation>The human-readable string to identify this value. This is what will be manipulated by the XML and shown to the end-user (if applicable).</xs:documentation></xs:annotation></xs:attribute> |
| 22 | <xs:attribute name="value" type="xs:string" use="required" > |
| 23 | <xs:annotation> |
| 24 | <xs:documentation>A system value the 'name' maps to. It will usually not be shown to the end user.</xs:documentation></xs:annotation></xs:attribute> |
| 25 | <xs:attribute name="color" type="xs:string" use="optional" > |
| 26 | <xs:annotation> |
| 27 | <xs:documentation>Optional color attribute to this mapping. This attribute is used in XML-defined views to represent this mapping.</xs:documentation></xs:annotation></xs:attribute> |
| 28 | </xs:complexType> |
| 29 | |
| 30 | <xs:complexType name="location"> |
| 31 | <xs:annotation> |
| 32 | <xs:documentation>Define a path in a state system, that can then be used as a shortcut in other XML elements.</xs:documentation></xs:annotation> |
| 33 | <xs:sequence> |
| 34 | <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="stateAttribute" > |
| 35 | <xs:annotation> |
| 36 | <xs:documentation>Define each element of the path represented by this location. For instance, if location "abc" has path "a/b/c", there would be a sequence of 3 stateAttribute elements of type constant.</xs:documentation></xs:annotation></xs:element> |
| 37 | </xs:sequence> |
| 38 | <xs:attribute name="id" type="xs:string" use="required" > |
| 39 | <xs:annotation> |
| 40 | <xs:documentation>The identifier of this location, used inside the XML element in the scope of which it is defined.</xs:documentation></xs:annotation></xs:attribute> |
| 41 | <xs:anyAttribute /> |
| 42 | </xs:complexType> |
| 43 | |
| 44 | <xs:complexType name="mappingGroup"> |
| 45 | <xs:sequence> |
| 46 | <xs:element maxOccurs="unbounded" name="entry" type="mapEntry" /> |
| 47 | </xs:sequence> |
| 48 | <xs:attribute name="id" type="xs:string" use="required" /> |
| 49 | </xs:complexType> |
| 50 | |
| 51 | <xs:complexType name="mapEntry"> |
| 52 | <xs:annotation> |
| 53 | <xs:documentation>Define a handler for a state value. The second state value defined in the handler will be used instead of the first state one whenever it will be met.</xs:documentation></xs:annotation> |
| 54 | <xs:sequence maxOccurs="1" minOccurs="1"> |
| 55 | <xs:element maxOccurs="2" minOccurs="2" name="stateValue" type="stateValue" /> |
| 56 | </xs:sequence> |
| 57 | </xs:complexType> |
| 58 | |
| 59 | </xs:schema> |