Down to one 'example1' stylesheet. Hooray\!
authorTony Graham
Sun, 09 Feb 2014 21:29:06 +0000
changeset 29 22ac957faf1a
parent 28 5509d620d54f
child 30 8a3f9f860c2e
Down to one 'example1' stylesheet. Hooray\!
FOPRunXSLTExt/examples/example1.xsl
FOPRunXSLTExt/examples/example1_saxon9_fop10.xsl
FOPRunXSLTExt/examples/example1_xalan.xsl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/examples/example1.xsl	Sun Feb 09 21:29:06 2014 +0000
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ============================================================= -->
+<!-- FOPRunXSLTExt Xalan example 1                                 -->
+<!--                                                               -->
+<!-- See http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt        -->
+<!--                                                               -->
+<!-- Requires Xalan 2.7 or later or Saxon 9.5 or later             -->
+<!-- and FOP 1.0 or later or AHF 6.1 or later                      -->
+<!--                                                               -->
+<!-- Produced by the Print and Page Layout Community Group @ W3C   -->
+<!-- ============================================================= -->
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+    xmlns:ppl="http://www.w3.org/community/ppl/ns/"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format"
+    exclude-result-prefixes="ppl">
+
+<!-- Print and Page Layout Community Group extensions. -->
+<xsl:import href="ppl-extensions.xsl" />
+
+<xsl:template match="/" name="main">
+  <!-- Make FO from source document. -->
+  <xsl:variable name="fo-tree">
+    <fo:root>
+      <fo:layout-master-set>
+	<fo:simple-page-master master-name="test-page">
+	  <fo:region-body margin="1in"/>
+	</fo:simple-page-master>
+      </fo:layout-master-set>
+
+      <fo:page-sequence master-reference="test-page">
+	<fo:flow flow-name="xsl-region-body">
+	  <xsl:apply-templates select="example" />
+	</fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </xsl:variable>
+
+  <!-- Use xsl:call-template since this is a XSLT 1.0 stylesheet for
+       compatibility with Xalan. -->
+  <xsl:call-template name="ppl:area-tree">
+    <xsl:with-param name="fo-tree" select="$fo-tree"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="header">
+  <fo:block font-size="14pt" font-family="verdana" color="red"
+	    space-before="5mm" space-after="5mm">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="paragraph">
+  <fo:block text-indent="5mm" font-family="verdana" font-size="12pt">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
--- a/FOPRunXSLTExt/examples/example1_saxon9_fop10.xsl	Sun Feb 09 19:52:25 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- ============================================================= -->
-<!-- FOPRunXSLTExt Saxon example 1                                 -->
-<!--                                                               -->
-<!-- See http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt        -->
-<!--                                                               -->
-<!-- Requires Saxon 9.4 or later and FOP 1.0                       -->
-<!--                                                               -->
-<!-- Produced by the Print and Page Layout Community Group @ W3C   -->
-<!-- ============================================================= -->
-<xsl:stylesheet
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    version="2.0"
-    xmlns:fo="http://www.w3.org/1999/XSL/Format"
-    xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    xmlns:runfop="http://org.w3c.ppl.xslt/saxon-extension"
-    exclude-result-prefixes="xs runfop">
-
-<!-- Common templates for formatting FOPRunXSLTExt examples -->
-<xsl:import href="formatting.xsl" />
-
-<!-- Where to write the output files. -->
-<xsl:param name="dest_dir" select="out" as="xs:string"/>
-<xsl:param name="area_tree_filename" />
-
-<!-- Initial template -->
-<xsl:template name="main">
-  <!-- Save the FO tree in a variable. -->
-  <xsl:variable name="fo_tree">
-    <xsl:apply-templates select="/" />
-  </xsl:variable>
-
-  <xsl:variable name="area_tree_file"
-		select="concat($dest_dir, '/', $area_tree_filename)" />
-
-  <xsl:message>Area tree filename = <xsl:value-of select="$area_tree_file" /></xsl:message>
-
-  <url>
-    <xsl:value-of select="runfop:area-tree-url($fo_tree, $area_tree_file)"/>
-  </url>
-
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
--- a/FOPRunXSLTExt/examples/example1_xalan.xsl	Sun Feb 09 19:52:25 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- ============================================================= -->
-<!-- FOPRunXSLTExt Xalan example 1                                 -->
-<!--                                                               -->
-<!-- See http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt        -->
-<!--                                                               -->
-<!-- Requires Xalan 2.7 or later and FOP 1.0                       -->
-<!--                                                               -->
-<!-- Produced by the Print and Page Layout Community Group @ W3C   -->
-<!-- ============================================================= -->
-<xsl:stylesheet
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    version="1.0"
-    xmlns:ppl="http://www.w3.org/community/ppl/ns/"
-    xmlns:fo="http://www.w3.org/1999/XSL/Format"
-    exclude-result-prefixes="ppl">
-
-<xsl:import href="ppl-extensions.xsl" />
-
-<xsl:param name="dest_dir" />
-<xsl:param name="area_tree_filename" />
-
-<xsl:variable name="area_tree_file"
-	      select="concat($dest_dir, '/', $area_tree_filename)" />
-
-<xsl:template match="/">
-  <!-- Make FO from source document. -->
-  <xsl:variable name="foTree">
-    <fo:root>
-      <fo:layout-master-set>
-	<fo:simple-page-master master-name="test-page">
-	  <fo:region-body margin="1in"/>
-	</fo:simple-page-master>
-      </fo:layout-master-set>
-
-      <fo:page-sequence master-reference="test-page">
-	<fo:flow flow-name="xsl-region-body">
-	  <xsl:apply-templates select="example" />
-	</fo:flow>
-      </fo:page-sequence>
-    </fo:root>
-  </xsl:variable>
-
-  <xsl:call-template name="ppl:area-tree">
-    <xsl:with-param name="fo-tree" select="$foTree"/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="header">
-  <fo:block font-size="14pt" font-family="verdana" color="red"
-	    space-before="5mm" space-after="5mm">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-<xsl:template match="paragraph">
-  <fo:block text-indent="5mm" font-family="verdana" font-size="12pt">
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file