You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@locus.apache.org on 2000/08/29 01:54:40 UTC

cvs commit: xml-fop/src/org/apache/fop/svg SVGDriver.java SVGObj.java A.java AltGlyph.java Animate.java AnimateColor.java AnimateMotion.java AnimateTransform.java Circle.java ClipPath.java Cursor.java Defs.java Desc.java Ellipse.java Filter.java Font.java G.java Glyph.java GraphicsCreator.java HKern.java Image.java Line.java LinearGradient.java Marker.java Mask.java MissingGlyph.java Path.java Pattern.java Polygon.java Polyline.java RadialGradient.java Rect.java SVG.java SVGElementMapping.java SVGLengthListProperty.java SVGPropertyListMapping.java SVGStyle.java SVGTransform.java Set.java Stop.java Style.java Switch.java Symbol.java TRef.java TSpan.java Text.java TextElement.java TextPath.java Title.java Use.java VKern.java

keiron      00/08/28 16:54:39

  Modified:    src/org/apache/fop/svg A.java AltGlyph.java Animate.java
                        AnimateColor.java AnimateMotion.java
                        AnimateTransform.java Circle.java ClipPath.java
                        Cursor.java Defs.java Desc.java Ellipse.java
                        Filter.java Font.java G.java Glyph.java
                        GraphicsCreator.java HKern.java Image.java
                        Line.java LinearGradient.java Marker.java Mask.java
                        MissingGlyph.java Path.java Pattern.java
                        Polygon.java Polyline.java RadialGradient.java
                        Rect.java SVG.java SVGElementMapping.java
                        SVGLengthListProperty.java
                        SVGPropertyListMapping.java SVGStyle.java
                        SVGTransform.java Set.java Stop.java Style.java
                        Switch.java Symbol.java TRef.java TSpan.java
                        Text.java TextElement.java TextPath.java Title.java
                        Use.java VKern.java
  Added:       src/org/apache/fop/svg SVGDriver.java SVGObj.java
  Log:
  remove layout and makes all elements return an SVGElement
  
  Revision  Changes    Path
  1.3       +6 -26     xml-fop/src/org/apache/fop/svg/A.java
  
  Index: A.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/A.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- A.java	2000/08/14 01:37:09	1.2
  +++ A.java	2000/08/28 23:54:07	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: A.java,v 1.2 2000/08/14 01:37:09 keiron Exp $ -- 
  +/*-- $Id: A.java,v 1.3 2000/08/28 23:54:07 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,11 +59,13 @@
   
   import org.apache.fop.dom.svg.*;
   
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:a pseudo flow object.
    *
    */
  -public class A extends FObj implements GraphicsCreator {
  +public class A extends SVGObj {
   
   	/**
   	 * inner class for making A objects.
  @@ -104,7 +106,7 @@
   		this.name = "svg:a";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		String rf = this.properties.get("xlink:href").getString();
   		SVGAElementImpl graphic;
  @@ -115,34 +117,12 @@
   		for (int i = 0; i < numChildren; i++) {
   			FONode child = (FONode) children.elementAt(i);
   			if(child instanceof GraphicsCreator) {
  -				GraphicImpl impl = ((GraphicsCreator)child).createGraphic();
  +				SVGElement impl = ((GraphicsCreator)child).createGraphic();
   				graphic.appendChild((GraphicElement)impl);
   			} else if(child instanceof Defs) {
   			}
   		}
   
   		return graphic;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:a outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -24     xml-fop/src/org/apache/fop/svg/AltGlyph.java
  
  Index: AltGlyph.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/AltGlyph.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AltGlyph.java	2000/07/11 05:09:27	1.1
  +++ AltGlyph.java	2000/08/28 23:54:07	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: AltGlyph.java,v 1.1 2000/07/11 05:09:27 keiron Exp $ -- 
  +/*-- $Id: AltGlyph.java,v 1.2 2000/08/28 23:54:07 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:altGlyph pseudo flow object.
    *
    */
  -public class AltGlyph extends FObj {
  +public class AltGlyph extends SVGObj {
   
   	/**
   	 * inner class for making AltGlyph objects.
  @@ -102,27 +102,5 @@
   	protected AltGlyph(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:altGlyph";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -//			((SVGArea) area).addGraphic(new AltGlyphGraphic(x1, y1, x2, y2));
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:altGlyph outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -24     xml-fop/src/org/apache/fop/svg/Animate.java
  
  Index: Animate.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Animate.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Animate.java	2000/07/11 05:09:27	1.1
  +++ Animate.java	2000/08/28 23:54:07	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Animate.java,v 1.1 2000/07/11 05:09:27 keiron Exp $ -- 
  +/*-- $Id: Animate.java,v 1.2 2000/08/28 23:54:07 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Animate pseudo flow object.
    *
    */
  -public class Animate extends FObj {
  +public class Animate extends SVGObj {
   
   	/**
   	 * inner class for making Animate objects.
  @@ -102,27 +102,5 @@
   	protected Animate(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:animate";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -//			((SVGArea) area).addGraphic(new AnimateGraphic(x1, y1, x2, y2));
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:animate outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -24     xml-fop/src/org/apache/fop/svg/AnimateColor.java
  
  Index: AnimateColor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/AnimateColor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AnimateColor.java	2000/07/11 05:09:28	1.1
  +++ AnimateColor.java	2000/08/28 23:54:08	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: AnimateColor.java,v 1.1 2000/07/11 05:09:28 keiron Exp $ -- 
  +/*-- $Id: AnimateColor.java,v 1.2 2000/08/28 23:54:08 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:AnimateColor pseudo flow object.
    *
    */
  -public class AnimateColor extends FObj {
  +public class AnimateColor extends SVGObj {
   
   	/**
   	 * inner class for making AnimateColor objects.
  @@ -102,27 +102,5 @@
   	protected AnimateColor(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:animateColor";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a AnimateColor to the SVGArea */
  -//			((SVGArea) area).addGraphic(new AnimateColorGraphic(x1, y1, x2, y2));
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:animateColor outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -24     xml-fop/src/org/apache/fop/svg/AnimateMotion.java
  
  Index: AnimateMotion.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/AnimateMotion.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AnimateMotion.java	2000/07/11 05:09:28	1.1
  +++ AnimateMotion.java	2000/08/28 23:54:08	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: AnimateMotion.java,v 1.1 2000/07/11 05:09:28 keiron Exp $ -- 
  +/*-- $Id: AnimateMotion.java,v 1.2 2000/08/28 23:54:08 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:AnimateMotion pseudo flow object.
    *
    */
  -public class AnimateMotion extends FObj {
  +public class AnimateMotion extends SVGObj {
   
   	/**
   	 * inner class for making AnimateMotion objects.
  @@ -102,27 +102,5 @@
   	protected AnimateMotion(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:animateMotion";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a AnimateMotion to the SVGArea */
  -//			((SVGArea) area).addGraphic(new AnimateMotionGraphic(x1, y1, x2, y2));
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:animateMotion outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -24     xml-fop/src/org/apache/fop/svg/AnimateTransform.java
  
  Index: AnimateTransform.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/AnimateTransform.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AnimateTransform.java	2000/07/11 05:09:28	1.1
  +++ AnimateTransform.java	2000/08/28 23:54:09	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: AnimateTransform.java,v 1.1 2000/07/11 05:09:28 keiron Exp $ -- 
  +/*-- $Id: AnimateTransform.java,v 1.2 2000/08/28 23:54:09 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:AnimateTransform pseudo flow object.
    *
    */
  -public class AnimateTransform extends FObj {
  +public class AnimateTransform extends SVGObj {
   
   	/**
   	 * inner class for making AnimateTransform objects.
  @@ -102,27 +102,5 @@
   	protected AnimateTransform(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:animateTransform";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -//			((SVGArea) area).addGraphic(new AnimateTransformGraphic(x1, y1, x2, y2));
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:animateTransform outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.3       +6 -26     xml-fop/src/org/apache/fop/svg/Circle.java
  
  Index: Circle.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Circle.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Circle.java	2000/07/18 05:37:09	1.2
  +++ Circle.java	2000/08/28 23:54:09	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: Circle.java,v 1.2 2000/07/18 05:37:09 keiron Exp $ -- 
  +/*-- $Id: Circle.java,v 1.3 2000/08/28 23:54:09 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,11 +63,13 @@
   import org.apache.fop.dom.svg.SVGArea;
   
   import org.w3c.dom.svg.SVGLength;
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:Circle pseudo flow object.
    *
    */
  -public class Circle extends FObj implements GraphicsCreator {
  +public class Circle extends SVGObj {
   
   	/**
   	 * inner class for making Circle objects.
  @@ -108,7 +110,7 @@
   		this.name = "svg:circle";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		/* retrieve properties */
   		SVGLength cx = ((SVGLengthProperty)this.properties.get("cx")).getSVGLength();
  @@ -119,30 +121,8 @@
   		graph.setCy(new SVGAnimatedLengthImpl(cy));
   		graph.setR(new SVGAnimatedLengthImpl(r));
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:circle outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +8 -27     xml-fop/src/org/apache/fop/svg/ClipPath.java
  
  Index: ClipPath.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/ClipPath.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClipPath.java	2000/07/11 05:09:28	1.1
  +++ ClipPath.java	2000/08/28 23:54:09	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: ClipPath.java,v 1.1 2000/07/11 05:09:28 keiron Exp $ -- 
  +/*-- $Id: ClipPath.java,v 1.2 2000/08/28 23:54:09 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,11 +59,14 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:ClipPath pseudo flow object.
    *
    */
  -public class ClipPath extends FObj implements GraphicsCreator {
  +public class ClipPath extends SVGObj {
   
   	/**
   	 * inner class for making ClipPath objects.
  @@ -110,40 +113,18 @@
   		super.addChild(child);
   		if(child instanceof GraphicsCreator) {
   			GraphicsCreator gc = (GraphicsCreator)child;
  -			GraphicImpl graph = gc.createGraphic();
  +			SVGElement graph = gc.createGraphic();
   			clippath.addElement(graph);
  -			graph.setParent(clippath);
  +//			graph.setParent(clippath);
   		} else {
   			// error
   		}
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		clippath.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
   		clippath.setId(this.properties.get("id").getString());
   		return clippath;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:clipPath outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/Cursor.java
  
  Index: Cursor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Cursor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Cursor.java	2000/07/11 05:09:28	1.1
  +++ Cursor.java	2000/08/28 23:54:10	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Cursor.java,v 1.1 2000/07/11 05:09:28 keiron Exp $ -- 
  +/*-- $Id: Cursor.java,v 1.2 2000/08/28 23:54:10 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -62,7 +62,7 @@
   /**
    *
    */
  -public class Cursor extends FObj {
  +public class Cursor extends SVGObj {
   
   	/**
   	 * inner class for making Cursor objects.
  @@ -101,28 +101,5 @@
   	protected Cursor(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:cursor";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGCursorElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:cursor outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +9 -29     xml-fop/src/org/apache/fop/svg/Defs.java
  
  Index: Defs.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Defs.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Defs.java	2000/07/11 05:09:28	1.1
  +++ Defs.java	2000/08/28 23:54:10	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Defs.java,v 1.1 2000/07/11 05:09:28 keiron Exp $ -- 
  +/*-- $Id: Defs.java,v 1.2 2000/08/28 23:54:10 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,7 +59,7 @@
   
   import java.util.*;
   
  -import org.w3c.dom.svg.SVGElement;
  +import org.w3c.dom.svg.*;
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  @@ -67,7 +67,7 @@
    * class representing svg:Defs pseudo flow object.
    *
    */
  -public class Defs extends FObj {
  +public class Defs extends SVGObj {
   
   	/**
   	 * inner class for making Defs objects.
  @@ -108,19 +108,21 @@
   		this.name = "svg:defs";
   	}
   
  -	Hashtable defs = new Hashtable();
  +//	Hashtable defs = new Hashtable();
   
  -	public Hashtable createDefs()
  +	public SVGElement createGraphic()
   	{
  +	    SVGDefsElement defs = new SVGDefsElementImpl();
   		int numChildren = this.children.size();
   		for (int i = 0; i < numChildren; i++) {
   			FONode child = (FONode) children.elementAt(i);
   			if(child instanceof GraphicsCreator) {
  -				GraphicImpl gi = ((GraphicsCreator)child).createGraphic();
  +				SVGElement gi = ((GraphicsCreator)child).createGraphic();
   				if(gi instanceof SVGElement) {
  +				    defs.appendChild((SVGElement)gi);
   					String id = ((SVGElement)gi).getId();
   					if(!id.equals("")) {
  -						defs.put(id, gi);
  +//						defs.put(id, gi);
   					} else {
   						// no id
   						System.err.println("WARNING No ID for defs element : " + gi);
  @@ -129,27 +131,5 @@
   			}
   		}
   		return defs;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addDefs(createDefs());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:defs outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -2      xml-fop/src/org/apache/fop/svg/Desc.java
  
  Index: Desc.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Desc.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Desc.java	2000/07/11 05:09:28	1.1
  +++ Desc.java	2000/08/28 23:54:11	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Desc.java,v 1.1 2000/07/11 05:09:28 keiron Exp $ -- 
  +/*-- $Id: Desc.java,v 1.2 2000/08/28 23:54:11 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,7 +61,7 @@
    * class representing svg:Desc pseudo flow object.
    *
    */
  -public class Desc extends FObj {
  +public class Desc extends SVGObj {
   
   	/**
   	 * inner class for making Desc objects.
  
  
  
  1.3       +6 -27     xml-fop/src/org/apache/fop/svg/Ellipse.java
  
  Index: Ellipse.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Ellipse.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Ellipse.java	2000/07/18 05:37:10	1.2
  +++ Ellipse.java	2000/08/28 23:54:11	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: Ellipse.java,v 1.2 2000/07/18 05:37:10 keiron Exp $ -- 
  +/*-- $Id: Ellipse.java,v 1.3 2000/08/28 23:54:11 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,11 +61,13 @@
   import org.apache.fop.dom.svg.SVGArea;
   
   import org.w3c.dom.svg.SVGLength;
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:Ellipse pseudo flow object.
    *
    */
  -public class Ellipse extends FObj implements GraphicsCreator {
  +public class Ellipse extends SVGObj {
   
   	/**
   	 * inner class for making Ellipse objects.
  @@ -106,7 +108,7 @@
   		this.name = "svg:ellipse";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		/* retrieve properties */
   		SVGLength cx = ((SVGLengthProperty)this.properties.get("cx")).getSVGLength();
  @@ -119,31 +121,8 @@
   		graph.setRx(new SVGAnimatedLengthImpl(rx));
   		graph.setRy(new SVGAnimatedLengthImpl(ry));
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:ellipse outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/Filter.java
  
  Index: Filter.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Filter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Filter.java	2000/07/11 05:09:29	1.1
  +++ Filter.java	2000/08/28 23:54:11	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Filter.java,v 1.1 2000/07/11 05:09:29 keiron Exp $ -- 
  +/*-- $Id: Filter.java,v 1.2 2000/08/28 23:54:11 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Filter pseudo flow object.
    *
    */
  -public class Filter extends FObj {
  +public class Filter extends SVGObj {
   
   	/**
   	 * inner class for making Filter objects.
  @@ -102,28 +102,5 @@
   	protected Filter(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:filter";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGFilterElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:filter outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/Font.java
  
  Index: Font.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Font.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Font.java	2000/07/11 05:09:29	1.1
  +++ Font.java	2000/08/28 23:54:12	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Font.java,v 1.1 2000/07/11 05:09:29 keiron Exp $ -- 
  +/*-- $Id: Font.java,v 1.2 2000/08/28 23:54:12 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Font pseudo flow object.
    *
    */
  -public class Font extends FObj {
  +public class Font extends SVGObj {
   
   	/**
   	 * inner class for making Font objects.
  @@ -102,28 +102,5 @@
   	protected Font(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:font";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGFontElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:font outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +11 -29    xml-fop/src/org/apache/fop/svg/G.java
  
  Index: G.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/G.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- G.java	2000/07/11 05:09:29	1.1
  +++ G.java	2000/08/28 23:54:12	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: G.java,v 1.1 2000/07/11 05:09:29 keiron Exp $ -- 
  +/*-- $Id: G.java,v 1.2 2000/08/28 23:54:12 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,11 +59,14 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:G pseudo flow object.
    *
    */
  -public class G extends FObj implements GraphicsCreator {
  +public class G extends SVGObj {
   
   	/**
   	 * inner class for making G objects.
  @@ -106,44 +109,23 @@
   
   	SVGGElementImpl ggraphic = new SVGGElementImpl();
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
  -		ggraphic.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		ggraphic.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		ggraphic.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
   		ggraphic.setId(this.properties.get("id").getString());
   		int numChildren = this.children.size();
   		for (int i = 0; i < numChildren; i++) {
   			FONode child = (FONode) children.elementAt(i);
   			if(child instanceof GraphicsCreator) {
  -				GraphicImpl impl = ((GraphicsCreator)child).createGraphic();
  -				ggraphic.addGraphic(impl);
  +				SVGElement impl = ((GraphicsCreator)child).createGraphic();
  +				if(impl != null)
  +					ggraphic.appendChild(impl);
   			} else if(child instanceof Defs) {
   //				System.out.println(child);
  -				ggraphic.addDefs(((Defs)child).createDefs());
  +//				ggraphic.addDefs(((Defs)child).createDefs());
   			}
   		}
   		return ggraphic;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException
  -	{		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a G to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:g outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/Glyph.java
  
  Index: Glyph.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Glyph.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Glyph.java	2000/07/11 05:09:29	1.1
  +++ Glyph.java	2000/08/28 23:54:12	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Glyph.java,v 1.1 2000/07/11 05:09:29 keiron Exp $ -- 
  +/*-- $Id: Glyph.java,v 1.2 2000/08/28 23:54:12 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Glyph pseudo flow object.
    *
    */
  -public class Glyph extends FObj {
  +public class Glyph extends SVGObj {
   
   	/**
   	 * inner class for making Glyph objects.
  @@ -102,28 +102,5 @@
   	protected Glyph(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:glyph";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGGlyphElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:glyph outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +4 -2      xml-fop/src/org/apache/fop/svg/GraphicsCreator.java
  
  Index: GraphicsCreator.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/GraphicsCreator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GraphicsCreator.java	2000/07/11 05:09:30	1.1
  +++ GraphicsCreator.java	2000/08/28 23:54:13	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: GraphicsCreator.java,v 1.1 2000/07/11 05:09:30 keiron Exp $ -- 
  +/*-- $Id: GraphicsCreator.java,v 1.2 2000/08/28 23:54:13 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -53,9 +53,11 @@
   
   import org.apache.fop.dom.svg.*;
   
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    *
    */
   public interface GraphicsCreator {
  -	public GraphicImpl createGraphic();
  +	public SVGElement createGraphic();
   }
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/HKern.java
  
  Index: HKern.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/HKern.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HKern.java	2000/07/11 05:09:30	1.1
  +++ HKern.java	2000/08/28 23:54:13	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: HKern.java,v 1.1 2000/07/11 05:09:30 keiron Exp $ -- 
  +/*-- $Id: HKern.java,v 1.2 2000/08/28 23:54:13 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -62,7 +62,7 @@
   /**
    *
    */
  -public class HKern extends FObj {
  +public class HKern extends SVGObj {
   
   	/**
   	 * inner class for making HKern objects.
  @@ -101,28 +101,5 @@
   	protected HKern(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:hkern";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGHKernElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:hkern outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +6 -24     xml-fop/src/org/apache/fop/svg/Image.java
  
  Index: Image.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Image.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Image.java	2000/07/11 05:09:30	1.1
  +++ Image.java	2000/08/28 23:54:14	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Image.java,v 1.1 2000/07/11 05:09:30 keiron Exp $ -- 
  +/*-- $Id: Image.java,v 1.2 2000/08/28 23:54:14 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,11 +59,14 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:Image pseudo flow object.
    *
    */
  -public class Image extends FObj implements GraphicsCreator {
  +public class Image extends SVGObj {
   
   	/**
   	 * inner class for making Image objects.
  @@ -104,7 +107,7 @@
   		this.name = "svg:image";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		String link = this.properties.get("xlink:href").getString();
   		float x = ((SVGLengthProperty)this.properties.get("x")).getSVGLength().getValue();
  @@ -115,26 +118,5 @@
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a Image to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:image outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.10      +7 -27     xml-fop/src/org/apache/fop/svg/Line.java
  
  Index: Line.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Line.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Line.java	2000/07/18 05:37:10	1.9
  +++ Line.java	2000/08/28 23:54:14	1.10
  @@ -1,4 +1,4 @@
  -/*-- $Id: Line.java,v 1.9 2000/07/18 05:37:10 keiron Exp $ -- 
  +/*-- $Id: Line.java,v 1.10 2000/08/28 23:54:14 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,13 +61,15 @@
   import org.w3c.dom.svg.SVGLength;
   
   import org.apache.fop.dom.svg.*;
  -//import org.apache.fop.dom.svg.Graphic;
   import org.apache.fop.dom.svg.SVGLineElementImpl;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:line pseudo flow object.
    */
  -public class Line extends FObj implements GraphicsCreator {
  +public class Line extends SVGObj {
   
   	/**
   	 * inner class for making Line objects.
  @@ -108,7 +110,7 @@
   		this.name = "svg:line";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		/* retrieve properties */
   		SVGLength x1 = ((SVGLengthProperty)this.properties.get("x1")).getSVGLength();
  @@ -121,30 +123,8 @@
   		graph.setX2(new SVGAnimatedLengthImpl(x2));
   		graph.setY2(new SVGAnimatedLengthImpl(y2));
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -	    MessageHandler.errorln("WARNING: svg:line outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.3       +4 -4      xml-fop/src/org/apache/fop/svg/LinearGradient.java
  
  Index: LinearGradient.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/LinearGradient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LinearGradient.java	2000/07/18 05:37:10	1.2
  +++ LinearGradient.java	2000/08/28 23:54:15	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: LinearGradient.java,v 1.2 2000/07/18 05:37:10 keiron Exp $ -- 
  +/*-- $Id: LinearGradient.java,v 1.3 2000/08/28 23:54:15 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -66,7 +66,7 @@
    * class representing svg:LinearGradient pseudo flow object.
    *
    */
  -public class LinearGradient extends FObj implements GraphicsCreator {
  +public class LinearGradient extends SVGObj {
   
   	/**
   	 * inner class for making LinearGradient objects.
  @@ -117,10 +117,10 @@
   		}
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		linear.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		linear.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		linear.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		linear.setId(this.properties.get("id").getString());
   
   		linear.setX1(new SVGAnimatedLengthImpl(((SVGLengthProperty)this.properties.get("x1")).getSVGLength()));
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/Marker.java
  
  Index: Marker.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Marker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Marker.java	2000/07/11 05:09:33	1.1
  +++ Marker.java	2000/08/28 23:54:15	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Marker.java,v 1.1 2000/07/11 05:09:33 keiron Exp $ -- 
  +/*-- $Id: Marker.java,v 1.2 2000/08/28 23:54:15 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Marker pseudo flow object.
    *
    */
  -public class Marker extends FObj {
  +public class Marker extends SVGObj {
   
   	/**
   	 * inner class for making Marker objects.
  @@ -102,28 +102,5 @@
   	protected Marker(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:marker";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGMarkerElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:marker outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +11 -26    xml-fop/src/org/apache/fop/svg/Mask.java
  
  Index: Mask.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Mask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Mask.java	2000/07/11 05:09:34	1.1
  +++ Mask.java	2000/08/28 23:54:16	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Mask.java,v 1.1 2000/07/11 05:09:34 keiron Exp $ -- 
  +/*-- $Id: Mask.java,v 1.2 2000/08/28 23:54:16 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -58,11 +58,14 @@
   import org.apache.fop.apps.FOPException;
   
   import org.apache.fop.dom.svg.*;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:Mask pseudo flow object.
    *
    */
  -public class Mask extends FObj {
  +public class Mask extends SVGObj {
   
   	/**
   	 * inner class for making Mask objects.
  @@ -109,38 +112,20 @@
   		super.addChild(child);
   		if(child instanceof GraphicsCreator) {
   			GraphicsCreator gc = (GraphicsCreator)child;
  -			GraphicImpl graph = gc.createGraphic();
  -			mask.addElement(graph);
  -			graph.setParent(mask);
  +			SVGElement graph = gc.createGraphic();
  +			if(graph != null) {
  +	    		mask.addElement(graph);
  +//    			graph.setParent(mask);
  +		    }
   		} else {
   			// error
   		}
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		mask.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
   		mask.setId(this.properties.get("id").getString());
   		return mask;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:mask outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -26     xml-fop/src/org/apache/fop/svg/MissingGlyph.java
  
  Index: MissingGlyph.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/MissingGlyph.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MissingGlyph.java	2000/07/11 05:09:34	1.1
  +++ MissingGlyph.java	2000/08/28 23:54:16	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: MissingGlyph.java,v 1.1 2000/07/11 05:09:34 keiron Exp $ -- 
  +/*-- $Id: MissingGlyph.java,v 1.2 2000/08/28 23:54:16 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -62,7 +62,7 @@
   /**
    *
    */
  -public class MissingGlyph extends FObj {
  +public class MissingGlyph extends SVGObj {
   
   	/**
   	 * inner class for making MissingGlyph objects.
  @@ -101,29 +101,5 @@
   	protected MissingGlyph(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:missing-glyph";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGMissingGlyphElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:missing-glyph outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +7 -26     xml-fop/src/org/apache/fop/svg/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Path.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Path.java	2000/07/11 05:09:34	1.1
  +++ Path.java	2000/08/28 23:54:16	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Path.java,v 1.1 2000/07/11 05:09:34 keiron Exp $ -- 
  +/*-- $Id: Path.java,v 1.2 2000/08/28 23:54:16 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,11 +61,14 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:Path pseudo flow object.
    *
    */
  -public class Path extends FObj implements GraphicsCreator {
  +public class Path extends SVGObj {
   
   	/**
   	 * inner class for making Path objects.
  @@ -106,35 +109,13 @@
   		this.name = "svg:path";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		Vector pd = ((SVGD)this.properties.get("d")).getPath();
   		SVGPathElementImpl graph = new SVGPathElementImpl(pd);
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a Path to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:path outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -26     xml-fop/src/org/apache/fop/svg/Pattern.java
  
  Index: Pattern.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Pattern.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Pattern.java	2000/07/11 05:09:34	1.1
  +++ Pattern.java	2000/08/28 23:54:17	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Pattern.java,v 1.1 2000/07/11 05:09:34 keiron Exp $ -- 
  +/*-- $Id: Pattern.java,v 1.2 2000/08/28 23:54:17 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Pattern pseudo flow object.
    *
    */
  -public class Pattern extends FObj {
  +public class Pattern extends SVGObj {
   
   	/**
   	 * inner class for making Pattern objects.
  @@ -102,29 +102,5 @@
   	protected Pattern(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:pattern";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a Pattern to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGPatternElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:pattern outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +7 -27     xml-fop/src/org/apache/fop/svg/Polygon.java
  
  Index: Polygon.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Polygon.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Polygon.java	2000/07/11 05:09:34	1.1
  +++ Polygon.java	2000/08/28 23:54:17	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Polygon.java,v 1.1 2000/07/11 05:09:34 keiron Exp $ -- 
  +/*-- $Id: Polygon.java,v 1.2 2000/08/28 23:54:17 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,10 +61,13 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    *
    */
  -public class Polygon extends FObj implements GraphicsCreator {
  +public class Polygon extends SVGObj {
   
   	/**
   	 * inner class for making Polygon objects.
  @@ -105,36 +108,13 @@
   		this.name = "svg:polygon";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		Vector points = ((SVGPoints)this.properties.get("points")).getPoints();
   		SVGPolygonElementImpl graph =  new SVGPolygonElementImpl(points);
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:polygon outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +7 -26     xml-fop/src/org/apache/fop/svg/Polyline.java
  
  Index: Polyline.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Polyline.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Polyline.java	2000/07/11 05:09:34	1.1
  +++ Polyline.java	2000/08/28 23:54:17	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Polyline.java,v 1.1 2000/07/11 05:09:34 keiron Exp $ -- 
  +/*-- $Id: Polyline.java,v 1.2 2000/08/28 23:54:17 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,11 +61,14 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:Polyline pseudo flow object.
    *
    */
  -public class Polyline extends FObj implements GraphicsCreator {
  +public class Polyline extends SVGObj {
   
   	/**
   	 * inner class for making Polyline objects.
  @@ -106,35 +109,13 @@
   		this.name = "svg:polyline";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		Vector points = ((SVGPoints)this.properties.get("points")).getPoints();
   		SVGPolylineElementImpl graph =  new SVGPolylineElementImpl(points);
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a Polyline to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:polyline outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.3       +4 -28     xml-fop/src/org/apache/fop/svg/RadialGradient.java
  
  Index: RadialGradient.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/RadialGradient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RadialGradient.java	2000/07/18 05:37:10	1.2
  +++ RadialGradient.java	2000/08/28 23:54:18	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: RadialGradient.java,v 1.2 2000/07/18 05:37:10 keiron Exp $ -- 
  +/*-- $Id: RadialGradient.java,v 1.3 2000/08/28 23:54:18 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -66,7 +66,7 @@
    * class representing svg:RadialGradient pseudo flow object.
    *
    */
  -public class RadialGradient extends FObj implements GraphicsCreator {
  +public class RadialGradient extends SVGObj {
   
   	/**
   	 * inner class for making RadialGradient objects.
  @@ -117,10 +117,10 @@
   		}
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		radial.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		radial.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		radial.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		radial.setId(this.properties.get("id").getString());
   
   		radial.setCx(new SVGAnimatedLengthImpl(((SVGLengthProperty)this.properties.get("cx")).getSVGLength()));
  @@ -129,29 +129,5 @@
   		radial.setFx(new SVGAnimatedLengthImpl(((SVGLengthProperty)this.properties.get("fx")).getSVGLength()));
   		radial.setFy(new SVGAnimatedLengthImpl(((SVGLengthProperty)this.properties.get("fy")).getSVGLength()));
   		return radial;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a RadialGradient to the SVGArea */
  -			((SVGArea) area).addGraphic(radial);
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:radialGradient outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.11      +5 -26     xml-fop/src/org/apache/fop/svg/Rect.java
  
  Index: Rect.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Rect.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Rect.java	2000/07/27 06:34:22	1.10
  +++ Rect.java	2000/08/28 23:54:19	1.11
  @@ -1,4 +1,4 @@
  -/*-- $Id: Rect.java,v 1.10 2000/07/27 06:34:22 keiron Exp $ -- 
  +/*-- $Id: Rect.java,v 1.11 2000/08/28 23:54:19 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -65,11 +65,12 @@
   import org.apache.fop.dom.svg.SVGArea;
   
   import org.w3c.dom.svg.SVGLength;
  +import org.w3c.dom.svg.SVGElement;
   
   /**
    * class representing svg:rect pseudo flow object.
    */
  -public class Rect extends FObj implements GraphicsCreator {
  +public class Rect extends SVGObj {
   
   	/**
   	 * inner class for making Rect objects.
  @@ -110,7 +111,7 @@
   	this.name = "svg:rect";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		/* retrieve properties */
   		SVGLength width = ((SVGLengthProperty)this.properties.get("width")).getSVGLength();
  @@ -127,30 +128,8 @@
   		graph.setWidth(new SVGAnimatedLengthImpl(width));
   		graph.setHeight(new SVGAnimatedLengthImpl(height));
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -	
  -	/* if the area this is being put into is an SVGArea */
  -	if (area instanceof SVGArea) {
  -		/* add a rectangle to the SVGArea */
  -		((SVGArea) area).addGraphic(createGraphic());
  -	} else {
  -		/* otherwise generate a warning */
  -	    MessageHandler.errorln("WARNING: svg:rect outside svg:svg");
  -	}
  -
  -	/* return status */
  -	return new Status(Status.OK);
   	}
   }
  
  
  
  1.11      +23 -49    xml-fop/src/org/apache/fop/svg/SVG.java
  
  Index: SVG.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVG.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SVG.java	2000/08/10 06:46:54	1.10
  +++ SVG.java	2000/08/28 23:54:19	1.11
  @@ -1,4 +1,4 @@
  -/*-- $Id: SVG.java,v 1.10 2000/08/10 06:46:54 keiron Exp $ -- 
  +/*-- $Id: SVG.java,v 1.11 2000/08/28 23:54:19 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -60,6 +60,7 @@
   import org.apache.fop.apps.FOPException;
   
   import org.apache.fop.dom.svg.*;
  +import org.w3c.dom.svg.*;
   
   import org.apache.fop.dom.svg.SVGArea;
   /**
  @@ -110,45 +111,32 @@
   	this.name = "svg:svg";
   	}
   
  -/*	protected void addChild(FONode child) {
  -		super.addChild(child);
  -		if(svgArea != null) {
  -			Status status;
  -			try {
  -				if ((status = child.layout(svgArea)).isIncomplete()) {
  -				}
  -			} catch(FOPException fope) {
  -				fope.printStackTrace();
  -			}
  -		}
  -	}*/
  -
  -	SVGArea svgArea = null;
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
  -		this.width = ((SVGLengthProperty)this.properties.get("width")).getSVGLength().getValue();
  -		this.height = ((SVGLengthProperty)this.properties.get("height")).getSVGLength().getValue();
  -		svgArea = new SVGArea(null, width, height);
  +		SVGSVGElementImpl svgArea = null;
  +		SVGLength w = ((SVGLengthProperty)this.properties.get("width")).getSVGLength();
  +		SVGLength h = ((SVGLengthProperty)this.properties.get("height")).getSVGLength();
  +		svgArea = new SVGSVGElementImpl();
  +		SVGAnimatedLength sal;
  +		sal = new SVGAnimatedLengthImpl(w);
  +		sal.setBaseVal(w);
  +		svgArea.setWidth(sal);
  +		sal = new SVGAnimatedLengthImpl(h);
  +		sal.setBaseVal(h);
  +		svgArea.setHeight(sal);
   		svgArea.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		svgArea.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  -//		svgArea.setId(this.properties.get("id").getString());
  +		svgArea.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
  +		svgArea.setId(this.properties.get("id").getString());
   		int numChildren = this.children.size();
   		for (int i = 0; i < numChildren; i++) {
   			FONode fo = (FONode) children.elementAt(i);
   			if(fo instanceof GraphicsCreator) {
  -				GraphicImpl impl = ((GraphicsCreator)fo).createGraphic();
  -				svgArea.addGraphic(impl);
  -			} else if(fo instanceof Defs) {
  -				svgArea.addDefs(((Defs)fo).createDefs());
  +				SVGElement impl = ((GraphicsCreator)fo).createGraphic();
  +				svgArea.appendChild((org.w3c.dom.Node)impl);
  +//			} else if(fo instanceof Defs) {
  +//				svgArea.addDefs(((Defs)fo).createDefs());
   			}
   			Status status;
  -/*			try {
  -				if ((status = fo.layout(svgArea)).isIncomplete()) {
  -//				return null;
  -				}
  -			} catch(FOPException fope) {
  -				fope.printStackTrace();
  -			}*/
   		}
   		return svgArea;
   	}
  @@ -162,11 +150,6 @@
   	 */
   	public Status layout(Area area) throws FOPException {
   	
  -	if (area instanceof SVGArea) {
  -		((SVGArea) area).addGraphic(createGraphic());
  -		return new Status(Status.OK);
  -	}
  -
   	if (!(area instanceof ForeignObjectArea)) {
   	    // this is an error
   	    throw new FOPException("SVG not in fo:instream-foreign-object");
  @@ -196,8 +179,8 @@
   	/* create an SVG area */
   	/* if width and height are zero, may want to get the bounds of the content. */
   	SVGArea svg = new SVGArea(fs, width, height);
  -	svg.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -	svg.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +	SVGDocument doc = new SVGDocumentImpl();
  +	svg.setSVGDocument(doc);
   	svg.start();
   
   	/* add the SVG area to the containing area */
  @@ -206,16 +189,7 @@
   	foa.setIntrinsicWidth(svg.getWidth());
   	foa.setIntrinsicHeight(svg.getHeight());
   
  -	/* iterate over the child formatting objects and lay them out
  -	   into the SVG area */
  -	int numChildren = this.children.size();
  -	for (int i = 0; i < numChildren; i++) {
  -		FONode fo = (FONode) children.elementAt(i);
  -		Status status;
  -		if ((status = fo.layout(svg)).isIncomplete()) {
  -		return status;
  -		}
  -	}
  +	doc.appendChild((SVGSVGElement)createGraphic());
   
   	/* finish off the SVG area */
   	svg.end();
  
  
  
  1.9       +5 -3      xml-fop/src/org/apache/fop/svg/SVGElementMapping.java
  
  Index: SVGElementMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGElementMapping.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SVGElementMapping.java	2000/08/14 01:37:10	1.8
  +++ SVGElementMapping.java	2000/08/28 23:54:19	1.9
  @@ -1,4 +1,4 @@
  -/*-- $Id: SVGElementMapping.java,v 1.8 2000/08/14 01:37:10 keiron Exp $ -- 
  +/*-- $Id: SVGElementMapping.java,v 1.9 2000/08/28 23:54:19 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -50,13 +50,15 @@
    */
   package org.apache.fop.svg;
   
  +import org.apache.fop.fo.TreeBuilder;
   import org.apache.fop.fo.FOTreeBuilder;
   import org.apache.fop.fo.ElementMapping;
  +import org.apache.fop.dom.svg.SVGDocumentImpl;
   
   public class SVGElementMapping implements ElementMapping {
   
  -	public void addToBuilder(FOTreeBuilder builder) {
  -		String uri = "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd";
  +	public void addToBuilder(TreeBuilder builder) {
  +		String uri = SVGDocumentImpl.namespaceURI;
   		builder.addMapping(uri, "svg", SVG.maker());
   		builder.addMapping(uri, "rect", Rect.maker());
   		builder.addMapping(uri, "line", Line.maker());
  
  
  
  1.2       +2 -2      xml-fop/src/org/apache/fop/svg/SVGLengthListProperty.java
  
  Index: SVGLengthListProperty.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGLengthListProperty.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SVGLengthListProperty.java	2000/07/11 05:09:39	1.1
  +++ SVGLengthListProperty.java	2000/08/28 23:54:20	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: SVGLengthListProperty.java,v 1.1 2000/07/11 05:09:39 keiron Exp $ -- 
  +/*-- $Id: SVGLengthListProperty.java,v 1.2 2000/08/28 23:54:20 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -94,7 +94,7 @@
   	 * @param propertyList the property list the property is a member of
   	 */
   	public Property make(PropertyList propertyList) throws FOPException {
  -		return make(propertyList, "0pt");
  +		return make(propertyList, "");
   	}
   	}
   
  
  
  
  1.5       +5 -3      xml-fop/src/org/apache/fop/svg/SVGPropertyListMapping.java
  
  Index: SVGPropertyListMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGPropertyListMapping.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SVGPropertyListMapping.java	2000/08/14 01:37:10	1.4
  +++ SVGPropertyListMapping.java	2000/08/28 23:54:20	1.5
  @@ -1,4 +1,4 @@
  -/*-- $Id: SVGPropertyListMapping.java,v 1.4 2000/08/14 01:37:10 keiron Exp $ -- 
  +/*-- $Id: SVGPropertyListMapping.java,v 1.5 2000/08/28 23:54:20 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -53,14 +53,15 @@
   
   import org.apache.fop.fo.*;
   import org.apache.fop.fo.properties.*;
  +import org.apache.fop.dom.svg.SVGDocumentImpl;
   
   import java.util.Hashtable;
   
   public class SVGPropertyListMapping implements PropertyListMapping {
   
  -    public void addToBuilder(FOTreeBuilder builder) {
  +    public void addToBuilder(TreeBuilder builder) {
   
  -	String uri = "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd";
  +	String uri = SVGDocumentImpl.namespaceURI;
   	Hashtable propertyTable = new Hashtable();
   		propertyTable.put("height",SVGLengthProperty.maker());
   		propertyTable.put("width",SVGLengthProperty.maker());
  @@ -93,6 +94,7 @@
   		propertyTable.put("d",SVGD.maker());
   		propertyTable.put("points",SVGPoints.maker());
   //		propertyTable.put("viewBox",SVGBox.maker());
  +		propertyTable.put("xml:space",XMLSpace.maker());
   
   	propertyTable.put("font-family",FontFamily.maker());
   	propertyTable.put("font-style",FontStyle.maker());
  
  
  
  1.2       +4 -2      xml-fop/src/org/apache/fop/svg/SVGStyle.java
  
  Index: SVGStyle.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGStyle.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SVGStyle.java	2000/07/11 05:09:39	1.1
  +++ SVGStyle.java	2000/08/28 23:54:20	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: SVGStyle.java,v 1.1 2000/07/11 05:09:39 keiron Exp $ -- 
  +/*-- $Id: SVGStyle.java,v 1.2 2000/08/28 23:54:20 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -57,6 +57,8 @@
   
   import java.util.*;
   
  +import org.w3c.dom.css.CSSStyleDeclaration;
  +
   /**
    *
    */
  @@ -122,7 +124,7 @@
   	 *
   	 * @return the length as a Length object
   	 */
  -	public Hashtable getStyle()
  +	public CSSStyleDeclaration getStyle()
   	{
   		return this.style.getStyle();
   	}
  
  
  
  1.2       +5 -3      xml-fop/src/org/apache/fop/svg/SVGTransform.java
  
  Index: SVGTransform.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGTransform.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SVGTransform.java	2000/07/11 05:09:39	1.1
  +++ SVGTransform.java	2000/08/28 23:54:21	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: SVGTransform.java,v 1.1 2000/07/11 05:09:39 keiron Exp $ -- 
  +/*-- $Id: SVGTransform.java,v 1.2 2000/08/28 23:54:21 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -55,6 +55,8 @@
   import org.apache.fop.datatypes.*;
   import org.apache.fop.apps.FOPException;
   
  +import org.w3c.dom.svg.SVGAnimatedTransformList;
  +
   import java.util.*;
   
   /**
  @@ -120,7 +122,7 @@
   	 *
   	 * @return the length as a Length object
   	 */
  -	public Vector oldgetTransform() {
  -		return this.trans.oldgetTransform();
  +	public SVGAnimatedTransformList getTransform() {
  +		return this.trans.getTransform();
   	}
   }
  
  
  
  1.2       +2 -26     xml-fop/src/org/apache/fop/svg/Set.java
  
  Index: Set.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Set.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Set.java	2000/07/11 05:09:39	1.1
  +++ Set.java	2000/08/28 23:54:21	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Set.java,v 1.1 2000/07/11 05:09:39 keiron Exp $ -- 
  +/*-- $Id: Set.java,v 1.2 2000/08/28 23:54:21 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Set pseudo flow object.
    *
    */
  -public class Set extends FObj {
  +public class Set extends SVGObj {
   
   	/**
   	 * inner class for making Set objects.
  @@ -102,29 +102,5 @@
   	protected Set(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:set";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a Set to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGSetElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:set outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.3       +2 -2      xml-fop/src/org/apache/fop/svg/Stop.java
  
  Index: Stop.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Stop.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Stop.java	2000/07/18 05:37:10	1.2
  +++ Stop.java	2000/08/28 23:54:21	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: Stop.java,v 1.2 2000/07/18 05:37:10 keiron Exp $ -- 
  +/*-- $Id: Stop.java,v 1.3 2000/08/28 23:54:21 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -67,7 +67,7 @@
    * class representing svg:Stop pseudo flow object.
    *
    */
  -public class Stop extends FObj {
  +public class Stop extends SVGObj {
   
   	/**
   	 * inner class for making Stop objects.
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/Style.java
  
  Index: Style.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Style.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Style.java	2000/07/11 05:09:40	1.1
  +++ Style.java	2000/08/28 23:54:22	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Style.java,v 1.1 2000/07/11 05:09:40 keiron Exp $ -- 
  +/*-- $Id: Style.java,v 1.2 2000/08/28 23:54:22 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -63,7 +63,7 @@
    * class representing svg:Style pseudo flow object.
    *
    */
  -public class Style extends FObj {
  +public class Style extends SVGObj {
   
   	/**
   	 * inner class for making Style objects.
  @@ -102,28 +102,5 @@
   	protected Style(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:style";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a Style to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGStyleElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:style outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.3       +4 -27     xml-fop/src/org/apache/fop/svg/Switch.java
  
  Index: Switch.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Switch.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Switch.java	2000/08/14 01:37:10	1.2
  +++ Switch.java	2000/08/28 23:54:22	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: Switch.java,v 1.2 2000/08/14 01:37:10 keiron Exp $ -- 
  +/*-- $Id: Switch.java,v 1.3 2000/08/28 23:54:22 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -65,7 +65,7 @@
   /**
    *
    */
  -public class Switch extends FObj implements GraphicsCreator {
  +public class Switch extends SVGObj {
   
   	/**
   	 * inner class for making Line objects.
  @@ -106,7 +106,7 @@
   		this.name = "svg:switch";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		/*
   		 * There are two options
  @@ -138,7 +138,7 @@
   		for (int i = 0; i < numChildren; i++) {
   			FONode child = (FONode) children.elementAt(i);
   			if(child instanceof GraphicsCreator) {
  -				GraphicImpl impl = ((GraphicsCreator)child).createGraphic();
  +				SVGElement impl = ((GraphicsCreator)child).createGraphic();
   				if(impl instanceof SVGTests) {
   					SVGTests testable = (SVGTests)impl;
   					rf = child.getProperty("requiredFeatures").getString();
  @@ -163,28 +163,5 @@
   		}
   
   		return graphic;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:switch outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -25     xml-fop/src/org/apache/fop/svg/Symbol.java
  
  Index: Symbol.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Symbol.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Symbol.java	2000/07/11 05:09:40	1.1
  +++ Symbol.java	2000/08/28 23:54:23	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Symbol.java,v 1.1 2000/07/11 05:09:40 keiron Exp $ -- 
  +/*-- $Id: Symbol.java,v 1.2 2000/08/28 23:54:23 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -62,7 +62,7 @@
   /**
    *
    */
  -public class Symbol extends FObj {
  +public class Symbol extends SVGObj {
   
   	/**
   	 * inner class for making Symbol objects.
  @@ -101,28 +101,5 @@
   	protected Symbol(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:symbol";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGSymbolElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:symbol outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +10 -28    xml-fop/src/org/apache/fop/svg/TRef.java
  
  Index: TRef.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/TRef.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TRef.java	2000/07/11 05:09:40	1.1
  +++ TRef.java	2000/08/28 23:54:23	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: TRef.java,v 1.1 2000/07/11 05:09:40 keiron Exp $ -- 
  +/*-- $Id: TRef.java,v 1.2 2000/08/28 23:54:23 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,10 +59,13 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    *
    */
  -public class TRef extends FObj implements TextElement {
  +public class TRef extends SVGObj implements TextElement {
   
   	/**
   	 * inner class for making Line objects.
  @@ -103,7 +106,7 @@
   		this.name = "svg:tref";
   	}
   
  -	public GraphicImpl createTextElement()
  +	public SVGElement createTextElement()
   	{
   		SVGTRefElementImpl tref = new SVGTRefElementImpl();
   		tref.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  @@ -115,41 +118,20 @@
   		prop = this.properties.get("x");
   		// bit of a hack, but otherwise the svg:text x element could be
   		// returned which is not a list
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tref.xlist = ((SVGLengthListProperty)prop).getSVGLengthList();
   		prop = this.properties.get("y");
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tref.ylist = ((SVGLengthListProperty)prop).getSVGLengthList();
   		prop = this.properties.get("dx");
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tref.dxlist = ((SVGLengthListProperty)prop).getSVGLengthList();
   		prop = this.properties.get("dy");
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tref.dylist = ((SVGLengthListProperty)prop).getSVGLengthList();
   //		tref.dxlist = ((SVGLengthProperty)this.properties.get("dx")).getSVGLength().valueList();
   		tref.ref = this.properties.get("xlink:href").getString();
   		tref.setId(this.properties.get("id").getString());
   		return tref;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:tref outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +11 -29    xml-fop/src/org/apache/fop/svg/TSpan.java
  
  Index: TSpan.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/TSpan.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TSpan.java	2000/07/11 05:09:40	1.1
  +++ TSpan.java	2000/08/28 23:54:23	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: TSpan.java,v 1.1 2000/07/11 05:09:40 keiron Exp $ -- 
  +/*-- $Id: TSpan.java,v 1.2 2000/08/28 23:54:23 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,11 +59,14 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:tspan pseudo flow object.
    *
    */
  -public class TSpan extends FObj implements TextElement {
  +public class TSpan extends SVGObj implements TextElement {
   
   	/**
   	 * inner class for making tspan objects.
  @@ -105,7 +108,7 @@
   	protected void addCharacters(char data[], int start, int length)
   	{
   		this.text += new String(data, start, length - start);
  -		tspan.str = this.text.trim();
  +		tspan.str = this.text;
   	}
   
   	/**
  @@ -119,7 +122,7 @@
   		this.name = "svg:tspan";
   	}
   
  -	public GraphicImpl createTextElement()
  +	public SVGElement createTextElement()
   	{
   		tspan.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
   //		tspan.dx = ((SVGLengthProperty)this.properties.get("dx")).getSVGLength().mvalue();
  @@ -130,41 +133,20 @@
   		prop = this.properties.get("x");
   		// bit of a hack, but otherwise the svg:text x element coud be
   		// returned which is not a list
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tspan.xlist = ((SVGLengthListProperty)prop).getSVGLengthList();
   		prop = this.properties.get("y");
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tspan.ylist = ((SVGLengthListProperty)prop).getSVGLengthList();
   		prop = this.properties.get("dx");
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tspan.dxlist = ((SVGLengthListProperty)prop).getSVGLengthList();
   		prop = this.properties.get("dy");
  -		if(prop instanceof SVGLengthListProperty)
  +//		if(prop instanceof SVGLengthListProperty)
   			tspan.dylist = ((SVGLengthListProperty)prop).getSVGLengthList();
   //		tspan.xlist = ((SVGLengthListProperty)this.properties.get("x")).getSVGLengthList();
   //		tspan.dxlist = ((SVGLengthProperty)this.properties.get("dx")).getSVGLength().valueList();
   		tspan.setId(this.properties.get("id").getString());
   		return tspan;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:tspan outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.9       +33 -29    xml-fop/src/org/apache/fop/svg/Text.java
  
  Index: Text.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Text.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Text.java	2000/07/11 05:09:40	1.8
  +++ Text.java	2000/08/28 23:54:24	1.9
  @@ -1,4 +1,4 @@
  -/*-- $Id: Text.java,v 1.8 2000/07/11 05:09:40 keiron Exp $ -- 
  +/*-- $Id: Text.java,v 1.9 2000/08/28 23:54:24 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -57,6 +57,7 @@
   import org.apache.fop.layout.Area;
   import org.apache.fop.layout.FontState;
   import org.apache.fop.apps.FOPException;
  +import org.apache.fop.fo.properties.XMLSpace;
   
   import java.util.*;
   
  @@ -64,11 +65,13 @@
   import org.apache.fop.dom.svg.SVGTextElementImpl;
   import org.apache.fop.dom.svg.SVGArea;
   
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:text pseudo flow object.
    *
    */
  -public class Text extends FObjMixed implements GraphicsCreator {
  +public class Text extends SVGObj {
   
   	/**
   	 * inner class for making SVG Text objects.
  @@ -125,52 +128,53 @@
   	 */
   	protected void addCharacters(char data[], int start, int length)
   	{
  -		textList.addElement(new String(data, start, length - start).trim());
  +		textList.addElement(new String(data, start, length - start));
   	}
   
  +	/**
  +	 * The children need to be added in order so that the text data
  +	 * is also added in order.
  +	 */
   	protected void addChild(FONode child) {
   		super.addChild(child);
   		if(child instanceof TextElement) {
   			TextElement te = (TextElement)child;
  -			GraphicImpl graph = te.createTextElement();
  +			SVGElement graph = te.createTextElement();
   			textList.addElement(graph);
  -			graph.setParent(textGraph);
   		} else {
   			// error
   		}
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
  +		int numChildren = this.textList.size();
  +		for (int i = 0; i < numChildren; i++) {
  +			Object obj = textList.elementAt(i);
  +			if(obj instanceof SVGElement) {
  +				SVGElement child = (SVGElement)obj;
  +				textGraph.appendChild(child);
  +			} else if(obj instanceof String) {
  +				String str = (String)obj;
  +				// new CDATANode(str); ??
  +			}
  +//			System.out.println(child);
  +		}
   		/* retrieve properties */
   		textGraph.x = ((SVGLengthProperty)this.properties.get("x")).getSVGLength().getValue();
   		textGraph.y = ((SVGLengthProperty)this.properties.get("y")).getSVGLength().getValue();
   		textGraph.textList = textList;
   		textGraph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		textGraph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		textGraph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		textGraph.setId(this.properties.get("id").getString());
  +		switch((this.properties.get("xml:space")).getEnum()) {
  +			case XMLSpace.DEFAULT:
  +				textGraph.setXMLspace("default");
  +			break;
  +			case XMLSpace.PRESERVE:
  +				textGraph.setXMLspace("preserve");
  +			break;
  +		}
   		return textGraph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -	
  -	/* if the area this is being put into is an SVGArea */
  -	if (area instanceof SVGArea) {
  -		/* add the text to the SVGArea */
  -		((SVGArea) area).addGraphic(createGraphic());
  -	} else {
  -		/* otherwise generate a warning */
  -	    MessageHandler.errorln("WARNING: svg:text outside svg:svg");
  -	}
  -
  -	/* return status */
  -	return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +5 -2      xml-fop/src/org/apache/fop/svg/TextElement.java
  
  Index: TextElement.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/TextElement.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TextElement.java	2000/07/11 05:09:41	1.1
  +++ TextElement.java	2000/08/28 23:54:24	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: TextElement.java,v 1.1 2000/07/11 05:09:41 keiron Exp $ -- 
  +/*-- $Id: TextElement.java,v 1.2 2000/08/28 23:54:24 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -52,9 +52,12 @@
   package org.apache.fop.svg;
   
   import org.apache.fop.dom.svg.*;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    *
    */
   public interface TextElement {
  -	public GraphicImpl createTextElement();
  +	public SVGElement createTextElement();
   }
  
  
  
  1.2       +6 -24     xml-fop/src/org/apache/fop/svg/TextPath.java
  
  Index: TextPath.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/TextPath.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TextPath.java	2000/07/11 05:09:41	1.1
  +++ TextPath.java	2000/08/28 23:54:24	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: TextPath.java,v 1.1 2000/07/11 05:09:41 keiron Exp $ -- 
  +/*-- $Id: TextPath.java,v 1.2 2000/08/28 23:54:24 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,11 +59,14 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    * class representing svg:TextPath pseudo flow object.
    *
    */
  -public class TextPath extends FObj implements TextElement {
  +public class TextPath extends SVGObj implements TextElement {
   
   	/**
   	 * inner class for making TextPath objects.
  @@ -110,33 +113,12 @@
   		text += new String(data, start, length - start);
   	}
   
  -	public GraphicImpl createTextElement()
  +	public SVGElement createTextElement()
   	{
   		SVGTextPathElementImpl graph = null;
   		String link = this.properties.get("xlink:href").getString();
   		graph = new SVGTextPathElementImpl(link, text.trim());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a TextPath to the SVGArea */
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:textPath outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -2      xml-fop/src/org/apache/fop/svg/Title.java
  
  Index: Title.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Title.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Title.java	2000/07/11 05:09:41	1.1
  +++ Title.java	2000/08/28 23:54:25	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Title.java,v 1.1 2000/07/11 05:09:41 keiron Exp $ -- 
  +/*-- $Id: Title.java,v 1.2 2000/08/28 23:54:25 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -60,7 +60,7 @@
   /**
    *
    */
  -public class Title extends FObj {
  +public class Title extends SVGObj {
   
   	/**
   	 * inner class for making Title objects.
  
  
  
  1.2       +7 -26     xml-fop/src/org/apache/fop/svg/Use.java
  
  Index: Use.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Use.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Use.java	2000/07/11 05:09:42	1.1
  +++ Use.java	2000/08/28 23:54:25	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: Use.java,v 1.1 2000/07/11 05:09:42 keiron Exp $ -- 
  +/*-- $Id: Use.java,v 1.2 2000/08/28 23:54:25 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,10 +59,13 @@
   
   import org.apache.fop.dom.svg.*;
   import org.apache.fop.dom.svg.SVGArea;
  +
  +import org.w3c.dom.svg.SVGElement;
  +
   /**
    *
    */
  -public class Use extends FObj implements GraphicsCreator {
  +public class Use extends SVGObj {
   
   	/**
   	 * inner class for making Use objects.
  @@ -103,35 +106,13 @@
   		this.name = "svg:use";
   	}
   
  -	public GraphicImpl createGraphic()
  +	public SVGElement createGraphic()
   	{
   		String str = this.properties.get("xlink:href").getString();
   		SVGUseElementImpl graph = new SVGUseElementImpl(str);
   		graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
  -		graph.setTransform(((SVGTransform)this.properties.get("transform")).oldgetTransform());
  +		graph.setTransform(((SVGTransform)this.properties.get("transform")).getTransform());
   		graph.setId(this.properties.get("id").getString());
   		return graph;
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a line to the SVGArea */
  -			((SVGArea) area).addGraphic(createGraphic());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:use outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.2       +2 -26     xml-fop/src/org/apache/fop/svg/VKern.java
  
  Index: VKern.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/VKern.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VKern.java	2000/07/11 05:09:42	1.1
  +++ VKern.java	2000/08/28 23:54:26	1.2
  @@ -1,4 +1,4 @@
  -/*-- $Id: VKern.java,v 1.1 2000/07/11 05:09:42 keiron Exp $ -- 
  +/*-- $Id: VKern.java,v 1.2 2000/08/28 23:54:26 keiron Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -62,7 +62,7 @@
   /**
    *
    */
  -public class VKern extends FObj {
  +public class VKern extends SVGObj {
   
   	/**
   	 * inner class for making VKern objects.
  @@ -101,29 +101,5 @@
   	protected VKern(FObj parent, PropertyList propertyList) {
   		super(parent, propertyList);
   		this.name = "svg:vkern";
  -	}
  -
  -	/**
  -	 * layout this formatting object.
  -	 *
  -	 * @param area the area to layout the object into
  -	 *
  -	 * @return the status of the layout
  -	 */
  -	public Status layout(Area area) throws FOPException {
  -
  -		/* retrieve properties */
  -		
  -		/* if the area this is being put into is an SVGArea */
  -		if (area instanceof SVGArea) {
  -			/* add a VKern to the SVGArea */
  -			((SVGArea) area).addGraphic(new SVGVKernElementImpl());
  -		} else {
  -			/* otherwise generate a warning */
  -			System.err.println("WARNING: svg:vkern outside svg:svg");
  -		}
  -
  -		/* return status */
  -		return new Status(Status.OK);
   	}
   }
  
  
  
  1.1                  xml-fop/src/org/apache/fop/svg/SVGDriver.java
  
  Index: SVGDriver.java
  ===================================================================
  /*-- $Id: SVGDriver.java,v 1.1 2000/08/28 23:54:19 keiron Exp $ -- 
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
   
      Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
   
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
   
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
   
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
   
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
   
   4. The names "FOP" and  "Apache Software Foundation"  must not be used to
      endorse  or promote  products derived  from this  software without  prior
      written permission. For written permission, please contact
      apache@apache.org.
   
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
   
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation and was  originally created by
   James Tauber <jt...@jtauber.com>. For more  information on the Apache 
   Software Foundation, please see <http://www.apache.org/>.
   
   */
  
  package org.apache.fop.svg;
  
  // FOP
  import org.apache.fop.fo.*;
  import org.apache.fop.apps.*;
  import org.apache.fop.dom.svg.*;
  import org.apache.fop.fo.FOTreeBuilder;
  import org.apache.fop.fo.ElementMapping;
  import org.apache.fop.fo.PropertyListMapping;
  import org.apache.fop.layout.AreaTree;
  import org.apache.fop.layout.FontInfo;
  import org.apache.fop.render.Renderer;
  import org.apache.fop.messaging.MessageHandler;
  
  // DOM
  import org.w3c.dom.Document;
  import org.w3c.dom.Node;
  import org.w3c.dom.NamedNodeMap;
  import org.w3c.dom.Attr;
  
  // SAX
  import org.xml.sax.ContentHandler;
  import org.xml.sax.InputSource;
  import org.xml.sax.XMLReader;
  import org.xml.sax.SAXException;
  import org.xml.sax.helpers.AttributesImpl;
  
  import org.w3c.dom.svg.*;
  
  // Java
  import java.io.PrintWriter;
  import java.io.IOException;
  
  /**
   * <P>Primary class that drives overall FOP process.
   *
   * <P>Once this class is instantiated, methods are called to set the
   * Renderer to use, the (possibly multiple) ElementMapping(s) to
   * use and the PrintWriter to use to output the results of the
   * rendering (where applicable). In the case of the Renderer and
   * ElementMapping(s), the Driver may be supplied either with the
   * object itself, or the name of the class, in which case Driver will
   * instantiate the class itself. The advantage of the latter is it
   * enables runtime determination of Renderer and ElementMapping(s).
   *
   * <P>Once the Driver is set up, the buildFOTree method
   * is called. Depending on whether DOM or SAX is being used, the
   * invocation of the method is either buildFOTree(Document) or
   * buildFOTree(Parser, InputSource) respectively.
   *
   * <P>A third possibility may be used to build the FO Tree, namely
   * calling getDocumentHandler() and firing the SAX events yourself.
   *
   * <P>Once the FO Tree is built, the format() and render() methods may be
   * called in that order.
   *
   * <P>Here is an example use of Driver from CommandLine.java:
   *
   * <PRE>
   *   Driver driver = new Driver();
   *   driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);
   *   driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
   *   driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
   *   driver.setWriter(new PrintWriter(new FileWriter(args[1])));
   *   driver.buildFOTree(parser, fileInputSource(args[0]));
   *   driver.format();
   *   driver.render();
   * </PRE>
   */
  public class SVGDriver {
  
      /** the FO tree builder */
      protected SVGTreeBuilder treeBuilder;
  
      /** the PrintWriter to use to output the results of the renderer */
      protected PrintWriter writer;
  
      /** create a new Driver */
      public SVGDriver() {
  	this.treeBuilder = new SVGTreeBuilder();
      }
     
      /**
       * add the given element mapping.
       *
       * an element mapping maps element names to Java classes
       */
      public void addElementMapping(ElementMapping mapping) {
  	mapping.addToBuilder(this.treeBuilder);
      }
      
      /**
       * add the element mapping with the given class name
       */
      public void addElementMapping(String mappingClassName) {
  	createElementMapping(mappingClassName).addToBuilder(this.treeBuilder);
      }
  
      /**
       * protected method used by addElementMapping(String) to
       * instantiate element mapping class
       */
      protected ElementMapping createElementMapping(String mappingClassName) {
      MessageHandler.logln("using element mapping " + mappingClassName);
  
  	try {
  	    return (ElementMapping)
  		Class.forName(mappingClassName).newInstance();
  	} catch (ClassNotFoundException e) {
  	    MessageHandler.errorln("Could not find " + mappingClassName);
  	} catch (InstantiationException e) {
  	    MessageHandler.errorln("Could not instantiate "
  			       + mappingClassName);
  	} catch (IllegalAccessException e) {
  	    MessageHandler.errorln("Could not access " + mappingClassName);
  	} catch (ClassCastException e) {
  	    MessageHandler.errorln(mappingClassName + " is not an element mapping"); 
  	}
  	return null;
      }
  
      /**
       * add the element mapping with the given class name
       */
      public void addPropertyList(String listClassName) {
  	createPropertyList(listClassName).addToBuilder(this.treeBuilder);
      }
  
      /**
       * protected method used by addPropertyList(String) to
       * instantiate list mapping class
       */
      protected PropertyListMapping createPropertyList(String listClassName) {
      MessageHandler.logln("using property list mapping " + listClassName);
  
  	try {
  	    return (PropertyListMapping)
  		Class.forName(listClassName).newInstance();
  	} catch (ClassNotFoundException e) {
  	    MessageHandler.errorln("Could not find " + listClassName);
  	} catch (InstantiationException e) {
  	    MessageHandler.errorln("Could not instantiate "
  			       + listClassName);
  	} catch (IllegalAccessException e) {
  	    MessageHandler.errorln("Could not access " + listClassName);
  	} catch (ClassCastException e) {
  	    MessageHandler.errorln(listClassName + " is not an property list"); 
  	}
  	return null;
      }
  
      /**
       * return the tree builder (a SAX DocumentHandler).
       *
       * used in situations where SAX is used but not via a FOP-invoked
       * SAX parser. A good example is an XSLT engine that fires SAX
       * events but isn't a SAX Parser itself.
       */
      public ContentHandler getContentHandler() {
  	return this.treeBuilder;
      }
  
      /**
       * build the formatting object tree using the given SAX Parser and
       * SAX InputSource
       */
      public void buildSVGTree(XMLReader parser, InputSource source)
  		throws FOPException {
  
  	parser.setContentHandler(this.treeBuilder);
  	try {
  	    parser.parse(source);
  	} catch (SAXException e) {
  e.printStackTrace();
  	    if (e.getException() instanceof FOPException)
  		throw (FOPException) e.getException();
  	    else
  		throw new FOPException(e.getMessage());
  	} catch (IOException e) {
  	    throw new FOPException(e.getMessage());
  	}
      }
  
      /**
       * build the formatting object tree using the given DOM Document
       */
      public void buildSVGTree(Document document) 
  	throws FOPException {
  
  	/* most of this code is modified from John Cowan's */
  
  	Node currentNode;
  	AttributesImpl currentAtts;
  	
  	/* temporary array for making Strings into character arrays */
  	char[] array = null;
  
  	currentAtts = new AttributesImpl();
  	
  	/* start at the document element */
  	currentNode = document;
  
  	try {
  	    while (currentNode != null) {
  		switch (currentNode.getNodeType()) {
  		case Node.DOCUMENT_NODE:
  		    this.treeBuilder.startDocument();
  		    break;
  		case Node.CDATA_SECTION_NODE:
  		case Node.TEXT_NODE:
  		    String data = currentNode.getNodeValue();
  		    int datalen = data.length();
  		    if (array == null || array.length < datalen) {
  			/* if the array isn't big enough, make a new
  			   one */
  			array = new char[datalen];
  		    }
  		    data.getChars(0, datalen, array, 0);
  		    this.treeBuilder.characters(array, 0, datalen);
  		    break;
  		case Node.PROCESSING_INSTRUCTION_NODE:
  		    this.treeBuilder.processingInstruction(
  	  	        currentNode.getNodeName(),
  			currentNode.getNodeValue());
  		    break;
  		case Node.ELEMENT_NODE:
  		    NamedNodeMap map = currentNode.getAttributes();
  		    currentAtts.clear();
  		    for (int i = map.getLength() - 1; i >= 0; i--) {
  			Attr att = (Attr)map.item(i);
  			currentAtts.addAttribute("",
                           att.getName(),
                           "",
                           "CDATA",
                           att.getValue());
  		    }
  		    this.treeBuilder.startElement(
  			"", currentNode.getNodeName(), "", currentAtts);
  		    break;
  		}
  		
  		Node nextNode = currentNode.getFirstChild();
  		if (nextNode != null) {
  		    currentNode = nextNode;
  		    continue;
  		}
  		
  		while (currentNode != null) {
  		    switch (currentNode.getNodeType()) {
  		    case Node.DOCUMENT_NODE:
  			this.treeBuilder.endDocument();
  			break;
  		    case Node.ELEMENT_NODE:
  			this.treeBuilder.endElement(
  			    "", currentNode.getNodeName(), "" );
  			break;
  		    }
  		    
  		    nextNode = currentNode.getNextSibling();
  		    if (nextNode != null) {
  			currentNode = nextNode;
  			break;
  		    }
  		    
  		    currentNode = currentNode.getParentNode();
  		}
  	    }
  	} catch (SAXException e) {
  	    throw new FOPException(e.getMessage());
  	}
      }
  
      public SVGDocument getSVGDocument()
      {
          return this.treeBuilder.getSVGDocument();
      }
  
      /**
       * format the formatting object tree into an area tree
       */
      public void format()
  	throws FOPException {
  	FontInfo fontInfo = new FontInfo();
      }
  }
  
  
  
  1.1                  xml-fop/src/org/apache/fop/svg/SVGObj.java
  
  Index: SVGObj.java
  ===================================================================
  /*-- $Id: SVGObj.java,v 1.1 2000/08/28 23:54:20 keiron Exp $ -- 
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
   
      Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
   
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
   
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
   
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
   
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
   
   4. The names "FOP" and  "Apache Software Foundation"  must not be used to
      endorse  or promote  products derived  from this  software without  prior
      written permission. For written permission, please contact
      apache@apache.org.
   
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
   
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation and was  originally created by
   James Tauber <jt...@jtauber.com>. For more  information on the Apache 
   Software Foundation, please see <http://www.apache.org/>.
   
   */
  
  package org.apache.fop.svg;
  
  // FOP
  import org.apache.fop.fo.*;
  import org.apache.fop.layout.Area;
  import org.apache.fop.layout.FontState;
  import org.apache.fop.apps.FOPException;
  
  import org.apache.fop.dom.svg.*;
  
  import org.w3c.dom.svg.SVGElement;
  
  /**
   * Since SVG objects are not layed out then this class checks
   * that this element is not being layed out inside some incorrect
   * element.
   */
  public abstract class SVGObj extends FObj implements GraphicsCreator {
  
  	/**
  	 *
  	 * @param parent the parent formatting object
  	 * @param propertyList the explicit properties of this object
  	 */
  	public SVGObj(FObj parent, PropertyList propertyList) {
  		super(parent, propertyList);
  	}
  
  	public SVGElement createGraphic()
  	{
  		return null;
  	}
  
  	/**
  	 * layout this formatting object.
  	 *
  	 * @param area the area to layout the object into
  	 * @return the status of the layout
  	 */
  	public Status layout(Area area) throws FOPException
  	{
  		if (area instanceof SVGArea) {
  		} else {
  			/* otherwise generate a warning */
  			System.err.println("WARNING: " + this.name + " outside svg:svg");
  		}
  
  		/* return status */
  		return new Status(Status.OK);
  	}
  }