Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

external-graphic_breaking.xml 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 external-graphics and the handling of linebreaks.
  21. It is unclear at the moment if consecutive images without intervening white space
  22. actually should have a linebreak opportunity between them or not. Fop currently
  23. takes the "there is no break opportunity" view and the checks test accordingly.
  24. </p>
  25. </info>
  26. <fo>
  27. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  28. <fo:layout-master-set>
  29. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  30. <fo:region-body/>
  31. </fo:simple-page-master>
  32. </fo:layout-master-set>
  33. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  34. <fo:flow flow-name="xsl-region-body">
  35. <fo:block>12 external-graphic elements - no space between them</fo:block>
  36. <fo:block background-color="orange"><fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/></fo:block>
  37. <fo:block>12 external-graphic elements - zwsp between them</fo:block>
  38. <fo:block background-color="orange"><fo:external-graphic src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic src="../../resources/images/arrow_down_medium.png"/></fo:block>
  39. <fo:block>12 external-graphic elements - with spaces between every 2nd</fo:block>
  40. <fo:block background-color="orange">
  41. <fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>
  42. <fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>
  43. <fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>
  44. <fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>
  45. <fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>
  46. <fo:external-graphic src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic src="../../resources/images/arrow_down_medium.png"/>
  47. </fo:block>
  48. </fo:flow>
  49. </fo:page-sequence>
  50. </fo:root>
  51. </fo>
  52. <checks>
  53. <!-- 1st test - 1 overflowing line -->
  54. <eval expected="1" xpath="count(//flow/block[2]/lineArea)"/>
  55. <eval expected="12" xpath="count(//flow/block[2]/lineArea/viewport)"/>
  56. <!-- 2nd test - 2 lines broken after 9th graphic -->
  57. <eval expected="2" xpath="count(//flow/block[4]/lineArea)"/>
  58. <eval expected="9" xpath="count(//flow/block[4]/lineArea[1]/viewport)"/>
  59. <eval expected="3" xpath="count(//flow/block[4]/lineArea[2]/viewport)"/>
  60. <!-- 3rd test - 2 lines broken after 10th graphic -->
  61. <eval expected="2" xpath="count(//flow/block[6]/lineArea)"/>
  62. <eval expected="8" xpath="count(//flow/block[6]/lineArea[1]/viewport)"/>
  63. <eval expected="4" xpath="count(//flow/block[6]/lineArea[2]/viewport)"/>
  64. </checks>
  65. </testcase>