<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE diagram> <diagram metadata="true" xmlns:sdm="http://www.ilog.com/JViews/SDM/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <person id="person_1"> <property name="sex">male</property> <property name="sdm:y">264.91016</property> <property name="firstname">John</property> <property name="profession">teacher</property> <property name="deathdate">1960</property> <property name="sdm:x">35.429688</property> <property name="name">Smith</property> <property name="birthdate">1900</property> </person> <person id="person_2"> <property name="sex">female</property> <property name="sdm:y">165.28516</property> <property name="firstname">Janet</property> <property name="deathdate">1970</property> <property name="sdm:x">35.429688</property> <property name="name">Whoop</property> <property name="birthdate">1903</property> </person> <couple id="couple_1"> <property name="startdate">1920</property> <property name="sdm:y">215.09766</property> <property name="sdm:x">123.75</property> <property name="status">married</property> </couple> <couplelink islink="true" id="couple_11" from="person_1" to="couple_1" /> <couplelink islink="true" id="couple_21" from="person_2" to="couple_1" /> <person id="person_3"> <property name="sex">male</property> <property name="sdm:y">310.3828</property> <property name="firstname">Andrew</property> <property name="profession">engineer</property> <property name="deathdate">1995</property> <property name="sdm:x">214.79688</property> <property name="name">Smith</property> <property name="birthdate">1922</property> </person> <childlink islink="true" id="child_1_3" from="couple_1" to="person_3" /> <person id="person_4"> <property name="sex">female</property> <property name="sdm:y">119.8125</property> <property name="firstname">Mary</property> <property name="profession">Advocat</property> <property name="sdm:x">214.79688</property> <property name="name">Smith</property> <property name="birthdate">1924</property> </person>
<childlink islink="true" id="child_1_4" from="couple_1" to="person_4" /> <person id="person_5"> <property name="sex">male</property> <property name="sdm:y">212.97656</property> <property name="firstname">Richard</property> <property name="profession">Writer</property> <property name="deathdate">1995</property> <property name="sdm:x">214.79688</property> <property name="name">Bilbot</property> <property name="birthdate">1920</property> </person> <couple id="couple_2"> <property name="startdate">1942</property> <property name="sdm:y">166.39453</property> <property name="enddate">1960</property> <property name="sdm:x">305.84375</property> <property name="status">divorced</property> </couple> <couplelink islink="true" id="couple_42" from="person_4" to="couple_2" /> <couplelink islink="true" id="couple_52" from="person_5" to="couple_2" /> <person id="person_6"> <property name="sex">male</property> <property name="sdm:y">166.39453</property> <property name="firstname">Henry</property> <property name="profession">Driver</property> <property name="sdm:x">391.375</property> <property name="name">Bilbot</property> <property name="birthdate">1945</property> </person> <childlink islink="true" id="child_2_6" from="couple_2" to="person_6" /> <person id="person_7"> <property name="sex">male</property> <property name="sdm:y">26.648438</property> <property name="firstname">Jack</property> <property name="profession">Technician</property> <property name="deathdate">1997</property> <property name="sdm:x">214.79688</property> <property name="name">Johnson</property> <property name="birthdate">1925</property> </person> <couple id="couple_3"> <property name="startdate">1960</property> <property name="sdm:y">73.23047</property> <property name="sdm:x">305.84375</property> <property name="status">married</property> </couple> <couplelink islink="true" id="couple_43" from="person_4" to="couple_3" /> <couplelink islink="true" id="couple_73" from="person_7" to="couple_3" /> </diagram>
childlink
or couplelin
k)
with the attribute isLink
set to true
and
attributes from
and to
which
refer to nodes defined in the same file. sdm:x
and sdm:y
properties
are x- and y-coordinates giving the location of a node. diagram
. isLink
is true)
or nodes (attribute isLink
is false
).
Nodes and links must be distinguishable by different XML element
names. They are loaded from the same file. isLink
attribute
= false
) are represented by nodes in the
diagram. The elements that are links (isLink
attribute
= true
) are represented by links in the
diagram. tag
property
of the the model object. id
represents
the object’s unique identifier (ID). isLink
,
when set to true
, indicates that the model
object is a link. from
and to
for
a link designate the origin and destination. The values of these attributes
are the IDs of the origin and destination nodes. property
. name
attribute.
The value of the property is the text of the element. speed
with
the value 148.0
: <property name="speed">148.0</property>
diagram
element has
a Boolean attribute metadata
which indicates
whether metadata is to be handled. The default value is true
.
<diagram metadata="true"/>
sdm:
prefix,
indicating a specific SDM namespace. <property name="sdm:x">23</property>
<diagram metadata="true" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://dublincore.org/" xmlns:sdm="http://www.ilog.com/JViews/SDM/" /> <rdf:RDF> <rdf:Description about="."> <dc:Creator> <sdm:Pseudo>PhK</sdm:Pseudo> <sdm:Office>S023</sdm:Office> </dc:Creator> </rdf:Description> </rdf:RDF> ... (the remainder of the document represents the SDM model) </diagram>
rdf
, then the metadata
attribute
of the diagram
element is forced to true
.