File: vixmlconInheritance.htm

package info (click to toggle)
office2003-schemas 1.0%2Bds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, forky, sid, trixie
  • size: 42,304 kB
  • sloc: javascript: 2,429; makefile: 29
file content (269 lines) | stat: -rw-r--r-- 15,734 bytes parent folder | download
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01087246"><META NAME="lcid" CONTENT="1033"><title>Inheritance</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><h1>Inheritance</h1><p>Microsoft® Office Visio® 2003 shapes can inherit sections, rows, and cells from parent sheets. A <b class="bterm">Shape</b> element that inherits from a <b class="bterm">Master</b> element is called an instance of the <b class="bterm">Master</b> element. An instance inherits all the elements of the master. Additionally, a <b class="bterm">Shape</b> element can inherit from a <b class="bterm">StyleSheet</b> element and inherit the style's line, fill, and text properties. (A <b class="bterm">Master</b> element doesn't inherit styles, but the <b class="bterm">PageSheet</b> or <b class="bterm">Shape</b> elements contained in them do.) A <b class="bterm">StyleSheet</b> and <b class="bterm">PageSheet</b> element can also inherit from another <b class="bterm">StyleSheet</b> element.</p><p>The inheritance relationships are established in a DatadiagramML file by means of attributes. The following table describes the attributes used to establish inheritance between a shape, a master, and a style. (Some of the attributes listed in the table are also associated with other elements. For example, the <b class="bterm">Page</b> element also has an <b class="bterm">ID</b> attribute that identifies it within its container, but it is unrelated to inheritance.)</p><table>
			<tr>
				<th>
					<b class="bterm">Attribute</b>
				</th>
				<th>
					<b class="bterm">In element</b>
				</th>
				<th>
					<b class="bterm">Attribute description</b>
				</th>
			</tr>
			<tr>
				<td>
					<p><b class="bterm">ID</b></p>
				</td>
				<td>
					<p><b class="bterm">Master</b> and <b class="bterm">StyleSheet</b></p>
				</td>
				<td>
					<p>A unique ID within the object's container. An integer value.</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><b class="bterm">Master</b></p>
				</td>
				<td>
					<p><b class="bterm">Shape</b></p>
				</td>
				<td>
					<p>The <b class="bterm">ID</b> of the master that the shape inherits from. Top-level shapes on a page that are instances of a master must have a valid <b class="bterm">Master</b> attribute. Mutually exclusive with the <b class="bterm">MasterShape</b> attribute.</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><b class="bterm">MasterShape</b></p>
				</td>
				<td>
					<p><b class="bterm">Shape</b></p>
				</td>
				<td>
					<p>The <b class="bterm">ID</b> of a shape in a <b class="bterm">Master</b> element that this shape inherits. Establishes a link between an instance of a shape and its master shape. Subshapes of an instance group shape must have this attribute. Mutually exclusive with the <b class="bterm">Master</b> attribute.</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><b class="bterm">LineStyle</b></p>
				</td>
				<td>
					<p><b class="bterm">Shape</b>, <b class="bterm">StyleSheet</b>, <b class="bterm">PageSheet</b>, <b class="bterm">DocumentSheet</b></p>
				</td>
				<td>
					<p>ID of the <b class="bterm">StyleSheet</b> element from which  this element inherits line formatting.</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><b class="bterm">FillStyle</b></p>
				</td>
				<td>
					<p><b class="bterm">Shape</b>, <b class="bterm">StyleSheet</b>, <b class="bterm">PageSheet</b>, <b class="bterm">DocumentSheet</b></p>
				</td>
				<td>
					<p>ID of the <b class="bterm">StyleSheet</b> element from which this element inherits fill formatting.</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><b class="bterm">TextStyle</b></p>
				</td>
				<td>
					<p><b class="bterm">Shape</b>, <b class="bterm">StyleSheet</b>, <b class="bterm">PageSheet</b>, <b class="bterm">DocumentSheet</b></p>
				</td>
				<td>
					<p>ID of the <b class="bterm">StyleSheet</b> element from which  this element inherits text formatting.</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><b class="bterm">Del</b></p>
				</td>
				<td>
					<p><b class="bterm">Shape</b></p>
				</td>
				<td>
					<p><b class="bterm">Del</b> is a boolean attribute. It is only meaningful if the shape is part of a master instance. If 1 (true), the shape instance is deleted locally.</p>
				</td>
			</tr>
		</table><h2>Master and MasterShape attributes</h2><p><b class="bterm">Shape</b> elements use the <b class="bterm">Master</b> and <b class="bterm">MasterShape</b> attributes to establish inheritance from a <b class="bterm">Master</b> element. For example, a shape that inherits from a master has a <b class="bterm">Master</b> attribute whose value is the ID of the <b class="bterm">Master</b> element. The <b class="bterm">Shape</b> element inherits all the subelements of the <b class="bterm">Shape</b> element contained in the <b class="bterm">Master</b> element.</p><p>A <b class="bterm">Master</b> element is often composed of one <b class="bterm">Shapes</b> element that contains multiple <b class="bterm">Shape</b> elements that can, in turn, contain additional <b class="bterm">Shapes</b> elements. The IDs of a <b class="bterm">Master</b> element's shapes and subshapes are all unique within the <b class="bterm">Master</b> element. In an instance of a master, the master's subshapes can be re-expressed for the purposes of local overrides or local deletions. However, each of those subshapes must have its own <b class="bterm">ID</b> attribute that is unique within the instance's page.</p><p>To maintain a link back to the <b class="bterm">Master</b> element's shapes, overridden shapes must have a separate attribute called <b class="bterm">MasterShape</b>. The value of this attribute is the ID of the <b class="bterm">Shape</b> in the <b class="bterm">Master</b> that this local shape is overriding.</p><p>For example, consider the following code, which describes a master that is a group:</p><pre><code>&lt;Master ID='4' NameU='MasterShapeExample' ...&gt;
   ...
   &lt;Shapes&gt;
      &lt;Shape ID='5' Type='Group'&gt;
         ...
         &lt;Shapes&gt;
            &lt;Shape ID='6' Type='Shape'&gt;
               ...
               &lt;Fill&gt;
                  &lt;FillForegnd&gt;2&lt;/FillForegnd&gt;
                  ...
               &lt;/Fill&gt;
               ...
            &lt;/Shape&gt;
            ...
         &lt;/Shapes&gt;
      &lt;/Shape&gt;
   &lt;/Shapes&gt;
&lt;/Master&gt;


</code></pre><p>The following code shows how to create an instance of the previous master that contains a local shape that overrides the fill formatting of one of the subshapes in that master. (Note that this example uses the <b class="bterm">MasterShape</b> attribute to refer to the previous master.)</p><pre><code>

&lt;Shape ID='10' NameU='MasterShapeExample' Type='Group' Master='4'&gt;
   ...
   &lt;Shapes&gt;
      &lt;Shape ID='11' Type='Shape' MasterShape='6'&gt;
         ...
         &lt;Fill&gt;
            &lt;FillForegnd&gt;3&lt;/FillForegnd&gt;
            ...
         &lt;/Fill&gt;
      &lt;/Shape&gt;
   &lt;/Shapes&gt;
&lt;/Shape&gt;</code></pre><h2>FillStyle, LineStyle, and TextStyle attributes</h2><p>A <b class="bterm">Shape</b>, <b class="bterm">PageSheet</b>, <b class="bterm">DocumentSheet</b>, or <b class="bterm">StyleSheet</b> element can inherit styles from up to three other <b class="bterm">StyleSheet</b> elements. Three attributes of a sheet element<nbsp />— <b class="bterm">FillStyle</b>, <b class="bterm">TextStyle</b>, and <b class="bterm">LineStyle</b><nbsp />— can refer to a <b class="bterm">StyleSheet</b> element by ID. When a sheet element inherits from a <b class="bterm">StyleSheet</b> element, it inherits only elements relevant to the attribute. For example, when a <b class="bterm">Shape</b> element contains a <b class="bterm">TextStyle</b> attribute, it inherits only elements that affect text, such as <b class="bterm">Para</b>, <b class="bterm">Char</b>, <b class="bterm">Tabs</b>, and <b class="bterm">TextBlock</b>.</p><p> If an instance does not specify a particular style-inheritance attribute, it inherits the styles that attribute defines from the master shape, or from the style that master shape inherits. If a non-instance does not specify a particular style-inheritance attribute, Style 0 is used. (Style 0 is defined by the default document and cannot be modified in the user interface or by  Automation.)</p><h2>Local overrides</h2><p>A <b class="bterm">Shape</b> element that inherits from a <b class="bterm">Master</b> element is called an instance of the <b class="bterm">Master</b>. An instance inherits all the elements of the master. Therefore, the instance in a DatadiagramML file does not explicitly express the elements that it inherits. By locally overriding an element, you can block inheritance of that element.</p><p>Consider the following XML:</p><pre><code>&lt;Master ID='0'&gt;
   ...
   &lt;XForm&gt;
      &lt;PinX&gt; 1.0 &lt;/PinX&gt;
      &lt;PinY&gt; 2.0 &lt;/PinY&gt;
   &lt;/XForm&gt;
   ...
&lt;/Master&gt;
...
&lt;Shape ID='99' Master='0'/&gt;
</code></pre><p>Shape 99 inherits all the elements of Master 0. It does not explicitly express its <b class="bterm">PinX</b> and <b class="bterm">PinY</b> elements, but the <b class="bterm">Shape</b> element behaves as if they were present. If a <b class="bterm">Shape</b> element does explicitly express an inherited element, that component is locally overridden in the instance. Consider the following code:</p><pre><code>&lt;Master ID='0'&gt;
   ...
   &lt;XForm&gt;
      &lt;PinX&gt; 1.0 &lt;/PinX&gt;
      &lt;PinY&gt; 2.0 &lt;/PinY&gt;
   &lt;/XForm&gt;
   ...
&lt;/Master&gt;
...
&lt;Shape ID='99' Master='0'&gt;
   &lt;XForm&gt;
      &lt;PinX&gt; 2.0 &lt;/PinX&gt;
   &lt;/XForm&gt;
&lt;/Shape&gt;
</code></pre><p>In this case, Shape 99 still inherits its master's <b class="bterm">PinY</b> element value, but it has locally overridden the value of <b class="bterm">PinX</b> to 2.0.</p><h2>Local deletion</h2><p>A <b class="bterm">Shape</b> element can also suppress the appearance of an element in an instance. When an instance suppresses a component, that component is locally deleted. Consider this example:
			
			</p><pre><code>&lt;Master ID='0'&gt;
   &lt;Shapes&gt;
      &lt;Shape ID='5' Type='Group' ...&gt;
         &lt;Shapes&gt;
            &lt;Shape ID='6' Type='Shape' ...&gt;
            ...
            &lt;/Shape&gt;
            &lt;Shape ID='7' Type='Shape' ...&gt;
            ...
            &lt;/Shape&gt;
         &lt;/Shapes&gt;
      &lt;/Shape&gt;
   &lt;/Shapes&gt;
&lt;/Master&gt;
</code></pre><p>In this case, the <b class="bterm">Master </b>element is a group that contains two shapes. To suppress one of the shapes on the shape instance, use the <b class="bterm">Del</b> attribute. For example, the following would suppress a shape (ID='2') in the instance of the group:</p><pre><code>&lt;Shapes&gt;
   &lt;Shape ID='1' Type='Group' Master='0'&gt;
      ...
      &lt;Shapes&gt;
         &lt;Shape ID='2' Type='Shape' MasterShape='6' Del='1'&gt;
         ...
         &lt;/Shape&gt;
         &lt;Shape ID='3' Type='Shape' MasterShape='7'&gt;
         ...
         &lt;/Shape&gt;
      &lt;/Shapes&gt;
   &lt;/Shape&gt;
&lt;/Shapes&gt;</code></pre><h2>Inheritance states</h2><p>The following table describes all the possible inheritance states in which the sheet elements can exist.</p><table>
			<tr>
				<th>
					<b class="bterm">XML example</b>
				</th>
				<th>
					<b class="bterm">Description of inheritance state</b>
				</th>
			</tr>
			<tr>
				<td>
					<i>empty</i>
				</td>
				<td>
					<p>Represents full inheritance. If a sheet element inherits its state fully from its parent, the element simply does not appear within the instance.</p>
				</td>
			</tr>
			<tr>
				<td>
					<p><code>&lt;Geom IX='1' Del='1'/&gt;</code></p>
				</td>
				<td>
					<p>A section (represented by the <b class="bterm">Geom</b> element) is locally deleted. This means that the section has been severed locally, blocking inheritance of the section and all its children.</p>
				</td>
			</tr>
			<tr>
				<td>
					<code>&lt;Geom IX ='1'/&gt;</code>
				</td>
				<td>
					<p>A section is local, but its children are inherited from the master.</p>
				</td>
			</tr>
			<tr>
				<td>
					<code>&lt;Geom IX ='1'&gt;</code>
					
					<code>&lt;LineTo IX ='2' Del='1'/&gt;</code>
					
					<code>&lt;/Geom&gt;</code>
				</td>
				<td>
					<p>A row (represented by the <b class="bterm">LineTo</b> element) is locally deleted. The row has been severed locally, blocking inheritance of the row and its children.</p>
				</td>
			</tr>
			<tr>
				<td>
					<code>&lt;PinX F='Inh'&gt; 20 &lt;/PinX&gt;</code>
				</td>
				<td>
					<p>A locally overridden value.</p>
				</td>
			</tr>
			<tr>
				<td>
					<code>&lt;PinX F='Inh' Err='#NUM!'&gt; 20 &lt;/PinX&gt;</code>
				</td>
				<td>
					<p>A locally overridden value. The <b class="bterm">Err</b> attribute value has also been overridden. The formula (represented by the <b class="bterm">F</b> attribute) is inherited from the parent.</p>
				</td>
			</tr>
			<tr>
				<td>
					<code>&lt;PinX&gt; 20 &lt;/PinX&gt;</code>
				</td>
				<td>
					<p>The most common case. The formula is a constant value. The value is a number and the <b class="bterm">F</b> attribute is not present.</p>
				</td>
			</tr>
			<tr>
				<td>
					<code>&lt;PinX F='Height*2'&gt; 20 &lt;/PinX&gt;</code>
				</td>
				<td>
					<p>The formula is a complex expression represented by a string that is not empty and not the string "No Formula". The value contains a number, which is the last valid value.</p>
				</td>
			</tr>
			<tr>
				<td>
					<code>&lt;PinX F='Height/0' Err='#DIV/0!'&gt; 20 &lt;/PinX&gt;</code>
				</td>
				<td>
					<p>The formula is a complex expression represented by a string that is not empty and not the string "No Formula". The value contains a number, which is the last valid value. The <b class="bterm">Err</b> attribute is also present and contains a string representing the error state.</p>
				</td>
			</tr>
		</table><p> <p><b>Note</b>  Every Visio document is based on a default document with a built-in <b class="bterm">StyleSheet</b> element with the ID of 0. Style 0 is defined by the default document and cannot be modified in the user interface or through Automation. If a sheet does not explicitly inherit from a <b class="bterm">Master</b> or <b class="bterm">StyleSheet</b> element, it implicitly inherits from <b class="bterm">StyleSheet</b> ID = '0'. All absent document-level elements also inherit from Style 0.</p></p><p>When Visio reads a DatadiagramML file, it ignores any <b class="bterm">StyleSheet</b> element with the ID = '0'. It always uses its built-in Style 0 when loading a DatadiagramML file.</p><center><a href="XMLSchemaCopyright_HV01147162.htm">&copy;2003-2004 Microsoft Corporation. All rights reserved.</a>  

Permission to copy, display and distribute this document is available at: <a 

href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&amp;CTT=11&amp;Origin=HV011232471033" 

target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html>