您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

marker_inline_white-space.xml 2.8KB

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. Test for Bugzilla 42703: incorrect white-space handling during
  21. marker-retrieval.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="all-pages">
  28. <fo:region-body region-name="xsl-region-body" margin-top="10cm"/>
  29. <fo:region-before region-name="xsl-region-before" extent="29cm" display-align="before" />
  30. <fo:region-after region-name="xsl-region-after" extent="10cm" display-align="before" />
  31. </fo:simple-page-master>
  32. </fo:layout-master-set>
  33. <fo:page-sequence master-reference="all-pages">
  34. <fo:static-content flow-name="xsl-region-before">
  35. <fo:block color="blue" font-size="25pt">
  36. <fo:block>marker1 content:
  37. <fo:inline color="green"><fo:retrieve-marker
  38. retrieve-class-name="marker1"
  39. retrieve-boundary="page"
  40. /></fo:inline>
  41. </fo:block>
  42. <fo:block>marker1 content:
  43. <fo:inline color="green"><fo:retrieve-marker
  44. retrieve-class-name="marker1"
  45. retrieve-boundary="page"
  46. /></fo:inline>
  47. </fo:block>
  48. </fo:block>
  49. </fo:static-content>
  50. <fo:flow flow-name="xsl-region-body">
  51. <fo:block font-size="20pt">
  52. <fo:block margin-top="2cm">
  53. <fo:marker marker-class-name="marker1">
  54. <fo:block>Block<fo:inline> with inline element </fo:inline>.</fo:block>
  55. </fo:marker>
  56. text with the marker
  57. </fo:block>
  58. </fo:block>
  59. </fo:flow>
  60. </fo:page-sequence>
  61. </fo:root>
  62. </fo>
  63. <checks>
  64. <!-- preserve leading white-space of the inline in the retrieved marker -->
  65. <eval expected="4"
  66. xpath="count(//regionBefore/*[1]/*[1]/*[2]/*/*/*/inlineparent/text/space)"/>
  67. </checks>
  68. </testcase>