biz-Streamマニュアル XMLページレイアウトタグ リファレンス 第9章 繰り返し制御 9.6 クローンペイン<clone>

9.6 クローンペイン<clone>


9.6.1機能説明

クローンは表とはデータソースから主となるレイアウトにデータを割り当てる流れが違います。データの流れ方はright-down(左上から右へ)、left-down(右上から左へ)、down-right(左上から下へ)、down-left(右上から下へ)と4通りあり、隣接するペインへと進んでいきます。flowing-direction属性で指定してください。


cloneサンプル1


9.6.2属性説明

1clone属性説明

クローンペインについての定義を行います。このコンポーネントの基本座標は左上になります。

属性名指定説明指定内容初期値
name任意名前CDATA
x任意X座標CDATA0
y任意Y座標CDATA0
master-reference任意<bs:datasource-master>との関連付けCDATA
number-clones-repeated任意クローンを繰り返す回数CDATA
number-columns-repeated任意列数CDATA1
number-rows-repeated任意行数CDATA1
flowing-direction任意データを配置する順序(Choice)right-down /
left-down /
down-right /
down-left
column-span任意列間CDATA0
row-span任意行間CDATA0
  • (注)初期値:出荷時のXMLデフォルト情報(default_values.properties)値を表します。ユーザにより値の変更が行われた場合は内容が異なります。

2clone-template属性説明

複製のベースとなるペインの大きさ(幅と高さ)について定義します。

属性名指定説明指定内容初期値
width必須ベースとなるペインの幅CDATA
height必須ベースとなるペインの高さCDATA


9.6.3記述例

クローンペインのサンプル

クローンペインのサンプル(『<biz-Stream_home>/sample/xml/clone/cloneSample1-doc.xml』)


<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
    <bs:datasource-master-set>
        <bs:datasource-master master-name="STAFF" position="first">
            <bs:query-master-reference master-reference="STAFF-SQL"/>

        </bs:datasource-master>
        <bs:database-resource-master master-name="DB2" driver="com.ibm.db2.jcc.DB2Driver" url="jdbc:db2://brain_db:50000/sample" userid="Administrator" password="ZGIyYWRtaW4=
"/>

        <bs:query-master master-name="STAFF-SQL">
            <bs:query-statement master-reference="DB2">select EMPLOYEE.EMPNO,EMPLOYEE.FIRSTNME,EMPLOYEE.LASTNAME,EMPLOYEE.BIRTHDATE from EMPLOYEE where (EMPLOYEE.EMPNO like '0001%')  order by EMPLOYEE.EMPNO</bs:query-statement>
            <bs:data-type column-name="EMPNO" type="char"/>
            <bs:data-type column-name="FIRSTNME" type="varchar"/>
            <bs:data-type column-name="LASTNAME" type="varchar"/>
            <bs:data-type column-name="BIRTHDATE" type="date"/>
            <!-- TableName = EMPLOYEE	 AliasTableName = EMPLOYEE	 FieldName = EMPNO	 TOTAL = 	 SORT = 昇順	 ExtractionCnditions = 	 orStr = like '0001%'	 type = char
 TableName = EMPLOYEE	 AliasTableName = EMPLOYEE	 FieldName = FIRSTNME	 TOTAL = 	 SORT = 	 ExtractionCnditions = 	 orStr = 	 type = varchar
 TableName = EMPLOYEE	 AliasTableName = EMPLOYEE	 FieldName = LASTNAME	 TOTAL = 	 SORT = 	 ExtractionCnditions = 	 orStr = 	 type = varchar
 TableName = EMPLOYEE	 AliasTableName = EMPLOYEE	 FieldName = BIRTHDATE	 TOTAL = 	 SORT = 	 ExtractionCnditions = 	 orStr = 	 type = date
-->

        </bs:query-master>
    </bs:datasource-master-set>
    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4V" page-height="297mm" page-width="230mm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4V" name="bizsheet" bs:local-page-control="none">
        <fo:flow flow-name="xsl-region-body">
            <bs:block-container>
                <bs:include href="${base-dir}/sample/xml/clone/cloneSample1-page.xml"/>

            </bs:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



クローンペインのサンプル(『<biz-Stream_home>/sample/xml/clone/cloneSample1-page.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="230mm" Height="297mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <clone x="14.516" y="250.645" master-reference="STAFF" number-clones-repeated="1" number-columns-repeated="3" number-rows-repeated="3" flowing-direction="right-down" column-span="2mm" row-span="2mm">
        <clone-template width="32.394" height="31.338">
            <Round Width="31.514" Height="30.986" X="0.352" Y="0.352" LineColor="0,0,0" LineWidth="0.5" FillColor="204,204,255" Radius="5" LineStyle="Solid"/>

            <Label Name="EMPNO" Width="25" Height="4.93" X="4" Y="20" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontColor="0,0,0" FontSize="16" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="FIRSTNME" Width="25" Height="4.93" X="4" Y="13" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="LASTNAME" Width="25" Height="4.93" X="4" Y="7" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
        </clone-template>
    </clone>
    <Label Width="36.261" Height="9.578" X="38.656" Y="172.564" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="horizon">right-down</Label>
    <clone x="14.516" y="137.625" master-reference="STAFF" number-clones-repeated="1" number-columns-repeated="3" number-rows-repeated="3" flowing-direction="down-right" column-span="2mm" row-span="2mm">
        <clone-template width="32.394" height="31.338">
            <Round Width="31.514" Height="30.986" X="0.352" Y="0.352" LineColor="0,0,0" LineWidth="0.5" FillColor="204,204,255" Radius="5" LineStyle="Solid"/>

            <Label Name="EMPNO" Width="25" Height="4.93" X="4" Y="20" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontColor="0,0,0" FontSize="16" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="FIRSTNME" Width="25" Height="4.93" X="4" Y="13" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="LASTNAME" Width="25" Height="4.93" X="4" Y="7" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
        </clone-template>
    </clone>
    <Label Width="36.261" Height="9.578" X="38.656" Y="59.544" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="horizon">down-right</Label>
    <clone x="186.307" y="250.625" master-reference="STAFF" number-clones-repeated="1" number-columns-repeated="3" number-rows-repeated="3" flowing-direction="left-down" column-span="2mm" row-span="2mm">
        <clone-template width="32.394" height="31.338">
            <Round Width="31.514" Height="30.986" X="0.352" Y="0.352" LineColor="0,0,0" LineWidth="0.5" FillColor="204,204,255" Radius="5" LineStyle="Solid"/>

            <Label Name="EMPNO" Width="25" Height="4.93" X="4" Y="20" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontColor="0,0,0" FontSize="16" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="FIRSTNME" Width="25" Height="4.93" X="4" Y="13" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="LASTNAME" Width="25" Height="4.93" X="4" Y="7" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
        </clone-template>
    </clone>
    <Label Width="36.261" Height="9.578" X="157.137" Y="172.896" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="horizon">left-down</Label>
    <clone x="186.307" y="137.668" master-reference="STAFF" number-clones-repeated="1" number-columns-repeated="3" number-rows-repeated="3" flowing-direction="down-left" column-span="2mm" row-span="2mm">
        <clone-template width="32.394" height="31.338">
            <Round Width="31.514" Height="30.986" X="0.352" Y="0.352" LineColor="0,0,0" LineWidth="0.5" FillColor="204,204,255" Radius="5" LineStyle="Solid"/>

            <Label Name="EMPNO" Width="25" Height="4.93" X="4" Y="20" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontColor="0,0,0" FontSize="16" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="FIRSTNME" Width="25" Height="4.93" X="4" Y="13" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="LASTNAME" Width="25" Height="4.93" X="4" Y="7" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="horizon"/>
        </clone-template>
    </clone>
    <Label Width="36.261" Height="9.578" X="157.137" Y="59.938" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="20" FontStyle="PLAIN" Narrow="horizon">down-left</Label>
</Layout>

生成されるPDF(『<biz-Stream_home>/sample/xml/clone/cloneSample1.pdf』)


cloneサンプル2

4つの<clone>の同じデータソース(master-reference="STAFF")が指定してありますが、それぞれ異なるflowing-direction属性を指定しているので異なる表示をします。