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.

block-level_id.xml 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 IDs on block-level FOs.
  21. </p>
  22. <p>
  23. TODO:
  24. Test table-and-caption and table-caption once implemented.
  25. </p>
  26. <p>
  27. Notes:
  28. The following FOs cannot be tested this way:
  29. table-body, table-header, table-footer, table-row,
  30. multi-switch, multi-case, multi-toggle, multi-properties, multi-property-set,
  31. page-sequence.
  32. </p>
  33. </info>
  34. <fo>
  35. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  36. <fo:layout-master-set>
  37. <fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
  38. margin="20pt">
  39. <fo:region-body background-color="yellow"/>
  40. </fo:simple-page-master>
  41. </fo:layout-master-set>
  42. <fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
  43. <fo:flow flow-name="xsl-region-body">
  44. <fo:block id="block1">block1</fo:block>
  45. <fo:list-block id="list1" provisional-distance-between-starts="50pt" provisional-label-separation="5pt">
  46. <fo:list-item id="item1">
  47. <fo:list-item-label id="item1-label" end-indent="label-end()">
  48. <fo:block>•</fo:block>
  49. </fo:list-item-label>
  50. <fo:list-item-body id="item1-body" start-indent="body-start()">
  51. <fo:block>here is text in the list item body</fo:block>
  52. </fo:list-item-body>
  53. </fo:list-item>
  54. </fo:list-block>
  55. <fo:table id="table1" table-layout="fixed" border-collapse="separate">
  56. <fo:table-column column-width="100%"/>
  57. <fo:table-header id="table-header1">
  58. <fo:table-row>
  59. <fo:table-cell>
  60. <fo:block>header</fo:block>
  61. </fo:table-cell>
  62. </fo:table-row>
  63. </fo:table-header>
  64. <fo:table-footer id="table-footer1">
  65. <fo:table-row>
  66. <fo:table-cell>
  67. <fo:block>footer</fo:block>
  68. </fo:table-cell>
  69. </fo:table-row>
  70. </fo:table-footer>
  71. <fo:table-body id="table-body1">
  72. <fo:table-row id="table-row1">
  73. <fo:table-cell id="table-cell1">
  74. <fo:block>body-content</fo:block>
  75. </fo:table-cell>
  76. </fo:table-row>
  77. </fo:table-body>
  78. </fo:table>
  79. <fo:block-container id="block-container1">
  80. <fo:block>block-container-content</fo:block>
  81. </fo:block-container>
  82. </fo:flow>
  83. </fo:page-sequence>
  84. </fo:root>
  85. </fo>
  86. <checks>
  87. <eval expected="block1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@prod-id"/>
  88. <eval expected="list1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@prod-id"/>
  89. <eval expected="item1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/@prod-id"/>
  90. <eval expected="item1-label" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[1]/@prod-id"/>
  91. <eval expected="item1-body" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[2]/@prod-id"/>
  92. <eval expected="table1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/@prod-id"/>
  93. <!-- table-header1, table-body1, table-footer1, table-row1 don't exist in the area tree and cannot be tested. -->
  94. <eval expected="table-cell1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[3]/block[2]/@prod-id"/>
  95. <eval expected="block-container1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/@prod-id"/>
  96. </checks>
  97. </testcase>