changeset 13:f78e8c55c06b

three steps now
author Henry S. Thompson <ht@markup.co.uk>
date Mon, 03 Apr 2017 14:46:01 +0100
parents 01e125d722be
children 261e439a19fb
files rect.xsl visualise.xpl
diffstat 2 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rect.xsl	Mon Apr 03 13:46:54 2017 +0100
+++ b/rect.xsl	Mon Apr 03 14:46:01 2017 +0100
@@ -1,6 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE doc SYSTEM "../../../lib/xml/xsl.dtd" >
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:s="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:e="http://markup.co.uk/excel" exclude-result-prefixes="xs s xpf" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xpf="http://www.w3.org/2005/xpath-functions">
+ <xsl:strip-space elements="s:sheetData"/>
  
  <xsl:function name="e:a2n" as="xs:integer">
   <!-- Convert an alphabetic excel column 'index' into a number,
--- a/visualise.xpl	Mon Apr 03 13:46:54 2017 +0100
+++ b/visualise.xpl	Mon Apr 03 14:46:01 2017 +0100
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <!DOCTYPE p:pipeline SYSTEM "../../../WWW/XML/XProc/docs/schemas/xproc.dtd" >
-<p:pipeline xmlns:p="http://www.w3.org/ns/xproc" xmlns:x="http://www.w3.org/1999/xhtml" version="1.0" name="ascii">
+<p:pipeline xmlns:p="http://www.w3.org/ns/xproc" xmlns:x="http://www.w3.org/1999/xhtml" version="1.0" name="vis">
+ <p:serialization method="text" port="result"/>
  
  <p:documentation xmlns="http://www.w3.org/1999/xhtml">
   <div>Run this e.g. as follows:
-       xproc --input source=sample2/xl/worksheets/sheet1.xml ascii.xpl elabDir=file:/d/MT/sonra/OOXML</div>
+       xproc --input source=sample2/xl/worksheets/sheet1.xml visualise.xpl elabDir=file:/d/MT/sonra/OOXML</div>
  </p:documentation>
  
  <p:option name="elabDir" required="true">
@@ -19,7 +20,7 @@
 
  <p:xslt name="format">
    <p:input port="source">
-    <p:pipe step="ascii" port="source"/>
+    <p:pipe step="vis" port="source"/>
    </p:input>
   <p:input port="stylesheet">
    <p:pipe step="ss1" port="result"/>
@@ -31,17 +32,25 @@
   <p:with-option name="href" select="concat($elabDir,'/rect.xsl')"/>
  </p:load>
  
- <p:xslt name="asc">
+ <p:xslt name="rect">
    <p:input port="source">
     <p:pipe step="format" port="result"/>
    </p:input>
   <p:input port="stylesheet">
    <p:pipe step="ss2" port="result"/>
   </p:input>
-  <p:with-param name="elabDir" select="$elabDir"/>
  </p:xslt>
  
  <p:load name="ss3">
   <p:with-option name="href" select="concat($elabDir,'/ascii.xsl')"/>
  </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:pipeline>