-- 作者:huyanlin
-- 发布时间:6/7/2004 10:04:00 AM
-- 关于表格的填充问题,请指教
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" > <xsl:output method="xml" encoding="UTF-8" /> <xsl:template match="FRAMES"> <fo:block-container border-width="0.01mm" height="10.6cm" width="185.01mm" left="0mm" top="117.97mm" position="absolute"> <fo:table> <fo:table-column column-width="7.84mm"/> <fo:table-column column-width="14.79mm"/> <fo:table-column column-width="10.88mm"/> <fo:table-column column-width="12.99mm"/> <fo:table-column column-width="33.9mm"/> <fo:table-column column-width="12.05mm"/> <fo:table-column column-width="7.84mm"/> <fo:table-column column-width="14.79mm"/> <fo:table-column column-width="10.88mm"/> <fo:table-column column-width="12.99mm"/> <fo:table-column column-width="33.9mm"/> <fo:table-column column-width="12.05mm"/> <fo:table-body> <fo:table-row> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="8pt" font-weight="bold"> 画像番号 </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="11pt" font-weight="bold"> サイズ </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="8pt" font-weight="bold"> 枚数 </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="9pt" font-weight="bold"> フチ </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="11pt" font-weight="bold"> ファイル名 </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="8pt" font-weight="bold"> チェック </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="8pt" font-weight="bold"> 画像番号 </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="11pt" font-weight="bold"> サイズ </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="8pt" font-weight="bold"> 枚数 </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="9pt" font-weight="bold"> フチ </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="11pt" font-weight="bold"> ファイル名 </fo:block> </fo:table-cell> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="8pt" font-weight="bold"> チェック </fo:block> </fo:table-cell> </fo:table-row> <xsl:apply-templates select="FRAME" /> </fo:table-body> </fo:table> </fo:block-container> </xsl:template> <xsl:template match="FRAME"> <fo:table-row> <fo:table-cell background-color="GAINSBORO" border-width="0.01mm" border-style="solid"> <fo:block font-size="9pt"> <xsl:number/> </fo:block> </fo:table-cell> <xsl:apply-templates select="SIZE" /> <xsl:apply-templates select="ORDER-ALL" /> <xsl:apply-templates select="BORDER" /> <xsl:apply-templates select="UP-USER-FILE-NAME" /> <xsl:apply-templates select="CANCEL" /> <xsl:apply-templates select="KAKUSYUKU"/> </fo:table-row> </xsl:template> <xsl:template match="SIZE"> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="10pt"> <xsl:if test="../SERVICE = 3"> <xsl:if test="../PRODUCT-ID = 202"> FCD </xsl:if> <xsl:value-of select='.'/> </xsl:if> <xsl:if test="../SERVICE=8"> FCD </xsl:if> <xsl:if test="../SERVICE !=3"> <xsl:if test="../SERVICE !=8"> <xsl:value-of select='.'/> </xsl:if> </xsl:if> </fo:block> </fo:table-cell> </xsl:template> <xsl:template match="ORDER-ALL"> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="10pt"> <xsl:value-of select='.'/> </fo:block> </fo:table-cell> </xsl:template> <xsl:template match="BORDER"> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="10pt"> <xsl:if test="../BORDER != 0"> 有り </xsl:if> <xsl:if test="../BORDER = 0"> 無し </xsl:if> </fo:block> </fo:table-cell> </xsl:template> <xsl:template match="UP-USER-FILE-NAME"> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="10pt"> <xsl:value-of select='.'/> </fo:block> </fo:table-cell> </xsl:template> <xsl:template match="CANCEL"> <fo:table-cell border-width="0.01mm" border-style="solid"> <fo:block font-size="10pt"> <xsl:if test="../CANCEL = '1' " xml:space="preserve"> ▲ </xsl:if> </fo:block> </fo:table-cell> </xsl:template> </xsl:stylesheet> 此代码只实现表格显示 存在的数据,但是要显示20条,分左右两部分,当然内容都一样,其余数据用空白表格表示,如何实现,请指教
|