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.

multi-switch_select-first-fitting_padding.xml 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. <testcase>
  17. <info>
  18. <p>
  19. Test padding properties.
  20. </p>
  21. </info>
  22. <fo>
  23. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
  24. <fo:layout-master-set>
  25. <fo:simple-page-master master-name="page" page-width="300pt" page-height="200pt" margin="10pt">
  26. <fo:region-body/>
  27. </fo:simple-page-master>
  28. </fo:layout-master-set>
  29. <fo:page-sequence master-reference="page">
  30. <fo:flow flow-name="xsl-region-body">
  31. <fo:multi-switch fox:auto-toggle="select-first-fitting">
  32. <fo:multi-case>
  33. <fo:block padding="10pt">MS1 Variant 1</fo:block>
  34. </fo:multi-case>
  35. </fo:multi-switch>
  36. <fo:multi-switch fox:auto-toggle="select-first-fitting">
  37. <fo:multi-case>
  38. <fo:block padding-before="10pt" padding-after="10pt">MS2 Variant 1</fo:block>
  39. </fo:multi-case>
  40. </fo:multi-switch>
  41. <fo:multi-switch fox:auto-toggle="select-first-fitting">
  42. <fo:multi-case>
  43. <fo:block>
  44. <fo:inline padding-start="10pt" padding-end="10pt">MS3 Variant 1</fo:inline>
  45. </fo:block>
  46. </fo:multi-case>
  47. </fo:multi-switch>
  48. </fo:flow>
  49. </fo:page-sequence>
  50. </fo:root>
  51. </fo>
  52. <checks>
  53. <eval expected="MS1 Variant 1" xpath="//block[1]"/>
  54. <eval expected="10000" xpath="//block[1]/@padding-start"/>
  55. <eval expected="10000" xpath="//block[1]/@padding-end"/>
  56. <eval expected="10000" xpath="//block[1]/@padding-before"/>
  57. <eval expected="10000" xpath="//block[1]/@padding-after"/>
  58. <eval expected="MS2 Variant 1" xpath="//block[2]"/>
  59. <eval expected="10000" xpath="//block[2]/@padding-before"/>
  60. <eval expected="10000" xpath="//block[2]/@padding-after"/>
  61. <eval expected="MS3 Variant 1" xpath="//block[3]/lineArea[1]"/>
  62. <eval expected="10000" xpath="//block[3]/lineArea[1]/inlineparent/@padding-start"/>
  63. <eval expected="10000" xpath="//block[3]/lineArea[1]/inlineparent/@padding-end"/>
  64. </checks>
  65. </testcase>