<p>This schema defines elements in the
<tt>urn:publicid:-:Norman+Walsh:Schema Example:EN</tt> namespace.</p>
-<p>This schema defines several complex types and several elements that
-are instances of those types.</p>
+<p>This schema defines 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'
</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><a name="types"/>The Complex Types</h1>
<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>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
</src:fragment>
-
-<div>
-<h2>The <tt>role</tt> Attribute</h2>
-
-<p>The role attribute is an optional string.</p>
-
-<src:fragment id="role.attrib">
- <xs:attribute name="role" type="xs:string"/>
-</src:fragment>
-</div>
</div>
<div>
-
<h2>The <tt>para</tt> Type</h2>
<src:fragment id="para.type">
</src:fragment>
</div>
</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>
</html>
\ No newline at end of file
motivation for this document is to demonstrate the use of Literate XML.
</para>
+<section><title>Recursive Definition</title>
+
+<para>The Fibonacci series begins: 1 1 2 3 5 8 13... Each member of
+the series, after the first two, is the sum of the preceding two
+members.</para>
+
+<para>This can be implemented recursively by calculating the preceding
+two members of the series and returning their sum:</para>
+
+<src:fragment id="sub.fib.recursion">
+&fib($n-2) + &fib($n-1);
+</src:fragment>
+</section>
+
<section><title>The <function>fib</function> Function</title>
<para>The heart of this program is the recursive function that
}
}
</src:fragment>
-
-<section><title>Recursive Definition</title>
-
-<para>The Fibonacci series begins: 1 1 2 3 5 8 13... Each member of
-the series, after the first two, is the sum of the preceding two
-members.</para>
-
-<para>This can be implemented recursively by calculating the preceding
-two members of the series and returning their sum:</para>
-
-<src:fragment id="sub.fib.recursion">
-&fib($n-2) + &fib($n-1);
-</src:fragment>
-
-</section>
</section>
-<section><title>Preamble</title>
+<section><title>Code Preamble</title>
<para>The program preamble simply establishes a default location for
the Perl executable and informs the interpreter that we want to use