File: vixmlconRoundtrip.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 (82 lines) | stat: -rw-r--r-- 9,026 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
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01086438"><META NAME="lcid" CONTENT="1033"><title>Round-Tripping DatadiagramML Files</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><p id="ExpandAllLine" class="ExpFav"><a href="#" onclick="ExpandAll()" onkeypress="ExpandAll()" class="DropDown"><img id="picHeader" border="0" src="expandtri.gif" alt="Show All"><span id="ExpandAll">Show All</span></a></p><h1>Round-Tripping DatadiagramML Files</h1><p>You can save Microsoft Office Visio drawings, stencils, and templates as XML files and then open them again in Visio without any loss of information. This is called <i>round-tripping</i>.</p><p>However, when Visio opens an XML file created  in another application or a DatadiagramML file edited in another application and then resaves the document into a DatadiagramML file, although there should be no loss of data, the files are not guaranteed to be identical after they have been saved in Visio. </p><p>The following cases illustrate some differences that occur when an XML  file created  in another application or a DatadiagramML file edited in another application is saved in Visio.</p>
				<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">White space</a></p>
				<div id="ExpCol" class="collapsed" border="0">
					<p>White space is not preserved in DatadiagramML files except within elements whose data type is string, including <b class="bterm">Text</b> elements. Visio will also preserve white space for any Solution XML or unknown XML because of the default xml:space='preserve' setting in all VDX files. In all other cases, for example in cell elements whose data type is NUM,  white space is not preserved. </p><p>By default, Visio typically does not display any formatting, such as carriage returns and tab indents, in the source code of XML files. This can make these files  hard to read inside a general text editor such as Notepad. To have Visio display formatting (such as  indents of child elements) in XML files to make them easier to read, you must modify  the following registry key:</p>
					<b class="bterm">HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Visio\Application\XMLEmitIndents</b>
					<p>To improve readability in Notepad and other text editors, set the value of <b class="bterm">XMLEmitIndents</b> to 1.</p>
				<b class="bterm">Caution</b>&nbsp;&nbsp;&nbsp;Incorrectly editing the registry may severely damage your operating system, requiring you to reinstall it. Microsoft cannot guarantee that problems resulting from editing the registry incorrectly can be resolved. Before editing the registry, back up any valuable data. For the most recent information about using and protecting your computer's registry, see Microsoft Windows Help.</div>
			
				<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Elements that represent cells</a></p>
				<div id="ExpCol" class="collapsed" border="0">
					<p>Visio always emits local cell elements that have an explicit unit, value, and formula. If a third-party application omits portions of the element, Visio either picks default values or infers correct values for the missing components. Consider a possible fragment emitted from a third-party application:</p>
					<pre><code>&lt;PinX F='1'/&gt;
</code></pre>
					<p>Because only a formula was specified, Visio assigns the formula to the <b class="bterm">PinX</b> element and then evaluates the formula to determine the value. Because the formula evaluates to a constant, Visio flags the element as a constant. A unit of measure was not specified, so Visio uses the default unit for the cell, which is inches (the default length unit or DL). When the file is resaved, the previous fragment appears like this:</p>
					<p><pre><code>&lt;PinX&gt;1&lt;/PinX&gt;
</code></pre><p><b>Note</b>   If the unit of measure is explicitly set in the ShapeSheet spreadsheet and is different from the default unit, Visio writes out the <b class="bterm">Unit</b> attribute.</p></p>
				</div>
			
				<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Elements that represent rows</a></p>
				<div id="ExpCol" class="collapsed" border="0">
					<p>A DatadiagramML file can contain a series of elements that represent indexed rows. Consider this file fragment:</p><pre><code>&lt;Scratch IX='3'&gt;
   &lt;X&gt; 3 &lt;X/&gt;
&lt;/Scratch&gt;
&lt;Scratch IX='1'&gt;
   &lt;X&gt; 1 &lt;X/&gt;
&lt;/Scratch&gt;
</code></pre>
					<p>When Visio reads the file and resaves it, it appears as follows:</p><pre><code>&lt;Scratch IX='0'&gt;
   &lt;X F='No Formula'&gt;0&lt;/X&gt;
   &lt;Y F='No Formula'&gt;0&lt;/Y&gt;
   ...
&lt;/Scratch&gt; 
&lt;Scratch IX='1'&gt;
   &lt;X&gt;1&lt;/X&gt;
   &lt;Y F='No Formula'&gt;0&lt;/Y&gt;
   ...
&lt;/Scratch&gt; 
&lt;Scratch IX='2'&gt;
   &lt;X F='No Formula'&gt;0&lt;/X&gt;
   &lt;Y F='No Formula'&gt;0&lt;/Y&gt;
   ...
&lt;/Scratch&gt; 
&lt;Scratch IX='3'&gt;
   &lt;X&gt;3&lt;/X&gt;
   &lt;Y F='No Formula'&gt;0&lt;/Y&gt;
   ...
&lt;/Scratch&gt;
</code></pre>
					
					
					<p>Visio always writes indexed rows out in index order. If the original sequence of rows was indexed sparsely (there were gaps in the sequence), Visio implicitly creates the missing rows. <p><b>Note</b>   Text rows will not work as expected if the rows are not listed in ascending order.</p></p>
					<p>Named rows have no specific order. If a DatadiagramML file contains a series of named rows, their order is not guaranteed when the file is round-tripped.</p>
				</div>
			
				<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Geom elements</a></p>
				<div id="ExpCol" class="collapsed" border="0">
					<p>Geometry sections follow the same round-tripping rules as indexed rows. Indexed sections can appear in any order, but when round-tripped, they are written out in index order and the sparse sections are implicitly created.</p>
					<p>For more information about <b class="bterm">Geom</b> elements, see <a href="vixmlconWorkingWithGeom.htm" id="HV83150820" lcid=" ">Working with Geometry in DatadiagramML</a>.</p>
				</div>
			
				<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Text elements</a></p>
				<div id="ExpCol" class="collapsed" border="0">
					<p>In the Visio engine, a block of text can contain ASCII control characters that represent tabs, line breaks, paragraph breaks, and field positions.</p>
					<p>An ASCII 9, ASCII 10, or ASCII 13 character indicating a tab, paragraph break, or line break, respectively, is emitted as a normal ASCII character into DatadiagramML. These characters are considered legal Unicode characters by all XML parsers. </p>
					<p>Any other ASCII control character between ASCII 0 and ASCII 31 (other than ASCII 9, 10, and 13) is considered an illegal Unicode character by some XML parsers. As a result, when you save a file that contains these control characters, Visio converts them into question-mark characters (?) and warns you about their existence. </p>
					
					<p>For more information about working with text, see <a href="vixmlconWorkingWithText.htm" id="HV83150821" lcid=" ">Working with a Shape's Text in DatadiagramML.</a></p>
				</div>
			
				<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Miscellaneous</a></p>
				<div id="ExpCol" class="collapsed" border="0">
					<p>A third-party application can omit a document-level element from a DatadiagramML file, such as <b class="bterm">DocumentProperties</b> or any of the document level child elements, such as <b class="bterm">Author</b>. However, when the DatadiagramML file is round-tripped, Visio creates a document-level element for all non-empty document properties. For example, a DatadiagramML file can omit the <b class="bterm">TimeSaved</b> element, but the round-tripped DatadiagramML file contains a <b class="bterm">TimeSaved</b> element with an appropriate value.</p>
				</div>
			<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>