Updated naming conventions to clarify distinction between PROV elements, attributes, and types and XML elements, attributes, and types.
authorStephan Zednik <zednis@rpi.edu>
Wed, 17 Apr 2013 21:31:42 -0600
changeset 6212 bf218fcb4f7d
parent 6211 f6c3e596c592
child 6213 f99a7ea128c1
Updated naming conventions to clarify distinction between PROV elements, attributes, and types and XML elements, attributes, and types.
xml/prov-xml.html
--- a/xml/prov-xml.html	Thu Apr 18 03:23:06 2013 +0200
+++ b/xml/prov-xml.html	Wed Apr 17 21:31:42 2013 -0600
@@ -67,21 +67,21 @@
         }
 
     $(function() {
-    	$("pre.schema-type").before("<p>Type definition in XML Schema:</p>");
+    	$("pre.schema-type").before("<p>ComplexType definition (denoting a similarly named prov-\"type\") in XML Schema:</p>");
 
 	    	    
 	    $("pre.schema-element").each(function(index) {
 		    $(this)
-		    	.before("<p>The element <code>"+$(this).attr("element")+"</code> is used to reference a "+$(this).attr("schemaType")+" from within a prov:Document or prov:BundleConstructor.</p>")
-		    	.before("<p>Element definition in XML Schema:</p>")
+		    	.before("<p>The xml-element <code>"+$(this).attr("element")+"</code> is used to denote a "+$(this).attr("schemaType")+" prov-\"type\" from within a prov:Document or prov:BundleConstructor.</p>")
+		    	.before("<p>XML Element definition in XML Schema:</p>")
 		    	.removeAttr("schemaType")
 		    	.removeAttr("element")
 	    });
 	    
 	    $("pre.prov-attribute").each(function(index) {
 		    $(this)
-		    	.before("<p>The element <code>"+$(this).attr("element")+"</code> is used to represent a PROV "+$(this).attr("provType")+" attribute and has type "+$(this).attr("schemaType")+".</p>")
-		    	.before("<p>Element definition in XML Schema:</p>")
+		    	.before("<p>The xml-element <code>"+$(this).attr("element")+"</code> is used to denote a "+$(this).attr("provType")+" prov-\"attribute\" and has prov-\"type\" "+$(this).attr("schemaType")+".</p>")
+		    	.before("<p>XML Element definition in XML Schema:</p>")
 		    	.removeAttr("provType")
 		    	.removeAttr("schemaType")
 		    	.removeAttr("element")
@@ -306,7 +306,7 @@
 
 <section id="schema-modularization">
 <h3>Schema Modularization</h3>
-<p>The PROV-XML schema have been modularized so that extension elements defined in Working Group Notes can be defined in separate schemas.  Elements corresponding to terms defined in the PROV-DM are defined in the <b>prov-core.xsd</b> schema and elements corresponding to terms defined in notes are defined in extension schemas (e.g. <b>prov-dictionary.xsd</b>, <b>prov-links.xsd</b>).  The default schema, <b>prov.xsd</b>, imports <b>prov-core.xsd</b> and all extension schemas developed by the Working Group.  With this modeling all PROV elements, even those defined in Notes, are defined from the default schema.  If the user wishes to leverage a schema that does not include extension elements the user can use schemaLocation to directly reference <b>prov-core.xsd</b>.</p>
+<p>The PROV-XML schema have been modularized so that xml-elements denoting terms defined in Working Group Notes are defined in separate extension schemas.  All xml-elements denoting terms defined in the PROV-DM are defined in the <b>prov-core.xsd</b> schema and xml-elements denoting terms defined in PROV Working Group Notes are defined in extension schemas (e.g. <b>prov-dictionary.xsd</b>, <b>prov-links.xsd</b>).  The default schema, <b>prov.xsd</b>, imports <b>prov-core.xsd</b> and all extension schemas.  With this modeling all PROV xml-elements, even those denoting terms defined in Notes, are declared from the default schema.  If the user wishes to leverage a schema that does not include xml-elements corresponding to terms from the PROV Notes the user can use schemaLocation to directly reference the core schema.</p>
 <p>The default schema - <b>prov.xsd</b></p>
 <pre>
 &lt;?xml version="1.0" encoding="utf-8"?&gt;
@@ -322,9 +322,9 @@
 
 &lt;/xs:schema&gt;
 </pre>
-<p>Extension schemas import the <b>prov-core.xsd</b> schema and make use of a substitution group on the <code>prov:internalElement</code> to add extension-defined elements to the list of valid PROV elements in a bundle or document.</p>
+<p>Extension schemas import the <b>prov-core.xsd</b> schema and make use of a substitution group on the <code>prov:internalElement</code> to add extension-defined xml-elements to the list of valid PROV xml-elements in a bundle or document.</p>
 <div class="note">
-<p>This schema design leveraging substitutionGroups on an abstract element may result in sub-optimal binding classes being generated by Object-to-XML frameworks such as JAXB, JiBX, etc. See the PROV FAQ entry at <a href="http://www.w3.org/2001/sw/wiki/PROV-FAQ#How_should_I_generate_JAXB_classes_from_the_PROV-XML_schemas.3F">How should I generate JAXB classes from the PROV-XML schemas?</a> for a JAXB-specific discussion on using OXM technologies with the PROV schemas.</p>
+<p>This schema design leveraging substitutionGroups on an abstract xml-element may result in sub-optimal binding classes being generated by Object-to-XML frameworks such as JAXB, JiBX, etc. See the PROV FAQ entry at <a href="http://www.w3.org/2001/sw/wiki/PROV-FAQ#How_should_I_generate_JAXB_classes_from_the_PROV-XML_schemas.3F">How should I generate JAXB classes from the PROV-XML schemas?</a> for a JAXB-specific discussion on using OXM technologies with the PROV schemas.</p>
 </div> <!-- end note -->
 <p>The <b>prov-links.xsd</b> extension schema.</p>
 <pre>
@@ -353,8 +353,8 @@
 
 <section id="design-pattern">
 <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>.  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>
-<p>The <code>prov:document</code> element has been defined to act as a convenient root element for a PROV-XML document, but it's use as the root element is not required.  The schema follows the Salami Slice pattern to ensure PROV XML elements can be integrated with mixed-schema XML documents which require a different document root.</p>
+<p>The general design pattern for the XML schema has been called <i>Salami Slice Design</i>.  With this design, the individual components are each defined at the top level as separate xml-elements with distinct xml-types.  This allows the xml-types to be easily reusable for domain specific extensions.</p>
+<p>The <code>prov:document</code> xml-element has been defined to act as a convenient root xml-element for a PROV-XML document, but it's use as the root xml-element is not required.  The schema follows the Salami Slice pattern to ensure PROV XML xml-elements can be integrated with mixed-schema XML documents which require a different document root.</p>
 </section> <!-- end design-pattern -->
 
 <section id="elements-vs-attributes">
@@ -371,7 +371,7 @@
 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 (<code>prov:id</code>), 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, but unlike PROV-N the attributes have a fixed (alphabetical) order.  The PROV-N "attribute" elements are always defined at the end of the encompassing sequence after all PROV-N "elements".  Elements defined in namespaces other than the PROV namespace may be included in a element after all PROV elements.</p>
+<p>In PROV-XML the PROV identifier is treated as an xml-attribute (<code>prov:id</code>), the prov-"elements" are treated as xml-elements, always with the same required order (position) as the PROV-DM/PROV-N description followed by optional prov-"attributes" which are also represented by xml-elements.  As in PROV-N, the prov-"attributes" can be specified multiple times, but unlike PROV-N the prov-"attributes" have a fixed (alphabetical) order.  The prov-"attribute" xml-elements are always defined at the end of the encompassing sequence after all prov-"element" xml-elements.  XML Elements defined in namespaces other than the PROV namespace may be included after the prov-"attribute" xml-elements.</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.
@@ -397,8 +397,8 @@
 <h3>Type Conventions</h3>
 <section id="type-conventions-attributes">
 <h4>PROV Type Attribute</h4>
-<p>The PROV-DM states type information is described using the prov:type PROV attribute and may occur multiple times for a given entity, activity, agent, or relation.</p>
-<p>PROV-XML uses the element <code>prov:type</code> to represent the prov:type PROV attribute.  This element can be use to represent both PROV and non-PROV type information.  The following examples shows type information encoded using the <code>prov:type</code> element.</p>
+<p>The PROV-DM states type information is described using the prov:type prov-"attribute" and may occur multiple times for a given entity, activity, agent, or relation.</p>
+<p>PROV-XML uses the xml-element <code>prov:type</code> to represent the prov:type prov-"attribute".  This xml-element can be use to represent both PROV and non-PROV type information.  The following examples shows type information encoded using the <code>prov:type</code> xml-element.</p>
 <pre class="example" title="type information using prov:type PROV attribute" ignore>
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -414,11 +414,11 @@
 
 &lt;/prov:document&gt;
 </pre>
-<p>The <code>prov:type</code> element can be used in conjunction with schema-defined PROV types (see examples 2-5).</p>
+<p>The <code>prov:type</code> xml-element can be used in conjunction with schema-defined PROV types (see examples 2-5).</p>
 </section> <!-- end type-conventions-attributes -->
 <section id="type-conventions-extension-types">
 <h4>Extension Types</h4>
-<p>PROV-XML defines complexTypes to match the PROV defined type values.  These types provide a more native XML representation of PROV types.  The following example is considered equivalent to the previous example because the element <code>prov:plan</code> has type <code>prov:Plan</code>.  All complexTypes representing a PROV type which is defined as a subclass of another PROV type are defined in PROV-XML as extensions of their parent PROV type's complexType.  For example, <code>prov:Plan</code> is defined as an extension of the complexType <code>prov:Entity</code> and may be referenced by either <code>prov:plan</code> or <code>prov:entity</code>.</p>
+<p>PROV-XML defines complexTypes to match the PROV defined type values (prov-type).  These xml-types provide a more native XML representation of prov-"types".  The following example is considered equivalent to the previous example because the xml-element <code>prov:plan</code> has <code>xs:type=prov:Plan</code>.  All complexTypes representing a prov-"type" which is defined as a subclass of another prov-"type" are defined in PROV-XML as extensions of their parent prov-"type's" complexType.  For example, <code>prov:Plan</code> is defined as an extension of the complexType <code>prov:Entity</code> and may be referenced by either <code>prov:plan</code> or <code>prov:entity</code> xml-elements.</p>
 <pre class="example" title="type information using schema defined types" ignore>
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -433,8 +433,8 @@
 
 &lt;/prov:document&gt;
 </pre>
-<p>When an extended type is used a PROV type attribute relation may be inferred for the current and any parent type of the declared type.</p>
-<p>Stating all type information using the PROV type attribute assists in interoperability with non-PROV-XML encoding of PROV.</p>
+<p>When an extension xml-type is used a prov-"type" may be inferred.</p>
+<p>Use of the <code>prov:type</code> xml-element to state prov-"type" information, even for cases where type information is determinable from xml-types, is highly encouraged.</p> 
 <pre class="example" title="type information using schema defined types - type inferences" ignore>
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -454,7 +454,7 @@
 </section><!-- end-type-conventions-extension-types -->
 <section id="type-conventions-xsi-type">
 <h4>XSI Type</h4>
-<p>Because the <code>prov:Plan</code> complexType is defined as an extension of the complexType <code>prov:Entity</code>, the following example using <code>xsi:type</code> is valid and considered equivalent to the two previous examples. The attribute <code>xsi:type</code> tells an XML parser the complexType of the element.  The value of <code>xsi:type</code> must be a complexType derived from the default element type in a schema with known location (referenced through <code>xsi:schemaLocation</code>).</p>
+<p>Because the <code>prov:Plan</code> complexType is defined as an extension of the complexType <code>prov:Entity</code>, the following example using <code>xsi:type</code> is valid and considered equivalent to the two previous examples. The xml-attribute <code>xsi:type</code> tells an XML parser the complexType of the xml-element.  The value of <code>xsi:type</code> must be a complexType derived from the default xml-element xml-type in a schema with known location (referenced through <code>xsi:schemaLocation</code>).</p>
 <pre class="example" title="type information using xsi:type" ignore>
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -469,7 +469,7 @@
 
 &lt;/prov:document&gt;
 </pre>
-<p>A PROV type attribute relation may be inferred by the use of the <code>xsi:type</code> XML attribute.</p>
+<p>A prov-"type" xml-element may be inferred by the use of the <code>xsi:type</code> xml-attribute.</p>
 <pre class="example" title="type information using xsi:type - type inferences" ignore>
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -492,8 +492,8 @@
 
 <section id="naming-conventions">
 <h3>Naming Conventions</h3>
-<p>Element names are aligned with [[PROV-N]] record names (e.g. <code>prov:wasGeneratedBy</code>, <code>prov:actedOnBehalfOf</code>) and record parameter roles (e.g. <code>prov:delegate</code>, <code>prov:responsible</code> on a Delegation).  Elements are named in camelCase which also conforms with [[PROV-N]] naming conventions.</p>
-<p>ComplexType names are aligned with [[PROV-DM]] type names (e.g. <code>prov:Generation</code>, <code>prov:Delegation</code>).  ComplexTypes are named in PascalCase which conforms to [[PROV-DM]] naming conventions and differentiates complexTypes from elements in the schema.</p>
+<p>XML element names are aligned with [[PROV-N]] record names (e.g. <code>prov:wasGeneratedBy</code>, <code>prov:actedOnBehalfOf</code>) and record parameter roles (e.g. <code>prov:delegate</code>, <code>prov:responsible</code> on a Delegation).  XML Elements are named in camelCase which also conforms with [[PROV-N]] naming conventions.</p>
+<p>ComplexType names are aligned with [[PROV-DM]] prov-"type" names (e.g. <code>prov:Generation</code>, <code>prov:Delegation</code>).  ComplexTypes are named in PascalCase which conforms to [[PROV-DM]] naming conventions and differentiates complexTypes from xml-elements in the schema.</p>
 </section> <!-- end naming-conventions -->
 
 </section> <!-- end schema-design -->
@@ -501,7 +501,7 @@
 <section id="schema-components">
 <h2>PROV XML Schema</h2>
 
-<p>Provenance concepts, expressed as PROV-DM types and relations, are organized according to six components that are defined in this section.</p>
+<p>Provenance concepts, expressed as prov-"types" and prov-"relations", are organized according to six components that are defined in this section.</p>
 
 <div id="prov-dm-components-ul">
 <ul>
@@ -533,15 +533,15 @@
 <figure>
 </div>
 
-<p><a href="#prov-schema-mapping">Table 1</a> is a mapping of PROV-DM types and relations in PROV-XML schema XML types and elements.</p>
+<p><a href="#prov-schema-mapping">Table 1</a> is a mapping of PROV-DM prov-"types" and prov-"relations" in PROV-XML schema XML complexTypes and xml-elements.</p>
 
 <div id="prov-schema-mapping-div" style="text-align: center;">
 <table  class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="prov-schema-mapping"><!--<span>Table 1<sup><a class="internalDFN" href="#prov-schema-mapping"><span class="diamond"> ◊:</span></a></sup> </span>-->PROV-DM Types and Relations to XML Schema Mapping</caption> 
+<caption id="prov-schema-mapping">PROV-DM Types and Relations to XML Schema Mapping</caption> 
 <tr>
 <td><a><b>PROV-DM Term / Concept</b></a></td>
 <td><b>XML Schema ComplexType</b></td>
-<td><b>XML Schema Referencing Element</b></td>
+<td><b>XML Schema XML Element</b></td>
 <td><b>Component</b></td></tr>
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td></tr>
 
@@ -1714,7 +1714,7 @@
 <section id="term-Bundle">
 <h4>Bundle</h4>
 <span class="glossary-ref" data-ref="glossary-bundle" data-withspan="true"></span>
-<p>A <code>prov:Bundle</code> identifies a set of provenance descriptions, and is an extension of <code>prov:Entity</code>, so allowing provenance of provenance to be expressed by referencing the associated entity. The content of a bundle, i.e. its provenance records, can be represented by the <code>prov:BundleConstructor</code> complexType and can be specified with the <code>prov:bundleContent</code> element, its <code>prov:id</code> corresponds to the bundle entity.</p>
+<p>A <code>prov:Bundle</code> identifies a set of provenance descriptions, and is an extension of <code>prov:Entity</code>, so allowing provenance of provenance to be expressed by referencing the associated entity. The content of a bundle, i.e. its provenance records, can be represented by the <code>prov:BundleConstructor</code> ComplexType and is denoted with the <code>prov:bundleContent</code> xml-element, its <code>prov:id</code> corresponds to the bundle entity.</p>
 <pre class="schema-type">
 &lt;xs:complexType name="Bundle"&gt;
   &lt;xs:complexContent&gt;
@@ -1765,7 +1765,7 @@
 
 <section id="term-BundleConstructor">
 <h4>Bundle Constructor</h4>
-<p>The <code>prov:BundleConstructor</code> complexType is used to define a named set of provenance statements.  The Bundle Constructor type supports the <code>prov:id</code> attribute.</p>
+<p>The <code>prov:BundleConstructor</code> ComplexType is used to define a named set of provenance statements.  The Bundle Constructor supports the <code>prov:id</code> xml-attribute.</p>
 <p>The bundle entity associated with a bundle constructor set must have the same <code>prov:id</code> as the bundle constructor set.</p>
 <pre class="schema-type">
 &lt;xs:complexType name="BundleConstructor"&gt;
@@ -1775,8 +1775,8 @@
   &lt;xs:attribute ref="prov:id"/&gt;
 &lt;/xs:complexType&gt;
 </pre>
-<p>The element <code>prov:bundleContent</code> is used to reference a set of nested provenance statements from within a prov:Document.</p>
-<p>Although <code>prov:bundleContent</code> can only be expressed at the <code>prov:document</code> level, the corresponding bundle entities may be specified at from either the <code>prov:document</code> or any <code>prov:bundleContent</code>, if at all.</p>
+<p>The xml-element <code>prov:bundleContent</code> is used to denote a set of nested provenance statements from within a prov:Document.</p>
+<p>Although <code>prov:bundleContent</code> can only be expressed at the <code>prov:document</code> level, the corresponding bundle entities may be specified from either the <code>prov:document</code> or any <code>prov:bundleContent</code>.</p>
 <pre>
 &lt;xs:complexType name="Document"&gt;
   &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
@@ -2011,7 +2011,7 @@
 <section id="attribute-Identifier">
 <h4>Identifier</h4>
 <span class="glossary-ref" data-ref="glossary-identifier" data-withspan="true"></span>
-<p>The identifier attribute is used to identify instances of PROV types or relations.</p>
+<p>The identifier attribute is used to identify instances of prov-"types" or prov-"relations".</p>
 <pre class="schema-attribute" attribute="prov:id" schemaType="xs:QName">
 &lt;xs:attribute xmlns:xs="http://www.w3.org/2001/XMLSchema" name="id" type="xs:QName"/&gt;
 </pre>
@@ -2061,7 +2061,7 @@
 
 <section id="attributes">
 <h4>Attributes</h4>
-<p>The PROV-DM defined PROV attributes are represented in XML as elements.</p>
+<p>The PROV-DM defined prov-"attributes" are represented in XML as xml-elements.</p>
 
 <section id="element-Label">
 <h5>Label</h5>
@@ -2212,7 +2212,7 @@
 <section id="type-value">
 <h4>Value</h4>
 <span class="glossary-ref" data-ref="glossary-value" data-withspan="true"></span>
-<p>Relations defined by the PROV-DM to have type Value have type <code>xs:anySimpleType</code> in PROV-XML unless otherwise specified.</p>
+<p>Relations defined by the PROV-DM to have prov-"type" Value have type <code>xs:anySimpleType</code> in PROV-XML unless otherwise specified.</p>
 </section> <!-- end type-Value -->
 
 </section> <!-- end further-elements -->
@@ -2222,12 +2222,12 @@
 
 <section id="term-Document">
 <h4>Document</h4>
-<p>The root element of all PROV-XML documents is <code>prov:document</code> which has type <code>prov:Document</code>.</p>
+<p>The root xml-element of all PROV-XML documents is <code>prov:document</code> which has xml-type <code>prov:Document</code>.</p>
 <p>Similar to a <code>prov:BundleConstructor</code>, the <code>prov:Document</code> complexType is used to define a set of provenance statements.</p> 
 <p>Unlike the <code>prov:BundleConstructor</code>, a <code>prov:Document</code>
 <ul>
-<li>may contain <code>prov:bundle</code> elements (but not other <code>prov:document</code> elements)</li>
-<li>does not support the prov:id attribute.</li>
+<li>may contain <code>prov:bundle</code> xml-elements (but not other <code>prov:document</code> xml-elements)</li>
+<li>does not support the prov:id xml-attribute.</li>
 </ul>
 </p>
 <pre class="schema-type">
@@ -2239,7 +2239,7 @@
 &lt;/xs:complexType&gt;
 </pre>
 
-<p>The element <code>prov:document</code> may only be used as the root element of a a PROV-XML document.</p>
+<p>The xml-element <code>prov:document</code> may only be used as the root xml-element of a a PROV-XML document.</p>
 <pre>
 &lt;xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="document" type="prov:Document"/&gt;
 </pre>
@@ -2258,7 +2258,7 @@
 
 <section id="term-Other">
 <h4>Other</h4>
-<p>The <code>prov:other</code> element provides a place to include non-PROV XML elements inside a <code>prov:document</code> or <code>prov:bundleContent</code>.</p>
+<p>The <code>prov:other</code> xml-element provides a place to include non-PROV xml-elements inside a <code>prov:document</code> or <code>prov:bundleContent</code>.</p>
 <pre class="schema-type">
 &lt;xs:complexType name="Other"&gt;
   &lt;xs:sequence&gt;
@@ -2266,7 +2266,7 @@
   &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
 </pre>
-<p>The element <code>prov:other</code> may be used in a <code>prov:document</code> or a <code>prov:bundleContent</code> but may not be used inside a relation, entity, or activity element.</p>
+<p>The xml-element <code>prov:other</code> may be used in a <code>prov:document</code> or a <code>prov:bundleContent</code> but may not be used inside a prov-"relation", entity, or activity xml-element.</p>
 <pre>
 &lt;xs:element name="other" type="prov:Other"/&gt;
 </pre>
@@ -2406,6 +2406,7 @@
 <section>
 <h3>Change Log Since WD Working Draft 12 March 2013</h3>
 <ul>
+<li>Updated naming conventions to clarify distinction between PROV elements, attributes, and types and XML elements, attributes, and types.</li>
 <li>Added links to PROV-DM term/concepts in Table 1.</li>
 <li>Removed inline schema, added links to published schemas.</li>
 <li>Updated BundleConstructor and Document sections to reflect changes to schema.</li>