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.

list.xml 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?xml version="1.0" standalone="no"?>
  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. This test checks that IDs coming from the various elements of a list properly appear in the IF
  20. output.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="page"
  27. page-height="320pt" page-width="420pt" margin="10pt">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="page">
  32. <fo:flow flow-name="xsl-region-body" text-align="justify">
  33. <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
  34. bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
  35. <fo:list-block provisional-distance-between-starts="10pt" provisional-label-separation="5pt"
  36. id="list-block" space-before="10pt">
  37. <fo:list-item id="list-item_1">
  38. <fo:list-item-label end-indent="label-end()" id="list-item-label">
  39. <fo:block>•</fo:block>
  40. </fo:list-item-label>
  41. <fo:list-item-body start-indent="body-start()" id="list-item-body">
  42. <fo:block>Item 1</fo:block>
  43. <fo:block>id="list-item-body"</fo:block>
  44. </fo:list-item-body>
  45. </fo:list-item>
  46. <fo:list-item id="list-item_2" space-before="5pt">
  47. <fo:list-item-label end-indent="label-end()">
  48. <fo:block>•</fo:block>
  49. </fo:list-item-label>
  50. <fo:list-item-body start-indent="body-start()">
  51. <fo:block>Item 2</fo:block>
  52. <fo:block>id="list-item_2"</fo:block>
  53. </fo:list-item-body>
  54. </fo:list-item>
  55. <fo:list-item space-before="5pt">
  56. <fo:list-item-label end-indent="label-end()">
  57. <fo:block>•</fo:block>
  58. </fo:list-item-label>
  59. <fo:list-item-body start-indent="body-start()">
  60. <fo:block>Item 3</fo:block>
  61. <fo:block>id="list-block"</fo:block>
  62. </fo:list-item-body>
  63. </fo:list-item>
  64. </fo:list-block>
  65. <fo:block id="block" space-before="10pt" color="purple" font-family="serif">In vel libero
  66. libero, a semper est. Vivamus dapibus ante id lorem mattis eget mattis urna sodales.
  67. Vestibulum nec dui urna, in porta mi.</fo:block>
  68. <fo:block space-before="10pt">Proin varius egestas erat. Proin ante eros, consequat eget
  69. semper a, molestie non arcu. Praesent hendrerit dolor vel leo luctus dapibus.</fo:block>
  70. </fo:flow>
  71. </fo:page-sequence>
  72. </fo:root>
  73. </fo>
  74. <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
  75. <eval expected="21" xpath="count(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
  76. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
  77. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
  78. <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
  79. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
  80. <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
  81. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
  82. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
  83. <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
  84. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][9])"/>
  85. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][10])"/>
  86. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][11])"/>
  87. <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][12])"/>
  88. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][13])"/>
  89. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][14])"/>
  90. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][15])"/>
  91. <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][16])"/>
  92. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][17])"/>
  93. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][18])"/>
  94. <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][19])"/>
  95. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][20])"/>
  96. <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][21])"/>
  97. <eval expected="list-item-label" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][1]/@name"/>
  98. <eval expected="list-item-body" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][2]/@name"/>
  99. <eval expected="list-item_2" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][3]/@name"/>
  100. <eval expected="list-block" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][4]/@name"/>
  101. <eval expected="block" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][5]/@name"/>
  102. <eval expected="" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][6]/@name"/>
  103. </if-checks>
  104. </testcase>