dleslie 01/01/17 13:37:06
Modified: java/xdocs/style/stylesheets xml2fo.xsl
Log:
Turned resourceFile into stylesheet parameter.
Revision Changes Path
1.3 +25 -1 xml-xalan/java/xdocs/style/stylesheets/xml2fo.xsl
Index: xml2fo.xsl
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/style/stylesheets/xml2fo.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xml2fo.xsl 2001/01/11 19:22:42 1.2
+++ xml2fo.xsl 2001/01/17 21:37:04 1.3
@@ -18,7 +18,7 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- to use document func to get resources.xml -->
- <xsl:variable name="resourceFile"
select="'../../sources/xalan/resources.xml'"/>
+ <xsl:param name="resourceFile"
select="'../../sources/xalan/resources.xml'"/>
<xsl:template match ="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
@@ -189,7 +189,31 @@
<xsl:value-of select="concat(ancestor::chapter/@id,'_',./@name)"/>
</xsl:attribute>
</fo:block>
+</xsl:template>
+
+<xsl:template match="table">
+ <xsl:variable name="colwidth" select="14.5 div count(tr[1]/td)"/>
+ <fo:table>
+ <xsl:for-each select="tr[1]/td">
+ <fo:table-column column-width="{$colwidth}cm"/>
+ </xsl:for-each>
+ <fo:table-body font-size="10pt" font-family="sans-serif">
+ <xsl:apply-templates/>
+ </fo:table-body>
+ </fo:table>
</xsl:template>
+<xsl:template match="tr">
+ <fo:table-row>
+ <xsl:apply-templates/>
+ </fo:table-row>
+</xsl:template>
+<xsl:template match="td">
+ <fo:table-cell>
+ <fo:block>
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:table-cell>
+</xsl:template>
<!-- p + code
<xsl:template match ="p[code]">