home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / svgjpeg-serializer.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.4 KB  |  103 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18.  
  19. <document>
  20.   <header>
  21.     <title>SVG/JPEG Serializer</title>
  22.     <version>0.9</version>
  23.     <type>Technical document</type>
  24.     <authors>
  25.       <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
  26.       <person name="Bernhard Huber" email="huber@apache.org"/>
  27.     </authors>
  28.     <abstract>This document describes the svg/jpeg serializer of Cocoon.</abstract>
  29.   </header>
  30.   <body>
  31.   <s1 title="SVG/JPEG Serializer">
  32.     <p>
  33.       The SVG/JPEG serializes an xml svg document to a jpeg image.
  34.       The serialization uses the Batik's JPEGTranscoder internally.
  35.     </p>
  36.     <ul>
  37.       <li>Name : svg2jpeg</li>
  38.       <li>Class: org.apache.cocoon.serialization.SVGSerializer</li>
  39.       <li>Cacheable: yes</li>
  40.     </ul>
  41.     <s2 title="Sitemap Configuration">
  42.       <p>
  43.         A minimal sitemap configuration snippet declaring the svg2jpeg serializer:
  44.       </p>
  45.       <source><![CDATA[
  46. <map:serializers..
  47.   <map:serializer name="svg2jpeg"
  48.     src="org.apache.cocoon.serialization.SVGSerializer"
  49.     mime-type="image/jpeg"
  50.     logger="sitemap.serializer.svg2jpeg"
  51.   >
  52.   </map:serializer>
  53. ]]></source>
  54.       <p>
  55.         A sitemap pipeline snippet using the svg2jpeg serializer:
  56.       </p>
  57.       <source><![CDATA[
  58. <map:match pattern="svg/*.jpg">
  59.   <map:generate src="docs/samples/svg/{1}.svg"/>
  60.   <map:serialize type="svg2jpeg"/>
  61. </map:match>
  62. ]]></source>
  63.       <p>
  64.         In the declaration section of the svg2jpeg a number of parameters can be specified.
  65.         The following snippet set the background color explicitly:
  66.       </p>
  67.       <source><![CDATA[
  68. <map:serializers..
  69.   <map:serializer name="svg2jpeg"
  70.     src="org.apache.cocoon.serialization.SVGSerializer"
  71.     mime-type="image/jpeg"
  72.     logger="sitemap.serializer.svg2jpeg"
  73.   >
  74.     <parameter name="background_color" type="color" value="#ff00ff"/>
  75.   </map:serializer>
  76. ]]></source>
  77.     </s2>
  78.     <s2 title="JPEGTranscoder Parameters">
  79.       <p>
  80.         General ImageTranscoder parameters are described
  81.         at the <link href="svg-serializer.html">SVG Serializer</link> user documentation.
  82.       </p>
  83.       <p>
  84.         The following section presents JPEGTranscoder specific parameters configurable for the JPEGTranscoder.
  85.       </p>
  86.       <table>
  87.         <tr><th>Parameter</th><th>Type</th><th>Comment</th></tr>
  88.         <tr><td>quality</td><td>float</td><td>Specifies the JPEG quality as value between 0.0 and 1.0,
  89.           1.0 specifies highest quality. Usually a value of 0.9 is choosen.</td>
  90.         </tr>
  91.       </table>
  92.     </s2>
  93.     <s2 title="Further Reading">
  94.       <p>
  95.         Further details about JPEGTranscoder, ImageTranscoder is available 
  96.         at <link href="http://xml.apache.org/batik">Batik</link>.
  97.       </p>
  98.     </s2>
  99.   </s1>
  100.   </body>
  101. </document>
  102.  
  103.