[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-cvs
Subject:    svn commit: r1344594 [13/15] - in /xmlgraphics/fop/branches/Temp_URI_Unification: ./
From:       mehdi () apache ! org
Date:       2012-05-31 8:33:50
Message-ID: 20120531083434.635242388C52 () eris ! apache ! org
[Download RAW message or body]

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java \
Thu May 31 08:33:36 2012 @@ -19,49 +19,82 @@
 
 package org.apache.fop.render.pdf;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+import org.xml.sax.SAXException;
 
-import org.apache.fop.apps.FOPException;
-import org.apache.fop.apps.FOUserAgent;
+import org.apache.xmlgraphics.util.MimeConstants;
+
+import org.apache.fop.apps.AbstractRendererConfiguratorTest;
+import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
 import org.apache.fop.apps.FopFactory;
+import org.apache.fop.apps.PDFRendererConfBuilder;
 import org.apache.fop.events.Event;
 import org.apache.fop.events.EventListener;
+import org.apache.fop.pdf.PDFAMode;
 import org.apache.fop.pdf.PDFEncryptionParams;
-import org.junit.Test;
+import org.apache.fop.pdf.PDFXMode;
+import org.apache.fop.pdf.Version;
+import org.apache.fop.render.pdf.PDFRendererConfig.PDFRendererConfigParser;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 /**
  * Tests that encryption length is properly set up.
  */
-public class PDFRendererConfiguratorTestCase {
-
-    private FOUserAgent foUserAgent;
-
-    private PDFDocumentHandler documentHandler;
-
+public class PDFRendererConfiguratorTestCase extends
+        AbstractRendererConfiguratorTest<PDFRendererConfigurator, \
PDFRendererConfBuilder> {  private boolean eventTriggered;
+    private PDFRenderingUtil pdfUtil;
 
-    private class EncryptionEventFilter implements EventListener {
+    public PDFRendererConfiguratorTestCase() {
+        super(MimeConstants.MIME_PDF, PDFRendererConfBuilder.class, \
PDFDocumentHandler.class); +    }
 
-        private final int specifiedEncryptionLength;
+    @Override
+    protected PDFRendererConfigurator createConfigurator() {
+        return new PDFRendererConfigurator(userAgent, new \
PDFRendererConfigParser()); +    }
 
-        private final int correctedEncryptionLength;
+    @Override
+    public void setUpDocumentHandler() {
+        pdfUtil = new PDFRenderingUtil(userAgent);
+        when(((PDFDocumentHandler) docHandler).getPDFUtil()).thenReturn(pdfUtil);
+    }
 
-        EncryptionEventFilter(int specifiedEncryptionLength, int \
                correctedEncryptionLength) {
-            this.specifiedEncryptionLength = specifiedEncryptionLength;
-            this.correctedEncryptionLength = correctedEncryptionLength;
-        }
+    private void parseConfig(RendererConfBuilder builder, EventListener listener)
+            throws SAXException, IOException {
+        parseConfigWithUtil(builder, listener, false);
+    }
 
-        public void processEvent(Event event) {
-            assertEquals(PDFEventProducer.class.getName() + \
                ".incorrectEncryptionLength",
-                    event.getEventID());
-            assertEquals(specifiedEncryptionLength, \
                event.getParam("originalValue"));
-            assertEquals(correctedEncryptionLength, \
                event.getParam("correctedValue"));
-            eventTriggered = true;
+    private void parseConfigWithUtil(RendererConfBuilder builder, EventListener \
listener, +            boolean mockUtil) throws SAXException, IOException {
+        userAgent = FopFactory.newInstance(
+                new File(".").toURI(), \
builder.endRendererConfig().build()).newFOUserAgent(); +        \
userAgent.getEventBroadcaster().addEventListener(listener); +        if (mockUtil) {
+            this.pdfUtil = mock(PDFRenderingUtil.class);
+            when(((PDFDocumentHandler) \
docHandler).getPDFUtil()).thenReturn(pdfUtil); +        } else {
+            setUpDocumentHandler();
         }
+        sut = createConfigurator();
+        sut.configure(docHandler);
+    }
+
+    private void parseConfigMockUtil(RendererConfBuilder builder)
+            throws SAXException, IOException {
+        parseConfigWithUtil(builder, null, true);
     }
 
     /**
@@ -71,7 +104,7 @@ public class PDFRendererConfiguratorTest
      */
     @Test
     public void testRoundUp() throws Exception {
-        runTest("roundUp", 55, 56);
+        testEncryptionAndEvent(55, 56);
     }
 
     /**
@@ -81,7 +114,7 @@ public class PDFRendererConfiguratorTest
      */
     @Test
     public void testRoundDown() throws Exception {
-        runTest("roundDown", 67, 64);
+        testEncryptionAndEvent(67, 64);
     }
 
     /**
@@ -91,7 +124,7 @@ public class PDFRendererConfiguratorTest
      */
     @Test
     public void testBelow40() throws Exception {
-        runTest("below40", 32, 40);
+        testEncryptionAndEvent(32, 40);
     }
 
     /**
@@ -101,7 +134,7 @@ public class PDFRendererConfiguratorTest
      */
     @Test
     public void testAbove128() throws Exception {
-        runTest("above128", 233, 128);
+        testEncryptionAndEvent(233, 128);
     }
 
     /**
@@ -111,43 +144,102 @@ public class PDFRendererConfiguratorTest
      */
     @Test
     public void testCorrectValue() throws Exception {
-        givenAConfigurationFile("correct", new EventListener() {
-
-            public void processEvent(Event event) {
-                fail("No event was expected");
-            }
-        });
-        whenCreatingAndConfiguringDocumentHandler();
-        thenEncryptionLengthShouldBe(128);
-
+        runEncryptionTest(128, 128);
     }
 
-    private void runTest(String configFilename,
-            final int specifiedEncryptionLength,
-            final int correctedEncryptionLength) throws Exception {
-        givenAConfigurationFile(configFilename,
-                new EncryptionEventFilter(specifiedEncryptionLength, \
                correctedEncryptionLength));
-        whenCreatingAndConfiguringDocumentHandler();
+    private void testEncryptionAndEvent(int specifiedEncryptionLength,
+            int actualEncryptionLength) throws Exception {
+        runEncryptionTest(specifiedEncryptionLength, actualEncryptionLength);
         assertTrue(eventTriggered);
     }
 
-    private void givenAConfigurationFile(String filename, EventListener \
eventListener) +    private void runEncryptionTest(int specifiedEncryptionLength, int \
actualEncryptionLength)  throws Exception {
-        FopFactory fopFactory = FopFactory.newInstance();
-        fopFactory.setUserConfig(new \
                File("test/resources/org/apache/fop/render/pdf/"
-                + filename + ".xconf"));
-        foUserAgent = fopFactory.newFOUserAgent();
-        foUserAgent.getEventBroadcaster().addEventListener(eventListener);
-    }
-
-    private void whenCreatingAndConfiguringDocumentHandler() throws FOPException {
-        PDFDocumentHandlerMaker maker = new PDFDocumentHandlerMaker();
-        documentHandler = (PDFDocumentHandler) \
                maker.makeIFDocumentHandler(foUserAgent);
-        new PDFRendererConfigurator(foUserAgent).configure(documentHandler);
+        parseConfig(createBuilder().startEncryptionParams()
+                                       \
.setEncryptionLength(specifiedEncryptionLength) +                                   \
.endEncryptionParams(), +                new \
EncryptionEventFilter(specifiedEncryptionLength, actualEncryptionLength)); +        \
thenEncryptionLengthShouldBe(actualEncryptionLength);  }
 
     private void thenEncryptionLengthShouldBe(int expectedEncryptionLength) {
-        PDFEncryptionParams encryptionParams = \
documentHandler.getPDFUtil().getEncryptionParams(); +        PDFEncryptionParams \
                encryptionParams = pdfUtil.getEncryptionParams();
         assertEquals(expectedEncryptionLength, \
encryptionParams.getEncryptionLengthInBits());  }
+
+    private class EncryptionEventFilter implements EventListener {
+
+        private final int specifiedEncryptionLength;
+
+        private final int correctedEncryptionLength;
+
+        EncryptionEventFilter(int specifiedEncryptionLength, int \
correctedEncryptionLength) { +            this.specifiedEncryptionLength = \
specifiedEncryptionLength; +            this.correctedEncryptionLength = \
correctedEncryptionLength; +        }
+
+        public void processEvent(Event event) {
+            assertEquals(PDFEventProducer.class.getName() + \
".incorrectEncryptionLength", +                    event.getEventID());
+            assertEquals(specifiedEncryptionLength, \
event.getParam("originalValue")); +            \
assertEquals(correctedEncryptionLength, event.getParam("correctedValue")); +          \
eventTriggered = true; +        }
+    }
+
+    @Test
+    public void testFilterMaps() throws Exception {
+        parseConfig(createBuilder().createFilterList("image", "flate", "ascii-85"));
+        OutputStream outStream = mock(OutputStream.class);
+        Map<String, List<String>> filterMap = \
pdfUtil.setupPDFDocument(outStream).getFilterMap(); +        assertEquals("flate", \
filterMap.get("image").get(0)); +        assertEquals("ascii-85", \
filterMap.get("image").get(1)); +    }
+
+    @Test
+    public void testPDFAMode() throws Exception {
+        parseConfigMockUtil(createBuilder().setPDFAMode(PDFAMode.DISABLED.getName()));
 +        // DISABLED is the default setting, it doesn't need to be set
+        verify(pdfUtil, times(0)).setAMode(PDFAMode.DISABLED);
+
+        parseConfigMockUtil(createBuilder().setPDFAMode(PDFAMode.PDFA_1A.getName()));
 +        verify(pdfUtil, times(1)).setAMode(PDFAMode.PDFA_1A);
+
+        parseConfigMockUtil(createBuilder().setPDFAMode(PDFAMode.PDFA_1B.getName()));
 +        verify(pdfUtil, times(1)).setAMode(PDFAMode.PDFA_1B);
+    }
+
+    @Test
+    public void testPDFXMode() throws Exception {
+        parseConfigMockUtil(createBuilder().setPDFXMode(PDFXMode.DISABLED.getName()));
 +        // DISABLED is the default setting, it doesn't need to be set
+        verify(pdfUtil, times(0)).setXMode(PDFXMode.DISABLED);
+
+        parseConfigMockUtil(createBuilder().setPDFXMode(PDFXMode.PDFX_3_2003.getName()));
 +        verify(pdfUtil, times(1)).setXMode(PDFXMode.PDFX_3_2003);
+    }
+
+    @Test
+    public void testSetProfile() throws Exception {
+        String testString = "this string is purely for testing and has no contextual \
meaning"; +        parseConfigMockUtil(createBuilder().setOutputProfile(testString));
+        verify(pdfUtil).setOutputProfileURI(testString);
+    }
+
+    @Test
+    public void testDisableSRGBColourspace() throws Exception {
+        parseConfigMockUtil(createBuilder().disableSRGBColorSpace(true));
+        verify(pdfUtil).setDisableSRGBColorSpace(true);
+
+        parseConfigMockUtil(createBuilder().disableSRGBColorSpace(false));
+        verify(pdfUtil, times(0)).setDisableSRGBColorSpace(false);
+    }
+
+    @Test
+    public void testPDFVersion() throws Exception {
+        for (Version version : Version.values()) {
+            parseConfigMockUtil(createBuilder().setPDFVersion(version.toString()));
+            verify(pdfUtil).setPDFVersion(version);
+        }
+    }
 }

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java \
Thu May 31 08:33:36 2012 @@ -22,9 +22,12 @@ package org.apache.fop.render.pdf;
 import static org.junit.Assert.fail;
 
 import java.io.File;
+import java.io.IOException;
 
-import org.apache.fop.apps.FOUserAgent;
 import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import org.apache.fop.apps.FOUserAgent;
 
 /**
  * Tests the disables-srgb-colorspace setting.
@@ -33,6 +36,10 @@ public class PDFsRGBSettingsTestCase ext
 
     private File foBaseDir = new File("test/xml/pdf-a");
 
+    public PDFsRGBSettingsTestCase() throws SAXException, IOException {
+        super(getDefaultConfFile());
+    }
+
     private FOUserAgent getUserAgent(boolean enablePDFA) {
         final FOUserAgent a = fopFactory.newFOUserAgent();
         if (enablePDFA) {

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/ps/ImageHandlingTestCase.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java \
Thu May 31 08:33:36 2012 @@ -66,8 +66,7 @@ public class ImageHandlingTestCase exten
 
     private void innerTestJPEGImage(int level) throws Exception {
         FOUserAgent ua = fopFactory.newFOUserAgent();
-        PSDocumentHandler handler = new PSDocumentHandler();
-        handler.setContext(new IFContext(ua));
+        PSDocumentHandler handler = new PSDocumentHandler(new IFContext(ua));
         PSRenderingUtil psUtil = handler.getPSUtil();
         psUtil.setLanguageLevel(level);
         psUtil.setOptimizeResources(true);

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSPainterTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/ps/PSPainterTestCase.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSPainterTestCase.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSPainterTestCase.java \
Thu May 31 08:33:36 2012 @@ -17,6 +17,7 @@
 package org.apache.fop.render.ps;
 
 import java.io.IOException;
+import java.util.Collections;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -24,12 +25,15 @@ import org.mockito.verification.Verifica
 
 import org.apache.xmlgraphics.ps.PSGenerator;
 
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFState;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 public class PSPainterTestCase {
 
@@ -40,7 +44,12 @@ public class PSPainterTestCase {
 
     @Before
     public void setup() {
-        docHandler = new PSDocumentHandler();
+        state = IFState.create();
+        FOUserAgent userAgent = mock(FOUserAgent.class);
+        when(userAgent.getRendererOptions()).thenReturn(Collections.EMPTY_MAP);
+        IFContext context = mock(IFContext.class);
+        when(context.getUserAgent()).thenReturn(userAgent);
+        docHandler = new PSDocumentHandler(context);
         gen = mock(PSGenerator.class);
         docHandler.gen = gen;
         state = IFState.create();

Added: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfigParserTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/ps/PSRendererConfigParserTestCase.java?rev=1344594&view=auto
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfigParserTestCase.java \
                (added)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfigParserTestCase.java \
Thu May 31 08:33:36 2012 @@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.render.ps;
+
+import org.junit.Test;
+
+import org.apache.xmlgraphics.ps.PSGenerator;
+
+import org.apache.fop.apps.AbstractRendererConfigParserTester;
+import org.apache.fop.apps.PSRendererConfBuilder;
+import org.apache.fop.render.ps.PSRendererConfig.PSRendererConfigParser;
+
+import static org.junit.Assert.assertEquals;
+
+public class PSRendererConfigParserTestCase
+        extends AbstractRendererConfigParserTester<PSRendererConfBuilder, \
PSRendererConfig> { +
+    public PSRendererConfigParserTestCase() {
+        super(new PSRendererConfigParser(), PSRendererConfBuilder.class);
+    }
+
+    @Test
+    public void testAutoRotateLandscape() throws Exception {
+        boolean defaultVal = false;
+        boolean configuredVal = !defaultVal;
+        parseConfig(createRenderer());
+        assertEquals(defaultVal, conf.isAutoRotateLandscape());
+        parseConfig(createRenderer().setAutoRotateLandscape(configuredVal));
+        assertEquals(configuredVal, conf.isAutoRotateLandscape());
+    }
+
+    @Test
+    public void testSafeSetPageDevice() throws Exception {
+        boolean defaultVal = false;
+        boolean configuredVal = !defaultVal;
+        parseConfig(createRenderer());
+        assertEquals(defaultVal, conf.isSafeSetPageDevice());
+        parseConfig(createRenderer().setSafeSetPageDevice(configuredVal));
+        assertEquals(configuredVal, conf.isSafeSetPageDevice());
+    }
+
+    @Test
+    public void testDscCompliant() throws Exception {
+        boolean defaultVal = true;
+        boolean configuredVal = !defaultVal;
+        parseConfig(createRenderer());
+        assertEquals(defaultVal, conf.isDscComplianceEnabled());
+        parseConfig(createRenderer().setDscCompliant(configuredVal));
+        assertEquals(configuredVal, conf.isDscComplianceEnabled());
+    }
+
+    @Test
+    public void testLanguageLevel() throws Exception {
+        Integer defaultVal = PSGenerator.DEFAULT_LANGUAGE_LEVEL;
+        Integer configuredVal = defaultVal + 1;
+        parseConfig(createRenderer());
+        assertEquals(defaultVal, conf.getLanguageLevel());
+        parseConfig(createRenderer().setLanguageLevel(configuredVal));
+        assertEquals(configuredVal, conf.getLanguageLevel());
+    }
+
+    @Test
+    public void testOptimizeResources() throws Exception {
+        boolean defaultVal = false;
+        boolean configuredVal = !defaultVal;
+        parseConfig(createRenderer());
+        assertEquals(defaultVal, conf.isOptimizeResources());
+        parseConfig(createRenderer().setOptimizeResources(configuredVal));
+        assertEquals(configuredVal, conf.isOptimizeResources());
+    }
+}

Propchange: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfigParserTestCase.java
                
------------------------------------------------------------------------------
    svn:eol-style = native

Added: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfiguratorTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/ps/PSRendererConfiguratorTestCase.java?rev=1344594&view=auto
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfiguratorTestCase.java \
                (added)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfiguratorTestCase.java \
Thu May 31 08:33:36 2012 @@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.fop.render.ps;
+
+import org.junit.Test;
+
+import org.apache.fop.apps.AbstractRendererConfiguratorTest;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.apps.PSRendererConfBuilder;
+import org.apache.fop.render.ps.PSRendererConfig.PSRendererConfigParser;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
+
+public class PSRendererConfiguratorTestCase extends
+        AbstractRendererConfiguratorTest<PSRendererConfigurator, \
PSRendererConfBuilder> { +    private PSRenderingUtil psUtil;
+
+    public PSRendererConfiguratorTestCase() {
+        super(MimeConstants.MIME_POSTSCRIPT, PSRendererConfBuilder.class, \
PSDocumentHandler.class); +    }
+
+    @Override
+    public PSRendererConfigurator createConfigurator() {
+        return new PSRendererConfigurator(userAgent, new PSRendererConfigParser());
+    }
+
+    @Override
+    public void setUpDocumentHandler() {
+        psUtil = new PSRenderingUtil(userAgent);
+        when(((PSDocumentHandler) docHandler).getPSUtil()).thenReturn(psUtil);
+    }
+
+    @Test
+    public void testAutoRotateLandscape() throws Exception {
+        parseConfig(createBuilder().setAutoRotateLandscape(true));
+        assertTrue(psUtil.isAutoRotateLandscape());
+
+        parseConfig(createBuilder().setAutoRotateLandscape(false));
+        assertFalse(psUtil.isAutoRotateLandscape());
+
+        parseConfig(createBuilder());
+        assertFalse(psUtil.isAutoRotateLandscape());
+    }
+
+    @Test
+    public void testLanguageLevel() throws Exception {
+        parseConfig(createBuilder().setLanguageLevel(2));
+        assertEquals(2, psUtil.getLanguageLevel());
+
+        parseConfig(createBuilder().setLanguageLevel(3));
+        assertEquals(3, psUtil.getLanguageLevel());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testLanguageLevelTestCase() throws Exception {
+        parseConfig(createBuilder().setLanguageLevel(1));
+        assertEquals(1, psUtil.getLanguageLevel());
+    }
+
+    @Test
+    public void testOptimizeResources() throws Exception {
+        parseConfig(createBuilder().setOptimizeResources(true));
+        assertTrue(psUtil.isOptimizeResources());
+
+        parseConfig(createBuilder().setOptimizeResources(false));
+        assertFalse(psUtil.isOptimizeResources());
+
+        parseConfig(createBuilder());
+        assertFalse(psUtil.isOptimizeResources());
+    }
+
+    @Test
+    public void testSafeSetPageDevice() throws Exception {
+        parseConfig(createBuilder().setSafeSetPageDevice(true));
+        assertTrue(psUtil.isSafeSetPageDevice());
+
+        parseConfig(createBuilder().setSafeSetPageDevice(false));
+        assertFalse(psUtil.isSafeSetPageDevice());
+
+        parseConfig(createBuilder());
+        assertFalse(psUtil.isSafeSetPageDevice());
+    }
+
+    @Test
+    public void testDscComplianceEnabled() throws Exception {
+        parseConfig(createBuilder().setDscCompliant(true));
+        assertTrue(psUtil.isDSCComplianceEnabled());
+
+        parseConfig(createBuilder().setDscCompliant(false));
+        assertFalse(psUtil.isDSCComplianceEnabled());
+
+        parseConfig(createBuilder());
+        assertTrue(psUtil.isDSCComplianceEnabled());
+    }
+}

Propchange: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/PSRendererConfiguratorTestCase.java
                
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/ps/ResourceOptimizationTestCase.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java \
Thu May 31 08:33:36 2012 @@ -67,8 +67,7 @@ public class ResourceOptimizationTestCas
     @Test
     public void testResourceOptimization() throws Exception {
         FOUserAgent ua = fopFactory.newFOUserAgent();
-        PSDocumentHandler handler = new PSDocumentHandler();
-        handler.setContext(new IFContext(ua));
+        PSDocumentHandler handler = new PSDocumentHandler(new IFContext(ua));
         // This is the important part: we're enabling resource optimization
         handler.getPSUtil().setOptimizeResources(true);
         ua.setDocumentHandlerOverride(handler);

Added: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java?rev=1344594&view=auto
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java \
                (added)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java \
Thu May 31 08:33:36 2012 @@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.render.txt;
+
+import org.junit.Test;
+
+import org.apache.fop.apps.AbstractRendererConfigParserTester;
+import org.apache.fop.apps.TxtRendererConfBuilder;
+import org.apache.fop.render.RendererConfig.RendererConfigParser;
+import org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigOptions;
+import org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigParser;
+
+import static org.junit.Assert.assertEquals;
+
+public class TxtRendererConfigParserTestCase
+        extends AbstractRendererConfigParserTester<TxtRendererConfBuilder, \
TxtRendererConfig> { +
+    public TxtRendererConfigParserTestCase() {
+        super(new TxtRendererConfigParser(), TxtRendererConfBuilder.class);
+    }
+
+    @Test
+    public void testEncoding() throws Exception {
+        parseConfig(createRenderer().setEncoding("UTF-16"));
+        assertEquals("UTF-16", conf.getEncoding());
+
+        // Check validation isn't done at this point
+        parseConfig(createRenderer().setEncoding("RandomString"));
+        assertEquals("RandomString", conf.getEncoding());
+
+        // Check the default behaviour is expected
+        parseConfig(createRenderer());
+        assertEquals(TxtRendererConfigOptions.ENCODING.getDefaultValue(), \
conf.getEncoding()); +    }
+
+}

Propchange: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/render/txt/TxtRendererConfigParserTestCase.java
                
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/threading/FOProcessorImpl.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/threading/FOProcessorImpl.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/threading/FOProcessorImpl.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/threading/FOProcessorImpl.java \
Thu May 31 08:33:36 2012 @@ -19,8 +19,11 @@
 
 package org.apache.fop.threading;
 
+import java.io.File;
 import java.io.OutputStream;
 import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 
 import javax.xml.transform.Result;
@@ -31,6 +34,8 @@ import javax.xml.transform.TransformerEx
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXResult;
 
+import org.xml.sax.SAXException;
+
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
@@ -50,32 +55,39 @@ import org.apache.fop.apps.MimeConstants
 public class FOProcessorImpl extends AbstractLogEnabled
             implements Processor, Configurable, Initializable {
 
-    private FopFactory fopFactory = FopFactory.newInstance();
+    private FopFactory fopFactory;
     private TransformerFactory factory = TransformerFactory.newInstance();
-    private String userconfig;
+    private URI userconfig;
     private String mime;
     private String fileExtension;
 
     /** {@inheritDoc} */
     public void configure(Configuration configuration) throws ConfigurationException \
                {
-        this.userconfig = configuration.getChild("userconfig").getValue(null);
-        this.mime = configuration.getChild("mime").getValue(MimeConstants.MIME_PDF);
-        this.fileExtension = configuration.getChild("extension").getValue(".pdf");
+        try {
+            this.userconfig = new \
URI(configuration.getChild("userconfig").getValue(null)); +            this.mime = \
configuration.getChild("mime").getValue(MimeConstants.MIME_PDF); +            \
this.fileExtension = configuration.getChild("extension").getValue(".pdf"); +        } \
catch (URISyntaxException use) { +            throw new RuntimeException(use);
+        }
     }
 
-    /** {@inheritDoc} */
     public void initialize() throws Exception {
         if (this.userconfig != null) {
             getLogger().debug("Setting user config: " + userconfig);
-            fopFactory.setUserConfig(this.userconfig);
+            fopFactory = FopFactory.newInstance(new File(userconfig));
+        } else {
+            fopFactory = FopFactory.newInstance(new File(".").toURI());
         }
     }
 
-    /** {@inheritDoc} */
+    /** {@inheritDoc} 
+     * @throws URISyntaxException 
+     * @throws SAXException */
     public void process(Source src, Templates templates, OutputStream out)
-                throws org.apache.fop.apps.FOPException, java.io.IOException {
+            throws java.io.IOException, URISyntaxException, SAXException {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
-        foUserAgent.setBaseURL(src.getSystemId());
+
         try {
             URL url = new URL(src.getSystemId());
             String filename = FilenameUtils.getName(url.getPath());

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/threading/IFProcessorImpl.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/threading/IFProcessorImpl.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/threading/IFProcessorImpl.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/threading/IFProcessorImpl.java \
Thu May 31 08:33:36 2012 @@ -19,6 +19,7 @@
 
 package org.apache.fop.threading;
 
+import java.io.File;
 import java.io.OutputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -56,7 +57,7 @@ import org.apache.fop.render.intermediat
 public class IFProcessorImpl extends AbstractLogEnabled
             implements Processor, Configurable, Initializable {
 
-    private FopFactory fopFactory = FopFactory.newInstance();
+    private FopFactory fopFactory;
     private TransformerFactory factory = TransformerFactory.newInstance();
     private String userconfig;
     private String mime;
@@ -73,7 +74,9 @@ public class IFProcessorImpl extends Abs
     public void initialize() throws Exception {
         if (this.userconfig != null) {
             getLogger().debug("Setting user config: " + userconfig);
-            fopFactory.setUserConfig(this.userconfig);
+            fopFactory = FopFactory.newInstance(new File(this.userconfig));
+        } else {
+            fopFactory = FopFactory.newInstance(new File(".").toURI());
         }
     }
 
@@ -82,7 +85,6 @@ public class IFProcessorImpl extends Abs
     public void process(Source src, Templates templates, OutputStream out)
                 throws org.apache.fop.apps.FOPException, java.io.IOException, \
IFException {  FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
-        foUserAgent.setBaseURL(src.getSystemId());
         try {
             URL url = new URL(src.getSystemId());
             String filename = FilenameUtils.getName(url.getPath());

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/util/ColorUtilTestCase.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/util/ColorUtilTestCase.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/util/ColorUtilTestCase.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/util/ColorUtilTestCase.java \
Thu May 31 08:33:36 2012 @@ -19,27 +19,32 @@
 
 package org.apache.fop.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
 import java.awt.Color;
 import java.awt.color.ColorSpace;
+import java.io.File;
 import java.net.URI;
 
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.FopFactory;
+import org.junit.Test;
+
 import org.apache.xmlgraphics.java2d.color.ColorSpaces;
 import org.apache.xmlgraphics.java2d.color.ColorWithAlternatives;
 import org.apache.xmlgraphics.java2d.color.NamedColorSpace;
 import org.apache.xmlgraphics.java2d.color.RenderingIntent;
-import org.junit.Test;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopFactory;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Tests the ColorUtil class.
  */
 public class ColorUtilTestCase {
+    private FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI());
+    private final String thisDirectory = "file:" + new File("./").getAbsolutePath();
 
     /**
      * Test serialization to String.
@@ -105,7 +110,7 @@ public class ColorUtilTestCase {
      */
     @Test
     public void testRGB() throws Exception {
-        FopFactory fopFactory = FopFactory.newInstance();
+
         FOUserAgent ua = fopFactory.newFOUserAgent();
         Color colActual;
 
@@ -123,11 +128,10 @@ public class ColorUtilTestCase {
      */
     @Test
     public void testRGBICC() throws Exception {
-        FopFactory fopFactory = FopFactory.newInstance();
-        URI sRGBLoc = new URI(
-                "file:src/java/org/apache/fop/pdf/sRGB%20Color%20Space%20Profile.icm");
 +        FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI());
+        URI sRGBLoc = new \
URI("src/java/org/apache/fop/pdf/sRGB%20Color%20Space%20Profile.icm");  ColorSpace cs \
                = fopFactory.getColorSpaceCache().get(
-                "sRGBAlt", null, sRGBLoc.toASCIIString(), RenderingIntent.AUTO);
+                "sRGBAlt", thisDirectory, sRGBLoc.toASCIIString(), \
RenderingIntent.AUTO);  assertNotNull("Color profile not found", cs);
 
         FOUserAgent ua = fopFactory.newFOUserAgent();
@@ -293,10 +297,10 @@ public class ColorUtilTestCase {
      */
     @Test
     public void testNamedColorProfile() throws Exception {
-        FopFactory fopFactory = FopFactory.newInstance();
-        URI ncpLoc = new URI("file:test/resources/color/ncp-example.icc");
+        FopFactory fopFactory = FopFactory.newInstance(new File("./").toURI());
+        URI ncpLoc = new URI("test/resources/color/ncp-example.icc");
         ColorSpace cs = fopFactory.getColorSpaceCache().get(
-                "NCP", null, ncpLoc.toASCIIString(), RenderingIntent.AUTO);
+                "NCP", thisDirectory, ncpLoc.toASCIIString(), RenderingIntent.AUTO);
         assertNotNull("Color profile not found", cs);
 
         FOUserAgent ua = fopFactory.newFOUserAgent();

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/AbstractBitmapProducer.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/visual/AbstractBitmapProducer.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/AbstractBitmapProducer.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/AbstractBitmapProducer.java \
Thu May 31 08:33:36 2012 @@ -19,6 +19,8 @@
 
 package org.apache.fop.visual;
 
+import java.net.URI;
+
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 
@@ -32,6 +34,11 @@ public abstract class AbstractBitmapProd
 
     /** Logger */
     protected static Log log = LogFactory.getLog(AbstractBitmapProducer.class);
+    final URI baseUri;
+
+    public AbstractBitmapProducer(URI baseUri) {
+        this.baseUri = baseUri;
+    }
 
     /**
      * Returns a new JAXP Transformer based on information in the ProducerContext.

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java \
Thu May 31 08:33:36 2012 @@ -25,6 +25,7 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.net.URI;
 import java.text.MessageFormat;
 
 import javax.xml.transform.Transformer;
@@ -68,13 +69,18 @@ public abstract class AbstractPSPDFBitma
             implements Configurable {
 
     // configure fopFactory as desired
-    private FopFactory fopFactory = FopFactory.newInstance();
+    private final FopFactory fopFactory;
 
     private String converter;
     private boolean deleteTempFiles;
     /** the bitmap producer's target format */
     protected String targetFormat;
 
+    public AbstractPSPDFBitmapProducer(URI baseUri) {
+        super(baseUri);
+        fopFactory = FopFactory.newInstance(baseUri);
+    }
+
     /** {@inheritDoc} */
     public void configure(Configuration cfg) throws ConfigurationException {
         this.converter = cfg.getChild("converter").getValue();
@@ -122,7 +128,6 @@ public abstract class AbstractPSPDFBitma
         try {
             FOUserAgent userAgent = fopFactory.newFOUserAgent();
             userAgent.setTargetResolution(context.getTargetResolution());
-            userAgent.setBaseURL(src.getParentFile().toURI().toURL().toString());
 
             File tempOut = new File(context.getTargetDir(),
                     src.getName() + "." + index + "." + getTargetExtension());

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BatchDiffer.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/visual/BatchDiffer.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BatchDiffer.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BatchDiffer.java \
Thu May 31 08:33:36 2012 @@ -22,6 +22,7 @@ package org.apache.fop.visual;
 import java.awt.image.BufferedImage;
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.util.Collection;
 
 import javax.xml.transform.TransformerConfigurationException;
@@ -141,13 +142,16 @@ public class BatchDiffer {
                     throw new RuntimeException("Error setting up stylesheet");
                 }
             }
-            BitmapProducer[] producers = getProducers(cfg.getChild("producers"));
+
 
             //Set up directories
             File srcDir = new File(cfg.getChild("source-directory").getValue());
             if (!srcDir.exists()) {
                 throw new RuntimeException("source-directory does not exist: " + \
srcDir);  }
+
+            BitmapProducer[] producers = getProducers(cfg.getChild("producers"), \
srcDir); +
             final File targetDir = new \
File(cfg.getChild("target-directory").getValue());  if (!targetDir.mkdirs() && \
                !targetDir.exists()) {
                 throw new RuntimeException("target-directory is invalid: " + \
targetDir); @@ -249,13 +253,15 @@ public class BatchDiffer {
         }
     }
 
-    private BitmapProducer[] getProducers(Configuration cfg) {
+    private BitmapProducer[] getProducers(Configuration cfg, File srcDir) {
         Configuration[] children = cfg.getChildren("producer");
         BitmapProducer[] producers = new BitmapProducer[children.length];
         for (int i = 0; i < children.length; i++) {
             try {
                 Class<?> clazz = \
                Class.forName(children[i].getAttribute("classname"));
-                producers[i] = (BitmapProducer)clazz.newInstance();
+                Object producer = clazz.getDeclaredConstructor(URI.class)
+                                       .newInstance(srcDir.toURI());
+                producers[i] = (BitmapProducer) producer;
                 ContainerUtil.configure(producers[i], children[i]);
             } catch (Exception e) {
                 log.error("Error setting up producers", e);

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerJava2D.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/visual/BitmapProducerJava2D.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerJava2D.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerJava2D.java \
Thu May 31 08:33:36 2012 @@ -24,6 +24,7 @@ import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.OutputStream;
+import java.net.URI;
 
 import javax.xml.transform.Transformer;
 import javax.xml.transform.sax.SAXResult;
@@ -56,10 +57,15 @@ import org.apache.fop.util.DefaultErrorL
 public class BitmapProducerJava2D extends AbstractBitmapProducer implements \
Configurable {  
     // configure fopFactory as desired
-    private FopFactory fopFactory = FopFactory.newInstance();
+    private final FopFactory fopFactory;
 
     private boolean deleteTempFiles;
 
+    public BitmapProducerJava2D(URI baseUri) {
+        super(baseUri);
+        fopFactory = FopFactory.newInstance(baseUri);
+    }
+
     /** @see org.apache.avalon.framework.configuration.Configurable */
     public void configure(Configuration cfg) throws ConfigurationException {
         this.deleteTempFiles = \
cfg.getChild("delete-temp-files").getValueAsBoolean(true); @@ -70,7 +76,6 @@ public \
class BitmapProducerJava2D extend  try {
             FOUserAgent userAgent = fopFactory.newFOUserAgent();
             userAgent.setTargetResolution(context.getTargetResolution());
-            userAgent.setBaseURL(src.getParentFile().toURI().toURL().toString());
 
             File outputFile = new File(context.getTargetDir(),
                     src.getName() + "." + index + ".java2d.png");

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerPDF.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/visual/BitmapProducerPDF.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerPDF.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerPDF.java \
Thu May 31 08:33:36 2012 @@ -19,6 +19,8 @@
 
 package org.apache.fop.visual;
 
+import java.net.URI;
+
 import org.apache.fop.apps.MimeConstants;
 
 /**
@@ -32,7 +34,8 @@ public class BitmapProducerPDF extends A
     /**
      * Default constructor.
      */
-    public BitmapProducerPDF() {
+    public BitmapProducerPDF(URI baseUri) {
+        super(baseUri);
         this.targetFormat = MimeConstants.MIME_PDF;
     }
 

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerPS.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/visual/BitmapProducerPS.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerPS.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/BitmapProducerPS.java \
Thu May 31 08:33:36 2012 @@ -19,6 +19,8 @@
 
 package org.apache.fop.visual;
 
+import java.net.URI;
+
 import org.apache.fop.apps.MimeConstants;
 
 /**
@@ -32,7 +34,8 @@ public class BitmapProducerPS extends Ab
     /**
      * Default constructor.
      */
-    public BitmapProducerPS() {
+    public BitmapProducerPS(URI baseUri) {
+        super(baseUri);
         this.targetFormat = MimeConstants.MIME_POSTSCRIPT;
     }
 

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/j \
ava/org/apache/fop/visual/ReferenceBitmapLoader.java?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java \
Thu May 31 08:33:36 2012 @@ -21,6 +21,7 @@ package org.apache.fop.visual;
 
 import java.awt.image.BufferedImage;
 import java.io.File;
+import java.net.URI;
 
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
@@ -42,6 +43,10 @@ public class ReferenceBitmapLoader exten
 
     private File bitmapDirectory;
 
+    public ReferenceBitmapLoader(URI baseUri) {
+        super(baseUri);
+    }
+
     /** @see org.apache.avalon.framework.configuration.Configurable */
     public void configure(Configuration cfg) throws ConfigurationException {
         this.bitmapDirectory = new File(cfg.getChild("directory").getValue(null));

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/afp-extension_1.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/afp-extension_1.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/afp-extension_1.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/afp-extension_1.xml \
Thu May 31 08:33:36 2012 @@ -30,7 +30,7 @@
       <fo:layout-master-set>
         <fo:simple-page-master master-name="normal" page-width="5in" \
page-height="5in">  <afp:include-page-overlay name="O1SAMP1 "/>
-          <afp:include-page-segment name="S1ISLOGO" \
src="../../resources/images/bgimg300dpi.jpg"/> +          <afp:include-page-segment \
                name="S1ISLOGO" src="../resources/images/bgimg300dpi.jpg"/>
           <afp:tag-logical-element name="The TLE Name" value="The TLE Value"/>
           <afp:no-operation name="My NOP">insert up to 32k of character data \
here!</afp:no-operation>  <fo:region-body/>
@@ -38,7 +38,7 @@
       </fo:layout-master-set>
       
       <fo:declarations>
-        <afp:include-form-map name="FORMMAP1" \
src="file:../../resources/afp/F1SAMPLE.afp"/> +        <afp:include-form-map \
name="FORMMAP1" src="file:../resources/afp/F1SAMPLE.afp"/>  </fo:declarations>
       
       <fo:page-sequence master-reference="normal" fox:test-ignore="this">
@@ -53,7 +53,7 @@
   </fo>
   <checks xmlns:afp="apache:fop:extensions:afp">
     <eval expected="FORMMAP1" \
                xpath="/areaTree/extension-attachments/afp:include-form-map/@name"/>
-    <eval expected="file:../../resources/afp/F1SAMPLE.afp" \
xpath="/areaTree/extension-attachments/afp:include-form-map/@src"/> +    <eval \
expected="file:../resources/afp/F1SAMPLE.afp" \
xpath="/areaTree/extension-attachments/afp:include-form-map/@src"/>  
     <eval expected="4" \
xpath="count(/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*)"/>
                
     <eval expected="O1SAMP1 " \
xpath="/areaTree/pageSequence/pageViewport[@nr=1]/page/extension-attachments/child::*[1]/@name"/>
 @@ -74,7 +74,7 @@
   <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate"
         xmlns:afp="apache:fop:extensions:afp">
     <eval expected="FORMMAP1" \
                xpath="/if:document/if:header/afp:include-form-map/@name"/>
-    <eval expected="file:../../resources/afp/F1SAMPLE.afp" \
xpath="/if:document/if:header/afp:include-form-map/@src"/> +    <eval \
expected="file:../resources/afp/F1SAMPLE.afp" \
xpath="/if:document/if:header/afp:include-form-map/@src"/>  
     <eval expected="4" xpath="count(//if:page[@name = \
                '1']/if:page-header/child::*)"/>
     <eval expected="O1SAMP1 " xpath="//if:page[@name = \
'1']/if:page-header/afp:include-page-overlay[1]/@name"/>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/basic-link_background-image.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/basic-link_background-image.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/basic-link_background-image.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/basic-link_background-image.xml \
Thu May 31 08:33:36 2012 @@ -23,7 +23,7 @@
     </p>
   </info>
   <variables>
-    <img>../../resources/images/bgimg300dpi.jpg</img>
+    <img>../resources/images/bgimg300dpi.jpg</img>
   </variables>
   <fo>
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
@@ -44,7 +44,7 @@
   <checks>
     <eval expected="197376" xpath="//flow/block/lineArea/inlineparent/@ipd"/>
     <eval expected="88800" xpath="//flow/block/lineArea/inlineparent/@bpd"/>
-    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=21360" \
xpath="//flow/block/lineArea/inlineparent/@background"/> +    <eval \
expected="color=#ffff00,url=../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=21360" \
xpath="//flow/block/lineArea/inlineparent/@background"/>  </checks>
   <if-checks xmlns:n="http://xmlgraphics.apache.org/fop/intermediate/document-navigation">
  <eval expected="page-trailer" xpath="local-name(//n:link/..)"/>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/basic-link_background-image_writing-mode_rl.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/basic-link_background-image_writing-mode_rl.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/basic-link_background-image_writing-mode_rl.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/basic-link_background-image_writing-mode_rl.xml \
Thu May 31 08:33:36 2012 @@ -23,7 +23,7 @@
     </p>
   </info>
   <variables>
-    <img>../../resources/images/bgimg300dpi.jpg</img>
+    <img>../resources/images/bgimg300dpi.jpg</img>
   </variables>
   <fo>
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
@@ -44,7 +44,7 @@
   <checks>
     <eval expected="197376" xpath="//flow/block/lineArea/inlineparent/@ipd"/>
     <eval expected="88800" xpath="//flow/block/lineArea/inlineparent/@bpd"/>
-    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=21360" \
xpath="//flow/block/lineArea/inlineparent/@background"/> +    <eval \
expected="color=#ffff00,url=../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=21360" \
xpath="//flow/block/lineArea/inlineparent/@background"/>  </checks>
   <if-checks xmlns:n="http://xmlgraphics.apache.org/fop/intermediate/document-navigation">
  <eval expected="page-trailer" xpath="local-name(//n:link/..)"/>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/block-container_background-image_background-position-relative.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/block-container_background-image_background-position-relative.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/block-container_background-image_background-position-relative.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/block-container_background-image_background-position-relative.xml \
Thu May 31 08:33:36 2012 @@ -23,7 +23,7 @@
     </p>
   </info>
   <variables>
-    <img>../../resources/images/box1.png</img>
+    <img>../resources/images/box1.png</img>
   </variables>
   <fo>
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
@@ -97,22 +97,22 @@
   </fo>
   <checks>
     <!-- first container in row 1 -->
-    <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=0" \
xpath="//flow/block[1]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=0" \
xpath="//flow/block[1]/@background"/>  <!-- second container in row 1 -->
-    <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=27495" \
xpath="//flow/block[2]/@background"/> +    <eval \
expected="color=#008000,url=../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=27495" \
xpath="//flow/block[2]/@background"/>  <!-- third container in row 1 -->
-    <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=54991" \
xpath="//flow/block[3]/@background"/> +    <eval \
expected="color=#ffff00,url=../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=54991" \
xpath="//flow/block[3]/@background"/>  <!-- first container in row 2 -->
-    <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=0" \
xpath="//flow/block[4]/@background"/> +    <eval \
expected="color=#ffff00,url=../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=0" \
xpath="//flow/block[4]/@background"/>  <!-- second container in row 2 -->
-    <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=27495" \
xpath="//flow/block[5]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=27495" \
xpath="//flow/block[5]/@background"/>  <!-- third container in row 2 -->
-    <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=54991" \
xpath="//flow/block[6]/@background"/> +    <eval \
expected="color=#008000,url=../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=54991" \
xpath="//flow/block[6]/@background"/>  <!-- first container in row 3 -->
-    <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" \
xpath="//flow/block[7]/@background"/> +    <eval \
expected="color=#008000,url=../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" \
xpath="//flow/block[7]/@background"/>  <!-- second container in row 3 -->
-    <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=27495" \
xpath="//flow/block[8]/@background"/> +    <eval \
expected="color=#ffff00,url=../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=27495" \
xpath="//flow/block[8]/@background"/>  <!-- third container in row 3 -->
-    <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=54991" \
xpath="//flow/block[9]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=54991" \
xpath="//flow/block[9]/@background"/>  </checks>
 </testcase>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/block-container_background-image_background-repeat.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/block-container_background-image_background-repeat.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/block-container_background-image_background-repeat.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/block-container_background-image_background-repeat.xml \
Thu May 31 08:33:36 2012 @@ -23,7 +23,7 @@
     </p>
   </info>
   <variables>
-    <img>../../resources/images/bgimg300dpi.jpg</img>
+    <img>../resources/images/bgimg300dpi.jpg</img>
   </variables>
   <fo>
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" \
xmlns:svg="http://www.w3.org/2000/svg"> @@ -57,11 +57,11 @@
     </fo:root>
   </fo>
   <checks>
-    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-x,horiz=0,vertical=0" \
                xpath="//flow/block[1]/@background"/>
-    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-y,horiz=0,vertical=0" \
                xpath="//flow/block[2]/@background"/>
-    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat,horiz=0,vertical=0" \
                xpath="//flow/block[3]/@background"/>
-    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=0,vertical=0" \
                xpath="//flow/block[4]/@background"/>
-    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-x,horiz=0,vertical=10440" \
                xpath="//flow/block[5]/@background"/>
-    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-y,horiz=47940,vertical=0" \
xpath="//flow/block[6]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/bgimg300dpi.jpg,repeat=repeat-x,horiz=0,vertical=0" \
xpath="//flow/block[1]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/bgimg300dpi.jpg,repeat=repeat-y,horiz=0,vertical=0" \
xpath="//flow/block[2]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/bgimg300dpi.jpg,repeat=repeat,horiz=0,vertical=0" \
xpath="//flow/block[3]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=0,vertical=0" \
xpath="//flow/block[4]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/bgimg300dpi.jpg,repeat=repeat-x,horiz=0,vertical=10440" \
xpath="//flow/block[5]/@background"/> +    <eval \
expected="color=#0000ff,url=../resources/images/bgimg300dpi.jpg,repeat=repeat-y,horiz=47940,vertical=0" \
xpath="//flow/block[6]/@background"/>  </checks>
 </testcase>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/character_background-image.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/character_background-image.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/character_background-image.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/character_background-image.xml \
Thu May 31 08:33:36 2012 @@ -23,7 +23,7 @@
     </p>
   </info>
   <variables>
-    <img>../../resources/images/bgimg300dpi.jpg</img>
+    <img>../resources/images/bgimg300dpi.jpg</img>
   </variables>
   <fo>
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
@@ -43,7 +43,7 @@
     </fo:root>
   </fo>
   <checks>
-    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=8976,vertical=21360" \
                xpath="//flow/block[1]/lineArea/text[1]/@background"/>
-    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-9696,vertical=-840" \
xpath="//flow/block[1]/lineArea/text[3]/@background"/> +    <eval \
expected="color=#ffff00,url=../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=8976,vertical=21360" \
xpath="//flow/block[1]/lineArea/text[1]/@background"/> +    <eval \
expected="color=#ffff00,url=../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-9696,vertical=-840" \
xpath="//flow/block[1]/lineArea/text[3]/@background"/>  </checks>
 </testcase>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/color_1.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/color_1.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/color_1.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/color_1.xml \
Thu May 31 08:33:36 2012 @@ -30,7 +30,7 @@
         </fo:simple-page-master>
       </fo:layout-master-set>
       <fo:declarations>
-        <fo:color-profile src="../../../src/java/org/apache/fop/pdf/sRGB Color Space \
Profile.icm" color-profile-name="sRGB"/> +        <fo:color-profile \
src="../../src/java/org/apache/fop/pdf/sRGB Color Space Profile.icm" \
                color-profile-name="sRGB"/>
         <fo:color-profile src="nonexistent.icc" color-profile-name="unknown"/>
       </fo:declarations>
       <fo:page-sequence master-reference="normal" white-space-collapse="true">
@@ -54,7 +54,7 @@
     <eval expected="#ff0000" xpath="//block[1]//text/@color"/>
     <eval expected="#ff8000" xpath="//block[2]//text/@color"/>
     <eval expected="#ff8000" xpath="//block[3]//text/@color"/>
-    <eval expected="fop-rgb-icc(1.0,0.5,0.0,sRGB,&quot;../../../src/java/org/apache/fop/pdf/sRGB \
Color Space Profile.icm&quot;,1.0,0.5,0.0)" xpath="//block[4]//text/@color"/> +    \
<eval expected="fop-rgb-icc(1.0,0.5,0.0,sRGB,&quot;../../src/java/org/apache/fop/pdf/sRGB \
Color Space Profile.icm&quot;,1.0,0.5,0.0)" xpath="//block[4]//text/@color"/>  <eval \
                expected="#00ff00" xpath="//block[5]//text/@color"/>
     <eval expected="fop-rgb-icc(0.6,0.6,0.48000002,#CMYK,,0.0,0.0,0.2,0.4)" \
                xpath="//block[6]//text/@color"/>
     <eval expected="fop-rgb-icc(0.6,0.6,0.4,#CMYK,,0.0,0.0,0.2,0.4)" \
xpath="//block[7]//text/@color"/>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_basic.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_basic.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_basic.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_basic.xml \
Thu May 31 08:33:36 2012 @@ -33,7 +33,7 @@
         <fo:flow flow-name="xsl-region-body">
           <fo:block>plain external-graphic</fo:block>
           <fo:block background-color="orange">
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg"/>EOG
+            <fo:external-graphic src="../resources/images/bgimg300dpi.jpg"/>EOG
           </fo:block>
           <fo:block>EOF</fo:block>
         </fo:flow>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_bmp.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_bmp.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_bmp.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_bmp.xml \
Thu May 31 08:33:36 2012 @@ -33,11 +33,11 @@
         <fo:flow flow-name="xsl-region-body">
           <fo:block>BMP external-graphic 300dpi</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.bmp"/>EOG
+            <fo:external-graphic src="../resources/images/bgimg300dpi.bmp"/>EOG
           </fo:block>
           <fo:block>BMP external-graphic 72dpi</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg72dpi.bmp"/>EOG
+            <fo:external-graphic src="../resources/images/bgimg72dpi.bmp"/>EOG
           </fo:block>
           <fo:block>EOF</fo:block>
         </fo:flow>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_border_padding.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_border_padding.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_border_padding.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_border_padding.xml \
Thu May 31 08:33:36 2012 @@ -32,10 +32,10 @@
       <fo:page-sequence master-reference="normal" white-space-collapse="true">
         <fo:flow flow-name="xsl-region-body">
           <fo:block background-color="orange">
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" \
background-color="white"/> Normal font +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" border-style="solid" border-width="5pt 10pt \
20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"/> Normal font  \
</fo:block>  <fo:block background-color="yellow" font-size="140pt">
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" \
background-color="white"/> FO +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" border-style="solid" border-width="5pt 10pt \
20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"/> FO  </fo:block>
           <fo:block font-size="9pt">
            In both blocks we have a setting of border-width="5pt 10pt 20pt 15pt" \
padding="15pt 20pt 10pt 5pt" on the e-g.

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_breaking.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_breaking.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_breaking.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_breaking.xml \
Thu May 31 08:33:36 2012 @@ -35,17 +35,17 @@
       <fo:page-sequence master-reference="normal" white-space-collapse="true">
         <fo:flow flow-name="xsl-region-body">
           <fo:block>12 external-graphic elements - no space between them</fo:block>
-          <fo:block background-color="orange"><fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/></fo:block> +          <fo:block \
background-color="orange"><fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
                src="../resources/images/arrow_down_medium.png"/></fo:block>
           <fo:block>12 external-graphic elements - zwsp between them</fo:block>
-          <fo:block background-color="orange"><fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../../resources/images/arrow_down_medi  um.png"/></fo:block>
+          <fo:block background-color="orange"><fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/>&#x200b;<fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/>&#x200b;<fo:external-graphic \
                src="../resources/images/arrow_down_medium.png"/></fo:block>
           <fo:block>12 external-graphic elements - with spaces between every \
2nd</fo:block>  <fo:block background-color="orange">
-            <fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
                src="../../resources/images/arrow_down_medium.png"/>
-            <fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
                src="../../resources/images/arrow_down_medium.png"/>
-            <fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
                src="../../resources/images/arrow_down_medium.png"/>
-            <fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
                src="../../resources/images/arrow_down_medium.png"/>
-            <fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
                src="../../resources/images/arrow_down_medium.png"/>
-            <fo:external-graphic \
src="../../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../../resources/images/arrow_down_medium.png"/> +            \
<fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/> +            <fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/> +            <fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/> +            <fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/> +            <fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/> +            <fo:external-graphic \
src="../resources/images/arrow_up_medium.png"/><fo:external-graphic \
src="../resources/images/arrow_down_medium.png"/>  </fo:block>
         </fo:flow>
       </fo:page-sequence>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_bug37815.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_bug37815.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_bug37815.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_bug37815.xml \
Thu May 31 08:33:36 2012 @@ -32,10 +32,10 @@
       <fo:page-sequence master-reference="normal" white-space-collapse="true">
         <fo:flow flow-name="xsl-region-body">
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg72dpi.jpg" \
width="50%" content-width="scale-to-fit" content-height="100%" border="solid 1pt" \
background-color="yellow"/>EOG +            <fo:external-graphic \
src="../resources/images/bgimg72dpi.jpg" width="50%" content-width="scale-to-fit" \
content-height="100%" border="solid 1pt" background-color="yellow"/>EOG  </fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
width="50%" content-width="scale-to-fit" content-height="100%" border="solid 1pt" \
background-color="yellow"/>EOG +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" width="50%" content-width="scale-to-fit" \
content-height="100%" border="solid 1pt" background-color="yellow"/>EOG  </fo:block>
           <fo:block>EOF</fo:block>
         </fo:flow>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_content-height_content-width.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_content-height_content-width.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_content-height_content-width.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_content-height_content-width.xml \
Thu May 31 08:33:36 2012 @@ -33,7 +33,7 @@
         <fo:flow flow-name="xsl-region-body">
           <fo:block>plain external-graphic</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
content-height="200%" content-width="200%" />EOG +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" content-height="200%" content-width="200%" \
/>EOG  </fo:block>
           <fo:block>EOF</fo:block>
         </fo:flow>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_content-height_content-width_2.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_content-height_content-width_2.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_content-height_content-width_2.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_content-height_content-width_2.xml \
Thu May 31 08:33:36 2012 @@ -33,30 +33,30 @@
       <fo:page-sequence master-reference="normal" font-size="0" line-height="1">
         <fo:flow flow-name="xsl-region-body">
           <fo:block>
-            <fo:external-graphic id="img1" \
src="../../resources/images/bgimg72dpi.jpg"/> +            <fo:external-graphic \
id="img1" src="../resources/images/bgimg72dpi.jpg"/>  </fo:block>
           <fo:block>
-            <fo:external-graphic id="img2" \
src="../../resources/images/bgimg72dpi.jpg" +            <fo:external-graphic \
                id="img2" src="../resources/images/bgimg72dpi.jpg"
               inline-progression-dimension="250pt" \
                block-progression-dimension="250pt"
               content-height="scale-to-fit" content-width="scale-to-fit"/>
           </fo:block>
           <fo:block>
-            <fo:external-graphic id="img3" \
src="../../resources/images/bgimg72dpi.jpg" +            <fo:external-graphic \
                id="img3" src="../resources/images/bgimg72dpi.jpg"
               inline-progression-dimension="250pt" \
                block-progression-dimension="250pt"
               content-height="scale-down-to-fit" content-width="scale-down-to-fit"/>
           </fo:block>
           <fo:block>
-            <fo:external-graphic id="img4" \
src="../../resources/images/bgimg72dpi.jpg" +            <fo:external-graphic \
                id="img4" src="../resources/images/bgimg72dpi.jpg"
               inline-progression-dimension="250pt" \
                block-progression-dimension="250pt"
               content-height="scale-up-to-fit" content-width="scale-up-to-fit"/>
           </fo:block>
           <fo:block>
-            <fo:external-graphic id="img5" \
src="../../resources/images/bgimg300dpi.jpg" +            <fo:external-graphic \
                id="img5" src="../resources/images/bgimg300dpi.jpg"
               inline-progression-dimension="250pt" \
                block-progression-dimension="250pt"
               content-height="scale-down-to-fit" content-width="scale-down-to-fit"/>
           </fo:block>
           <fo:block>
-            <fo:external-graphic id="img6" \
src="../../resources/images/bgimg300dpi.jpg" +            <fo:external-graphic \
                id="img6" src="../resources/images/bgimg300dpi.jpg"
               inline-progression-dimension="250pt" \
                block-progression-dimension="250pt"
               content-height="scale-up-to-fit" content-width="scale-up-to-fit"/>
           </fo:block>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_display-align.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_display-align.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_display-align.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_display-align.xml \
Thu May 31 08:33:36 2012 @@ -33,23 +33,23 @@
         <fo:flow flow-name="xsl-region-body">
           <fo:block>plain external-graphic</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
block-progression-dimension="60pt" background-color="yellow"/>EOG +            \
<fo:external-graphic src="../resources/images/bgimg300dpi.jpg" \
block-progression-dimension="60pt" background-color="yellow"/>EOG  </fo:block>
           <fo:block>external-graphic with display-align="auto"</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
display-align="auto" block-progression-dimension="60pt" \
background-color="yellow"/>EOG +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" display-align="auto" \
block-progression-dimension="60pt" background-color="yellow"/>EOG  </fo:block>
           <fo:block>external-graphic with display-align="before"</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
display-align="before" block-progression-dimension="60pt" \
background-color="yellow"/>EOG +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" display-align="before" \
block-progression-dimension="60pt" background-color="yellow"/>EOG  </fo:block>
           <fo:block>external-graphic with display-align="center"</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
display-align="center" block-progression-dimension="60pt" \
background-color="yellow"/>EOG +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" display-align="center" \
block-progression-dimension="60pt" background-color="yellow"/>EOG  </fo:block>
           <fo:block>external-graphic with display-align="after"</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" \
display-align="after" block-progression-dimension="60pt" \
background-color="yellow"/>EOG +            <fo:external-graphic \
src="../resources/images/bgimg300dpi.jpg" display-align="after" \
block-progression-dimension="60pt" background-color="yellow"/>EOG  </fo:block>
           <fo:block>EOF</fo:block>
         </fo:flow>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_emf.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_emf.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_emf.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_emf.xml \
Thu May 31 08:33:36 2012 @@ -33,7 +33,7 @@
         <fo:flow flow-name="xsl-region-body">
           <fo:block>EMF external-graphic</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/img.emf"/>EOG
+            <fo:external-graphic src="../resources/images/img.emf"/>EOG
           </fo:block>
           <fo:block>EOF</fo:block>
         </fo:flow>

Modified: xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_eps.xml
                
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_URI_Unification/test/l \
ayoutengine/standard-testcases/external-graphic_eps.xml?rev=1344594&r1=1344593&r2=1344594&view=diff
 ==============================================================================
--- xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_eps.xml \
                (original)
+++ xmlgraphics/fop/branches/Temp_URI_Unification/test/layoutengine/standard-testcases/external-graphic_eps.xml \
Thu May 31 08:33:36 2012 @@ -33,7 +33,7 @@
         <fo:flow flow-name="xsl-region-body">
           <fo:block>EPS external-graphic</fo:block>
           <fo:block>
-            <fo:external-graphic src="../../resources/images/barcode.eps"/>EOG
+            <fo:external-graphic src="../resources/images/barcode.eps"/>EOG
           </fo:block>
           <fo:block>EOF</fo:block>
         </fo:flow>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic