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.

extensions.xml 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. <!-- $Id$ -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
  18. <document>
  19. <header>
  20. <title>Standard FOP Extensions</title>
  21. <version>$Revision$</version>
  22. </header>
  23. <body>
  24. <p>
  25. By "extension", we mean any data that can be placed in the input XML document that
  26. is not addressed by the XSL-FO standard.
  27. By having a mechanism for supporting extensions, FOP is able to add features that
  28. are not covered in the specification.
  29. </p>
  30. <p>
  31. The extensions documented here are included with FOP, and are automatically available
  32. to you. If you wish to add an extension of your own to FOP, please see the
  33. <a href="../dev/extensions.html">Developers' Extension Page</a>.
  34. </p>
  35. <note>All extensions require the correct use of an appropriate namespace in your input document.</note>
  36. <section id="svg">
  37. <title>SVG</title>
  38. <p>
  39. Please see the <a href="graphics.html#svg">SVG documentation</a> for more details.
  40. </p>
  41. </section>
  42. <section id="fo-extensions">
  43. <title>FO Extensions</title>
  44. <section id="fox-namespace">
  45. <title>Namespace</title>
  46. <p>
  47. By convention, FO extensions in FOP use the "fox" namespace prefix.
  48. To use any of the FO extensions, add a namespace entry for
  49. <code>http://xmlgraphics.apache.org/fop/extensions</code> to the root element:
  50. </p>
  51. <source><![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  52. xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">]]></source>
  53. </section>
  54. <section id="bookmarks">
  55. <title>PDF Bookmarks</title>
  56. <p>
  57. In previous versions of Apache FOP there was a <code>fox:outline</code> element
  58. which was used to create outlines in PDF files. The redesigned code makes use
  59. of the new <a href="http://www.w3.org/TR/xsl11/#fo_bookmark-tree">bookmark feature defined in the latest XSL 1.1 working draft</a>.
  60. </p>
  61. </section>
  62. <section id="named-destinations">
  63. <title>Anchors or Named Destinations</title>
  64. <p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
  65. <!--p>Use the fox:destination element to define "named destinations" inside a PDF document.
  66. These are useful as fragment identifiers, e.g. "http://server/document.pdf#anchor-name".
  67. fox:destination elements can be placed almost anywhere in the fo document, including a child of
  68. root, a block-level element, or an inline-level element.
  69. For the destination to actually work, it must correspond to an "id" attribute on some fo element
  70. within the document. In other words, the "id" attribute actually creates the "view" within the
  71. PDF document. The fox:destination simply gives that view an independent name.
  72. </p>
  73. <source><![CDATA[<fox:destination internal-destination="table-of-contents"/>
  74. ...
  75. <fo:block id="table-of-contents">Table of Contents</fo:block>]]></source>
  76. <warning>It is possible that in some future release of FOP, <em>all </em>elements with
  77. "id" attributes will generate named-destinations, which will eliminate the need for
  78. fox:destination.</warning-->
  79. </section>
  80. <section id="table-continue-label">
  81. <title>Table Continuation Label</title>
  82. <p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
  83. <!--p>Use the fox:continued-label element to create content in table-header and
  84. table-footer cells that will appear only on pages after the first page that the table
  85. appears. fox:continued-label is itself inline content, and is a container of fo:inline
  86. content. This content will be laid out only if the table does not fit on a single page and flows
  87. to following pages. Here is an example of FO code creating such a table-header:</p>
  88. <source><![CDATA[<fo:table-header>
  89. <fo:table-row>
  90. <fo:table-cell>
  91. <fo:block>Header column 1 with continued label
  92. <fox:continued-label><fo:inline> (cont.)</fo:inline></fox:continued-label>
  93. </fo:block>
  94. </fo:table-cell>
  95. <fo:table-cell>
  96. <fo:block>Header column 2 with no continued label</fo:block>
  97. </fo:table-cell>
  98. </fo:table-row>
  99. </fo:table-header>]]></source-->
  100. </section>
  101. <section id="widow-orphan-content-limit">
  102. <title>fox:orphan-content-limit and fox:widow-content-limit</title>
  103. <p>
  104. The two proprietary extension properties, fox:orphan-content-limit and
  105. fox:widow-content-limit, are used to improve the layout of list-blocks and tables.
  106. If you have a table with many entries, you don't want a single row to be left over
  107. on a page. You will want to make sure that at least two or three lines are kept
  108. together. The properties take an absolute length which specifies the area at the
  109. beginning (fox:widow-content-limit) or at the end (fox:orphan-content-limit) of a
  110. table or list-block. The properties are inherited and only have an effect on fo:table
  111. and fo:list-block. An example: fox:widow-content-limit="3 * 1.2em" would make sure
  112. the you'll have at least three lines (assuming line-height="1.2") together on a table
  113. or list-block.
  114. </p>
  115. </section>
  116. </section>
  117. </body>
  118. </document>