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.

pcl-extension_1.xml 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 the PostScript extension for custom setup code. The extension attachments need to show
  21. up in the area tree XML so the AreaTreeParser can fully restore the area tree.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  26. xmlns:pcl="http://xmlgraphics.apache.org/fop/extensions/pcl">
  27. <fo:layout-master-set>
  28. <fo:simple-page-master master-name="first"
  29. page-width="148mm" page-height="210mm" margin="20mm"
  30. pcl:paper-source="2" pcl:duplex-mode="1">
  31. <fo:region-body/>
  32. </fo:simple-page-master>
  33. <fo:simple-page-master master-name="second"
  34. page-width="148mm" page-height="210mm" margin="20mm"
  35. pcl:paper-source="1">
  36. <fo:region-body/>
  37. </fo:simple-page-master>
  38. <fo:page-sequence-master master-name="complex">
  39. <fo:repeatable-page-master-reference master-reference="first" maximum-repeats="1"/>
  40. <fo:repeatable-page-master-reference master-reference="second"/>
  41. </fo:page-sequence-master>
  42. </fo:layout-master-set>
  43. <fo:page-sequence master-reference="complex">
  44. <fo:flow flow-name="xsl-region-body">
  45. <fo:block>Text on page <fo:page-number/>.</fo:block>
  46. <fo:block break-before="page">Text on page <fo:page-number/>.</fo:block>
  47. </fo:flow>
  48. </fo:page-sequence>
  49. </fo:root>
  50. </fo>
  51. <checks xmlns:pcl="http://xmlgraphics.apache.org/fop/extensions/pcl">
  52. <eval expected="2" xpath="//pageViewport[@nr=1]/@pcl:paper-source"/>
  53. <eval expected="1" xpath="//pageViewport[@nr=1]/@pcl:duplex-mode"/>
  54. <eval expected="1" xpath="//pageViewport[@nr=2]/@pcl:paper-source"/>
  55. <true xpath="not(boolean(//pageViewport[@nr=2]/@pcl:duplex-mode))"/>
  56. </checks>
  57. <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate" xmlns:pcl="http://xmlgraphics.apache.org/fop/extensions/pcl">
  58. <eval expected="2" xpath="//if:page[@index=0]/@pcl:paper-source"/>
  59. <eval expected="1" xpath="//if:page[@index=0]/@pcl:duplex-mode"/>
  60. <eval expected="1" xpath="//if:page[@index=1]/@pcl:paper-source"/>
  61. <true xpath="not(boolean(//if:page[@index=1]/@pcl:duplex-mode))"/>
  62. </if-checks>
  63. </testcase>