prov-xml
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Tue, 03 Apr 2012 20:53:39 +0100
changeset 2238 f02d92f4e7c3
parent 2237 8483376b2a73
child 2239 1c9ffa9acf96
prov-xml
xml/prov-xml.html
--- a/xml/prov-xml.html	Tue Apr 03 20:11:15 2012 +0100
+++ b/xml/prov-xml.html	Tue Apr 03 20:53:39 2012 +0100
@@ -26,7 +26,45 @@
   return $('<div/>').text(value).html();
 }
 
-function insertSchemaDefinition(doc, content) {
+function insertSchemaDefinition(doc, content, name) {
+
+	// NB - this is hardcoded to entity at present. The respec js doesn't appear
+	// to pass in the element that it's working with - just the entire doc,
+	// and the respec object.
+
+	var xml=$.parseXML(content);
+	var segment = $(xml).find('complexType[name~="' + name + '"]')[0];
+	return doc._esc((new XMLSerializer()).serializeToString(segment));
+}
+
+function insertSchemaEntity(doc, content) {  return insertSchemaDefinition(doc,content,'Entity'); }
+function insertSchemaActivity(doc, content) {  return insertSchemaDefinition(doc,content,'Activity'); }
+function insertSchemaWasGeneratedBy(doc, content) {  return insertSchemaDefinition(doc,content,'WasGeneratedBy'); }
+function insertSchemaUsed(doc, content) {  return insertSchemaDefinition(doc,content,'Used'); }
+function insertSchemaWasStartedBy(doc, content) {  return insertSchemaDefinition(doc,content,'WasStartedBy'); }
+function insertSchemaWasEndedBy(doc, content) {  return insertSchemaDefinition(doc,content,'WasEndedBy'); }
+function insertSchemaWasInformedBy(doc, content) {  return insertSchemaDefinition(doc,content,'WasInformedBy'); }
+function insertSchemaWasStartedByActivity(doc, content) {  return insertSchemaDefinition(doc,content,'WasStartedByActivity'); }
+
+function insertSchemaAgent(doc, content) {  return insertSchemaDefinition(doc,content,'Agent'); }
+function insertSchemaWasAttributedTo(doc, content) {  return insertSchemaDefinition(doc,content,'WasAttributedTo'); }
+function insertSchemaWasAssociatedWith(doc, content) {  return insertSchemaDefinition(doc,content,'WasAssociatedWith'); }
+function insertSchemaActedOnBehalfOf(doc, content) {  return insertSchemaDefinition(doc,content,'ActedOnBehalfOf'); }
+
+
+function insertSchemaWasDerivedFrom(doc, content) {  return insertSchemaDefinition(doc,content,'WasDerivedFrom'); }
+function insertSchemaWasRevisionOf(doc, content) {  return insertSchemaDefinition(doc,content,'WasRevisionOf'); }
+function insertSchemaWasQuotedFrom(doc, content) {  return insertSchemaDefinition(doc,content,'WasQuotedFrom'); }
+function insertSchemaHadOriginalSource(doc, content) {  return insertSchemaDefinition(doc,content,'HadOriginalSource'); }
+function insertSchemaTracedTo(doc, content) {  return insertSchemaDefinition(doc,content,'TracedTo'); }
+
+function insertSchemaSpecializationOf(doc, content) {  return insertSchemaDefinition(doc,content,'SpecializationOf'); }
+function insertSchemaAlternateOf(doc, content) {  return insertSchemaDefinition(doc,content,'AlternateOf'); }
+
+function insertSchemaNote(doc, content) {  return insertSchemaDefinition(doc,content,'Note'); }
+function insertSchemaHasAnnotation(doc, content) {  return insertSchemaDefinition(doc,content,'HasAnnotation'); }
+
+function insertSchemaDefinitionOriginal(doc, content) {
 	// perform transformations to make it render and prettier
 
 	// NB - this is hardcoded to entity at present. The respec js doesn't appear
@@ -404,7 +442,7 @@
 
 <div class="glossary-ref" data-ref="glossary-entity"></div>
 
-<pre class='schema' data-name='entity' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaDefinition'  ></pre> 
+<pre class='schema' data-name='entity' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaEntity'  ></pre> 
 
 
 </section> 
@@ -416,6 +454,8 @@
 
 <div class="glossary-ref" data-ref="glossary-activity"></div>
 
+<pre class='schema' data-name='entity' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaActivity'  ></pre> 
+
 </section>
 
 
@@ -425,7 +465,7 @@
 
 <div class="glossary-ref" data-ref="glossary-generation"></div>
 
-
+<pre class='schema' data-name='wasGeneratedBy' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasGeneratedBy'  ></pre> 
 
 </section>
 
@@ -435,6 +475,7 @@
 
 <div class="glossary-ref" data-ref="glossary-usage"></div>
 
+<pre class='schema' data-name='used' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaUsed'  ></pre> 
 
 </section>
 
@@ -444,6 +485,7 @@
 
 <div class="glossary-ref" data-ref="glossary-start"></div>
 
+<pre class='schema' data-name='wasStartedBy' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasStartedBy'  ></pre> 
 
 </section>
 
@@ -452,6 +494,7 @@
 
 <div class="glossary-ref" data-ref="glossary-end"></div>
 
+<pre class='schema' data-name='wasEndedBy' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasEndedBy'  ></pre> 
 
 </section>
 
@@ -460,7 +503,7 @@
 
 <div class="glossary-ref" data-ref="glossary-communication"></div>
 
-
+<pre class='schema' data-name='wasInformedBy' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasInformedBy'  ></pre> 
 </section>
 
 <section id="term-wasStartedByActivity">
@@ -468,7 +511,7 @@
 
 <div class="glossary-ref" data-ref="glossary-startByActivity"></div>
 
-
+<pre class='schema' data-name='wasStartedByActivity' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasStartedByActivity'  ></pre> 
 </section>
 
 
@@ -487,7 +530,7 @@
 
 <div class="glossary-ref" data-ref="glossary-agent"></div>
 
-
+<pre class='schema' data-name='agent' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaAgent'  ></pre> 
 
 
 </section>
@@ -497,6 +540,8 @@
 
 <div class="glossary-ref" data-ref="glossary-attribution"></div>
 
+<pre class='schema' data-name='wasAttributedTo' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasAttributedTo'  ></pre> 
+
 
 </section>  <!-- end attribution -->
 
@@ -506,6 +551,7 @@
 
 <div class="glossary-ref" data-ref="glossary-activityAssociation"></div>
 
+<pre class='schema' data-name='wasAssociatedWith' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasAssociatedWith'  ></pre> 
 
 </section>  <!-- end wasAssociatedWith -->
 
@@ -515,6 +561,7 @@
 
 <div class="glossary-ref" data-ref="glossary-responsibility"></div>
 
+<pre class='schema' data-name='actedOnBehalfOf' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaActedOnBehalfOf'  ></pre> 
 
 </section>
 
@@ -541,6 +588,7 @@
 
 <div class="glossary-ref" data-ref="glossary-derivation"></div>
 
+<pre class='schema' data-name='wasDerivedFrom' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasDerivedFrom'  ></pre> 
 
 </section>
 
@@ -549,6 +597,10 @@
 
 <p><span class="glossary-ref" data-ref="glossary-revision"></span></p>
 
+<pre class='schema' data-name='wasRevisionOf' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasRevisionOf'  ></pre> 
+
+
+
 </section>  <!-- end revision -->
 
 <section id="term-quotation">
@@ -558,6 +610,8 @@
 <span class="glossary-ref" data-ref="glossary-quotation"></span>
 </p>
 
+<pre class='schema' data-name='wasQuotedFrom' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaWasQuotedFrom'  ></pre> 
+
 </section>  <!-- end quotation -->
 
 
@@ -568,6 +622,8 @@
 <span class="glossary-ref" data-ref="glossary-original-source"></span>
 </p>
 
+<pre class='schema' data-name='hadOriginalSource' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaHadOriginalSource'  ></pre> 
+
 </section>  <!-- end original source -->
 
 <section id="term-traceability">
@@ -577,6 +633,7 @@
 <span class="glossary-ref" data-ref="glossary-traceability"></span>
 </p>
 
+<pre class='schema' data-name='tracedTo' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaTracedTo'  ></pre> 
 
 </section>
 
@@ -598,6 +655,7 @@
 
 <span class="glossary-ref" data-ref="glossary-specialization"></span> 
 
+<pre class='schema' data-name='specializationOf' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaSpecializationOf'  ></pre> 
 
 </section>
 
@@ -608,7 +666,7 @@
 
 <span class="glossary-ref" data-ref="glossary-alternate"></span>
 
-
+<pre class='schema' data-name='alternateOf' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaAlternateOf'  ></pre> 
   
 </section>
 
@@ -621,6 +679,10 @@
 <p>The fifth component of PROV-DM is concerned with the notion of collections. 
 A collection is an entity that has some members. The members are themselves entities, and therefore their provenance can be expressed. In many applications, it is also of interest to be able to express the provenance of the collection  itself: e.g. who maintains the collection, which member it contains at which point in time, and how it was assembled. The purpose of Component 5 is to define the types and relations that are useful to express the provenance of collections. </p>
 
+<div class="note">
+XML Schema not defined for collections yet.
+</div>
+
 
 <section id="term-collection">
 <h3>Collection</h3>
@@ -672,14 +734,20 @@
       
 <h4>Note</h4>
 
+<span class="glossary-ref" data-ref="glossary-note"></span>
+
+<pre class='schema' data-name='note' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaNote'  ></pre> 
+
    </section> 
 
 <section id="term-annotation">
 <h4>Annotation</h4>
 
+<span class="glossary-ref" data-ref="glossary-annotation"></span>
+
+<pre class='schema' data-name='hasAnnotation' data-include='schema/prov-20120110.xsd' data-oninclude='insertSchemaHasAnnotation'  ></pre> 
 
 
-<span class="glossary-ref" data-ref="glossary-annotation"></span>
 
 
 </section>