Author: jeremias
Date: Fri Aug 15 07:17:52 2008
New Revision: 686227

URL: http://svn.apache.org/viewvc?rev=686227&view=rev
Log:
Some fixes for SVG along the way:
Fix for group nesting.
Fix for reused content (metadata etc.) cause exceptions.

Modified:
    
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java
    
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java

Modified: 
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java?rev=686227&r1=686226&r2=686227&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java
 Fri Aug 15 07:17:52 2008
@@ -193,6 +193,7 @@
     /** [EMAIL PROTECTED] */
     public void endGroup() throws IFException {
         try {
+            establish(MODE_NORMAL);
             endElement("g");
         } catch (SAXException e) {
             throw new IFException("SAX error in endGroup()", e);

Modified: 
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java?rev=686227&r1=686226&r2=686227&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
 Fri Aug 15 07:17:52 2008
@@ -109,6 +109,9 @@
             TransformerHandler toDOMHandler = tFactory.newTransformerHandler();
             toDOMHandler.setResult(new DOMResult(this.reusedParts));
             this.handler = toDOMHandler;
+            this.handler.startDocument();
+        } catch (SAXException se) {
+            throw new IFException("SAX error in startDocument()", se);
         } catch (TransformerConfigurationException e) {
             throw new IFException(
                     "Error while setting up a TransformerHandler for SVG 
generation", e);
@@ -121,6 +124,18 @@
     }
 
     /** [EMAIL PROTECTED] */
+    public void endDocumentHeader() throws IFException {
+        super.endDocumentHeader();
+        try {
+            //Stop recording parts reused for each page
+            this.handler.endDocument();
+            this.handler = null;
+        } catch (SAXException e) {
+            throw new IFException("SAX error in endDocumentHeader()", e);
+        }
+    }
+
+    /** [EMAIL PROTECTED] */
     public void startPageSequence(String id) throws IFException {
         //nop
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to