Model XML File

Purpose

The model XML file contains all the data required to generate a system model diagram.

Note: System Model Manager does not use a model XML file. It is only used by System Model Generator.

Syntax

<?xml version="1.0"?>  
    <!-- Global data -->
<model ver="version-number" revision="revision_number" revision-type="revision-type" name="system-name" label="label-text" distribution="distribution-text"
     link="base-url" deps="url">

        <!-- architecture data -->

              <sysdef href="url">
        <info href="url" type="type" dbfilter="element" use="value" include="element-list"/>
        ...
     </sysdef>
            
     <sysdef href="url">
        <info href="url" type="type" dbfilter="element" use="value" include="element-list"/>
     </sysdef>           

            ....

        <!-- filters -->

                    <filter select="attribute-name" value="value" display="display-type"/>

                    <ignore type="type" name="name"/>

        <!-- presentation data -->

                    <layout page-width="length" resolution="dpi" static="true-or-false" detail="element"  detail-type="type">
                    < display name="layer-name" align="alignment"/>
                    <layer-group color="color" from="layer-name" to="layer-name" />
                    <logo src="uri" height="length-in-mm" width="length-in-mm" embed="true-or-false" />
                    <info href="url" type="type"/>
                    <legend label="title" 
                                use="location" 
                                width="percent" 
                                maxscale="scale-factor" 
                                title-scale="scale-factor">
                    </legend>
        </layout>

</model>

The Model XML file consists of following sections:

Global data

The global data section contains global information. The root element <model> contains the global information that includes labels and data sources.

The following are some commonly used labels:

  • Model Version: The syntax to specify model version is:

    <model ver="version-number">

    where version-number indicates the model version.

  • System Name: The syntax to specify system name is:

    <model name="system-name" …>

    where system-name indicates the name of the system. For example, you can specify System Model Diagram as name of the system.

  • Model revision number: The syntax to specify model revision number is:

    <model revision="n" …>

    where n indicates the model revision number.

  • Model revision type: The syntax to specify model revision type is:

    <model revision-type="revision-type" …>

    where revision-type indicates the revision type. It can be draft, issued, build, or free text.

  • Copyright: The syntax to specify copyright information is:

    <model copyright="copyright-information" …>

    where copyright-information indicates the copyright information.

  • Distribution: The syntax to specify distribution information is:

    <model distribution="distribution-type" …>

    where distribution-type indicates the distribution type information. For example, it can be confidential.

The following are the various data sources that can be specified in the <model> tag:

  • Dependencies: The syntax to specify dependencies XML file is:

    <model deps="url" …>

    where url indicates the path of the dependencies XML file.

  • Tech Streams: The syntax to specify tech streams XML file is:

    <model ts="url" …>

    where url indicates the path of the tech streams XML file.

  • Shapes: The syntax to specify shapes XML file is:

    <model shapes="url" …>

    where url indicates the path of the tech shapes XML file.

Architecture data

The architecture data section contains system definitions and data sources specific to the system definitions.

The following is the syntax to specify the architecture data in the model XML file:

<sysdef href="sysdef-url"> <info href="url" type="type" ... </sysdef>

The preceding syntax contains following attributes:

  • sysdef href="sysdef-url": Indicates the URL for the system definition file.

  • info href="url": Indicates the URL for the data source.

  • type="type": Indicates the type of the data source. The valid values are extra, levels, s12, contract, and sysmsym.

Filters

The filters section defines filters using Filter tags to filter the contents of the system model diagram. The following is the syntax for the Filter tag:

<filter select="attribute-name" value="value" display="display-type"/>

The preceding syntax contains the following attributes:

  • select = "attribute-name": Indicates the name of the filter.

  • value="value": Indicates the value of the filter.

  • display="display-type": Indicates the display type for the filter. The valid values can be show or hide.

Presentation data

The presentation data section contains styling information to fine tune the system model diagram. The entire presentation data is contained in the <layout> tag.

The <layout> element is a container for all presentation information. It includes <info>, <display>, <layer-group>, <logo> and <legend> elements.

The layout tag contains the following attributes:

  • page-width="length": Specifies the width of the page. For example, it can be page-width="56.6cm"

  • resolution="dpi": Specifies the print resolution in DPI.

  • static="true-or-false": Suppresses the mouseover effects if specified as true.

  • detail="element": Specifies the level of detail. The valid values are layer, block, subblock, collection and component.

The following tags are defined under the layout tag:

  • <info href="url" type="type"/>

    where url refers to the path of the file and type refers to the type of the file. The valid values are abbrev, color, style, border, and overlay. There can be any number of abbrev and style links, but only one each of color, border and overlay.

  • <legend label="title" use="location" width="percent" maxscale="scale-factor" title-scale="scale-factor">

    The preceding tag contains following attributes:

    • width="percent" maxscale="scale-factor": Specifies the scaling of the legend and title at the bottom of the diagram.

    • title-scale="scale-factor": Specifies the scale factor to increase or decrease the font size used for the title in bottom right corner.

    • label="title" use="location": Generates content for the legend with an optional title. For example, <legend label="key" use="@shapes#color"> … </legend>

Example

<?xml version="1.0"?>  

<!-- Global Data -->

<model   ver="9.2" revision="1.1" revision-type="draft" name="Symbian OS" label="System Model"
  copyright="Symbian Ltd. 2006" distribution="internal"
     link="file:///f:/deps"
     deps="system_model_deps.xml"
     ts="http://smglinx.intra/twiki/pub/SMG/CodeOwnerEditTest/techstreams.xml"
     shapes="shapes.xml">


        <!-- architecture data -->

        <sysdef href="file:///I:/epoc32/data/System_Definition.xml">
            <info href="systeminfo.xml" type="extra"/>
            <info href="file:///I:/MCL/cedar/generic/utils/Symbian_OS_v9.2_Schedule12.xml" type="s12"/>
               <info href="levels.xml" type="levels"/>
               <info href="http://smglinx.intra/SymSym/query/dbquery.pl?rom_name=h4hrp_001%2Ftechview;viewdata=build;dbview=query;dbschema=symsym_2855;dbquery=400;datatype=xml"
                   type="symsym" use="component" dbfilter="component"
                   include="uncompressed_size,compressed_size"/>
        </sysdef>

    
    <!-- filters -->

        <filter select="*" display="show"/>
        <filter select="class" value="test" display="hide"/>
        <filter select="deprecated" display="hide"/>

        <ignore type="layer" name="Tools and Utils and SDKENG"/>
        <ignore type="layer" name="MISC"/>

    <!-- presentation data -->

        <layout>
            <info href="values.xml" type="color"/>
            <info href="values-osd.xml" type="border"/>
            <info href="values-ovr.xml" type="overlay"/>
            <info href="values-thickness.xml" type="style"/>
            <info href="values-style.xml" type="style"/>
            <legend label="Key">
            <legend use="#color"/>
            <legend use="#style"/>
            <legend use="#overlay"/>
            <legend use="#border"/>
            </legend>
        </layout>


</model>