選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

extending.xml 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0" encoding="UTF-8" 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.3//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
  18. <document>
  19. <header>
  20. <title>Apache™ FOP Design: Extensions</title>
  21. <version>$Revision$</version>
  22. <authors>
  23. <person name="Keiron Liddle" email="keiron@aftexsw.com"/>
  24. </authors>
  25. </header>
  26. <body>
  27. <section id="intro">
  28. <title>Introduction</title>
  29. <p>
  30. Apache™ FOP provides an extension mechanism to add extra functionality. There
  31. are a number of different types of extensions that apply to different
  32. steps when converting FO into the rendered output.
  33. </p>
  34. </section>
  35. <section>
  36. <title>Extensions</title>
  37. <p>
  38. SVG Graphic - This applies to svg and any other xml document that
  39. can be converted into svg in the output. All that is required is
  40. the element mapping for the xml and a converter that changes the
  41. document into svg. This conversion is done in the FO Tree. The
  42. conversion is done by the top level element of the namespace
  43. or in the case of an external image a Converter.
  44. </p>
  45. <p>
  46. XML Document - Instead of converting the document into svg it
  47. can be passed directly to the renderer. The renderer will need
  48. to have a handler for the xml document. This handler can add
  49. information directly to the output document.
  50. </p>
  51. <p>
  52. Output Document - This is used to add document level information
  53. to the output result. Such an extension will set information that
  54. is passed to the output document. The area tree handles these
  55. extensions and passs along the information to the renderer.
  56. The extension may contain resolveable objects. The extension
  57. can be passed to the renderer once resolve either immediately,
  58. after the next page or at the end of the document. This is so that
  59. the extension can be handled according to other associated data.
  60. </p>
  61. <p>
  62. FO Area - This is where an extension creates an normal or extended
  63. area in the Area Tree. This is useful when the normal FO objects
  64. cannot create the area in the way that is needed.
  65. </p>
  66. <p>
  67. Resolveable - In some cases it may require information to be
  68. resolved for information such as page numbers. This can apply
  69. to the XML Document, FO Area or output document extensions.
  70. </p>
  71. <ul>
  72. <li>Add a string ['(Continued)'] to a table header if the table spans
  73. multiple pages. These tables are part of the content and can start
  74. anywhere in the page.</li>
  75. <li>Separate page number display for a subsection. ie. - master document
  76. is page 4 of 7, but subsection is page 2 of 3.</li>
  77. </ul>
  78. </section>
  79. <section>
  80. <title>Examples</title>
  81. <p>
  82. Plan - The plan extension is a simple SVG graphic extension.
  83. Given a plan document either inside an InstreamForeignObject
  84. or as an external graphic, it converts the plan document into
  85. an svg graphic. The svg graphic is then passed through the
  86. Area Tree to the Renderer. The Renderer then renders the svg
  87. graphic as normal.
  88. </p>
  89. <p>
  90. PDF Outline - This is output document extension. If rendering to
  91. pdf and this extensionis used then the bookmark information is
  92. passed to the pdf document. This information is then set on the
  93. document.
  94. </p>
  95. <p>
  96. PDF Additions - This can be done with an XML Document extension.
  97. A simple xml document is defined that provides the appropriate
  98. information. When the document is rendered a handler converts the
  99. document into PDF markup.
  100. </p>
  101. <p>
  102. For example:</p>
  103. <source><![CDATA[<my:script-link script="app.execMenuItem('AcroSrch:Query');">
  104. Search
  105. </my:script-link>]]></source>
  106. <p>
  107. to result in a text box referencing the following PDF action:</p>
  108. <source><![CDATA[<<
  109. /S /JavaScript
  110. /JS (app.execMenuItem("AcroSrch:Query");)
  111. >>]]></source>
  112. </section>
  113. <section id="status">
  114. <title>Status</title>
  115. <section id="status-todo">
  116. <title>To Do</title>
  117. </section>
  118. <section id="status-wip">
  119. <title>Work In Progress</title>
  120. <ul>
  121. <li>mathml extension</li>
  122. <li>another xml -&gt; svg extension</li>
  123. <li>svg text normal text if that can be handled otherwise stroked this is done automatically</li>
  124. </ul>
  125. </section>
  126. <section id="status-complete">
  127. <title>Completed</title>
  128. <ul>
  129. <li>svg now in an xml handler, FOP can be used without batik</li>
  130. <li>bookmark extension improved a bit - changed bookmark extension, now requires a wrapping element bookmark</li>
  131. </ul>
  132. </section>
  133. </section>
  134. </body>
  135. </document>