123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <!-- $Id$ -->
- <testcase>
- <info>
- <p>This test checks fo:change-bar-* on list elements.</p>
- </info>
- <fo>
- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <fo:layout-master-set>
- <fo:simple-page-master page-height="145mm" page-width="210mm" margin="10mm"
- master-name="master">
- <fo:region-body column-count="2" column-gap="10mm"/>
- </fo:simple-page-master>
- </fo:layout-master-set>
- <fo:page-sequence master-reference="master">
- <fo:flow flow-name="xsl-region-body">
-
- <fo:block change-bar-style="solid" change-bar-color="red" change-bar-width="0.3mm"
- change-bar-offset="3mm">
- <fo:change-bar-begin change-bar-class="list-block"/>
- <fo:list-block id="list-block">
- <fo:change-bar-begin change-bar-class="list-item-first" change-bar-offset="2mm"
- change-bar-color="green"/>
- <fo:list-item id="list-item-first">
- <fo:list-item-label id="list-item-first-label" end-indent="label-end()">
- <fo:block>1</fo:block>
- </fo:list-item-label>
- <fo:list-item-body id="list-item-first-body" start-indent="body-start()">
- <fo:block>First</fo:block>
- </fo:list-item-body>
- </fo:list-item>
- <fo:change-bar-end change-bar-class="list-item-first"/>
- <fo:list-item id="list-item-second">
- <fo:change-bar-begin change-bar-class="list-item-second-label"
- change-bar-offset="2mm" change-bar-color="blue"/>
- <fo:list-item-label id="list-item-second-label" end-indent="label-end()">
- <fo:block>2</fo:block>
- </fo:list-item-label>
- <fo:change-bar-end change-bar-class="list-item-second-label"/>
- <fo:change-bar-begin change-bar-class="list-item-second-body" change-bar-offset="1mm"
- change-bar-color="magenta"/>
- <fo:list-item-body id="list-item-second-body" start-indent="body-start()">
- <fo:block>Second</fo:block>
- </fo:list-item-body>
- <fo:change-bar-end change-bar-class="list-item-second-body"/>
- </fo:list-item>
- </fo:list-block>
- <fo:change-bar-end change-bar-class="list-block"/>
- </fo:block>
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- </fo>
- <checks>
- <!-- the first -->
- <eval expected="(solid,#ff0000,850)" xpath="//block[@prod-id='list-item-first-label']/block[1]/block[1]/@border-start"/>
- <eval expected="-9353" xpath="//block[@prod-id='list-item-first-label']/block[1]/block[1]/@left-offset"/>
- <eval expected="(solid,#008000,850)" xpath="//block[@prod-id='list-item-first-label']/block[1]/block[2]/@border-start"/>
- <eval expected="-6519" xpath="//block[@prod-id='list-item-first-label']/block[1]/block[2]/@left-offset"/>
- <eval expected="(solid,#ff0000,850)" xpath="//block[@prod-id='list-item-first-body']/block[1]/block[1]/@border-start"/>
- <eval expected="-9353" xpath="//block[@prod-id='list-item-first-body']/block[1]/block[1]/@left-offset"/>
- <eval expected="(solid,#008000,850)" xpath="//block[@prod-id='list-item-first-body']/block[1]/block[2]/@border-start"/>
- <eval expected="-6519" xpath="//block[@prod-id='list-item-first-body']/block[1]/block[2]/@left-offset"/>
- <!-- the second -->
- <eval expected="(solid,#ff0000,850)" xpath="//block[@prod-id='list-item-second-label']/block[1]/block[1]/@border-start"/>
- <eval expected="-9353" xpath="//block[@prod-id='list-item-second-label']/block[1]/block[1]/@left-offset"/>
- <eval expected="(solid,#0000ff,850)" xpath="//block[@prod-id='list-item-second-label']/block[1]/block[2]/@border-start"/>
- <eval expected="-6519" xpath="//block[@prod-id='list-item-second-label']/block[1]/block[2]/@left-offset"/>
- <eval expected="(solid,#ff0000,850)" xpath="//block[@prod-id='list-item-second-body']/block[1]/block[1]/@border-start"/>
- <eval expected="-9353" xpath="//block[@prod-id='list-item-second-body']/block[1]/block[1]/@left-offset"/>
- <eval expected="(solid,#ff00ff,850)" xpath="//block[@prod-id='list-item-second-body']/block[1]/block[2]/@border-start"/>
- <eval expected="-3684" xpath="//block[@prod-id='list-item-second-body']/block[1]/block[2]/@left-offset"/>
- </checks>
- </testcase>
|