next up previous
Next: Formmatting with DSSSL Up: passivetex Previous: TeX brings typography to

A small example file

A simple source file

<!DOCTYPE invitation SYSTEM "invitation.dtd">
<invitation>
<front>
<to>Anna, Bernard, Didier, Johanna</to>
<date>Next Friday Evening at 8 pm</date>
<where>The Web Cafe</where>
<why>My first XML baby</why>
</front>
<body>
<par>I would like to invite you all to celebrate
the birth of <emph>Invitation</emph>, my
first XML document child.</par>
<par>Please do your best to come and join me next Friday
evening. And, do not forget to bring your friends.</par>
<par>I <emph>really</emph> look forward to see you soon!</par>
</body>
<back>
<signature>Michel</signature>
</back>
</invitation>
...and its DTD

<!-- invitation DTD   -->
<!ELEMENT invitation (front, body, back) >
<!ELEMENT front      (to, date, where, why?) >
<!ELEMENT date       (#PCDATA) >
<!ELEMENT to         (#PCDATA) >
<!ELEMENT where      (#PCDATA) >
<!ELEMENT why        (#PCDATA) >
<!ELEMENT body       (par+) >
<!ELEMENT par        (#PCDATA|emph)* >
<!ELEMENT emph       (#PCDATA) >
<!ELEMENT back       (signature) >
<!ELEMENT signature  (#PCDATA) >



Michel Goossens
1999-08-13