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.

page-number-citation_bugzilla44794.xml 4.5KB

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. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This test checks page-number-citation and page-number-citation-last on block and inline
  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="normal" page-width="5in" page-height="3in"
  27. margin="20pt">
  28. <fo:region-body background-color="yellow"/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block id="outer-block1">
  34. block: <fo:page-number-citation ref-id="block-inline1"/> to <fo:page-number-citation-last ref-id="block-inline1"/>.
  35. </fo:block>
  36. <fo:block id="outer-block2">
  37. inline: <fo:page-number-citation ref-id="inline1"/> to <fo:page-number-citation-last ref-id="inline1"/>.
  38. </fo:block>
  39. <fo:block id="outer-block3" border="0.5pt solid black">
  40. <fo:block id="block-inline1" border="0.5pt solid black" space-after.optimum="2em">text<fo:inline id="inline1" >XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX</fo:inline>text</fo:block>
  41. </fo:block>
  42. </fo:flow>
  43. </fo:page-sequence>
  44. <fo:page-sequence master-reference="normal">
  45. <fo:flow flow-name="xsl-region-body" font-size="8pt">
  46. <fo:block id="outer-block4">
  47. inline: <fo:page-number-citation ref-id="inline1" /> to <fo:page-number-citation-last ref-id="inline1" />
  48. </fo:block>
  49. <fo:block id="outer-block5">
  50. block: <fo:page-number-citation ref-id="block-inline1" /> to <fo:page-number-citation-last ref-id="block-inline1" />
  51. </fo:block>
  52. </fo:flow>
  53. </fo:page-sequence>
  54. </fo:root>
  55. </fo>
  56. <checks>
  57. <true fail-msg="Wrong page-number-citation for block before" xpath="'1' = (//block[@prod-id='outer-block1']//word)[2]"/>
  58. <true fail-msg="Wrong page-number-citation-last for block before" xpath="'2' = (//block[@prod-id='outer-block1']//word)[4]"/>
  59. <true fail-msg="Wrong page-number-citation for inline before" xpath="'1' = (//block[@prod-id='outer-block2']//word)[2]"/>
  60. <true fail-msg="Wrong page-number-citation-last for inline before" xpath="'2' = (//block[@prod-id='outer-block2']//word)[4]"/>
  61. <true fail-msg="Wrong page-number-citation for block after" xpath="'1' = (//block[@prod-id='outer-block5']//word)[2]"/>
  62. <true fail-msg="Wrong page-number-citation-last for block after" xpath="'2' = (//block[@prod-id='outer-block5']//word)[4]"/>
  63. <true fail-msg="Wrong page-number-citation for inline after" xpath="'1' = (//block[@prod-id='outer-block4']//word)[2]"/>
  64. <true fail-msg="Wrong page-number-citation-last for inline after" xpath="'2' = (//block[@prod-id='outer-block4']//word)[4]"/>
  65. </checks>
  66. </testcase>