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 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?xml version="1.0" standalone="no"?>
  2. <!--
  3. Copyright 1999-2005 The Apache Software Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!-- $Id$ -->
  15. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
  16. <document>
  17. <header>
  18. <title>Standard FOP Extensions</title>
  19. <version>$Revision$</version>
  20. </header>
  21. <body>
  22. <p>
  23. By "extension", we mean any data that can be placed in the input XML document that
  24. is not addressed by the XSL-FO standard.
  25. By having a mechanism for supporting extensions, FOP is able to add features that
  26. are not covered in the specification.
  27. </p>
  28. <p>
  29. The extensions documented here are included with FOP, and are automatically available
  30. to you. If you wish to add an extension of your own to FOP, please see the
  31. <a href="../dev/extensions.html">Developers' Extension Page</a>.
  32. </p>
  33. <note>All extensions required the correct use of an appropriate namespace in your input document.</note>
  34. <section id="svg">
  35. <title>SVG</title>
  36. <p>
  37. Please see the <a href="graphics.html#svg">SVG documentation</a> for more details.
  38. </p>
  39. </section>
  40. <section id="fo-extensions">
  41. <title>FO Extensions</title>
  42. <section id="fox-namespace">
  43. <title>Namespace</title>
  44. <p>
  45. By convention, FO extensions in FOP use the "fox" namespace prefix.
  46. To use any of the FO extensions, add a namespace entry for
  47. <code>http://xml.apache.org/fop/extensions</code> to the root element:
  48. </p>
  49. <source><![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  50. xmlns:fox="http://xml.apache.org/fop/extensions">]]></source>
  51. <note>Currently, no extensions are implemented in FOP Trunk which use the FOP extension namespace.</note>
  52. </section>
  53. <section id="bookmarks">
  54. <title>PDF Bookmarks</title>
  55. <p>
  56. In previous versions of Apache FOP there was a <code>fox:outline</code> element
  57. which was used to create outlines in PDF files. The redesigned code makes use
  58. 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>.
  59. </p>
  60. </section>
  61. <section id="named-destinations">
  62. <title>Anchors or Named Destinations</title>
  63. <p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
  64. <!--p>Use the fox:destination element to define "named destinations" inside a PDF document.
  65. These are useful as fragment identifiers, e.g. "http://server/document.pdf#anchor-name".
  66. fox:destination elements can be placed almost anywhere in the fo document, including a child of
  67. root, a block-level element, or an inline-level element.
  68. For the destination to actually work, it must correspond to an "id" attribute on some fo element
  69. within the document. In other words, the "id" attribute actually creates the "view" within the
  70. PDF document. The fox:destination simply gives that view an independent name.
  71. </p>
  72. <source><![CDATA[<fox:destination internal-destination="table-of-contents"/>
  73. ...
  74. <fo:block id="table-of-contents">Table of Contents</fo:block>]]></source>
  75. <warning>It is possible that in some future release of FOP, <em>all </em>elements with
  76. "id" attributes will generate named-destinations, which will eliminate the need for
  77. fox:destination.</warning-->
  78. </section>
  79. <section id="table-continue-label">
  80. <title>Table Continuation Label</title>
  81. <p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
  82. <!--p>Use the fox:continued-label element to create content in table-header and
  83. table-footer cells that will appear only on pages after the first page that the table
  84. appears. fox:continued-label is itself inline content, and is a container of fo:inline
  85. content. This content will be laid out only if the table does not fit on a single page and flows
  86. to following pages. Here is an example of FO code creating such a table-header:</p>
  87. <source><![CDATA[<fo:table-header>
  88. <fo:table-row>
  89. <fo:table-cell>
  90. <fo:block>Header column 1 with continued label
  91. <fox:continued-label><fo:inline> (cont.)</fo:inline></fox:continued-label>
  92. </fo:block>
  93. </fo:table-cell>
  94. <fo:table-cell>
  95. <fo:block>Header column 2 with no continued label</fo:block>
  96. </fo:table-cell>
  97. </fo:table-row>
  98. </fo:table-header>]]></source-->
  99. </section>
  100. </section>
  101. </body>
  102. </document>