diff visualise.xpl @ 17:a874f2a81ed2

default vis pipeline to raw xml, start extracting refs
author Henry S. Thompson <ht@markup.co.uk>
date Tue, 04 Apr 2017 15:30:04 +0100
parents e767bef35bb9
children 9b1b169dc8db
line wrap: on
line diff
--- a/visualise.xpl	Mon Apr 03 19:22:03 2017 +0100
+++ b/visualise.xpl	Tue Apr 04 15:30:04 2017 +0100
@@ -13,7 +13,7 @@
   </p:documentation>
  </p:option>
  
- <p:option name="format" select="'ascii.xsl'">
+ <p:option name="format">
   <p:documentation xmlns="http://www.w3.org/1999/xhtml">
    <div>If supplied, then use as stylesheet (located relative to elabDir)</div>
   </p:documentation>
@@ -46,16 +46,22 @@
   </p:input>
  </p:xslt>
  
- <p:load name="ss3">
-  <p:with-option name="href" select="concat($elabDir,'/',$format)"/>
- </p:load>
- 
- <p:xslt name="asc">
-   <p:input port="source">
-    <p:pipe step="rect" port="result"/>
-   </p:input>
-  <p:input port="stylesheet">
-   <p:pipe step="ss3" port="result"/>
-  </p:input>
- </p:xslt>
+ <p:choose> 
+  <p:when test="p:value-available('format')">
+   <p:load name="ss3">
+    <p:with-option name="href" select="concat($elabDir,'/',$format)"/>
+   </p:load>
+   <p:xslt name="asc">
+    <p:input port="source">
+     <p:pipe step="rect" port="result"/>
+    </p:input>
+    <p:input port="stylesheet">
+     <p:pipe step="ss3" port="result"/>
+    </p:input>
+   </p:xslt>
+  </p:when>
+  <p:otherwise>
+   <p:identity/>
+  </p:otherwise>
+ </p:choose>
 </p:pipeline>