-- 作者:huyanlin
-- 发布时间:6/4/2004 3:57:00 PM
-- 很急很急很急的一个问题,分贴提问
my.xsl <?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="/"> <!-- FOベース部--> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="ja" font-family="Mincho"> <fo:layout-master-set> <fo:simple-page-master master-name="page"> <fo:region-body margin-top="17.01mm" margin-left="11.01mm"/> <fo:region-before extent="0cm"/> <fo:region-after extent="0cm"/> <fo:region-start extent="0cm"/> <fo:region-end extent="0cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="page"> <fo:flow flow-name="xsl-region-body"> <!--上側枠--> <fo:block-container border-style="solid" border-width="0.01mm" height="250mm" width="185.01mm" top="0cm" position="absolute"> <xsl:apply-templates select="CENTER-ORDER" /> <xsl:apply-templates select="CENTER-ORDER/FRAMES" /> <!--表--> </fo:block-container> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="CENTER-ORDER"> <fo:block-container left="10.2mm" top="1.06mm" width="73.12mm" height="7mm" position="absolute"> <fo:block text-align="left" font-size="12pt" font-weight="bold"> HELLO1 </fo:block> </fo:block-container> </xsl:template> <xsl:template match="CENTER-ORDER/FRAMES"> <fo:block-container left="10.2mm" top="1.06mm" width="73.12mm" height="7mm" position="absolute"> <fo:block text-align="left" font-size="12pt" font-weight="bold"> HELLO1 </fo:block> </fo:block-container> </xsl:template> <xsl:include href="table01.xsl" /> </xsl:stylesheet> table01.xsl: <?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" /> </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"> ▲ </xsl:if> </fo:block> </fo:table-cell> </xsl:template> </xsl:stylesheet>
|