2014-05-14 2 views
2

일부 프로젝트에서는 XSL-FO를 사용하고 있습니다. 나는 다른 테이블 안에있는 테이블을 가지고 있는데, 정보를 그룹화하는데 도움이된다. (그리고 잘 작동한다.) 이 내부 테이블은 헤더로 국가 이름을가집니다. 이 테이블은 다른 페이지로 나눌 수 있습니다. 다음 페이지 (이미 작동 중)에 (continued) 텍스트로 국가 이름을 다시 인쇄해야합니다.xsl-fo 대체 테이블 헤더

그래서, 3 페이지의 하단에 : 헤더는 다음 페이지에서 반복 될 때

United States of America (continued) 
... ... ... remaining data 

가 어떻게이 (continued)을 삽입 할 수 있습니다 : 4 페이지의

United States of America 
... ... ... data 

시작?

감사합니다.

+1

테이블에 대해 XSL을 게시 할 수 있습니까? – Vinit

+0

사용중인 프로세서 (및 버전)에 따라 fo 마커 또는 fo : 테이블 마커를 사용할 수 있습니다. – PhillyNJ

+0

@Vinit 단지 하나의 셀로 구성된 여러 행을 가진 일반 테이블 일뿐입니다. 각 셀 내부에는 데이터 자체가있는 다른 테이블이 있습니다 (첫 번째 테이블은 레이아웃을 돕기 때문에) – igorjrr

답변

1

다음은 fo-marker를 사용하는 예입니다. FOP trunk에서 테스트했는데 이전 버전에서는 작동하지 않습니다. FOP 팀은 마커에 대해 트렁크를 크게 변경했습니다. 트렁크 버전에서는 사양과 더 잘 어울립니다. 예는 길지 않습니다. 여러 페이지에 걸쳐 계속 마커를 보여주기 위해 내용을 추가해야합니다.

<fo:root xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:fo="http://www.w3.org/1999/XSL/Format"> 
    <fo:layout-master-set> 
     <fo:simple-page-master master-name="alternate-blank" page-height="11in" page-width="8.5in" margin-left="1.0in" margin-right="1.0in"> 
      <fo:region-body/> 
      <fo:region-before region-name="header-blank" extent="11in"/> 
     </fo:simple-page-master> 
     <fo:simple-page-master master-name="page-even" page-height="11in" page-width="8.5in" margin-top="0.5in" margin-left="0.5in" margin-right="1.0in"> 
      <fo:region-body region-name="xsl-region-body" margin-top="0.80in" margin-bottom=".5in" overflow="auto"/> 
      <fo:region-before region-name="xsl-region-before" extent="1in"/> 
      <fo:region-after region-name="xsl-region-after" extent="0.5in"/> 
      <fo:region-start extent="0in"/> 
      <fo:region-end extent="0in"/> 
     </fo:simple-page-master> 
    </fo:layout-master-set> 
    <fo:page-sequence initial-page-number="1" force-page-count="end-on-even" format="1" master-reference="page-even" id="ps-0005"> 
     <fo:static-content flow-name="xsl-region-before"> 
      <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt" font-weight="bold" text-align="center">HEADER</fo:block> 
     </fo:static-content> 
     <fo:static-content flow-name="header-blank"> 
      <fo:block id="last-page-wp-d18e4446"/> 
     </fo:static-content> 
     <fo:static-content flow-name="xsl-region-after"> 
      <fo:block line-height="10pt" font-family="sans-serif" font-size="8pt" font-weight="bold" text-align="center">PAGE FOOTER</fo:block> 
     </fo:static-content> 
     <fo:flow flow-name="xsl-region-body"> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:block>Content</fo:block> 
      <fo:table line-height="12pt" font-family="sans-serif" font-size="10pt" table-layout="fixed" width="100%" space-before="6pt"> 
       <fo:table-column column-width="proportional-column-width(1)"/> 
       <fo:table-header> 
        <fo:table-row> 
         <fo:table-cell> 
          <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt" font-weight="bold" space-before.optimum="12pt" space-after.optimum="6pt" keep-with-next="always">PARA TITLE<fo:retrieve-table-marker retrieve-class-name="primary-para-continuation" retrieve-position-within-table="first-starting" retrieve-boundary-within-table="table"/> 
          </fo:block> 
         </fo:table-cell> 
        </fo:table-row> 
       </fo:table-header> 
       <fo:table-body> 
        <!--fo:marker marker-class-name="primary-para-continuation"/--> 
        <fo:table-row> 
         <fo:table-cell> 
          <!--fo:marker marker-class-name="primary-para-continuation"> - Cont</fo:marker--> 
          <fo:marker marker-class-name="primary-para-continuation"/> 
          <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt" keep-with-next="100"/> 
         </fo:table-cell> 
        </fo:table-row> 
        <fo:table-row> 
         <fo:table-cell> 
          <fo:marker marker-class-name="primary-para-continuation"> - Cont</fo:marker> 
          <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt"> 
           <fo:marker marker-class-name="primary-para-continuation"> - Cont</fo:marker> 
           <fo:table table-layout="fixed" width="100%" id="d18e2057"> 
            <fo:table-column column-width="proportional-column-width(1)"/> 
            <fo:table-body> 
             <fo:marker marker-class-name="table-caption-continued"/> 
             <fo:table-row> 
              <fo:table-cell padding-before="1pt"> 
               <fo:table table-layout="fixed" space-before.optimum="12pt" space-after.optimum="6pt" start-indent="0in" width="7in"> 
                <fo:table-column column-width="proportional-column-width(1.00)"/> 
                <fo:table-column column-width="proportional-column-width(2.20)"/> 
                <fo:table-body> 
                 <fo:marker marker-class-name="table-caption-continued"/> 
                 <fo:table-row keep-together.within-column="always" text-align="left"> 
                  <fo:table-cell wrap-option="wrap" padding-end="3pt" padding-start="3pt" padding-before="3pt" padding-after="3pt" border-start-style="solid" border-start-width="1pt" border-top-style="solid" border-top-width="1pt" border-bottom-style="solid" border-bottom-width="1pt" border-end-style="solid" border-end-width="1pt"> 
                   <fo:marker marker-class-name="table-caption-continued"> - Continued </fo:marker> 
                   <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt" space-after.optimum="5pt"> 
                    <fo:inline font-weight="bold">Column 1 Header</fo:inline> 
                   </fo:block> 
                  </fo:table-cell> 
                  <fo:table-cell wrap-option="wrap" padding-end="3pt" padding-start="3pt" padding-before="3pt" padding-after="3pt" border-start-style="solid" border-start-width="1pt" border-top-style="solid" border-top-width="1pt" border-bottom-style="solid" border-bottom-width="1pt" border-end-style="solid" border-end-width="1pt"> 
                   <fo:marker marker-class-name="table-caption-continued"> - Continued </fo:marker> 
                   <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt" space-after.optimum="5pt"> 
                    <fo:inline font-weight="bold">Column 2 Header</fo:inline> 
                   </fo:block> 
                  </fo:table-cell> 
                 </fo:table-row> 
                 <fo:table-row keep-together.within-column="always" text-align="left"> 
                  <fo:table-cell wrap-option="wrap" padding-end="3pt" padding-start="3pt" padding-before="3pt" padding-after="3pt" border-top-style="solid" border-top-width="1pt" border-start-style="solid" border-start-width="1pt" border-bottom-style="solid" border-bottom-width="1pt" border-end-style="solid" border-end-width="1pt"> 
                   <fo:marker marker-class-name="table-caption-continued"> - Continued </fo:marker> 
                   <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt" space-after.optimum="5pt">Data1 </fo:block> 
                  </fo:table-cell> 
                  <fo:table-cell wrap-option="wrap" padding-end="3pt" padding-start="3pt" padding-before="3pt" padding-after="3pt" border-top-style="solid" border-top-width="1pt" border-start-style="solid" border-start-width="1pt" border-bottom-style="solid" border-bottom-width="1pt" border-end-style="solid" border-end-width="1pt"> 
                   <fo:marker marker-class-name="table-caption-continued"> - Continued </fo:marker> 
                   <fo:block line-height="12pt" font-family="sans-serif" font-size="10pt" space-after.optimum="5pt">Content</fo:block> 
                  </fo:table-cell> 
                 </fo:table-row> 
                </fo:table-body> 
               </fo:table> 
              </fo:table-cell> 
             </fo:table-row> 
            </fo:table-body> 
           </fo:table> 
           <fo:block> </fo:block> 
          </fo:block> 
         </fo:table-cell> 
        </fo:table-row> 
       </fo:table-body> 
      </fo:table> 
     </fo:flow> 
    </fo:page-sequence> 
</fo:root>