You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

static-content_overflow_1.xml 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This test checks behaviour with overflowing content on static-content.
  21. </p>
  22. <p>
  23. Visual check: If there's a red line between the second and third line, the
  24. behaviour is wrong.
  25. </p>
  26. </info>
  27. <fo>
  28. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  29. <fo:layout-master-set>
  30. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="20pt">
  31. <fo:region-body margin-top="2em" margin-bottom="2em"/>
  32. <fo:region-before extent="2em" background-color="lightgray"/>
  33. <fo:region-after extent="2em" background-color="lightgray"/>
  34. </fo:simple-page-master>
  35. </fo:layout-master-set>
  36. <fo:page-sequence master-reference="normal" text-align="justify">
  37. <fo:static-content flow-name="xsl-region-before">
  38. <fo:block id="text-before" border="solid 1pt red" border-before-width.conditionality="retain">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl.</fo:block>
  39. </fo:static-content>
  40. <fo:static-content flow-name="xsl-region-after">
  41. <fo:block id="text-after" border="solid 1pt red" border-before-width.conditionality="retain">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl.</fo:block>
  42. </fo:static-content>
  43. <fo:flow flow-name="xsl-region-body">
  44. <fo:block>xsl-region-body</fo:block>
  45. </fo:flow>
  46. </fo:page-sequence>
  47. </fo:root>
  48. </fo>
  49. <checks>
  50. <!-- fo:block must not be broken into multiple parts! -->
  51. <eval expected="1" xpath="count(//block[@prod-id='text-before'])"/>
  52. <eval expected="1" xpath="count(//block[@prod-id='text-after'])"/>
  53. <!-- The following shows the overflow -->
  54. <true expected="24000" xpath="//regionBefore/@bpd"/>
  55. <true expected="24000" xpath="//regionAfter/@bpd"/>
  56. <true expected="60600" xpath="sum(//block[@prod-id='text-before']/@bpda)"/>
  57. <true expected="60600" xpath="sum(//block[@prod-id='text-after']/@bpda)"/>
  58. </checks>
  59. </testcase>