<head>
<title>Document Schema</title>
</head>
+<body>
<div>
<h1>A Simple Document W3C XML Schema</h1>
-<p>This schema defines elements in the
-<tt>urn:publicid:-:Norman+Walsh:Schema Example:EN</tt> namespace.</p>
-
-<p>This schema defines several elements and their complex types.
+<p>This schema defines the
+<tt>urn:publicid:-:Norman+Walsh:Schema Example:EN</tt> namespace
+by defining several elements and their complex types.
</p>
-<src:fragment id="top" mundane-result-prefixes="ex xs">
-<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
- xmlns:ex='urn:publicid:-:Norman+Walsh:Schema Example:EN'
- targetNamespace='urn:publicid:-:Norman+Walsh:Schema Example:EN'
- elementFormDefault='qualified'>
- <src:fragref linkend="types"/>
- <src:fragref linkend="elements"/>
-</xs:schema>
-</src:fragment>
-</div>
-
-<div>
-<h1>The Elements</h1>
-
-<p>This schema defines one element of each <a href="#types">complex
-type</a>.</p>
+<p>Documents that conform to this schema have the general form:</p>
-<src:fragment id="elements">
- <xs:element name="doc" type="ex:doc"/>
- <xs:element name="para" type="ex:para"/>
- <xs:element name="title" type="ex:title"/>
-</src:fragment>
+<pre><doc xmlns="urn:publicid:-:Norman+Walsh:Schema Example:EN">
+ <title>Sample Document</title>
+ <para>Some paragraphs.</para>
+</doc></pre>
</div>
<div>
-<h1><a name="types"/>The Complex Types</h1>
+<h1><a name="types"/>The Types</h1>
-<p>There are three complex types in this schema: <tt>doc</tt>,
+<p>This schema only defines three element types: <tt>doc</tt>,
<tt>title</tt>, and <tt>para</tt>.</p>
-<src:fragment id="types">
- <src:fragref linkend="doc.type"/>
- <src:fragref linkend="title.type"/>
- <src:fragref linkend="para.type"/>
-</src:fragment>
-
-<div>
-<h2>The <tt>role</tt> Attribute</h2>
-
-<p>Each of the complex types in this schema allows an optional role attribute.
-The role attribute is simply a string.</p>
-
-<src:fragment id="role.attrib">
- <xs:attribute name="role" type="xs:string"/>
-</src:fragment>
-</div>
-
<div>
<h2>The <tt>doc</tt> Type</h2>
+<p>This is a document.</p>
+
<src:fragment id="doc.type">
<xs:complexType name='doc'>
<xs:sequence>
<div>
<h2>The <tt>title</tt> Type</h2>
+<p>This is a title.</p>
+
<src:fragment id="title.type">
<xs:complexType name='title' mixed="true">
<src:fragref linkend="role.attrib"/>
<div>
<h2>The <tt>para</tt> Type</h2>
+<p>This is a paragraph.</p>
+
<src:fragment id="para.type">
<xs:complexType name='para' mixed="true">
<src:fragref linkend="role.attrib"/>
</src:fragment>
</div>
</div>
-</html>
\ No newline at end of file
+
+<div>
+<h1>The <tt>role</tt> Attribute</h1>
+
+<p>Each of the complex types in this schema allows an optional role attribute.
+The role attribute is simply a string.</p>
+
+<src:fragment id="role.attrib">
+ <xs:attribute name="role" type="xs:string"/>
+</src:fragment>
+</div>
+
+<div>
+<h1>The Elements</h1>
+
+<p>This schema defines one element of each <a href="#types">complex
+type</a>.</p>
+
+<src:fragment id="elements">
+ <xs:element name="doc" type="ex:doc"/>
+ <xs:element name="para" type="ex:para"/>
+ <xs:element name="title" type="ex:title"/>
+</src:fragment>
+</div>
+
+<div>
+<h1>The Schema</h1>
+
+<p>The schema wrapper surrounds all these definitions.</p>
+
+<src:fragment id="top" mundane-result-prefixes="ex xs">
+<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ xmlns:ex='urn:publicid:-:Norman+Walsh:Schema Example:EN'
+ targetNamespace='urn:publicid:-:Norman+Walsh:Schema Example:EN'
+ elementFormDefault='qualified'>
+ <src:fragref linkend="doc.type"/>
+ <src:fragref linkend="title.type"/>
+ <src:fragref linkend="para.type"/>
+ <src:fragref linkend="elements"/>
+</xs:schema>
+</src:fragment>
+</div>
+
+</body>
+</html>
+