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

block-break-inline-break-before.xml 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the
  3. NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses
  4. this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
  5. with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
  6. by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
  7. BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
  8. language governing permissions and limitations under the License. -->
  9. <!-- $Id$ -->
  10. <testcase>
  11. <info>
  12. <p>This tests that two breaks across an inline are treated as one.</p>
  13. </info>
  14. <fo>
  15. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  16. <fo:layout-master-set>
  17. <fo:simple-page-master master-name="page" page-width="220pt" page-height="220pt"
  18. margin="10pt">
  19. <fo:region-body />
  20. </fo:simple-page-master>
  21. </fo:layout-master-set>
  22. <fo:page-sequence master-reference="page">
  23. <fo:flow flow-name="xsl-region-body">
  24. <fo:block>one</fo:block>
  25. <fo:block break-before="page">
  26. <fo:inline>
  27. <fo:block break-before="page">two</fo:block>
  28. </fo:inline>
  29. </fo:block>
  30. </fo:flow>
  31. </fo:page-sequence>
  32. </fo:root>
  33. </fo>
  34. <checks>
  35. <eval expected="1" xpath="//lineArea[starts-with(., 'one')]/ancestor::pageViewport/@nr" />
  36. <eval expected="2" xpath="//lineArea[starts-with(., 'two')]/ancestor::pageViewport/@nr" />
  37. </checks>
  38. </testcase>