test dyn load prov-n
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Fri, 11 May 2012 12:54:15 +0100
changeset 2765 9c6bed5d3fa1
parent 2764 9b7a997712a5
child 2766 b9fc3f22f5d3
test dyn load prov-n
model/grammar/Makefile
model/prov-n.html
xml/prov-xml.html
--- a/model/grammar/Makefile	Fri May 11 11:04:53 2012 +0100
+++ b/model/grammar/Makefile	Fri May 11 12:54:15 2012 +0100
@@ -26,7 +26,7 @@
 	cat yack/prov-n-LL.bnf.html >> ll.html
 	xpath ll.html .//a[@id]/../../..
 	xpath ll.html .//a/@id
-	xpath ll.html .//a[@id \<\> "term-prov_n_LL-PASSED_TOKENS"]/@id
+	xpath ll.html .//a[@id == "term-prov_n_LL-PASSED_TOKENS"]/@id
 
 
 run1:
--- a/model/prov-n.html	Fri May 11 11:04:53 2012 +0100
+++ b/model/prov-n.html	Fri May 11 12:54:15 2012 +0100
@@ -16,6 +16,18 @@
     <script src="http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js" class="remove"></script> 
     <script src="http://www.w3.org/2007/OWL/toggles.js" class="remove"></script> 
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" class="remove"></script>
+    <script class="remove">
+function insertSchemaDefinition(doc, content, name) {
+
+	var xml=$.parseXML(content);
+	var segment = $(xml).find('a[name~="' + name + '"]')[0];
+
+	return doc._esc((new XMLSerializer()).serializeToString(segment));
+}
+
+function insertSchemaGeneration(doc, content) {  return insertSchemaDefinition(doc,content,'prod-prov_n_LL-generationExpression'); }
+
+    </script>
 
     <script class="remove">
       function updateGlossaryRefs() {
@@ -239,6 +251,11 @@
 
 
 
+<section id="test"> 
+<h2>Test</h2>
+<pre class='schema' data-name='entity' data-include='grammar/ll.html' data-oninclude='insertSchemaActivity'  ></pre> 
+</section>
+
 <section id="introduction"> 
 <h2>Introduction</h2>
 
--- a/xml/prov-xml.html	Fri May 11 11:04:53 2012 +0100
+++ b/xml/prov-xml.html	Fri May 11 12:54:15 2012 +0100
@@ -34,10 +34,6 @@
 
 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];