Hallo,
ich habe eine DTD und eine beispielhafte XML fuer einen Multiplechoice-Test geschrieben. Ich wuerde gerne definieren, dass jede Frage und jede Antwort optional eine oder mehrere Formeln in MathML enthalten kann. Wie kann ich das in der DTD definieren und wie wuerde die zugehoerige XML aussehen? Vielen Dank im Voraus!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE examination [
<!ELEMENT examination (title, language?, question_answer_set)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT language (#PCDATA)>
<!ELEMENT question_answer_set (question,answer1,answer2,answer3,answer4)+>
<!ELEMENT question (#PCDATA)>
<!ELEMENT answer1 (#PCDATA)>
<!ELEMENT answer2 (#PCDATA)>
<!ELEMENT answer3 (#PCDATA)>
<!ELEMENT answer4 (#PCDATA)>
]>
<?xml-stylesheet type="text/xsl" href="examination-html.xsl.xml" ?>
<!-- <?xml-stylesheet type="text/xsl" href="http://www.w3.org/Math/XSL/mathml.xsl"?> -->
<examination>
<title>Examination in mathematics</title>
<language>Dari</language>
<question_answer_set>
<question>How is the following formula?
<math title="E=mc^2" xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle mathcolor="red" displaystyle="true" fontfamily="serif">
<mi>E</mi>
<mo>=</mo>
<mi>m</mi>
<msup>
<mi>c</mi>
<mn>2</mn>
</msup>
</mstyle>
</math>
</question>
<answer1>Fine</answer1>
<answer2>Good</answer2>
<answer3>Not bad</answer3>
<answer4>better</answer4>
</question_answer_set>
</examination>