Written Exam

XML: Foundations, Techniques, Applications; 14-July 2000

Harold Boley; DFKI, Univ. Kaiserslautern

Family Name     First Name      Matriculation Number     Signature

a) Are the following markups well-formed XML elements (write "yes" or "no" behind them)?

<a> x </a>

<a> x y </b>

<name> John Smith </name>

<name> Smith (Jr.), John </name>

<disequation> 3 < 4 </disequation>

<disequation> 3 &lt; 4 </disequation>

<form> <num> 3 </num> <comp> = </comp> <num> 4 </num> </form>

<form> <num> 3 </num> <num> 4 </num> </form>

b) This is a highly simplified DTD for a 'formula':

<!ELEMENT form      (arg, comp, arg)>
<!ELEMENT arg       (num | var | form)>
<!ELEMENT comp      (#PCDATA)>
<!ELEMENT num       (#PCDATA)>
<!ELEMENT var       (#PCDATA)>
Are the following XML elements valid with respect to this DTD (write "yes" or "no" behind them)?
<form> <num> 3 </num> <comp> = </comp> <num> 3 </num> </form>

<form> <arg> </arg> <comp> = </comp> <arg> </arg> </form>

  <arg> <var> x </var> </arg>
    <comp> = </comp>
  <arg> <num> 3 </num> </arg>

  <arg> <form> <var> x </var> </form> </arg>
    <comp> = </comp>
  <arg> <num> 3 </num> </arg>

c) Consider the following set of MathML (sub)elements along with a one-line DTD:

{<minus/>, <minus></minus>}
Which of these XML elements are valid with respect to this DTD (write "yes" or "no" above them)? If any element is invalid, adapt the one-line DTD (write the corrected line behind it).

Write a one-line DTD for which the following MathML (sub)elements are valid (write it in below them):

{<ci> x </ci>,  <ci> y </ci>}

Write the remaining line of the DTD for which, for instance, the following MathML element is valid (write it in below the element):

<apply> <minus/> <ci> x </ci> <ci> y </ci> </apply>

d) This is simplified RDF metadata about the Mathematics International homepage:

  <rdf:Description about="http://www.mathematik.uni-kl.de/mathint">
    <name>Mathematics International</name>
    <field>Industrial Mathematics</field>
    <field>Management Mathematics</field>
    <partof rdf:resource="http://www.mathematik.uni-kl.de"/>
  <rdf:Description about="http://www.mathematik.uni-kl.de">
    <name>Department of Mathematics</name>
    <organizes rdf:resource="http://www.mathematik.uni-kl.de/mathint"/>
    <partof rdf:resource="http://www.math-net.de"/>
Draw the directed labeled graph (DLG) that is the RDF diagram of this XML element (use space below). Hint: URLs, going into ovals, and texts, going into boxes, may be arbitrarily shortened, as long as they remain unique.