--- a/xml/prov-xml.html Mon Nov 19 15:26:28 2012 +0000
+++ b/xml/prov-xml.html Mon Nov 19 10:34:02 2012 -0500
@@ -256,6 +256,76 @@
</section> <!-- end introduction -->
+<section id="schema-design">
+<h2>XML Schema Design</h2>
+
+<p>Several general design principles and patterns were used in the
+construction of the PROV XML Schema.
+</p>
+
+<h3><i>Salami Slice</i> Design Pattern</h3>
+
+<p>The general design pattern for the XML schema has been
+called <i>Salami Slice Design</i> (cite?). With this design, the
+individual components are each defined at the top level as separate
+elements with distinct types. This allows the types to be easily
+reusable for domain specific extensions.
+</p>
+
+<h3>Elements vs. Attributes</h3>
+
+<p>The general PROV-N syntax patterns for expressing provenance
+concepts are:
+</p>
+
+<pre class="codeexample">
+thing(id, elem1, elem2, ..., [attr1=val1, attr2=val2])
+concept(id; elem1, elem2, ... [attr1=val2, attr2=val2])
+</pre>
+
+<p>In both cases (required id or optional id), the PROV-N id is
+treated as an XML attribute, the PROV-N "elements" are treated as XML
+elements, always with the same required order (position) as the
+PROV-DM/PROV-N description, and optional PROV-N "attributes", if
+allowed, always follow and are also represented by XML elements. As
+in PROV-N, the attributes can be specified multiple times, and in any
+order, as long as they are all at the end of the encompassing element.
+</p>
+
+<p>Wherever an "id" is referenced from a later concept, the id is
+referenced as a prov:ref attribute of the element within the concept.
+</p>
+
+<p>This transformation technique yields a general XML pattern:
+</p>
+
+<pre class="codeexample">
+<prov:thing prov:id="id">
+ <prov:elem1 />
+ <prov:elem2 />
+ ...
+ <prov:attr1>val1</prov:attr1>
+ <prov:attr2>val2</prov:attr2>
+ ...
+</prov:thing>
+</pre>
+
+<p>Most of the concepts described below follow this general pattern.
+</p>
+
+<div class="note">
+<p>REVIEW QUESTION:</p>
+<p>Is this ordering of elements/attributes reasonable/satisfactory?</p>
+<p>Would it be better to loosen the ordering requirement allowing any mix
+of elements/attributes, or to tighten the ordering requirement,
+requiring all "prov:" namespace attributes to precede all non-"prov:"
+namespace attributes when expressed as XML elements?
+</p>
+</div>
+
+
+</section>
+
<!-- should we instead break the schema down into complex types and elements? -->
<section id="schema-components">