biz-StreamマニュアルXMLページレイアウトタグ リファレンス第10章 場合分け制御10.4 条件に当てはまらない場合の処理<ConditionIsElse>

10.4 条件に当てはまらない場合の処理<ConditionIsElse>


10.4.1機能説明

ConditionIsNull、ConditionIsLineで指定された場合分けに当てはまらないケースのページレイアウトを定義します。ConditionIsElse単一では使用せず、必ずConditionIsNullもしくはConditionIsLineと組み合わせて使用します。



10.4.2属性説明

属性名指定説明指定内容初期値M
Name任意名前CDATA
Width任意描画領域の幅CDATA
Height任意描画領域の高さCDATA
X任意X座標CDATA0
Y任意Y座標CDATA0
Unit任意単位(Choice)mm / cm / in / px / ptmm
Horizon任意水平方向の配置(Choice)left /
center /
right /
even
left
Vertical任意垂直方向の配置(Choice)top /
center /
bottom /
even
bottom
Vector任意整列方向(Choice)horizon /
vertical /
none
horizon
Narrow任意指定描画領域にデータが入りきらない場合の圧縮方法(Choice)horizon /
size /
none
size
LineSpace任意行間CDATA0
  • (注) 初期値:出荷時のXMLデフォルト情報(default_values.properties)値を表します。ユーザにより値の変更が行われた場合は内容が異なります。


10.4.3記述例

ConditionIsElseサンプル1

ConditionIsElseサンプル1(『<biz-Stream_home>/sample/ConditionIsElse/ConditionIsElseSample1.xml』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="CondirionIsElseSample1" Width="55" Height="40" X="10" Y="10" 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">
    <Square Width="30" Height="20" LineColor="14,0,176" LineStyle="Solid"/>

    <Condition>
        <ConditionIsNull Target="phone1;phone2" Name="con1" Width="30" Height="20" LineSpace="0" Horizon="center" Vertical="center" Vector="vertical" narrow="size">
            <Label Name="phone1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="phone2" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="fax" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
        </ConditionIsNull>
        <ConditionIsNull Target="phone1" Name="con2" Width="30" Height="20" Horizon="center" Vertical="center" Vector="vertical" narrow="size">
            <Label Name="phone1" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
            <Label Name="fax" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon"/>
        </ConditionIsNull>
        <ConditionIsElse Name="con3" Width="30" Height="20" Horizon="center" Vertical="center" Vector="vertical" narrow="size">
            <Label Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontStyle="PLAIN" Narrow="horizon">phone1、phone2なし</Label>
        </ConditionIsElse>
    </Condition>
</Layout>

生成されるPDF(『<biz-Stream_home>/sample/ConditionIsElse/ConditionIsElseSample1.pdf』)


ConditionIsElseサンプル1

<ConditionIsNull>の記述例に、<ConditionIsElse>を追加したパターンです。
<ConditionIsNull>で定義されている場合分けのいずれにも当てはまらない場合、<ConditionIsElse>で指定されているレイアウトが採用されます。


  • <ConditionIsLine>で指定する描画領域(X,Y,Width,
    Height)・Horizon・Vertical・Vector・Narrow・LineSpaceの
    機能は、<GroupAlignment>と同一機能となります。