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.

inlines.xml 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 various inline elements 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" id="page-sequence">
  32. <fo:flow flow-name="xsl-region-body" text-align="justify">
  33. <fo:block font-family="sans-serif">Lorem ipsum dolor sit amet, <fo:character id="character"
  34. font-size="150%" font-weight="bold" color="purple" character="C"/>onsectetur adipiscing
  35. elit. <fo:inline id="inline" color="purple" font-family="serif">Fusce rutrum leo a diam
  36. bibendum auctor.</fo:inline> Vivamus porttitor sollicitudin tortor eu vulputate. In vel
  37. libero libero, a semper est. Vivamus<fo:leader id="leader" leader-length="50pt"
  38. leader-pattern="rule" color="purple"/> dapibus ante id lorem mattis eget mattis urna
  39. sodales. This is page number <fo:page-number id="page-number" color="purple"/>. Vestibulum
  40. nec dui urna, in porta mi. The fo:character object is on page <fo:page-number-citation
  41. id="page-number-citation" ref-id="character" color="purple"/>. Proin varius egestas erat.
  42. Proin ante eros, consequat eget semper a, molestie non arcu. The last page of this document
  43. is page <fo:page-number-citation-last id="page-number-citation-last" ref-id="page-sequence"
  44. color="purple"/>. Praesent hendrerit dolor vel leo luctus dapibus.</fo:block>
  45. <fo:block break-before="page">Lorem ipsum dolor sit amet, consectetur adipiscing
  46. elit.</fo:block>
  47. </fo:flow>
  48. </fo:page-sequence>
  49. </fo:root>
  50. </fo>
  51. <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
  52. <eval expected="32" xpath="count(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'])"/>
  53. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][1])"/>
  54. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][2])"/>
  55. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][3])"/>
  56. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][4])"/>
  57. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][5])"/>
  58. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][6])"/>
  59. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][7])"/>
  60. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][8])"/>
  61. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][9])"/>
  62. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][10])"/>
  63. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][11])"/>
  64. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][12])"/>
  65. <eval expected="line" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][13])"/>
  66. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][14])"/>
  67. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][15])"/>
  68. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][16])"/>
  69. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][17])"/>
  70. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][18])"/>
  71. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][19])"/>
  72. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][20])"/>
  73. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][21])"/>
  74. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][22])"/>
  75. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][23])"/>
  76. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][24])"/>
  77. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][25])"/>
  78. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][26])"/>
  79. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][27])"/>
  80. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][28])"/>
  81. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][29])"/>
  82. <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][30])"/>
  83. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][31])"/>
  84. <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][32])"/>
  85. <eval expected="character" xpath="//if:page[1]/descendant::*[local-name() = 'id'][1]/@name"/>
  86. <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][2]/@name"/>
  87. <eval expected="inline" xpath="//if:page[1]/descendant::*[local-name() = 'id'][3]/@name"/>
  88. <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][4]/@name"/>
  89. <eval expected="leader" xpath="//if:page[1]/descendant::*[local-name() = 'id'][5]/@name"/>
  90. <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][6]/@name"/>
  91. <eval expected="page-number" xpath="//if:page[1]/descendant::*[local-name() = 'id'][7]/@name"/>
  92. <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][8]/@name"/>
  93. <eval expected="page-number-citation" xpath="//if:page[1]/descendant::*[local-name() = 'id'][9]/@name"/>
  94. <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][10]/@name"/>
  95. <eval expected="page-number-citation-last" xpath="//if:page[1]/descendant::*[local-name() = 'id'][11]/@name"/>
  96. <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][12]/@name"/>
  97. </if-checks>
  98. </testcase>