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.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 V1.1//EN"
  18. "http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/document-v12.dtd">
  19. <document>
  20. <header>
  21. <title>Standard FOP Extensions</title>
  22. <version>$Revision$</version>
  23. </header>
  24. <body>
  25. <p>By "extension", we mean any data that can be placed in the input XML document that is not addressed by the XSL-FO standard.
  26. By having a mechanism for supporting extensions, FOP is able to add features that are not covered in the specification.</p>
  27. <p>The extensions documented here are included with FOP, and are automatically available to you. If you wish to add an extension of your own to FOP, please see the <link href="../dev/extensions.html">Developers' Extension Page</link>.</p>
  28. <note>All extensions required the correct use of an appropriate namespace in your input document.</note>
  29. <section id="svg">
  30. <title>SVG</title>
  31. <p>
  32. Please see the <link href="graphics.html#svg">SVG documentation</link> for more details.
  33. </p>
  34. </section>
  35. <section id="fo-extensions">
  36. <title>FO Extensions</title>
  37. <section id="fox-namespace">
  38. <title>Namespace</title>
  39. <p>By convention, FO extensions in FOP use the "fox:" namespace identifier.
  40. To use any of the FO extensions, add a namespace entry for http://xml.apache.org/fop/extensions
  41. to the root element:</p>
  42. <source><![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  43. xmlns:fox="http://xml.apache.org/fop/extensions">]]></source>
  44. </section>
  45. <section id="bookmarks">
  46. <title>PDF Bookmarks</title>
  47. <p>
  48. You can provide outlines inside the root object (but outside any
  49. page-sequences or other formatting objects). Here's an example of an outline
  50. entry:
  51. </p>
  52. <source>
  53. <![CDATA[<fox:outline internal-destination="sec3">
  54. <fox:label>Running FOP</fox:label>
  55. <fox:outline internal-destination="sec3-1">
  56. <fox:label>Prerequisites</fox:label>
  57. </fox:outline>
  58. </fox:outline>
  59. </fo:root>]]></source>
  60. <p>
  61. It works similarly to a basic-link. There is also an external-destination
  62. property, but it isn't supported currently. See the pdfoutline.fo file in
  63. examples/fo/basic for a more complete example.
  64. </p>
  65. </section>
  66. <section id="named-destinations">
  67. <title>Anchors or Named Destinations</title>
  68. <p>Use the fox:destination element to define "named destinations" inside a PDF document.
  69. These are useful as fragment identifiers, e.g. "http://server/document.pdf#anchor-name".
  70. fox:destination elements can be placed almost anywhere in the fo document, including a child of
  71. root, a block-level element, or an inline-level element.
  72. For the destination to actually work, it must correspond to an "id" attribute on some fo element
  73. within the document. In other words, the "id" attribute actually creates the "view" within the
  74. PDF document. The fox:destination simply gives that view an independent name.
  75. </p>
  76. <source><![CDATA[<fox:destination internal-destination="table-of-contents"/>
  77. ...
  78. <fo:block id="table-of-contents">Table of Contents</fo:block>]]></source>
  79. <warning>It is possible that in some future release of FOP, <em>all </em>elements with
  80. "id" attributes will generate named-destinations, which will eliminate the need for
  81. fox:destination.</warning>
  82. </section>
  83. <section id="table-continue-label">
  84. <title>Table Continuation Label</title>
  85. <p>Use the fox:continued-label element to create content in table-header and
  86. table-footer cells that will appear only on pages after the first page that the table
  87. appears. fox:continued-label is itself inline content, and is a container of fo:inline
  88. content. This content will be laid out only if the table does not fit on a single page and flows
  89. to following pages. Here is an example of FO code creating such a table-header:</p>
  90. <source><![CDATA[<fo:table-header>
  91. <fo:table-row>
  92. <fo:table-cell>
  93. <fo:block>Header column 1 with continued label
  94. <fox:continued-label><fo:inline> (cont.)</fo:inline></fox:continued-label>
  95. </fo:block>
  96. </fo:table-cell>
  97. <fo:table-cell>
  98. <fo:block>Header column 2 with no continued label</fo:block>
  99. </fo:table-cell>
  100. </fo:table-row>
  101. </fo:table-header>]]></source>
  102. </section>
  103. </section>
  104. </body>
  105. </document>