aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/hybrid/evolution/passthrough/transform-v2.xsd
blob: 16ea390e318008244f2af85459ecaca46c24328d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0"?>

<!--

file      : examples/cxx/hybrid/evolution/passthrough/transform-v2.xsd
copyright : not copyrighted - public domain

-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:tf="http://www.codesynthesis.com/transform"
            targetNamespace="http://www.codesynthesis.com/transform"
            elementFormDefault="qualified">

  <xsd:complexType name="transformation_type" abstract="true">
    <xsd:sequence>
      <xsd:element name="description" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
  </xsd:complexType>

  <xsd:element name="transformation" type="tf:transformation_type"/>

  <!-- Document root. -->

  <xsd:complexType name="transformations_type">
    <xsd:sequence>
      <xsd:element ref="tf:transformation" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="transformations" type="tf:transformations_type"/>

  <!-- Special type for unknown transformations. -->

  <xsd:complexType name="unknown_type">
    <xsd:complexContent>
      <xsd:extension base="tf:transformation_type">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>


  <!-- Move. -->

  <xsd:complexType name="move_type">
    <xsd:complexContent>
      <xsd:extension base="tf:transformation_type">
      <xsd:sequence>
        <xsd:element name="x" type="xsd:float"/>
	<xsd:element name="y" type="xsd:float"/>
      </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="move-transformation"
               type="tf:move_type"
               substitutionGroup="tf:transformation"/>

  <!-- Rotate. -->

  <xsd:complexType name="rotate_type">
    <xsd:complexContent>
      <xsd:extension base="tf:transformation_type">
      <xsd:sequence>
        <xsd:element name="angle" type="xsd:float"/>
      </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="rotate-transformation"
               type="tf:rotate_type"
               substitutionGroup="tf:transformation"/>

  <!-- Scale. -->

  <xsd:complexType name="ratio_type">
    <xsd:sequence>
      <xsd:element name="x" type="xsd:float"/>
      <xsd:element name="y" type="xsd:float"/>
    </xsd:sequence>
    <xsd:attribute name="unit" type="xsd:string"/>
  </xsd:complexType>

  <xsd:complexType name="scale_type">
    <xsd:complexContent>
      <xsd:extension base="tf:transformation_type">
      <xsd:sequence>
        <xsd:element name="ratios" type="tf:ratio_type"/>
      </xsd:sequence>
      <xsd:attribute name="proportional" type="xsd:boolean"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="scale-transformation"
               type="tf:scale_type"
               substitutionGroup="tf:transformation"/>

</xsd:schema>