vgritsenko    2002/06/04 17:42:21

  Modified:    src/webapp/docs/samples/svg Tag: cocoon_2_0_3_branch
                        henryV.svg
               src/java/org/apache/cocoon/serialization Tag:
                        cocoon_2_0_3_branch SVGSerializer.java
               src/java/org/apache/cocoon/xml/dom Tag: cocoon_2_0_3_branch
                        SVGBuilder.java
  Added:       lib/optional Tag: cocoon_2_0_3_branch batik-all-1.5b2.jar
  Removed:     lib/optional Tag: cocoon_2_0_3_branch batik-all-1.5b1.jar
  Log:
  Update Batik to version 1.5b2
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +7479 -0   xml-cocoon2/lib/optional/Attic/batik-all-1.5b2.jar
  
        <<Binary file>>
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +76 -184   xml-cocoon2/src/webapp/docs/samples/svg/henryV.svg
  
  Index: henryV.svg
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/svg/henryV.svg,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- henryV.svg        23 Jan 2002 16:24:08 -0000      1.2
  +++ henryV.svg        5 Jun 2002 00:42:21 -0000       1.2.2.1
  @@ -1,4 +1,6 @@
   <?xml version="1.0" standalone="no"?>
  +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
  +"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>
   
   <!-- ========================================================================= -->
   <!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
  @@ -12,194 +14,84 @@
   <!-- Test description here                                                     -->
   <!--                                                                           -->
   <!-- @author [EMAIL PROTECTED]                                         
-->
  -<!-- @version $Id: henryV.svg,v 1.2 2002/01/23 16:24:08 morrijr Exp $               
                                              -->
  +<!-- @version $Id: henryV.svg,v 1.2.2.1 2002/06/05 00:42:21 vgritsenko Exp $        
                                                     -->
   <!-- ========================================================================= -->
   
  -<svg width="450" height="500" viewBox="0 0 450 500"
  -  xmlns:xlink="http://www.w3.org/1999/xlink";>
  -  <title>Henry V</title>
  -
  -  <!-- ============================================================= -->
  -  <!-- Test content                                                  -->
  -  <!-- ============================================================= -->
  -  <defs>
  -    <filter
  -      id="blur"
  -      filterUnits="objectBoundingBox"
  -      primitiveUnits="objectBoundingBox"
  -      x="-20%"
  -      y="-20%"
  -      width="120%"
  -      height="120%">
  -      <feGaussianBlur
  -        stdDeviation="2 2"
  -        x="-10%"
  -        y="-10%"
  -        width="120%"
  -        height="120%"/>
  -    </filter>
  -    <filter
  -      id="wideBlur"
  -      filterUnits="objectBoundingBox"
  -      primitiveUnits="objectBoundingBox"
  -      x="-20%"
  -      y="-20%"
  -      width="120%"
  -      height="120%">
  -      <feGaussianBlur
  -        stdDeviation="8 8"
  -        x="-10%"
  -        y="-10%"
  -        width="120%"
  -        height="120%"/>
  -    </filter>
  -    <clipPath
  -      id="shakeSpeare"
  -      font-family="Serif"
  -      font-weight="bold"
  -      font-size="25%"
  -      text-anchor="middle"
  -      transform="scale(0.8, 1.5)">
  -      <text x="50%" y="28%">Henry</text>
  -      <text font-size="40%" x="50%" y="60%">V</text>
  -    </clipPath>
  -  </defs>
  -
  -  <rect
  -    width="100%"
  -    height="100%"
  -    fill="GoldenRod"/>
  -    
  -  <g id="testContent" transform="scale(1.2,1.0)">
  -    <g opacity="0.8" fill="Maroon">
  -      <g
  -        font-family="Serif"
  -        id="poem"
  -        font-style="oblique"
  -        font-size="3%"
  -        fill="DarkRed"
  -        transform="scale(1.10, 0.92)">
  -        <text x="3%" y="6%">O for a Muse of fire, that would ascend</text>
  -        <text x="3%" y="9%">The brightest heaven of invention,</text>
  -        <text x="3%" y="12%">A kingdom for a stage, princes to act</text>
  -        <text x="3%" y="15%">And monarchs to behold the swelling scene!</text>
  -        <text x="3%" y="18%">Then should the warlike Harry, like himself,</text>
  -        <text x="3%" y="21%">Assume the port of Mars; and at his heels,</text>
  -        <text x="3%" y="24%">Leash'd in like hounds, should famine, sword and 
fire</text>
  -        <text x="3%" y="27%">Crouch for employment. But pardon, and gentles 
all,</text>
  -        <text x="3%" y="30%">The flat unraised spirits that have dared</text>
  -        <text x="3%" y="33%">On this unworthy scaffold to bring forth</text>
  -        <text x="3%" y="36%">So great an object: can this cockpit hold</text>
  -        <text x="3%" y="39%">The vasty fields of France? or may we cram</text>
  -        <text x="3%" y="42%">Within this wooden O the very casques</text>
  -        <text x="3%" y="45%">That did affright the air at Agincourt?</text>
  -        <text x="3%" y="48%">O, pardon! since a crooked figure may</text>
  -        <text x="3%" y="51%">Attest in little place a million;</text>
  -        <text x="3%" y="54%">And let us, ciphers to this great accompt,</text>
  -        <text x="3%" y="57%">On your imaginary forces work.</text>
  -        <text x="3%" y="60%">Suppose within the girdle of these walls</text>
  -        <text x="3%" y="63%">Are now confined two mighty monarchies,</text>
  -        <text x="3%" y="66%">Whose high upreared and abutting fronts</text>
  -        <text x="3%" y="69%">The perilous narrow ocean parts asunder:</text>
  -        <text x="3%" y="72%">Piece out our imperfections with your thoughts;</text>
  -        <text x="3%" y="75%">Into a thousand parts divide on man,</text>
  -        <text x="3%" y="78%">And make imaginary puissance;</text>
  -        <text x="3%" y="81%">Think when we talk of horses, that you see them</text>
  -        <text x="3%" y="84%">Printing their proud hoofs i' the receiving 
earth;</text>
  -        <text x="3%" y="87%">For 'tis your thoughts that now must deck our 
kings,</text>
  -        <text x="3%" y="90%">Carry them here and there; jumping o'er times,</text>
  -        <text x="3%" y="93%">Turning the accomplishment of many years</text>
  -        <text x="3%" y="96%">Into an hour-glass: for the which supply,</text>
  -        <text x="3%" y="99%">Admit me Chorus to this history;</text>
  -        <text x="3%" y="102%">Who prologue-like your humble patience pray,</text>
  -        <text x="3%" y="105%">Gently to hear, kindly to judge, our play.</text>
  -      </g>
  -    </g>
  -    <g transform="translate(-1, -1)">
  -      <g
  -        font-family="Serif"
  -        font-weight="bold"
  -        font-size="25%"
  -        text-anchor="middle"
  -        id="henryV"
  -        transform="scale(0.8, 1.5)"
  -        fill="DarkGoldenRod"
  -        stroke-width="0.1"
  -        stroke="black">
  -        <text x="50%" y="28%">Henry</text>
  -        <text font-size="40%" x="50%" y="60%">V</text>
  -      </g>
  +<svg xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; 
width="450" height="500" viewBox="0 0 450 500">
  +<title>Henry V</title>
  +
  +    <!-- ============================================================= -->
  +    <!-- Test content                                                  -->
  +    <!-- ============================================================= -->
  +    <defs>
  +        <filter id="blur" filterUnits="objectBoundingBox" 
primitiveUnits="objectBoundingBox" x="-20%" y="-20%" width="120%" height="120%" > 
  +        <feGaussianBlur stdDeviation="2 2" x="-10%" y="-10%" width="120%" 
height="120%" /> 
  +        </filter>
  +        <filter id="wideBlur" filterUnits="objectBoundingBox" 
primitiveUnits="objectBoundingBox" x="-20%" y="-20%" width="120%" height="120%" > 
  +        <feGaussianBlur stdDeviation="8 8" x="-10%" y="-10%" width="120%" 
height="120%" /> 
  +        </filter>
  +        <clipPath id="shakeSpeare" font-family="Serif" font-weight="bold" 
font-size="125" text-anchor="middle" transform="scale(0.8, 1.5)">
  +           <text x="50%" y="28%">Henry</text>
  +           <text font-size="200" x="50%" y="60%">V</text>
  +        </clipPath>
  +
  +        <g font-family="Serif" font-weight="bold" font-size="125" 
text-anchor="middle" id="henryV" transform="scale(0.8, 1.5)">
  +           <text x="50%" y="28%">Henry</text>
  +           <text font-size="200" x="50%" y="60%">V</text>
  +        </g>
  +<g font-family="Serif" id="text" font-style="oblique" font-size="15" fill="DarkRed" 
transform="scale(1.10, 0.92)">
  +<text x="3%" y="6%">O for a Muse of fire, that would ascend</text>
  +<text x="3%" y="9%">The brightest heaven of invention,</text>
  +<text x="3%" y="12%">A kingdom for a stage, princes to act</text>
  +<text x="3%" y="15%">And monarchs to behold the swelling scene!</text>
  +<text x="3%" y="18%">Then should the warlike Harry, like himself,</text>
  +<text x="3%" y="21%">Assume the port of Mars; and at his heels,</text>
  +<text x="3%" y="24%">Leash'd in like hounds, should famine, sword and fire</text>
  +<text x="3%" y="27%">Crouch for employment. But pardon, and gentles all,</text>
  +<text x="3%" y="30%">The flat unraised spirits that have dared</text>
  +<text x="3%" y="33%">On this unworthy scaffold to bring forth</text>
  +<text x="3%" y="36%">So great an object: can this cockpit hold</text>
  +<text x="3%" y="39%">The vasty fields of France? or may we cram</text>
  +<text x="3%" y="42%">Within this wooden O the very casques</text>
  +<text x="3%" y="45%">That did affright the air at Agincourt?</text>
  +<text x="3%" y="48%">O, pardon! since a crooked figure may</text>
  +<text x="3%" y="51%">Attest in little place a million;</text>
  +<text x="3%" y="54%">And let us, ciphers to this great accompt,</text>
  +<text x="3%" y="57%">On your imaginary forces work.</text>
  +<text x="3%" y="60%">Suppose within the girdle of these walls</text>
  +<text x="3%" y="63%">Are now confined two mighty monarchies,</text>
  +<text x="3%" y="66%">Whose high upreared and abutting fronts</text>
  +<text x="3%" y="69%">The perilous narrow ocean parts asunder:</text>
  +<text x="3%" y="72%">Piece out our imperfections with your thoughts;</text>
  +<text x="3%" y="75%">Into a thousand parts divide on man,</text>
  +<text x="3%" y="78%">And make imaginary puissance;</text>
  +<text x="3%" y="81%">Think when we talk of horses, that you see them</text>
  +<text x="3%" y="84%">Printing their proud hoofs i' the receiving earth;</text>
  +<text x="3%" y="87%">For 'tis your thoughts that now must deck our kings,</text>
  +<text x="3%" y="90%">Carry them here and there; jumping o'er times,</text>
  +<text x="3%" y="93%">Turning the accomplishment of many years</text>
  +<text x="3%" y="96%">Into an hour-glass: for the which supply,</text>
  +<text x="3%" y="99%">Admit me Chorus to this history;</text>
  +<text x="3%" y="102%">Who prologue-like your humble patience pray,</text>
  +<text x="3%" y="105%">Gently to hear, kindly to judge, our play.</text>
       </g>
  -    <g clip-path="url(#shakeSpeare)" transform="translate(-1, -1)">
  -      <g
  -        font-family="Serif"
  -        id="poem"
  -        font-style="oblique"
  -        font-size="3%"
  -        fill="DarkRed"
  -        transform="scale(1.10, 0.92)">
  -        <text x="3%" y="6%">O for a Muse of fire, that would ascend</text>
  -        <text x="3%" y="9%">The brightest heaven of invention,</text>
  -        <text x="3%" y="12%">A kingdom for a stage, princes to act</text>
  -        <text x="3%" y="15%">And monarchs to behold the swelling scene!</text>
  -        <text x="3%" y="18%">Then should the warlike Harry, like himself,</text>
  -        <text x="3%" y="21%">Assume the port of Mars; and at his heels,</text>
  -        <text x="3%" y="24%">Leash'd in like hounds, should famine, sword and 
fire</text>
  -        <text x="3%" y="27%">Crouch for employment. But pardon, and gentles 
all,</text>
  -        <text x="3%" y="30%">The flat unraised spirits that have dared</text>
  -        <text x="3%" y="33%">On this unworthy scaffold to bring forth</text>
  -        <text x="3%" y="36%">So great an object: can this cockpit hold</text>
  -        <text x="3%" y="39%">The vasty fields of France? or may we cram</text>
  -        <text x="3%" y="42%">Within this wooden O the very casques</text>
  -        <text x="3%" y="45%">That did affright the air at Agincourt?</text>
  -        <text x="3%" y="48%">O, pardon! since a crooked figure may</text>
  -        <text x="3%" y="51%">Attest in little place a million;</text>
  -        <text x="3%" y="54%">And let us, ciphers to this great accompt,</text>
  -        <text x="3%" y="57%">On your imaginary forces work.</text>
  -        <text x="3%" y="60%">Suppose within the girdle of these walls</text>
  -        <text x="3%" y="63%">Are now confined two mighty monarchies,</text>
  -        <text x="3%" y="66%">Whose high upreared and abutting fronts</text>
  -        <text x="3%" y="69%">The perilous narrow ocean parts asunder:</text>
  -        <text x="3%" y="72%">Piece out our imperfections with your thoughts;</text>
  -        <text x="3%" y="75%">Into a thousand parts divide on man,</text>
  -        <text x="3%" y="78%">And make imaginary puissance;</text>
  -        <text x="3%" y="81%">Think when we talk of horses, that you see them</text>
  -        <text x="3%" y="84%">Printing their proud hoofs i' the receiving 
earth;</text>
  -        <text x="3%" y="87%">For 'tis your thoughts that now must deck our 
kings,</text>
  -        <text x="3%" y="90%">Carry them here and there; jumping o'er times,</text>
  -        <text x="3%" y="93%">Turning the accomplishment of many years</text>
  -        <text x="3%" y="96%">Into an hour-glass: for the which supply,</text>
  -        <text x="3%" y="99%">Admit me Chorus to this history;</text>
  -        <text x="3%" y="102%">Who prologue-like your humble patience pray,</text>
  -        <text x="3%" y="105%">Gently to hear, kindly to judge, our play.</text>
  -      </g>
  -      <g font-style="normal" transform="translate(-2, 2)">
  -        <g
  -          font-family="Serif"
  -          font-weight="bold"
  -          font-size="25%"
  -          text-anchor="middle"
  -          id="henryV"
  -          transform="scale(0.8, 1.5)"
  -          fill="none"
  -          stroke-width="4"
  -          stroke="black"
  -          filter="url(#blur)"
  -          opacity="0.35">
  -          <text x="50%" y="28%">Henry</text>
  -          <text font-size="40%" x="50%" y="60%">V</text>
  +    </defs>
  +    <rect width="100%" height="100%" fill="GoldenRod"/>
  +    <g id="testContent" transform="scale(1.2,1.0)">       
  +        <g opacity="0.8" fill="Maroon">
  +            <use xlink:href="#text"/>
  +        </g>
  +        <g transform="translate(-1, -1)">
  +          <use xlink:href="#henryV" fill="DarkGoldenRod" stroke-width="0.1" 
stroke="black"/>
  +        </g>
  +        <g clip-path="url(#shakeSpeare)" transform="translate(-1, -1)">
  +            <use xlink:href="#text"/>
  +            <g font-style="normal">
  +            <use xlink:href="#henryV" fill="none" stroke-width="4" stroke="black" 
filter="url(#blur)" opacity="0.35" transform="translate(-2, 2)"/>
  +            </g>
           </g>
  -      </g>
       </g>
  -  </g>
  -  <rect
  -    x="0%"
  -    y="0%"
  -    width="100%"
  -    height="100%"
  -    stroke="SaddleBrown"
  -    stroke-width="12"
  -    fill="none"
  -    filter="url(#wideBlur)"/>
  +    <rect x="0%" y="0%" width="100%" height="100%" stroke="SaddleBrown" 
stroke-width="12" fill="none" filter="url(#wideBlur)"/>
   
  +    
   </svg>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.1   +2 -2      
xml-cocoon2/src/java/org/apache/cocoon/serialization/SVGSerializer.java
  
  Index: SVGSerializer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/SVGSerializer.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- SVGSerializer.java        22 Feb 2002 07:03:55 -0000      1.5
  +++ SVGSerializer.java        5 Jun 2002 00:42:21 -0000       1.5.2.1
  @@ -81,7 +81,7 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.ext.LexicalHandler;
   
  -import java.awt.*;
  +import java.awt.Color;
   import java.io.BufferedOutputStream;
   import java.io.OutputStream;
   
  @@ -90,7 +90,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Davanum Srinivas</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Ross Burton</a>
  - * @version CVS $Id: SVGSerializer.java,v 1.5 2002/02/22 07:03:55 cziegeler Exp $
  + * @version CVS $Id: SVGSerializer.java,v 1.5.2.1 2002/06/05 00:42:21 vgritsenko 
Exp $
    */
   public class SVGSerializer extends SVGBuilder
   implements Composable, Serializer, Configurable, Poolable, Cacheable, 
Contextualizable {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.1   +9 -3      xml-cocoon2/src/java/org/apache/cocoon/xml/dom/SVGBuilder.java
  
  Index: SVGBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/xml/dom/SVGBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- SVGBuilder.java   22 Feb 2002 07:03:59 -0000      1.4
  +++ SVGBuilder.java   5 Jun 2002 00:42:21 -0000       1.4.2.1
  @@ -51,9 +51,10 @@
   package org.apache.cocoon.xml.dom;
   
   import org.apache.avalon.framework.logger.Loggable;
  -import org.apache.batik.css.CSSDocumentHandler;
   import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
   import org.apache.batik.dom.svg.SVGDOMImplementation;
  +import org.apache.batik.util.XMLResourceDescriptor;
  +
   import org.apache.cocoon.xml.XMLConsumer;
   import org.apache.log.Logger;
   import org.w3c.dom.Document;
  @@ -64,7 +65,7 @@
    * SVG-DOM Document from SAX events using Batik's SVGDocumentFactory.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Davanum Srinivas</a>
  - * @version CVS $Id: SVGBuilder.java,v 1.4 2002/02/22 07:03:59 cziegeler Exp $
  + * @version CVS $Id: SVGBuilder.java,v 1.4.2.1 2002/06/05 00:42:21 vgritsenko Exp $
    */
   public class SVGBuilder extends SAXSVGDocumentFactory implements XMLConsumer, 
Loggable {
       protected Logger log;
  @@ -76,7 +77,12 @@
           "org.apache.batik.css.parser.Parser";
   
       static {
  -        CSSDocumentHandler.setParserClassName(CSS_PARSER_CLASS_NAME);
  +        /* Batik 1.5b1 and below:
  +        
org.apache.batik.css.CSSDocumentHandler.CSSDocumentHandler.setParserClassName(CSS_PARSER_CLASS_NAME);
  +        */
  +
  +        // VG: Is it required?
  +        XMLResourceDescriptor.setCSSParserClassName(CSS_PARSER_CLASS_NAME);
       }
   
       /**
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to