XML Schemas: DTD Example
Example of DTD syntax
<!ELEMENT book (title, chapter+)>
<!ELEMENT chapter (heading, paragraph*)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT paragraph (#PCDATA)>
<!ATTLIST book
language CDATA #REQUIRED
author CDATA #REQUIRED
>
Corresponds to the following XML document:
<book language="en" author="Ernest Hemingway">
<title>A Farewell to Arms</title>
<chapter>
<heading>Chapter One</heading>
<paragraph> ... <paragraph>
<paragraph> ... <paragraph>
</chapter>
<chapter>
<heading>Chapter Two</heading>
<paragraph> ... <paragraph>
<paragraph> ... <paragraph>
</chapter>
</book>
Read More
This page was last edited by KKahl on Friday, August 20, 2010 16:55
Text is available under the terms of the DAISY Consortium Intellectual Property Policy, Licensing, and Working Group Process.
Text is available under the terms of the DAISY Consortium Intellectual Property Policy, Licensing, and Working Group Process.
- © 2012 DAISY Consortium. All Rights Reserved.