Problem 6; 5-Jun-2000

XML: Foundations, Techniques, Applications; Summer 2000

Harold Boley; DFKI, Univ. Kaiserslautern


This is the DTD for a 'lightweight' kernel of the XML-based Ontology exchange Language (XOL specification):
<!ELEMENT module      (name, class*, slot*, individual*)>
<!ELEMENT class       (name, subclass-of*)>
<!ELEMENT slot        (name, (domain | slot-value-type)*)>
<!ELEMENT individual  (name, (instance-of | slot-values)*)>
<!ELEMENT slot-values (name, value+)>
<!ELEMENT e           (#PCDATA)>
(All otherwise undefined subelements e = name, ... are understood to have e's declaration.)

A modified version of the genealogy sample ontology from the XOL specification might have been marked up as an XOL module in this way:

<module><name>genealogy</name>

<class><name>person</name></class>
<class><name>male</name></class>
<class><name>female</name></class>
<class><name>man</name>
<subclass-of>person</subclass-of>
<subclass-of>male</subclass-of>
</class>
<class><name>woman</name>
<subclass-of>person</subclass-of>
<subclass-of>female</subclass-of>
</class>

<slot><name>year-of-birth</name>
<domain>person</domain>
<slot-value-type>integer</slot-value-type>
</slot>
<slot><name>brothers</name>
<domain>person</domain>
<slot-value-type>man</slot-value-type>
</slot>

<individual><name>Rob</name><instance-of>man</instance-of>
<slot-values><name>year-of-birth</name><value>1958</value></slot-values>
<slot-values><name>brothers</name><value>Carl</value></slot-values>
</individual>
<individual><name>Carl</name><instance-of>man</instance-of>
<slot-values><name>year-of-birth</name><value>1961</value></slot-values>
<slot-values><name>brothers</name><value>Rob</value></slot-values>
</individual>
<individual><name>Amy</name><instance-of>woman</instance-of>
<slot-values><name>year-of-birth</name><value>1963</value></slot-values>
<slot-values><name>brothers</name><value>Carl</value><value>Rob</value></slot-values>
</individual>

</module>

a) Is this markup well-formed XML? If no, indicate the erroneous place(s). Is it valid w.r.t. the above kernel XOL DTD? If no, indicate the erroneous place(s).

b) Draw the markup as a graphic object-oriented model using the conventions of an earlier course's Problem 2.

c) Extend the markup and the graphic model by a second woman individual who is the fourth sibling, putting in all information.

d) Extend both representations by a sisters slot, putting in all information.

e) Extend everything necessary for new ox and cow classes, subsumed by a new beast class and by, respectively, the male and female classes.

f) Now extend the DTD by a documentation subelement optionally following all name subelements except in the slot-values element; use it for a "The class of all people." comment in the appropriate element(s).