istar 之xml文件

Posted on 2007-09-04 01:57  三体星  阅读(263)  评论(0编辑  收藏  举报

以下是istar图的XML数据源文件:

  1<?xml version="1.0" encoding="UTF-8"?>
  2<istar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="istar.xsd">
  3    <actor ID="Hardware_Manufacturer">
  4        <name>Hardware Manufacturer</name>
  5        <goal ID="Manufacture_Card_Hardware">
  6            <name>Manufacture Card Hardware</name>
  7        </goal>
  8        <goal ID="GetPaid">
  9            <name>GetPaid</name>
 10        </goal>
 11        <softgoal ID="Security_Card">
 12            <name>Security[Card]</name>
 13        </softgoal>
 14        <softgoal ID="Low_Risk">
 15            <name>Low Risk</name>
 16        </softgoal>
 17        <softgoal ID="Low_Value_Per_Card">
 18            <name>Low Value Per Card</name>
 19        </softgoal>
 20        <softgoal ID="Simple_Card">
 21            <name>Simple Card</name>
 22        </softgoal>
 23        <softgoal ID="Low_Cost">
 24            <name>Low Cost</name>
 25        </softgoal>
 26        <task ID="Provide_Simple_Card_Solution">
 27            <name>Provide Simple Card Solution</name>
 28        </task>
 29        <task ID="Provide_Total_Card_Solution">
 30            <name>Provide Total Card Solution</name>
 31        </task>
 32        <task ID="Manufacture_Card_And_Devices">
 33            <name>Manufacture Card &amp; Devices</name>
 34        </task>
 35        <task ID="Develop_Card_Solution">
 36            <name>Develop Card Solution</name>
 37        </task>
 38        <task ID="Specify_Software_Requirement">
 39            <name>Specify Software Requirement</name>
 40        </task>
 41        <resource ID="Materials">
 42            <name>Materials</name>
 43        </resource>
 44        <belief ID="Total_Card_Solution_Such_as_Mondex_is_expensive">
 45            <name>Total Card Solution, Such as Mondex is expensive</name>
 46        </belief>
 47        <Mean-ends-link>
 48            <from ID="Provide_Simple_Card_Solution"/>
 49            <to ID="Manufacture_Card_Hardware"/>
 50        </Mean-ends-link>
 51        <Mean-ends-link>
 52            <from ID="Provide_Total_Card_Solution"/>
 53            <to ID="Manufacture_Card_Hardware"/>
 54        </Mean-ends-link>
 55        <Contribution-link>
 56            <type typeID="Some-"/>
 57            <from ID="Provide_Total_Card_Solution"/>
 58            <to ID="Low_Cost"/>
 59        </Contribution-link>
 60        <Contribution-link>
 61            <type typeID="Help"/>
 62            <from ID="Provide_Total_Card_Solution"/>
 63            <to ID="Security_Card"/>
 64        </Contribution-link>
 65        <Contribution-link>
 66            <type typeID="Some+"/>
 67            <from ID="Provide_Simple_Card_Solution"/>
 68            <to ID="Low_Cost"/>
 69        </Contribution-link>
 70        <Contribution-link>
 71            <type typeID="Make"/>
 72            <from ID="Provide_Simple_Card_Solution"/>
 73            <to ID="Simple_Card"/>
 74        </Contribution-link>
 75        <Contribution-link>
 76            <type typeID="Make"/>
 77            <from ID="Provide_Simple_Card_Solution"/>
 78            <to ID="Low_Value_Per_Card"/>
 79        </Contribution-link>
 80        <Contribution-link>
 81            <type typeID="And"/>
 82            <from ID="Simple_Card"/>
 83            <to ID="Low_Risk"/>
 84        </Contribution-link>
 85        <Contribution-link>
 86            <type typeID="And"/>
 87            <from ID="Low_Value_Per_Card"/>
 88            <to ID="Low_Risk"/>
 89        </Contribution-link>
 90        <Contribution-link>
 91            <type typeID="Help"/>
 92            <from ID="Low_Risk"/>
 93            <to ID="Security_Card"/>
 94        </Contribution-link>
 95        <Decomposition-link>
 96            <from ID="Provide_Total_Card_Solution"/>
 97            <to ID="GetPaid"/>
 98        </Decomposition-link>
 99        <Decomposition-link>
100            <from ID="Provide_Total_Card_Solution"/>
101            <to ID="Manufacture_Card_And_Devices"/>
102        </Decomposition-link>
103        <Decomposition-link>
104            <from ID="Provide_Total_Card_Solution"/>
105            <to ID="Develop_Card_Solution"/>
106        </Decomposition-link>
107        <Decomposition-link>
108            <from ID="Manufacture_Card_And_Devices"/>
109            <to ID="Materials"/>
110        </Decomposition-link>
111        <Decomposition-link>
112            <from ID="Develop_Card_Solution"/>
113            <to ID="Specify_Software_Requirement"/>
114        </Decomposition-link>
115    </actor>
116    <actor ID="Card_Issuer">
117        <name>Card Issuer</name>
118    </actor>
119    <actor ID="Software_Manufacturer">
120        <name>Software Manufacturer</name>
121    </actor>
122    <softgoal ID="Continued_Business">
123        <name>Continued Business</name>
124    </softgoal>
125    <resource ID="Payment_For_Card_And_Devices">
126        <name>Payment For Card &amp; Devices</name>
127    </resource>
128    <resource ID="Card_And_Devices">
129        <name>Card &amp; Devices</name>
130    </resource>
131    <resource ID="Card_Software">
132        <name>Card Software</name>
133    </resource>
134    <resource ID="Software_Requirement">
135        <name>Software Requirement</name>
136    </resource>
137    <Dependency-link>
138        <dependee ID="Card_Issuer"/>
139        <depender ID="Payment_For_Card_And_Devices"/>
140    </Dependency-link>
141    <Dependency-link>
142        <dependee ID="Payment_For_Card_And_Devices"/>
143        <depender ID="GetPaid"/>
144    </Dependency-link>
145    <Dependency-link>
146        <dependee ID="Card_Issuer"/>
147        <depender ID="Continued_Business"/>
148    </Dependency-link>
149    <Dependency-link>
150        <dependee ID="Continued_Business"/>
151        <depender ID="GetPaid"/>
152    </Dependency-link>
153    <Dependency-link>
154        <dependee ID="Card_And_Devices"/>
155        <depender ID="Card_Issuer"/>
156    </Dependency-link>
157    <Dependency-link>
158        <dependee ID="Manufacture_Card_And_Devices"/>
159        <depender ID="Card_And_Devices"/>
160    </Dependency-link>
161    <Dependency-link>
162        <dependee ID="Card_Software"/>
163        <depender ID="Manufacture_Card_And_Devices"/>
164    </Dependency-link>
165    <Dependency-link>
166        <dependee ID="Software_Manufacturer"/>
167        <depender ID="Card_Software"/>
168    </Dependency-link>
169    <Dependency-link>
170        <dependee ID="Software_Requirement"/>
171        <depender ID="Software_Manufacturer"/>
172    </Dependency-link>
173    <Dependency-link>
174        <dependee ID="Specify_Software_Requirement"/>
175        <depender ID="Software_Requirement"/>
176    </Dependency-link>
177</istar>
178

对于XML文件,指定了其Schema文件如下:
  1<?xml version="1.0" encoding="utf-8"?>
  2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
  3    <xs:element name="istar">
  4        <xs:complexType>
  5            <xs:sequence>
  6                <xs:element name="actor" minOccurs="0" maxOccurs="unbounded">
  7                    <xs:complexType>
  8                        <xs:sequence>
  9                            <xs:element name="name" type="xs:string"/>
 10                            <xs:element name="goal" minOccurs="0" maxOccurs="unbounded">
 11                                <xs:complexType>
 12                                    <xs:sequence>
 13                                        <xs:element name="name" type="xs:string"/>
 14                                    </xs:sequence>
 15                                    <xs:attribute name="ID" type="xs:ID" use="required"/>
 16                                </xs:complexType>
 17                            </xs:element>
 18                            <xs:element name="softgoal" minOccurs="0" maxOccurs="unbounded">
 19                                <xs:complexType>
 20                                    <xs:sequence>
 21                                        <xs:element name="name" type="xs:string"/>
 22                                    </xs:sequence>
 23                                    <xs:attribute name="ID" type="xs:ID" use="required"/>
 24                                </xs:complexType>
 25                            </xs:element>
 26                            <xs:element name="task" minOccurs="0" maxOccurs="unbounded">
 27                                <xs:complexType>
 28                                    <xs:sequence>
 29                                        <xs:element name="name" type="xs:string"/>
 30                                    </xs:sequence>
 31                                    <xs:attribute name="ID" type="xs:ID" use="required"/>
 32                                </xs:complexType>
 33                            </xs:element>
 34                            <xs:element name="resource" minOccurs="0" maxOccurs="unbounded">
 35                                <xs:complexType>
 36                                    <xs:sequence>
 37                                        <xs:element name="name" type="xs:string"/>
 38                                    </xs:sequence>
 39                                    <xs:attribute name="ID" type="xs:ID" use="required"/>
 40                                </xs:complexType>
 41                            </xs:element>
 42                            <xs:element name="belief" minOccurs="0" maxOccurs="unbounded">
 43                                <xs:complexType>
 44                                    <xs:sequence>
 45                                        <xs:element name="name" type="xs:string"/>
 46                                    </xs:sequence>
 47                                    <xs:attribute name="ID" type="xs:ID" use="required"/>
 48                                </xs:complexType>
 49                            </xs:element>
 50                            <xs:element name="Mean-ends-link" minOccurs="0" maxOccurs="unbounded">
 51                                <xs:complexType>
 52                                    <xs:sequence>
 53                                        <xs:element name="from">
 54                                            <xs:complexType>
 55                                                <xs:attribute name="ID" type="xs:IDREF" use="required"/>
 56                                            </xs:complexType>
 57                                        </xs:element>
 58                                        <xs:element name="to">
 59                                            <xs:complexType>
 60                                                <xs:attribute name="ID" type="xs:IDREF" use="required"/>
 61                                            </xs:complexType>
 62                                        </xs:element>
 63                                    </xs:sequence>
 64                                </xs:complexType>
 65                            </xs:element>
 66                            <xs:element name="Contribution-link" minOccurs="0" maxOccurs="unbounded">
 67                                <xs:complexType>
 68                                    <xs:sequence>
 69                                        <xs:element name="type">
 70                                            <xs:complexType>
 71                                                <xs:attribute name="typeID" use="required">
 72                                                    <xs:simpleType>
 73                                                        <xs:restriction base="xs:string">
 74                                                            <xs:enumeration value="And"/>
 75                                                            <xs:enumeration value="Help"/>
 76                                                            <xs:enumeration value="Make"/>
 77                                                            <xs:enumeration value="Some+"/>
 78                                                            <xs:enumeration value="Some-"/>
 79                                                        </xs:restriction>
 80                                                    </xs:simpleType>
 81                                                </xs:attribute>
 82                                            </xs:complexType>
 83                                        </xs:element>
 84                                        <xs:element name="from">
 85                                            <xs:complexType>
 86                                                <xs:attribute name="ID" type="xs:IDREF" use="required"/>
 87                                            </xs:complexType>
 88                                        </xs:element>
 89                                        <xs:element name="to">
 90                                            <xs:complexType>
 91                                                <xs:attribute name="ID" type="xs:IDREF" use="required"/>
 92                                            </xs:complexType>
 93                                        </xs:element>
 94                                    </xs:sequence>
 95                                </xs:complexType>
 96                            </xs:element>
 97                            <xs:element name="Decomposition-link" minOccurs="0" maxOccurs="unbounded">
 98                                <xs:complexType>
 99                                    <xs:sequence>
100                                        <xs:element name="from">
101                                            <xs:complexType>
102                                                <xs:attribute name="ID" type="xs:IDREF" use="required"/>
103                                            </xs:complexType>
104                                        </xs:element>
105                                        <xs:element name="to">
106                                            <xs:complexType>
107                                                <xs:attribute name="ID" type="xs:IDREF" use="required"/>
108                                            </xs:complexType>
109                                        </xs:element>
110                                    </xs:sequence>
111                                </xs:complexType>
112                            </xs:element>
113                        </xs:sequence>
114                        <xs:attribute name="ID" type="xs:ID" use="required"/>
115                    </xs:complexType>
116                </xs:element>
117                <xs:element name="goal" minOccurs="0" maxOccurs="unbounded">
118                    <xs:complexType>
119                        <xs:sequence>
120                            <xs:element name="name" type="xs:string"/>
121                        </xs:sequence>
122                        <xs:attribute name="ID" type="xs:ID" use="required"/>
123                    </xs:complexType>
124                </xs:element>
125                <xs:element name="softgoal" minOccurs="0" maxOccurs="unbounded">
126                    <xs:complexType>
127                        <xs:sequence>
128                            <xs:element name="name" type="xs:string"/>
129                        </xs:sequence>
130                        <xs:attribute name="ID" type="xs:ID" use="required"/>
131                    </xs:complexType>
132                </xs:element>
133                <xs:element name="task" minOccurs="0" maxOccurs="unbounded">
134                    <xs:complexType>
135                        <xs:sequence>
136                            <xs:element name="name" type="xs:string"/>
137                        </xs:sequence>
138                        <xs:attribute name="ID" type="xs:ID" use="required"/>
139                    </xs:complexType>
140                </xs:element>
141                <xs:element name="resource" minOccurs="0" maxOccurs="unbounded">
142                    <xs:complexType>
143                        <xs:sequence>
144                            <xs:element name="name" type="xs:string"/>
145                        </xs:sequence>
146                        <xs:attribute name="ID" type="xs:ID" use="required"/>
147                    </xs:complexType>
148                </xs:element>
149                <xs:element name="belief" minOccurs="0" maxOccurs="unbounded">
150                    <xs:complexType>
151                        <xs:sequence>
152                            <xs:element name="name" type="xs:string"/>
153                        </xs:sequence>
154                        <xs:attribute name="ID" type="xs:ID" use="required"/>
155                    </xs:complexType>
156                </xs:element>
157                <xs:element name="Dependency-link" minOccurs="0" maxOccurs="unbounded">
158                    <xs:complexType>
159                        <xs:sequence>
160                            <xs:element name="dependee">
161                                <xs:complexType>
162                                    <xs:attribute name="ID" type="xs:IDREF" use="required"/>
163                                </xs:complexType>
164                            </xs:element>
165                            <xs:element name="depender">
166                                <xs:complexType>
167                                    <xs:attribute name="ID" type="xs:IDREF" use="required"/>
168                                </xs:complexType>
169                            </xs:element>
170                        </xs:sequence>
171                    </xs:complexType>
172                </xs:element>
173            </xs:sequence>
174        </xs:complexType>
175    </xs:element>
176</xs:schema>
177

关于以上两个文件的语法说明可以参考xml xsd的相关书籍。

Copyright © 2024 三体星
Powered by .NET 9.0 on Kubernetes