sysmodellibs/sysmodelgen/doc/sysmodel/SMG-Input-Files/Values-XML-index.html
changeset 7 3c36c452f013
equal deleted inserted replaced
6:5b32dc297d05 7:3c36c452f013
       
     1 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       
     2     <!-- Generated by Xbuild version: 5.0.20 -->
       
     3     <head>
       
     4         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       
     5 	<meta name="show-comments" content="" />
       
     6 	<title>Values XML Files in System Model Generator Input Files</title>    
       
     7 	<link href="../../_stock/css/reset.css" rel="stylesheet" type="text/css" />
       
     8 	<link href="../../_stock/css/portal.css" rel="stylesheet" type="text/css" />
       
     9 	<link href="../../_stock/css/iefix.css" rel="stylesheet" type="text/css" />
       
    10 	<link href="../../_stock/css/ui.tabs.css" rel="stylesheet" type="text/css" />
       
    11 	<link href="../../_stock/css/developer.css" rel="stylesheet" type="text/css" />
       
    12 	<link rel="stylesheet" type="text/css" href="../../_stock/css/ui.css" media="screen" />
       
    13 	<link rel="stylesheet" type="text/css" href="../../_stock/css/sysdoc.css" media="screen" />
       
    14 	<link rel="stylesheet" type="text/css" href="../../_stock/css/sdlplugin.css" media="screen" />
       
    15     </head>
       
    16     <body>
       
    17 	<div id="main_content">
       
    18 	    <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
    19 		<tr>
       
    20 		    <td valign="top" width="100%">
       
    21 			<div id="main_content_txt">
       
    22 			    <div class="main_content_padding">		
       
    23                                 <div id="main">
       
    24                                     <div id="authoredContent">
       
    25                                         <a name=""></a>
       
    26 <h1>Values XML Files</h1><a name="valuesxml"></a><p>
       
    27 	The Values XML files are used to define default and per-item display
       
    28 	properties. You can use a values XML file to define colors, patterns, border
       
    29 	shapes, or border styles of the system model items. 
       
    30   </p><p>
       
    31 	For information about how to define new values for border shapes, colors or
       
    32 	patterns, see 
       
    33 	<a href="../CustomSysmodel/index.html#cust%2eindex" title="This document describes how to customise a System Model diagram using a Shapes XML file to specify the styling of components and generated legend items.">Customizing the System Model Presentation</a>
       
    34 .
       
    35 	
       
    36   </p><p>
       
    37 	There are four types of Values XML files: 
       
    38   </p><ul class="indexlinks">
       
    39 <li>
       
    40 <a href="Colours-XMLFile.html#coloursxml">Colors Values XML File</a></li>
       
    41 <li>
       
    42 <a href="Patterns-XMLFile.html#patternsxml">Patterns Values XML File</a></li>
       
    43 <li>
       
    44 <a href="Border-Shapes-XMLFile.html#bordershapesxml">Border Shapes Values XML File</a> (components only)</li>
       
    45 <li>
       
    46 <a href="Border-Style-XMLFile.html#borderstylesxml">Border Styles Values XML File</a></li>
       
    47 </ul>
       
    48 
       
    49 
       
    50 <h2>Syntax</h2>
       
    51 <p>All Values XML files share the same basic syntax
       
    52 <div class="Example"><code class="xml">&lt;?xml version="1.0"?&gt;
       
    53 <br/>&lt;values <span class="opt">default="<var>presentation-value</var>"</span> <span class="opt">label="<var>label for legend section</var>"</span> <span class="default">rank="<var>item-type-list</var>"</span> <span class="default">id-namespace="<var>uri</var>" </span><span class="opt"><var>&#133;namespaces&#133;</var></span> &gt;
       
    54 <div class="indent">&lt;item <span class="opt">label="<var>label for legend</var>"</span> value="<var>presentation-value</var>"&gt;
       
    55 <div class="indent">&lt;m ref="<var>id</var>"/&gt;
       
    56 <br/>&lt;m ref="<var>id</var>"/&gt;
       
    57 <br/>&lt;m ref="<var>id</var>"/&gt;
       
    58 <br>&#133;</div>
       
    59 &lt;/item&gt;
       
    60 <br>&lt;item &#133;&gt;<div class="indent">&#133;</div>&lt;/item&gt;<br>&#133;</div>&lt;/values&gt;</code></div><p>
       
    61 		In the preceding syntax, the root element <code>values</code> contains any number of 
       
    62 		<code>item</code> tags. The various attributes for the <code>values</code> tag are: 
       
    63 	  </p><ul> 
       
    64 	  
       
    65 		<li>
       
    66 		  <p>
       
    67 			<code class="xml">rank="<var>item-type-list</var>"</code>: Space-separated list of the ranks (<code>component</code>, <code>collection</code>, <code>package</code> or  <code>layer</code>) of items the <code>default</code> value applies to.
       
    68 			Any system model item of the listed rank <em>not</em> listed in the values file will get the <code>default</code> presentation value. 
       
    69 			The (default) special value of <code>*</code> indicates this file applies to all ranks. 
       
    70 		  </p> 
       
    71 		</li>
       
    72 
       
    73 		<li>
       
    74 		  <p>
       
    75 			<code class="xml">default="<var>presentation-value</var>"</code>: Defines the
       
    76 			default presentation value for the system model item. This default value gets assigned to
       
    77 			the system model items of the specified rank to which no specific value is assigned. 
       
    78 		  </p> 
       
    79 		</li>
       
    80  
       
    81 		<li>
       
    82 		  <p>
       
    83 			<code class="xml">label="<var>label for legend section</var>"</code>: Defines the label that will precede the legend section.
       
    84 		  </p> 
       
    85 		</li>
       
    86 		<li>
       
    87 		  <p>
       
    88 			<code class="xml">id-namespace="<var>uri</var>"</code>: The default namespace for all <code>ref</code> attributes in the XML file. Has the same meaning, usage and default value as <code>id-namespace</code> in the <a href="http://developer.symbian.org/wiki/index.php/System_Definition/Root#Attributes">System Definition</a>.
       
    89 		  </p> 
       
    90 		</li>
       
    91 
       
    92 		<li>
       
    93 		  <p>
       
    94 			<code><var>namespaces</var></code>: Any namespace declaration should be done in the root element. ID references can use namespace prefixes to associate with system model items. See <a href="http://developer.symbian.org/wiki/index.php/System_Definition/Attributes#Namespacing_names">Namespacing names</A> in the System Definition specification.
       
    95 		  </p> 
       
    96 		</li>
       
    97  
       
    98 	  </ul><p>
       
    99 		Each <code class="xml">item</code> tag can have the following attributes: 
       
   100 	  </p><ul> 
       
   101 		<li>
       
   102  
       
   103 		  <p>
       
   104 			<code class="xml">label="<var>label for legend</var>"</code>: Defines the label for the	legend. 
       
   105 		  </p> 
       
   106 		</li>
       
   107  
       
   108 		<li>
       
   109  
       
   110 		  <p>
       
   111 			<code>value="<var>presentation-value</var>"</code>: Defines the presentation
       
   112 			value for the item (color, border shape, etc). This presentation value gets assigned to all the referenced system model items that are
       
   113 			listed within that <code>item</code> element. 
       
   114 		  </p> 
       
   115 		</li>
       
   116  
       
   117 	  </ul><p>
       
   118 		The <code>item</code> tag also contains <code>m</code> tags to reference the IDs of system model items.
       
   119 		 Everything referenced in an
       
   120 		<code>item</code> tag has the same presentation value. The following is the basic syntax for <code>m</code>: 
       
   121 	  </p><p>
       
   122 		<code> &lt;m ref="<var>id</var>"/&gt;</code> 
       
   123 	  </p><p>
       
   124 		Where <var>id</var> is a reference to the ID of a system model item
       
   125 		defined in a system definition file. <strong>Note:</strong> while most presentation values can apply to anything, only components can be given a border shape. 
       
   126 	  </p></div>
       
   127 
       
   128 <p>
       
   129 	<b>Notes</b>:
       
   130   </p><ul> 
       
   131 	<li>
       
   132  
       
   133 	  <p>
       
   134 		You are recommended to specify a default value when using the values to
       
   135 		specify colors or shapes on components, since the components not specified in the file will
       
   136 		either be black or not show up at all. 
       
   137 	  </p>
       
   138 	</li>
       
   139  
       
   140 	<li>
       
   141  
       
   142 	  <p>
       
   143 		While creating a value XML file (colors, patterns, border shapes or
       
   144 		border styles), you can only specify predefined set of values to the items. For
       
   145 		information about the values that can be specified in each type of values XML
       
   146 		file, refer to the corresponding topic. 
       
   147 	  </p>
       
   148 	</li>
       
   149  
       
   150 	<li>
       
   151  
       
   152 	  <p>
       
   153 		All values in a values XML file must be of the same type. 
       
   154 	  </p>
       
   155 	</li>
       
   156  
       
   157   </ul>
       
   158                                     </div>
       
   159                                     <div id="printer_copyright">
       
   160                                         <div id="printer_copyright_padding">
       
   161                                             Copyright &copy;2009&nbsp; Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: <a href="http://www.symbianfoundation.org/legal/sfl-v10.html">SFL</a>
       
   162                                         </div>
       
   163                                     </div>
       
   164                                 </div>
       
   165 			    </div>
       
   166 			</div>
       
   167 		    </td>
       
   168 		</tr>
       
   169 	    </table>
       
   170 	    <div style="clear: both"></div>
       
   171 	</div>
       
   172 	<div id="includedFooter">
       
   173 	    <div id="devnet_footer">
       
   174             <div style="float: left;">Copyright &copy;2009&nbsp; Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: <a href="http://www.symbianfoundation.org/legal/sfl-v10.html">SFL</a>.&nbsp;</div>
       
   175             <div id='BUILD_VERSION'></div>
       
   176 	    </div>
       
   177 	</div>
       
   178 </body>
       
   179 </html>